WindhoverLabs / airliner

7 stars 3 forks source link

LD app didn't detect Freefall state and GroundContact state in operational mode, LD_OP_MODE_AUTO #346

Open ynielson opened 1 year ago

ynielson commented 1 year ago

When I tested the Freefall state of the LD app by calling freefall_history.setState(TRUE) by force, the app didn't detect the Freefall state ever. The Freefall detection was fixed to return FALSE in the function, DetectFreeFall(), which was called every time the App woke up.

The GroundContact state was fixed to return FALSE too. Even though the app set the GroundContact state by checking the landed_history and detecting GroundContact state, logically GroundContact can never be TRUE in the function, UpdateState().