diff --git a/src/translations/tts_cz.cpp b/src/translations/tts_cz.cpp index c2fd8cdbb..234b2608c 100644 --- a/src/translations/tts_cz.cpp +++ b/src/translations/tts_cz.cpp @@ -116,7 +116,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_de.cpp b/src/translations/tts_de.cpp index d6331950b..50eb94e39 100644 --- a/src/translations/tts_de.cpp +++ b/src/translations/tts_de.cpp @@ -106,7 +106,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_es.cpp b/src/translations/tts_es.cpp index 04783d074..ace411408 100644 --- a/src/translations/tts_es.cpp +++ b/src/translations/tts_es.cpp @@ -130,7 +130,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_fr.cpp b/src/translations/tts_fr.cpp index 956e01dec..8d286a9d4 100644 --- a/src/translations/tts_fr.cpp +++ b/src/translations/tts_fr.cpp @@ -112,7 +112,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_it.cpp b/src/translations/tts_it.cpp index f097c5066..dc7b4a0ae 100644 --- a/src/translations/tts_it.cpp +++ b/src/translations/tts_it.cpp @@ -102,7 +102,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_pt.cpp b/src/translations/tts_pt.cpp index ee472c01e..b00c08721 100644 --- a/src/translations/tts_pt.cpp +++ b/src/translations/tts_pt.cpp @@ -115,7 +115,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) { diff --git a/src/translations/tts_sk.cpp b/src/translations/tts_sk.cpp index e7fbd193d..f6699209e 100644 --- a/src/translations/tts_sk.cpp +++ b/src/translations/tts_sk.cpp @@ -131,7 +131,16 @@ PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) number = -number; } - convertUnit(number, unit); + if (unit) { + unit--; + convertUnit(number, unit); + if (IS_IMPERIAL_ENABLE()) { + if (unit == UNIT_METERS) { + unit = UNIT_FEET; + } + } + unit++; + } int8_t mode = MODE(att); if (mode > 0) {