-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -873,7 +873,10 @@ void taskMainPidLoop(timeUs_t currentTimeUs) | |
if (!ARMING_FLAG(ARMED)) { | ||
armTime = 0; | ||
|
||
processDelayedSave(); | ||
// Delay saving for 0.5s to allow other functions to process save actions on disarm | ||
if (currentTimeUs - lastDisarmTimeUs > USECS_PER_SEC / 2) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
MrD-RC
Collaborator
|
||
processDelayedSave(); | ||
} | ||
} | ||
|
||
#if defined(SITL_BUILD) | ||
|
1 comment
on commit b6b5a98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@breadoven I don't think adding a delay is the right way to deal with this. The whole point of the processDelayedSave mechanism was for a single save event on disarm. Adding a delay, so that other things can save on disarm is counter intuitive.
We should not be delaying this. Any save on disarm should use the same mechanism, so there is only a single save event. That was the whole point of it. Which save actions were also being called on disarm? The only two I was aware of was stats and continuous servo trim.