PX4-Autopilot
PX4-Autopilot copied to clipboard
fix wrong running status in app.h if start an app after stop it.
Solved Problem
I found that if I start hello example in the console, stop it, and start it again, the status is still running. Just like below:
pxh> hello start
hello starting.
hello
pxh> hello Doing work...
pxh> hello stop
pxh> Doing work...
goodbye
pxh> hello start
INFO [hello] already running
pxh> hello status
INFO [hello] is running
The problem could be showed in nsh shell also.
Solution
- Using a single variable instead of two to indicate the running status in app.h, which can solve the problem.
Context
This problem was reported before: https://discuss.px4.io/t/px4-hello-example-cannot-exit/33682