lock missing in telemetry bars screen
This commit is contained in:
@@ -133,6 +133,7 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
result.max = 225;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_RPM:
|
||||
case TELEMETRY_SOURCE_RPM_MAX:
|
||||
result.step = singleprec ? 50 : 1;
|
||||
result.max = singleprec ? 12750 : 20000;
|
||||
break;
|
||||
@@ -140,6 +141,7 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
result.max = 100;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_SPEED:
|
||||
case TELEMETRY_SOURCE_SPEED_MAX:
|
||||
result.step = singleprec ? 4 : 1;
|
||||
result.max = singleprec ? 944 : 2000;
|
||||
if (model && !model->frsky.imperial) {
|
||||
@@ -148,6 +150,7 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
||||
}
|
||||
break;
|
||||
case TELEMETRY_SOURCE_DIST:
|
||||
case TELEMETRY_SOURCE_DIST_MAX:
|
||||
result.step = singleprec ? 8 : 1;
|
||||
result.max = singleprec ? 2040 : 10000;
|
||||
break;
|
||||
|
||||
@@ -382,6 +382,8 @@ void TelemetryCustomScreen::update()
|
||||
|
||||
void TelemetryCustomScreen::updateBar(int line)
|
||||
{
|
||||
lock = true;
|
||||
|
||||
int index = screen.body.bars[line].source;
|
||||
barsCB[line]->setCurrentIndex(index);
|
||||
if (index) {
|
||||
@@ -407,6 +409,8 @@ void TelemetryCustomScreen::updateBar(int line)
|
||||
minSB[line]->setDisabled(true);
|
||||
maxSB[line]->setDisabled(true);
|
||||
}
|
||||
|
||||
lock = false;
|
||||
}
|
||||
|
||||
void TelemetryCustomScreen::on_screenType_currentIndexChanged(int index)
|
||||
@@ -428,13 +432,15 @@ void TelemetryCustomScreen::customFieldChanged(int value)
|
||||
|
||||
void TelemetryCustomScreen::barSourceChanged(int index)
|
||||
{
|
||||
QComboBox * cb = qobject_cast<QComboBox*>(sender());
|
||||
int line = cb->property("index").toInt();
|
||||
screen.body.bars[line].source = index;
|
||||
screen.body.bars[line].barMin = 0;
|
||||
screen.body.bars[line].barMax = 0;
|
||||
updateBar(line);
|
||||
emit modified();
|
||||
if (!lock) {
|
||||
QComboBox * cb = qobject_cast<QComboBox*>(sender());
|
||||
int line = cb->property("index").toInt();
|
||||
screen.body.bars[line].source = index;
|
||||
screen.body.bars[line].barMin = 0;
|
||||
screen.body.bars[line].barMax = 0;
|
||||
updateBar(line);
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void TelemetryCustomScreen::barMinChanged(double value)
|
||||
|
||||
Reference in New Issue
Block a user