mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
OP-1740: GetSet use enums. Need to pack the enums to retain byte compatibility.
This commit is contained in:
parent
0a7bd475f2
commit
604585f74e
@ -174,7 +174,7 @@ bool UAVObjectGeneratorFlight::process_object(ObjectInfo *info)
|
|||||||
// Only for enum types
|
// Only for enum types
|
||||||
if (info->fields[n]->type == FIELDTYPE_ENUM) {
|
if (info->fields[n]->type == FIELDTYPE_ENUM) {
|
||||||
enums.append(QString("\n// Enumeration options for field %1\n").arg(info->fields[n]->name));
|
enums.append(QString("\n// Enumeration options for field %1\n").arg(info->fields[n]->name));
|
||||||
enums.append("typedef enum {\n");
|
enums.append("typedef enum __attribute__ ((__packed__)) {\n");
|
||||||
// Go through each option
|
// Go through each option
|
||||||
QStringList options = info->fields[n]->options;
|
QStringList options = info->fields[n]->options;
|
||||||
for (int m = 0; m < options.length(); ++m) {
|
for (int m = 0; m < options.length(); ++m) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user