mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-402 gcs: better report invalid UAVO Enum errors
This commit is contained in:
parent
de837a02e8
commit
c95e718ff5
@ -1024,7 +1024,7 @@ QVariant UAVObjectField::getValue(quint32 index)
|
||||
quint8 tmpenum;
|
||||
memcpy(&tmpenum, &data[offset + numBytesPerElement * index], numBytesPerElement);
|
||||
if (tmpenum >= options.length()) {
|
||||
qDebug() << "Invalid value for" << name;
|
||||
qDebug() << "Invalid enum" << tmpenum << "for field" << (obj->getName() + ":" + name + "[" + elementNames[index] + "]");
|
||||
tmpenum = 0;
|
||||
}
|
||||
return QVariant(options[tmpenum]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user