This commit is contained in:
Bertrand Songis
2015-08-11 19:00:01 +02:00
parent 979ece9208
commit 900b53f165
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -680,7 +680,10 @@ void frskyDSetDefault(int index, uint16_t id)
else if (id == CURRENT_ID) {
telemetrySensor.onlyPositive = 1;
}
else if (unit == UNIT_RPMS) {
else if (id == BARO_ALT_AP_ID) {
telemetrySensor.autoOffset = 1;
}
if (unit == UNIT_RPMS) {
telemetrySensor.custom.ratio = 1;
telemetrySensor.custom.offset = 1;
}
+4 -2
View File
@@ -276,8 +276,10 @@ void frskySportSetDefault(int index, uint16_t id, uint8_t instance)
else if (id >= CURR_FIRST_ID && id <= CURR_LAST_ID) {
telemetrySensor.onlyPositive = 1;
}
// TODO set telemetrySensor.onlyPositive for other sensors that need it
else if (unit == UNIT_RPMS) {
else if (id >= ALT_FIRST_ID && id <= ALT_LAST_ID) {
telemetrySensor.autoOffset = 1;
}
if (unit == UNIT_RPMS) {
telemetrySensor.custom.ratio = 1;
telemetrySensor.custom.offset = 1;
}