1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

OP-521: Match the flight logic for processing flight mode switch position on

GCS so the slider should always match what hte internal logic says.
This commit is contained in:
James Cotton 2011-06-07 17:04:36 -05:00
parent 268488a5b8
commit 0b78ae07bb

View File

@ -602,12 +602,13 @@ void ConfigInputWidget::updateChannels(UAVObject* controlCommand)
valueScaled = 0;
}
// Bound
if (valueScaled > 1.0) valueScaled = 1.0;
else
if (valueScaled < -1.0) valueScaled = -1.0;
if(valueScaled < -(1.0 / 3.0))
m_config->fmsSlider->setValue(-100);
else if (valueScaled > (1.0/3.0))
m_config->fmsSlider->setValue(100);
else
m_config->fmsSlider->setValue(0);
m_config->fmsSlider->setValue(valueScaled * 100);
}
}