Re #3454: sensor persistent fixes (ported from master)
* Only clear sensor.persistentValue when the sensor.persistent is disabled and not on every shutdown. * Only show persistent option for calculated type sensors (only these actually get saved in EEPROM)
This commit is contained in:
@@ -619,7 +619,7 @@ void TelemetrySensorPanel::update()
|
||||
ui->source4->setVisible(sources34FieldsDisplayed);
|
||||
ui->autoOffset->setVisible(sensor.unit != SensorData::UNIT_RPMS && isConfigurable);
|
||||
ui->filter->setVisible(isConfigurable);
|
||||
ui->persistent->setVisible((sensor.type == SensorData::TELEM_TYPE_CALCULATED && sensor.formula == SensorData::TELEM_FORMULA_CONSUMPTION) || isConfigurable);
|
||||
ui->persistent->setVisible(sensor.type == SensorData::TELEM_TYPE_CALCULATED);
|
||||
|
||||
lock = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user