mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-04-10 02:02:21 +02:00
Merge remote-tracking branch 'origin/msmith/OP-597' into next
This commit is contained in:
commit
4c7919d319
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
|
# Exclude temporary and system files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
# /flight/
|
# /flight/
|
||||||
/flight/*.pnproj
|
/flight/*.pnproj
|
||||||
|
@ -111,6 +111,11 @@ int UAVObjectParser::getNumBytes(int objIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool fieldTypeLessThan(const FieldInfo* f1, const FieldInfo* f2)
|
||||||
|
{
|
||||||
|
return f1->numBytes > f2->numBytes;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse supplied XML file
|
* Parse supplied XML file
|
||||||
* @param xml The xml text
|
* @param xml The xml text
|
||||||
@ -200,6 +205,9 @@ QString UAVObjectParser::parseXML(QString& xml, QString& filename)
|
|||||||
// Get next element
|
// Get next element
|
||||||
childNode = childNode.nextSibling();
|
childNode = childNode.nextSibling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort all fields according to size
|
||||||
|
qStableSort(info->fields.begin(), info->fields.end(), fieldTypeLessThan);
|
||||||
|
|
||||||
// Make sure that required elements were found
|
// Make sure that required elements were found
|
||||||
if ( !accessFound )
|
if ( !accessFound )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user