mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Make object IDs depend on the names of any enums so if field names change then
bad settings won't be picked up.
This commit is contained in:
parent
d41260d54c
commit
2ab57910ce
@ -251,6 +251,11 @@ void UAVObjectParser::calculateID(ObjectInfo* info)
|
||||
hash = updateHash(info->fields[n]->name, hash);
|
||||
hash = updateHash(info->fields[n]->numElements, hash);
|
||||
hash = updateHash(info->fields[n]->type, hash);
|
||||
if(info->fields[n]->type == FIELDTYPE_ENUM) {
|
||||
QStringList options = info->fields[n]->options;
|
||||
for (int m = 0; m < options.length(); m++)
|
||||
hash = updateHash(options[m], hash);
|
||||
}
|
||||
}
|
||||
// Done
|
||||
info->id = hash & 0xFFFFFFFE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user