Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AFV improvements, volume + mute radio controls, better top-bar & minor fixes #250

Merged
merged 53 commits into from
Jan 6, 2025

Conversation

GeorgeBarlow
Copy link
Collaborator

@GeorgeBarlow GeorgeBarlow commented Jan 2, 2025

Improvements:

SDK Changes

New Properties

  • outputVolume: Controls individual station volume (0-100)
  • isOutputMuted: Controls muting state per station
  • mainOutputVolume: Controls global output volume (0-100)

New Inbound Events

Event Description Data Structure
kChangeStationVolume Adjust volume for station {"amount": number, "frequency": number}
kGetMainOutputVolume Requests the current main volume
kChangeMainOutputVolume Adjust global volume {"amount": number}

Volume Change Amounts

kChangeStationVolume: amount can be positive/negative to increase/decrease volume
kChangeMainOutputVolume: amount can be positive/negative to increase/decrease volume

New Outbound Events

Event Description Data Structure
kMainOutputVolumeChange Global volume changed/requested {"volume": number}

Modified Events

Station State Updates

Station state messages now include additional audio control fields:

{
 "type": "kStationStateUpdate",
 "value": {
   "outputVolume": number,  // 0-100
   "isOutputMuted": boolean,
   ...
 }
}

Station States Response

The kStationStates response array includes the new audio control fields for each station:

{
  "type": "kStationStates",  
  "value": {
    "stations": [
      {
        "outputVolume": number,
        "isOutputMuted": boolean,
        ...existing fields
      }
    ]
  }
}

RxEnd Updates

The kRxEnd response now includes lastRx array of station callsigns:

{
  "type": "kRxEnd",
  "value": {
    "callsign": string,
    "lastRx": string[],
    "pFrequencyHz": number
  }
}

@neilenns
Copy link
Contributor

neilenns commented Jan 3, 2025

Messing around with this and I've noticed a couple of things:

  1. I'm always getting two kRxBegin messages when a pilot calls up
  2. I can mute UNICOM and GUARD via the websocket interface, however the TrackAudio UI doesn't show the Rx button in red for those frequencies like it does for regular stations

@GeorgeBarlow
Copy link
Collaborator Author

GeorgeBarlow commented Jan 3, 2025

  1. I'm always getting two kRxBegin messages when a pilot calls up

Think this has always been the case?

  1. I can mute UNICOM and GUARD via the websocket interface, however the TrackAudio UI doesn't show the Rx button in red for those frequencies like it does for regular stations

Resolved

@GeorgeBarlow GeorgeBarlow merged commit cb5776d into main Jan 6, 2025
5 checks passed
@GeorgeBarlow GeorgeBarlow deleted the volume+minorfixes branch January 6, 2025 21:51
@GeheimagentNr1
Copy link

I just tested the current main branch (commit cb5776d) state, with the new volume system.
If I use the mouse wheel, a JavaScript error is shown in the console:
image
If I change the main volume below 50% the frequency is muted.

@neilenns
Copy link
Contributor

neilenns commented Jan 7, 2025

@GeheimagentNr1 Since it already got merged might as well open a bug for those

@GeorgeBarlow
Copy link
Collaborator Author

I just tested the current main branch (commit cb5776d) state, with the new volume system. If I use the mouse wheel, a JavaScript error is shown in the console: image If I change the main volume below 50% the frequency is muted.

Fixed

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.

3 participants