1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-21 23:35:17 +03:00

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:
Damjan Adamic 2016-05-02 19:38:57 +02:00
parent 97cc58e323
commit 3fb853c8b8
5 changed files with 10 additions and 13 deletions

View file

@ -121,7 +121,7 @@ enum SensorFields {
#define SENSOR_AUTOOFFSET_ROWS (sensor->unit != UNIT_RPMS && sensor->isConfigurable() ? (uint8_t)0 : HIDDEN_ROW)
#define SENSOR_ONLYPOS_ROWS (sensor->isConfigurable() ? (uint8_t)0 : HIDDEN_ROW)
#define SENSOR_FILTER_ROWS (sensor->isConfigurable() ? (uint8_t)0 : HIDDEN_ROW)
#define SENSOR_PERSISTENT_ROWS ((sensor->type == TELEM_TYPE_CALCULATED && sensor->formula == TELEM_FORMULA_CONSUMPTION) || sensor->isConfigurable() ? (uint8_t)0 : HIDDEN_ROW)
#define SENSOR_PERSISTENT_ROWS (sensor->type == TELEM_TYPE_CALCULATED ? (uint8_t)0 : HIDDEN_ROW)
bool menuModelSensor(evt_t event)
{