ArduPilot / ArduRemoteID

RemoteID support using OpenDroneID
GNU General Public License v2.0
90 stars 45 forks source link

init UAS payload in set_data #104

Closed BluemarkInnovations closed 1 year ago

BluemarkInnovations commented 1 year ago

In the current implementation, the UAS data variable that contains the RID payload is only initialized during boot. Also when a "valid" var like SelfIDValid is set to 1, it will remain 1 until the RID module reboots.

In the PR, the UAS data variable is initialized before filling it.

So if a packet payload has no valid data anymore (like location, system, selfID etc), do not broadcast it anymore. Otherwise the old, outdated, data would be used, as in the current implementation.

tridge commented 1 year ago

looks good, will test