iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.07k stars 1.46k forks source link

(VTOL) Flight timer stops in flight after switching from MC mode to FW mode when permanent FW autolaunch enabled. #10225

Closed glennvenghaus closed 1 month ago

glennvenghaus commented 1 month ago

Current Behavior

If you have permanent autolaunch enabled (like i have as no more switches and need the ability to either hand launch in autolaunch or use vtol to launch) , the flight timer stops when you switch after launch from MC mode into FW mode. It continues if you switch back into MC mode during landing. So while everything works as normal in flight in FW mode , apparently the flight timer thinks its not flying 😉 After landing the stats page also shows only the time spend in MC mode. When launching/autolaunching in FW mode and switch back to MC mode in flight this does not happen. (ps running v8 nightly master).

Steps to Reproduce

  1. Set the configuration for "permanently enable autolaunch in fixed wing mode"
  2. Launch in MC mode . Flight timer starts (OSD)
  3. Transition/switch to FW mode. Flight Timer stops (OSD)
  4. Switch back to MC mode Flight timer continues (OSD

Expected behavior

Flight timer should always continue running when armed and in flight regardless of the autolaunch (or any other) configuration

Suggested solution(s)

bugfix

Additional context


breadoven commented 1 month ago

It'll be a bug in the way the flight time is calculated that's not taking into consideration the fact you can now swap between MC and FW on the same platform. Needs a fix.