Align companion telemetry sensor units to radio (#7653)
* Align cpn sensor units to radio * Add cpn conversion for sensor unit
This commit is contained in:
@@ -1983,6 +1983,12 @@ class SensorField: public TransformedField {
|
|||||||
sensor.unit++;
|
sensor.unit++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version < 219) {
|
||||||
|
if (sensor.unit > SensorData::UNIT_FLOZ) {
|
||||||
|
sensor.unit += 11;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
qCDebug(eepromImport) << QString("imported %1").arg(internalField.getName());
|
qCDebug(eepromImport) << QString("imported %1").arg(internalField.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,13 @@ class SensorData {
|
|||||||
UNIT_METERS_PER_SECOND,
|
UNIT_METERS_PER_SECOND,
|
||||||
UNIT_FEET_PER_SECOND,
|
UNIT_FEET_PER_SECOND,
|
||||||
UNIT_KMH,
|
UNIT_KMH,
|
||||||
|
UNIT_SPEED = UNIT_KMH,
|
||||||
UNIT_MPH,
|
UNIT_MPH,
|
||||||
UNIT_METERS,
|
UNIT_METERS,
|
||||||
|
UNIT_DIST = UNIT_METERS,
|
||||||
UNIT_FEET,
|
UNIT_FEET,
|
||||||
UNIT_CELSIUS,
|
UNIT_CELSIUS,
|
||||||
|
UNIT_TEMPERATURE = UNIT_CELSIUS,
|
||||||
UNIT_FAHRENHEIT,
|
UNIT_FAHRENHEIT,
|
||||||
UNIT_PERCENT,
|
UNIT_PERCENT,
|
||||||
UNIT_MAH,
|
UNIT_MAH,
|
||||||
@@ -91,18 +94,30 @@ class SensorData {
|
|||||||
UNIT_MILLILITERS,
|
UNIT_MILLILITERS,
|
||||||
UNIT_FLOZ,
|
UNIT_FLOZ,
|
||||||
UNIT_MILLILITERS_PER_MINUTE,
|
UNIT_MILLILITERS_PER_MINUTE,
|
||||||
|
UNIT_MAX = UNIT_MILLILITERS_PER_MINUTE,
|
||||||
|
UNIT_SPARE1,
|
||||||
|
UNIT_SPARE2,
|
||||||
|
UNIT_SPARE3,
|
||||||
|
UNIT_SPARE4,
|
||||||
|
UNIT_SPARE5,
|
||||||
|
UNIT_SPARE6,
|
||||||
|
UNIT_SPARE7,
|
||||||
|
UNIT_SPARE8,
|
||||||
|
UNIT_SPARE9,
|
||||||
|
UNIT_SPARE10,
|
||||||
UNIT_HOURS,
|
UNIT_HOURS,
|
||||||
UNIT_MINUTES,
|
UNIT_MINUTES,
|
||||||
UNIT_SECONDS,
|
UNIT_SECONDS,
|
||||||
// FrSky format used for these fields, could be another format in the future
|
// FrSky format used for these fields, could be another format in the future
|
||||||
UNIT_FIRST_VIRTUAL,
|
UNIT_FIRST_VIRTUAL,
|
||||||
UNIT_CELLS = UNIT_FIRST_VIRTUAL,
|
UNIT_CELLS = UNIT_FIRST_VIRTUAL,
|
||||||
UNIT_DATETIME,
|
UNIT_DATETIME,
|
||||||
UNIT_GPS,
|
UNIT_GPS,
|
||||||
|
UNIT_BITFIELD,
|
||||||
|
UNIT_TEXT,
|
||||||
|
// Internal units (not stored in sensor unit)
|
||||||
UNIT_GPS_LONGITUDE,
|
UNIT_GPS_LONGITUDE,
|
||||||
UNIT_GPS_LATITUDE,
|
UNIT_GPS_LATITUDE,
|
||||||
UNIT_GPS_LONGITUDE_EW,
|
|
||||||
UNIT_GPS_LATITUDE_NS,
|
|
||||||
UNIT_DATETIME_YEAR,
|
UNIT_DATETIME_YEAR,
|
||||||
UNIT_DATETIME_DAY_MONTH,
|
UNIT_DATETIME_DAY_MONTH,
|
||||||
UNIT_DATETIME_HOUR_MIN,
|
UNIT_DATETIME_HOUR_MIN,
|
||||||
|
|||||||
Reference in New Issue
Block a user