Closed Oru-Bus closed 3 months ago
Hi! SimConnectConstants.EVENT_ID_AP_ALT_VAR_INC
does not exist in node-simconnect so that is probably why get that error.
You need to bind the SimConnect event names to your own ID which you will use when calling transmitClientEvent
. The available event names can be found here.
Example:
const INCREMENT = 0
const DECREMENT = 1
handle.mapClientEventToSimEvent(INCREMENT, "AP_ALT_VAR_INC");
handle.mapClientEventToSimEvent(DECREMENT, "AP_ALT_VAR_DEC");
// more events
// ...
// Usage
handle.transmitClientEvent(
SimConnectConstants.OBJECT_ID_USER,
INCREMENT,
0, // The input value is not relevant for this event
1,
EventFlag.EVENT_FLAG_GROUPID_IS_PRIORITY
);
handle.transmitClientEvent(
SimConnectConstants.OBJECT_ID_USER,
DECREMENT,
0, // The input value is not relevant for this event
1,
EventFlag.EVENT_FLAG_GROUPID_IS_PRIORITY
);
EDIT: I have added a sample here.
Hello, I'd like to know if it's possible to manage the aircraft by sending it data, and if so, how? For example, we can find out the altitude of the autopilot by doing :
But is it possible to increase the autopilot altitude from node-simconnect?
For example, I tried :
But here's the error I got: