Skip to content

Commit

Permalink
Make warning for serial port voltage levels clearer.
Browse files Browse the repository at this point in the history
  • Loading branch information
philmoz committed Mar 11, 2024
1 parent 4bfc1c9 commit 0ebc926
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions radio/src/gui/colorlcd/hw_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ SerialConfigWindow::SerialConfigWindow(Window *parent, const rect_t &rect) :
setFlexLayout();
FlexGridLayout grid(col_dsc, row_dsc, 2);

bool display_ttl_warning = false;
for (uint8_t port_nr = 0; port_nr < MAX_SERIAL_PORTS; port_nr++) {
auto port = serialGetPort(port_nr);
if (!port || !port->name) continue;

if (port_nr != SP_VCP) display_ttl_warning = true;

auto line = newLine(&grid);
new StaticText(line, rect_t{}, port->name, 0, COLOR_THEME_PRIMARY1);

Expand Down Expand Up @@ -71,11 +68,14 @@ SerialConfigWindow::SerialConfigWindow(Window *parent, const rect_t &rect) :
SET_DIRTY();
});
}
}

if (display_ttl_warning) {
grid.setColSpan(2);
auto line = newLine(&grid);
new StaticText(line, rect_t{}, STR_TTL_WARNING, 0, COLOR_THEME_WARNING);
if (port_nr != SP_VCP) {
grid.setColSpan(2);
auto line = newLine(&grid);
line->padLeft(20);
line->padBottom(6);
new StaticText(line, rect_t{}, STR_TTL_WARNING, 0, COLOR_THEME_WARNING);
grid.setColSpan(1);
}
}
}
2 changes: 1 addition & 1 deletion radio/src/translations/cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "主板温度"
#define TR_TEMPWARNING INDENT "过热"
#define TR_TTL_WARNING "注意串口使用逻辑电平3.3V"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "功能"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "Tepl. MB \016>"
#define TR_TEMPWARNING INDENT "Přehřátí"
#define TR_TTL_WARNING "Varování: používat 3.3V hodnoty"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funkce"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/da.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp."
#define TR_TEMPWARNING INDENT "For varm"
#define TR_TTL_WARNING "Advarsel: brug 3.3V logisk niveau"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funktion"
#define TR_V1 TR("V1", "Værdi 1")
#define TR_V2 TR("V2", "Værdi 2")
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/de.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
#define TR_COPROC "CoProz."
#define TR_COPROC_TEMP "MB Temp. \016>"
#define TR_TEMPWARNING INDENT "Temp. größer" //wg 9XR-Pro
#define TR_TTL_WARNING "Warning: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funktion"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/en.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp."
#define TR_TEMPWARNING INDENT "Overheat"
#define TR_TTL_WARNING "Warning: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Function"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/es.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp. \016>"
#define TR_TEMPWARNING INDENT "Sobrecalent"
#define TR_TTL_WARNING "Warning: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Función"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/fi.h
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp. \016>"
#define TR_TEMPWARNING INDENT "Ylikuumentunut"
#define TR_TTL_WARNING "Varoitus: käytä 3,3V:n logiikkatasoja"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Func"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "Temp. CM \016>"
#define TR_TEMPWARNING INDENT "Surchauffe"
#define TR_TTL_WARNING "Attention: utiliser valeur logique 3.3 V"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Fonction"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/he.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp."
#define TR_TEMPWARNING INDENT "Overheat"
#define TR_TTL_WARNING "אזהרה חיבורים אלה עם מתח 3.3 וולט !"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Function"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/it.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "Temp. MB \016>"
#define TR_TEMPWARNING INDENT "Temp. Alta"
#define TR_TTL_WARNING "Attenzione: usa livelli logici 3.3V"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funzione"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/jp.h
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB温度"
#define TR_TEMPWARNING INDENT "オーバーヒートです"
#define TR_TTL_WARNING "警告: 論理値3.3Vを使用します"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "ファンクション"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp. \016>"
#define TR_TEMPWARNING INDENT "Overhitting" //wg 9XR-Pro
#define TR_TTL_WARNING "Warning: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funktie"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/pl.h
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "Temp. MB"
#define TR_TEMPWARNING INDENT "Przegrzanie"
#define TR_TTL_WARNING "Uwaga: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funkcja"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB Temp."
#define TR_TEMPWARNING INDENT "SobrAquec."
#define TR_TTL_WARNING "Alerta: use 3.3V logic levels"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funcao"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/ru.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@
#define TR_COPROC "Сопроцессор"
#define TR_COPROC_TEMP "Темпер сопроц"
#define TR_TEMPWARNING INDENT "Перегрев"
#define TR_TTL_WARNING "Предупреждение: испол лог уровни 3."
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Функция"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/se.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "MB temp. \016>"
#define TR_TEMPWARNING TR(INDENT "Hög temp", INDENT "Hög temperatur")
#define TR_TTL_WARNING "Varning: använd 3.3V logiska nivåer"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Funktion"
#define TR_V1 "Värde 1"
#define TR_V2 "Värde 2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/tw.h
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@
#define TR_COPROC "CoProc."
#define TR_COPROC_TEMP "主板溫度"
#define TR_TEMPWARNING INDENT "過熱"
#define TR_TTL_WARNING "注意串口使用逻辑电平3.3V"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "功能"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations/ua.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
#define TR_COPROC "Сопроцессор"
#define TR_COPROC_TEMP "MB темп."
#define TR_TEMPWARNING INDENT "Перегрів"
#define TR_TTL_WARNING "Попередження: використовуйте лог. рівні 3.3V"
#define TR_TTL_WARNING "Warning: Do not exceed 3.3V on TX/RX pins!"
#define TR_FUNC "Функція"
#define TR_V1 "V1"
#define TR_V2 "V2"
Expand Down

0 comments on commit 0ebc926

Please sign in to comment.