After a while I return with my homemade simulator. With FSX, Simconnect and VS C++.
From what the SDK says it is these but I don't get any reading.
From other variables that I have configured, it works.
TRAILING_EDGE_FLAPS_LEFT_ANGLE
AUTOPILOT_AUTO_THROTTLE_ARM
AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE
Can someone guide me. Thank you.
example:
From what the SDK says it is these but I don't get any reading.
From other variables that I have configured, it works.
TRAILING_EDGE_FLAPS_LEFT_ANGLE
AUTOPILOT_AUTO_THROTTLE_ARM
AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE
Can someone guide me. Thank you.
example:
C++:
static enum DATA_NAMES {
AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE,
AUTO_BRAKE_SWITCH_CB,
GEAR_CENTER_POSITION,
//--------
hr = SimConnect_AddToDataDefinition(SimuConmutaGethSimConnect, DEFINITION_ComuGet, "AUTOPILOT FLIGHT DIRECTOR ACTIVE", "Bool ",
SIMCONNECT_DATATYPE_FLOAT32, 0, AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE);
hr = SimConnect_RequestDataOnSimObject(SimuConmutaGethSimConnect, REQUEST_ComuGet, DEFINITION_ComuGet,
SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SIM_FRAME,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED | SIMCONNECT_DATA_REQUEST_FLAG_TAGGED);
//-------------------------
case SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
{
SIMCONNECT_RECV_SIMOBJECT_DATA *pObjData = (SIMCONNECT_RECV_SIMOBJECT_DATA*)pData;
switch (pObjData->dwRequestID)
{
case REQUEST_ComuGet:
{ int count = 0;
StructDatum *pS = (StructDatum*)&pObjData->dwData;
while (count < (int)pObjData->dwDefineCount)
{
Sleep(5); //<<<<----------------------------------------------------------------
switch (pS->datum[count].id)
{
case AUTOPILOT_FLIGHT_DIRECTOR_ACTIVE:
printf("\n AUTOPILOT FLIGHT DIRECTOR ACTIVE = %02.0f\n", (pS->datum[count].value));
cuantos = sprintf_s(bufferFormat, "L04%02d", (pS->datum[count].value));
break;


