chore: Remove obsolete language defines, single source for telemetry sensor names (#3119)

* - all telemetry sensor name definitions in one place (untranslated.h)

- all telemetry sensor name definitions follow the naming convention STR_SENSOR_<sensor>
- eliminated one redundant definition
- editorial updates to telemetry protocols code to reflect the naming convention changes
- re-introduced translations in da.h (STR_SENSOR_THROTTLE and STR_SENSOR_SPEED)
- re-introduced translation in it.h (STR_SENSOR_GPSDATETIME)
- re-introduced translation for fr.h ( STR_SENSOR_BATT)
- saved 160 Bytes of flash

* removed obsolete translation

saved 280 byte flash memory in total

* finally removed extern const char STR_MENUTEMPLATES[]; definition

adjusted da.h, fr.h, it.h local sensor name definitions to naming conventions STR_SENSOR_<senosr>

* corrected merge

removed obsolete #ifdef

* some more obsolete ones

* added TW and CN translation for TR_PERIOD and TR_INTERVAL

fixed problem in /radio/src/gui/colorlcd/fullscreen_dialog.cpp preventing builds for CZ, IT and FR languages
This commit is contained in:
Michael
2023-02-10 19:49:41 +10:00
committed by GitHub
parent be3f8d74a8
commit 2470cedf38
24 changed files with 388 additions and 3630 deletions
+36 -36
View File
@@ -170,15 +170,15 @@ const SpektrumSensor spektrumSensors[] = {
{0x1b, 4, int16, STR_SENSOR_YAW, UNIT_DEGREE, 1},
// {0x20, esc}, Smart ESC telemetry
{I2C_ESC, 0, uint16, STR_ESC_RPM, UNIT_RPMS, 0},
{I2C_ESC, 2, uint16, STR_ESC_VIN, UNIT_VOLTS, 2},
{I2C_ESC, 4, uint16, STR_ESC_TFET, UNIT_CELSIUS, 1},
{I2C_ESC, 6, uint16, STR_ESC_CUR, UNIT_MAH, 1},
{I2C_ESC, 8, uint16, STR_ESC_TBEC, UNIT_CELSIUS, 1},
{I2C_ESC, 10, uint8, STR_ESC_BCUR, UNIT_AMPS, 1},
{I2C_ESC, 11, uint8, STR_ESC_VBEC, UNIT_VOLTS, 2},
{I2C_ESC, 12, uint8, STR_ESC_THR, UNIT_PERCENT, 1},
{I2C_ESC, 13, uint8, STR_ESC_POUT, UNIT_PERCENT, 1},
{I2C_ESC, 0, uint16, STR_SENSOR_ESC_RPM, UNIT_RPMS, 0},
{I2C_ESC, 2, uint16, STR_SENSOR_ESC_VIN, UNIT_VOLTS, 2},
{I2C_ESC, 4, uint16, STR_SENSOR_ESC_TFET, UNIT_CELSIUS, 1},
{I2C_ESC, 6, uint16, STR_SENSOR_ESC_CUR, UNIT_MAH, 1},
{I2C_ESC, 8, uint16, STR_SENSOR_ESC_TBEC, UNIT_CELSIUS, 1},
{I2C_ESC, 10, uint8, STR_SENSOR_ESC_BCUR, UNIT_AMPS, 1},
{I2C_ESC, 11, uint8, STR_SENSOR_ESC_VBEC, UNIT_VOLTS, 2},
{I2C_ESC, 12, uint8, STR_SENSOR_ESC_THR, UNIT_PERCENT, 1},
{I2C_ESC, 13, uint8, STR_SENSOR_ESC_POUT, UNIT_PERCENT, 1},
// Dual Cell monitor (0x34)
{0x34, 0, int16, STR_SENSOR_BATT1_CURRENT, UNIT_AMPS, 1},
@@ -207,44 +207,44 @@ const SpektrumSensor spektrumSensors[] = {
// Smartbat
//{I2C_SMART_BAT_REALTIME, 1, int8, STR_SMART_BAT_BTMP, UNIT_CELSIUS, 0}, // disabled because sensor is a duplicate of cells sensors ones
{I2C_SMART_BAT_REALTIME, 2, uint32le, STR_SMART_BAT_BCUR, UNIT_MAH, 0},
{I2C_SMART_BAT_REALTIME, 6, uint16le, STR_SMART_BAT_BCAP, UNIT_MAH, 0},
{I2C_SMART_BAT_REALTIME, 8, uint16le, STR_SMART_BAT_MIN_CEL, UNIT_VOLTS, 2},
{I2C_SMART_BAT_REALTIME, 10, uint16le, STR_SMART_BAT_MAX_CEL, UNIT_VOLTS, 2},
{I2C_SMART_BAT_REALTIME, 2, uint32le, STR_SENSOR_SMART_BAT_BCUR, UNIT_MAH, 0},
{I2C_SMART_BAT_REALTIME, 6, uint16le, STR_SENSOR_SMART_BAT_BCAP, UNIT_MAH, 0},
{I2C_SMART_BAT_REALTIME, 8, uint16le, STR_SENSOR_SMART_BAT_MIN_CEL, UNIT_VOLTS, 2},
{I2C_SMART_BAT_REALTIME, 10, uint16le, STR_SENSOR_SMART_BAT_MAX_CEL, UNIT_VOLTS, 2},
//{I2C_SMART_BAT_REALTIME, 12, uint16le, "RFU[2]", UNIT_RAW, 0}, // disabled to save sensors slots
{I2C_SMART_BAT_CELLS_1_6, 1, int8, STR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_1_6, 2, uint16le, STR_CL01, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 4, uint16le, STR_CL02, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 6, uint16le, STR_CL03, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 8, uint16le, STR_CL04, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 10, uint16le, STR_CL05, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 12, uint16le, STR_CL06, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 1, int8, STR_SENSOR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_1_6, 2, uint16le, STR_SENSOR_CL01, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 4, uint16le, STR_SENSOR_CL02, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 6, uint16le, STR_SENSOR_CL03, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 8, uint16le, STR_SENSOR_CL04, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 10, uint16le, STR_SENSOR_CL05, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_1_6, 12, uint16le, STR_SENSOR_CL06, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 1, int8, STR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_7_12, 2, uint16le, STR_CL07, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 4, uint16le, STR_CL08, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 6, uint16le, STR_CL09, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 8, uint16le, STR_CL10, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 10, uint16le, STR_CL11, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 12, uint16le, STR_CL12, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 1, int8, STR_SENSOR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_7_12, 2, uint16le, STR_SENSOR_CL07, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 4, uint16le, STR_SENSOR_CL08, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 6, uint16le, STR_SENSOR_CL09, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 8, uint16le, STR_SENSOR_CL10, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 10, uint16le, STR_SENSOR_CL11, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_7_12, 12, uint16le, STR_SENSOR_CL12, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 1, int8, STR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_13_18, 2, uint16le, STR_CL13, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 4, uint16le, STR_CL14, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 6, uint16le, STR_CL15, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 8, uint16le, STR_CL16, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 10, uint16le, STR_CL17, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 12, uint16le, STR_CL18, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 1, int8, STR_SENSOR_SMART_BAT_BTMP, UNIT_CELSIUS, 0},
{I2C_SMART_BAT_CELLS_13_18, 2, uint16le, STR_SENSOR_CL13, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 4, uint16le, STR_SENSOR_CL14, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 6, uint16le, STR_SENSOR_CL15, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 8, uint16le, STR_SENSOR_CL16, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 10, uint16le, STR_SENSOR_CL17, UNIT_VOLTS, 2},
{I2C_SMART_BAT_CELLS_13_18, 12, uint16le, STR_SENSOR_CL18, UNIT_VOLTS, 2},
//{I2C_SMART_BAT_ID, 1, uint8, "chemistery", UNIT_RAW, 0}, // disabled to save sensors slots
//{I2C_SMART_BAT_ID, 2, uint8, "number of cells", UNIT_RAW, 0}, // disabled to save sensors slots
//{I2C_SMART_BAT_ID, 3, uint8, "manufacturer code", UNIT_RAW, 0}, // disabled to save sensors slots
{I2C_SMART_BAT_ID, 4, uint16le, STR_SMART_BAT_CYCLES, UNIT_RAW, 0},
{I2C_SMART_BAT_ID, 4, uint16le, STR_SENSOR_SMART_BAT_CYCLES, UNIT_RAW, 0},
//{I2C_SMART_BAT_ID, 6, uint8, "uniqueID[8]", UNIT_RAW, 0}, // disabled to save sensors slots
//{I2C_SMART_BAT_LIMITS, 1, uint8, "rfu", UNIT_RAW, 0}, // disabled to save sensors slots
{I2C_SMART_BAT_LIMITS, 2, uint16le, STR_SMART_BAT_CAPACITY,UNIT_MAH, 0},
{I2C_SMART_BAT_LIMITS, 2, uint16le, STR_SENSOR_SMART_BAT_CAPACITY,UNIT_MAH, 0},
//{I2C_SMART_BAT_LIMITS, 4, uint16le, "dischargeCurrentRating", UNIT_RAW, 0}, // disabled to save sensors slots
//{I2C_SMART_BAT_LIMITS, 6, uint16le, "overDischarge_mV", UNIT_RAW, 0}, // disabled to save sensors slots
//{I2C_SMART_BAT_LIMITS, 8, uint16le, "zeroCapacity_mV", UNIT_RAW, 0}, // disabled to save sensors slots