Also backup members inside unions,

the code is a bit more complicated since unions can have structs or simple types. Also change Telemetry sensor to be a struct, since a class with all public is identical to a struct in C++
This commit is contained in:
Arne Schwabe
2016-03-29 16:05:32 +02:00
parent c24219cbcd
commit 86076bbf32
3 changed files with 94 additions and 19 deletions
+1 -3
View File
@@ -622,9 +622,7 @@ PACK(struct MavlinkTelemetryData {
*/
#if defined(CPUARM)
// TODO struct as others
PACK(class TelemetrySensor {
public:
PACK(struct TelemetrySensor {
union {
uint16_t id; // data identifier, for FrSky we can reuse existing ones. Source unit is derived from type.
uint16_t persistentValue;