mavlink/qgroundcontrol — Issue #4: Clarify what mavlink_system_t is for
Author: Susurrus
Created: 2012-01-24 01:46:37+00:00
State: open

This struct looks like its useful for creating a central data store for all the common system parameters that are either fairly constant and used within the heartbeat message and those used in other MAVLink messages. This struct seems useless as it's not used elsewhere in the code. It also doesn't fully store all the variables used within the heartbeat and so isn't useful for persistently storing that data (for example the autopilot type).

I'd suggest either removing everything except for the system_id and component_id so that it only stores data that is common to all MAVLink messages. Then I'd also recommend changing the function calls so that they just take a pointer to this struct instead of two separate arguments.

Another suggestion is to add the autopilot type element to this struct and then have the MAVLink heartbeat message merely take a pointer to this struct as its sole argument.