diff --git a/FSAutoSave/FSAutoSave.cpp b/FSAutoSave/FSAutoSave.cpp index f2a5509..3c3fe1b 100644 --- a/FSAutoSave/FSAutoSave.cpp +++ b/FSAutoSave/FSAutoSave.cpp @@ -462,7 +462,7 @@ void CALLBACK Dispatcher(SIMCONNECT_RECV* pData, DWORD cbData, void* pContext) printf("Aircraft Position: Not available or in Main Menu\n"); } else { - if (positionRequester == 0) { + // if (positionRequester == 0) { if (pS->sim_on_ground) { if (pS->airspeed < 1) { printf("Currently parked/stopped at Latitude: %f - Longitude: %f\n", pS->latitude, pS->longitude); @@ -472,10 +472,9 @@ void CALLBACK Dispatcher(SIMCONNECT_RECV* pData, DWORD cbData, void* pContext) } } else { - printf("Current position is Latitude: %f - Longitude: %f - Altitude: %.0f feet - Ground Speed: %.0f knots - Heading: %.0f degrees\n", pS->latitude, pS->longitude, pS->altitude, pS->airspeed, pS->mag_heading); - + printf("Current position is Latitude: %f - Longitude: %f - Altitude: %.0f feet - Ground Speed: %.0f knots - Heading: %.0f degrees - Flaps: %.0f degrees - IAS: %.0f feet/sec\n", pS->latitude, pS->longitude, pS->altitude, pS->airspeed, pS->mag_heading, pS->flaps, pS->IASinFPS); } - } + // } } break; } diff --git a/FSAutoSave/Utility.cpp b/FSAutoSave/Utility.cpp index 7447eba..e7ec45c 100644 --- a/FSAutoSave/Utility.cpp +++ b/FSAutoSave/Utility.cpp @@ -1026,8 +1026,6 @@ void finalSave() { // We ONLY save LAST.FLT as CustomFlight.FLT is used to start only FRESH flights if (!DEBUG) { - // Get the current position and the closest airport (including gate) - SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_CLOSEST_AIRPORT, 666, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); if (currentFlight == "LAST.FLT") { auto last_modified = fs::last_write_time(currentFlightPath); @@ -1041,6 +1039,10 @@ void finalSave() { } } } + + // Get the current position and the closest airport (including gate) + SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_CLOSEST_AIRPORT, 666, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); + } else { printf("\n[DEBUG] Will skip saving as we are in DEBUG mode\n"); @@ -1194,8 +1196,6 @@ void saveDuringPause() { // Save the situation (without needing to press CTRL+ALT+S or ESC) SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_SITUATION_SAVE, 98, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); - // Get the current position and the closest airport (including gate) - // SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_CLOSEST_AIRPORT, 666, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); } else { printf("\n[PAUSE EX1] Simulator is paused\n");