Skip to content

Add MSFS 2024 CommBus (Communication API) support#121

Draft
Copilot wants to merge 11 commits intomasterfrom
copilot/add-msfs2024-communication-api
Draft

Add MSFS 2024 CommBus (Communication API) support#121
Copilot wants to merge 11 commits intomasterfrom
copilot/add-msfs2024-communication-api

Conversation

Copy link
Copy Markdown

Copilot AI commented May 2, 2026

  • Fix skill: fixed-length string fields use the exact SDK-documented length per field, not always MAX_PATH
  • Fix skill: string | object parameter type only when SDK docs say the field is JSON; otherwise just string
  • Remove repository structure section from copilot-instructions.md to avoid maintenance overhead
  • Add instruction to read official SDK docs before writing any code for a new method

Copilot AI linked an issue May 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add support for new MSFS 2024 communication API Add MSFS 2024 CommBus (Communication API) support May 2, 2026
Copilot AI requested a review from EvenAR May 2, 2026 12:11
Copilot finished work on behalf of EvenAR May 2, 2026 12:11
@EvenAR EvenAR removed their request for review May 2, 2026 12:19
@EvenAR EvenAR assigned Copilot and unassigned EvenAR and Copilot May 2, 2026
@EvenAR
Copy link
Copy Markdown
Owner

EvenAR commented May 2, 2026

@copilot The users should be able to call callCommBusEvent with a payload that is either a string or an object that is converted to a JSON string before being sent. And RecvCommBus data should be an already decoded string.

Also for the new enum, use the enum definitions that are defined in the docs

enum SIMCONNECT_COMM_BUS_BROADCAST_TO
{
    SIMCONNECT_COMM_BUS_BROADCAST_TO_JS = 1 << 0;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_WASM = 1 << 1;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT = 1 << 3;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT_SELF_CALL = 1 << 4;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_DEFAULT = SIMCONNECT_COMM_BUS_BROADCAST_TO_JS | SIMCONNECT_COMM_BUS_BROADCAST_TO_WASM | SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_ALL_SIMCONNECT = SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT | SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT_SELF_CALL;
    SIMCONNECT_COMM_BUS_BROADCAST_TO_ALL = SIMCONNECT_COMM_BUS_BROADCAST_TO_JS | SIMCONNECT_COMM_BUS_BROADCAST_TO_WASM | SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT | SIMCONNECT_COMM_BUS_BROADCAST_TO_SIMCONNECT_SELF_CALL;
};

Copy link
Copy Markdown
Author

Copilot AI commented May 2, 2026

@copilot The users should be able to call callCommBusEvent with a payload that is either a string or an object that is converted to a JSON string before being sent. And RecvCommBus data should be an a...

Done in 08d69fd:

  • CommBusBroadcastTo enum now uses the exact values from the docs (JS, WASM, SIMCONNECT, SIMCONNECT_SELF_CALL, DEFAULT, ALL_SIMCONNECT, ALL)
  • callCommBusEvent now accepts string | object as the payload — objects are serialized with JSON.stringify before sending
  • RecvCommBus.data is now a string decoded from the raw bytes (UTF-8)

Copilot finished work on behalf of EvenAR May 2, 2026 12:54
Copilot finished work on behalf of EvenAR May 2, 2026 14:10
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.

New MSFS 2024 communication API

2 participants