public void stop(SimConnect connection) { startStruct start = new startStruct(registration, 1); connection.SetDataOnSimObject(DATA_DEF.AIRCRAFT_START, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG.DEFAULT, start); connection.RequestDataOnSimObject(DATA_REQUESTID.FLIGHT_DATA, DATA_DEF.FLIGHT_DATA, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD.NEVER, SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT, 0, 0, 0); }
public void start(SimConnect connection) { connection.SetDataOnSimObject(DATA_DEF.AIRCRAFT_FUEL, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG.DEFAULT, fuelState); int payloadPerStation = (int)(payloadWeight / aircraft.specifications.numPayloadStations); for (int c = 0; c < aircraft.specifications.numPayloadStations; c++) { setPayloadStation(connection, c + 1, payloadPerStation); } startStruct start = new startStruct(registration, 0); connection.SetDataOnSimObject(DATA_DEF.AIRCRAFT_START, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG.DEFAULT, start); connection.RequestDataOnSimObject(DATA_REQUESTID.FLIGHT_DATA, DATA_DEF.FLIGHT_DATA, SimConnect.SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD.SECOND, SIMCONNECT_DATA_REQUEST_FLAG.DEFAULT, 0, 0, 0); }