Skip to content

feat: add ACRE2 radio event tracking#76

Merged
fank merged 2 commits intomainfrom
feat/acre2-radio-tracking
Feb 21, 2026
Merged

feat: add ACRE2 radio event tracking#76
fank merged 2 commits intomainfrom
feat/acre2-radio-tracking

Conversation

@fank
Copy link
Member

@fank fank commented Feb 21, 2026

Summary

  • Replaces the commented-out WIP ACRE2 stub in fnc_addEventIntegrations.sqf with working acre_startedSpeaking / acre_stoppedSpeaking event handlers
  • Adds an "ACRE" processing branch in fnc_radioEvent.sqf that sends :RADIO: events in the same format as TFAR
  • Queries ACRE2 API for radio display name, channel, base class, and TX frequency; classifies PRC-343 as SR, all others as LR
  • Stores _radioId on the unit during start event since acre_stoppedSpeaking doesn't provide it

Test plan

  • Load with ACRE2 mod, start recording, press PTT — verify no script errors in RPT
  • Verify :RADIO: events appear in extension log with correct field data
  • Test with PRC-343 (should show SR) and PRC-152/PRC-117F (should show LR)
  • Test PTT release — verify Stop event fires with correct radio info
  • Verify TFAR tracking still works unchanged when ACRE2 is not loaded

Implement ACRE2 PTT tracking alongside existing TFAR support.
Captures radio name, channel, frequency, and SR/LR classification
using ACRE2 API functions and sends events through the same
:RADIO: extension command format.
@gemini-code-assist
Copy link

Summary of Changes

Hello @fank, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances radio event tracking capabilities by integrating full support for ACRE2. It allows for the detailed capture of radio transmissions, including specific radio models, channels, and frequencies, and ensures that both start and stop speaking events are reliably recorded. This integration provides a more complete and accurate picture of in-game radio communications for analysis and logging.

Highlights

  • ACRE2 Radio Event Tracking Implemented: The pull request introduces full support for ACRE2 radio event tracking, replacing a previously commented-out stub. This enables the system to capture when units start and stop speaking on ACRE2 radios.
  • Detailed Radio Information Capture: When a unit transmits via ACRE2, the system now queries the ACRE2 API to gather comprehensive details such as the radio's display name, current channel, base class, and transmitting frequency. Frequencies are rounded to three decimal places for consistency.
  • Radio Type Classification: Radios are automatically classified as either Short Range (SR) or Long Range (LR). Specifically, the PRC-343 radio is identified as SR, while all other ACRE2 radios are categorized as LR.
  • Robust Event Handling: To ensure accurate tracking of radio stop events, the _radioId is now temporarily stored on the transmitting unit during the acre_startedSpeaking event. This addresses the limitation that acre_stoppedSpeaking does not inherently provide the _radioId.
  • Dedicated ACRE2 Processing Branch: A new processing branch has been added to fnc_radioEvent.sqf specifically for ACRE2 events. This branch formats and dispatches :RADIO: events to the extension in a manner consistent with how TFAR events are handled.
Changelog
  • addons/recorder/fnc_addEventIntegrations.sqf
    • Uncommented and activated the ACRE2 event handler block.
    • Implemented acre_startedSpeaking event handler to extract radio details (display name, channel, base class, frequency) and classify radio type (SR/LR).
    • Added logic to store _radioId on the unit for subsequent acre_stoppedSpeaking events.
    • Implemented acre_stoppedSpeaking event handler to retrieve stored _radioId and dispatch stop events with full radio details.
  • addons/recorder/fnc_radioEvent.sqf
    • Added a new conditional block to process events specifically from the 'ACRE' mod.
    • Parsed ACRE2-specific radio event data, including unit, radio name, type, transmission type, channel, and frequency.
    • Included validation checks for _ocapId, _channel, and _freq before sending data.
    • Dispatched formatted :RADIO: events to the extension for ACRE2 transmissions.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully adds event tracking for ACRE2 radios, which is a great feature enhancement. The implementation correctly uses ACRE2 API functions and event handlers. My review focuses on improving maintainability by reducing code duplication between the acre_startedSpeaking and acre_stoppedSpeaking event handlers. I've provided specific suggestions to refactor this, which will also result in a minor performance improvement by avoiding redundant API calls.

Store computed radio name, type, channel, and frequency on the unit
during acre_startedSpeaking instead of re-querying ACRE2 API in the
stop handler. Radio settings can't change mid-transmission.
@fank fank merged commit f4ada8e into main Feb 21, 2026
1 check passed
@fank fank deleted the feat/acre2-radio-tracking branch February 21, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant