WindhoverLabs / airliner

7 stars 3 forks source link

LD app sent obsolete VehicleLandDetectedMsg(AltMax) when the battery status was changed #342

Open ynielson opened 1 year ago

ynielson commented 1 year ago

When the LD app received Wakeup MID and detected a changed Battery Status(Warning: PX4_BATTERY_WARNING_LOW), It sent the previous "VehicleLandDetectedMsg.AltMax" value which was "10000.000000", though it calculated changed "altitude_max"(7500.000000) in this case.

It compared the Max Altitude status between the previous "VehicleLandDetectedMsg.AltMax" and the "prev_altitude_max", instead of using changed "altitude_max". Unless there is an intended reason, this may be an issue.

The app sent the changed value in the next VehicleLandDetectedMsg.AltMax, but depending on how often the message is to be sent and how often the app receives the changed data messages it may cause issues.

ynielson commented 1 year ago

As I mentioned in the ticket #349, it is intended that the time delay is needed before triggering Landed/GroundContact state. I sent one more WakeupMsg and received correctly changed AltMax in the VehicleLandDetectedMsg.

This may not be an issue or may need to be examined related with the ticket #349.