mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +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:
parent
268488a5b8
commit
0b78ae07bb
@ -602,12 +602,13 @@ void ConfigInputWidget::updateChannels(UAVObject* controlCommand)
|
||||
valueScaled = 0;
|
||||
}
|
||||
|
||||
// Bound
|
||||
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
|
||||
if (valueScaled < -1.0) valueScaled = -1.0;
|
||||
m_config->fmsSlider->setValue(0);
|
||||
|
||||
m_config->fmsSlider->setValue(valueScaled * 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user