Skip to content

Commit 2e2f69a

Browse files
authored
Merge pull request #10245 from breadoven/abo_flight_timer_fix
Inflight timer fix
2 parents b67d58a + 2379a53 commit 2e2f69a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/fc/fc_core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,9 @@ void taskMainPidLoop(timeUs_t currentTimeUs)
880880
cycleTime = getTaskDeltaTime(TASK_SELF);
881881
dT = (float)cycleTime * 0.000001f;
882882

883-
if (ARMING_FLAG(ARMED) && (!STATE(FIXED_WING_LEGACY) || !isNavLaunchEnabled() || (isNavLaunchEnabled() && fixedWingLaunchStatus() >= FW_LAUNCH_DETECTED))) {
883+
bool fwLaunchIsActive = STATE(AIRPLANE) && isNavLaunchEnabled() && armTime == 0;
884+
885+
if (ARMING_FLAG(ARMED) && (!STATE(AIRPLANE) || !fwLaunchIsActive || fixedWingLaunchStatus() >= FW_LAUNCH_DETECTED)) {
884886
flightTime += cycleTime;
885887
armTime += cycleTime;
886888
updateAccExtremes();

0 commit comments

Comments
 (0)