Hey!
I have been trying to set the "Brake Parking Position" SimVar, but it is not responding.
This is the code at the setting:
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_2, "BRAKE PARKING POSITION", "Bool", SIMCONNECT_DATATYPE_INT32);
hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_A);
hr = SimConnect_MapInputEventToClientEvent(hSimConnect, INPUT_KEYS, "J", EVENT_A);
hr = SimConnect_SetInputGroupState(hSimConnect, INPUT_KEYS, SIMCONNECT_STATE_ON);
hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP_KEYS, EVENT_A);
This is after receiving the event "EVENT_A":
test.brake = 1;
SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_2, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(test), &test);
Where "test" is an struct.
Any idea? Thanks beforehand.
I have been trying to set the "Brake Parking Position" SimVar, but it is not responding.
This is the code at the setting:
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_2, "BRAKE PARKING POSITION", "Bool", SIMCONNECT_DATATYPE_INT32);
hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_A);
hr = SimConnect_MapInputEventToClientEvent(hSimConnect, INPUT_KEYS, "J", EVENT_A);
hr = SimConnect_SetInputGroupState(hSimConnect, INPUT_KEYS, SIMCONNECT_STATE_ON);
hr = SimConnect_AddClientEventToNotificationGroup(hSimConnect, GROUP_KEYS, EVENT_A);
This is after receiving the event "EVENT_A":
test.brake = 1;
SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_2, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(test), &test);
Where "test" is an struct.
Any idea? Thanks beforehand.

