1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

uavobjectgenerator: for consistency with flight and gcs code, change order of update modes. This is a cosmetic change, it does ot change the generated code since update modes are always identified by string, not numerically.

This commit is contained in:
Corvus Corax 2012-06-29 10:33:33 +02:00
parent d2606e64e4
commit 2dcc28cea3
3 changed files with 8 additions and 7 deletions

View File

@ -37,8 +37,9 @@ void replaceCommonTags(QString& out, ObjectInfo* info)
{
QStringList updateModeStr,accessModeStr;
updateModeStr << "UPDATEMODE_PERIODIC" << "UPDATEMODE_ONCHANGE"
<< "UPDATEMODE_THROTTLED" << "UPDATEMODE_MANUAL";
updateModeStr << "UPDATEMODE_MANUAL" << "UPDATEMODE_PERIODIC"
<< "UPDATEMODE_ONCHANGE"
<< "UPDATEMODE_THROTTLED";
accessModeStr << "ACCESS_READWRITE" << "ACCESS_READONLY";

View File

@ -34,7 +34,7 @@ UAVObjectParser::UAVObjectParser()
fieldTypeStrXML << "int8" << "int16" << "int32" << "uint8"
<< "uint16" << "uint32" <<"float" << "enum";
updateModeStrXML << "periodic" << "onchange" << "throttled" << "manual";
updateModeStrXML << "manual" << "periodic" << "onchange" << "throttled";
accessModeStr << "ACCESS_READWRITE" << "ACCESS_READONLY";

View File

@ -64,10 +64,10 @@ typedef struct {
* Object update mode
*/
typedef enum {
UPDATEMODE_PERIODIC = 0, /** Automatically update object at periodic intervals */
UPDATEMODE_ONCHANGE, /** Only update object when its data changes */
UPDATEMODE_THROTTLED, /** Object is updated on change, but not more often than the interval time */
UPDATEMODE_MANUAL /** Manually update object, by calling the updated() function */
UPDATEMODE_MANUAL = 0, /** Manually update object, by calling the updated() function */
UPDATEMODE_PERIODIC = 1, /** Automatically update object at periodic intervals */
UPDATEMODE_ONCHANGE = 2, /** Only update object when its data changes */
UPDATEMODE_THROTTLED = 3 /** Object is updated on change, but not more often than the interval time */
} UpdateMode;