mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
OP-423: fix problem in GCS when the config files get deleted.
GCS aborts on a table overflow when trying to set the axes with wrong number of channels.
This commit is contained in:
parent
b67a38661e
commit
506125af14
@ -283,8 +283,8 @@ void GCSControlGadget::buttonState(ButtonNumber number, bool pressed)
|
||||
void GCSControlGadget::axesValues(QListInt16 values)
|
||||
{
|
||||
int chMax = values.length();
|
||||
if (rollChannel > chMax || pitchChannel > chMax ||
|
||||
yawChannel > chMax || throttleChannel > chMax ) {
|
||||
if (rollChannel >= chMax || pitchChannel >= chMax ||
|
||||
yawChannel >= chMax || throttleChannel >= chMax ) {
|
||||
qDebug() << "GCSControl: configuration is inconsistent with current joystick! Aborting update.";
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user