mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Input Configuration: Fix flight mode slider detection (looking at wrong channel
number).
This commit is contained in:
parent
c36297227d
commit
06fc5a1110
@ -1317,15 +1317,13 @@ void ConfigInputWidget::moveFMSlider()
|
||||
{
|
||||
ManualControlSettings::DataFields manualSettingsDataPriv = manualSettingsObj->getData();
|
||||
ManualControlCommand::DataFields manualCommandDataPriv=manualCommandObj->getData();
|
||||
uint chIndex = manualSettingsDataPriv.ChannelNumber[ManualControlSettings::CHANNELNUMBER_FLIGHTMODE];
|
||||
if (chIndex < 8) {
|
||||
float valueScaled;
|
||||
|
||||
float valueScaled;
|
||||
int chMin = manualSettingsDataPriv.ChannelMin[ManualControlSettings::CHANNELMIN_FLIGHTMODE];
|
||||
int chMax = manualSettingsDataPriv.ChannelMax[ManualControlSettings::CHANNELMAX_FLIGHTMODE];
|
||||
int chNeutral = manualSettingsDataPriv.ChannelNeutral[ManualControlSettings::CHANNELNEUTRAL_FLIGHTMODE];
|
||||
|
||||
int value = manualCommandDataPriv.Channel[chIndex];
|
||||
int value = manualCommandDataPriv.Channel[ManualControlSettings::CHANNELMIN_FLIGHTMODE];
|
||||
if ((chMax > chMin && value >= chNeutral) || (chMin > chMax && value <= chNeutral))
|
||||
{
|
||||
if (chMax != chNeutral)
|
||||
@ -1348,7 +1346,6 @@ void ConfigInputWidget::moveFMSlider()
|
||||
else
|
||||
m_config->fmsSlider->setValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigInputWidget::updateCalibration()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user