File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -873,7 +873,10 @@ void taskMainPidLoop(timeUs_t currentTimeUs)
873873 if (!ARMING_FLAG (ARMED )) {
874874 armTime = 0 ;
875875
876- processDelayedSave ();
876+ // Delay saving for 0.5s to allow other functions to process save actions on disarm
877+ if (currentTimeUs - lastDisarmTimeUs > USECS_PER_SEC / 2 ) {
878+ processDelayedSave ();
879+ }
877880 }
878881
879882#if defined(SITL_BUILD )
Original file line number Diff line number Diff line change @@ -1263,7 +1263,8 @@ pidBank_t * pidBankMutable(void) {
12631263bool isFixedWingLevelTrimActive (void )
12641264{
12651265 return IS_RC_MODE_ACTIVE (BOXAUTOLEVEL ) && !areSticksDeflected () &&
1266- (FLIGHT_MODE (ANGLE_MODE ) || FLIGHT_MODE (HORIZON_MODE )) && !FLIGHT_MODE (SOARING_MODE ) &&
1266+ (FLIGHT_MODE (ANGLE_MODE ) || FLIGHT_MODE (HORIZON_MODE )) &&
1267+ !FLIGHT_MODE (SOARING_MODE ) && !FLIGHT_MODE (MANUAL_MODE ) &&
12671268 !navigationIsControllingAltitude ();
12681269}
12691270
You can’t perform that action at this time.
0 commit comments