Skip to content

Commit

Permalink
Merge pull request #10245 from breadoven/abo_flight_timer_fix
Browse files Browse the repository at this point in the history
Inflight timer fix
  • Loading branch information
breadoven authored Jul 19, 2024
2 parents b67d58a + 2379a53 commit 2e2f69a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/fc/fc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,9 @@ void taskMainPidLoop(timeUs_t currentTimeUs)
cycleTime = getTaskDeltaTime(TASK_SELF);
dT = (float)cycleTime * 0.000001f;

if (ARMING_FLAG(ARMED) && (!STATE(FIXED_WING_LEGACY) || !isNavLaunchEnabled() || (isNavLaunchEnabled() && fixedWingLaunchStatus() >= FW_LAUNCH_DETECTED))) {
bool fwLaunchIsActive = STATE(AIRPLANE) && isNavLaunchEnabled() && armTime == 0;

if (ARMING_FLAG(ARMED) && (!STATE(AIRPLANE) || !fwLaunchIsActive || fixedWingLaunchStatus() >= FW_LAUNCH_DETECTED)) {
flightTime += cycleTime;
armTime += cycleTime;
updateAccExtremes();
Expand Down

0 comments on commit 2e2f69a

Please sign in to comment.