Open ynielson opened 1 year ago
In test case, Test_LD_Execute_AutoFlying(), The app sent 4 "VehicleLandDetectedMsgs" with Landed state(TRUE), until it detect "Flying" state from AirSpeedMsg which was in the DataPipe. Also at this time, the Battery status warning was "PX4_BATTERY_WARNING_CRITICAL", it sent 4 "VehicleLandDetectedMsgs" with AltMax=10000.000000 and sent AltMax=5000.000000(which should be) after that.
In my observation, most of other Apps that receive PX4 Data Message through the DataPipe, they received all the PX4 Data in the pipe until there is no more message at a time in the Main loop.
But the LD app received only one PX4 Data in the pipe even though there are several more Data in the DataPipe. and waited for SCH Messages and executed LD_WAKEUP_MID or LD_SEND_HK_MID without Data information in the DataPipe. And then it read the next PX4 Data in the DataPipe and then Sch Message and so on..
When I did unit test for this App, I had to send one Data Message(ex: ActuatorArmedMsg/VehicleLocalPositionMsg/ AirspeedMsg/BatteryStatusMsg) and one Wakeup Message one by one until I send all the Data Messages that I needed to send.
Unless this App was tuned this way for it's own purpose, it may need to be tuned.
This also apply to the test case, Test_LD_Execute_AutoFlying().