Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions companion/src/firmwares/edgetx/yaml_generalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ Node convert<GeneralSettings>::encode(const GeneralSettings& rhs)
node["disableRssiPoweroffAlarm"] = (int)rhs.disableRssiPoweroffAlarm;
node["disableTrainerPoweroffAlarm"] = (int)rhs.disableTrainerPoweroffAlarm;
node["USBMode"] = rhs.usbMode;
node["usbChargeDisabled"] = (int)rhs.usbChargeDisabled;
node["hatsMode"] = hatsModeLut << rhs.hatsMode;
node["stickDeadZone"] = rhs.stickDeadZone;
node["jackMode"] = rhs.jackMode;
Expand Down Expand Up @@ -542,6 +543,7 @@ bool convert<GeneralSettings>::decode(const Node& node, GeneralSettings& rhs)
node["disableRssiPoweroffAlarm"] >> rhs.disableRssiPoweroffAlarm;
node["disableTrainerPoweroffAlarm"] >> rhs.disableTrainerPoweroffAlarm;
node["USBMode"] >> rhs.usbMode;
node["usbChargeDisabled"] >> rhs.usbChargeDisabled;
node["hatsMode"] >> hatsModeLut >> rhs.hatsMode;
node["stickDeadZone"] >> rhs.stickDeadZone;
node["jackMode"] >> rhs.jackMode;
Expand Down
1 change: 1 addition & 0 deletions companion/src/firmwares/generalsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ class GeneralSettings {
bool disableRssiPoweroffAlarm;
bool disableTrainerPoweroffAlarm;
unsigned int usbMode;
bool usbChargeDisabled;
unsigned int hatsMode;
unsigned int stickDeadZone;
unsigned int jackMode;
Expand Down
18 changes: 18 additions & 0 deletions companion/src/generaledit/generalsetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ ui(new Ui::GeneralSetup)
ui->adjustRTC->setChecked(generalSettings.adjustRTC);
ui->usbModeCB->setCurrentIndex(generalSettings.usbMode);

// "USB SD/Joystick/VCP charge" is only available on RadioMaster radios
// that expose the charger-enable pin (rm-h750 based targets).
if (IS_RADIOMASTER_TX16SMK3(board) || IS_RADIOMASTER_TX15(board)) {
ui->usbChargeChkB->setChecked(!generalSettings.usbChargeDisabled); // Default is zero=checked
}
else {
ui->usbChargeLabel->hide();
ui->usbChargeChkB->hide();
}

if (IS_FLYSKY_EL18(board) || IS_FLYSKY_NV14(board) || IS_FAMILY_PL18(board)) {
ui->hatsModeCB->setModel(panelFilteredModels->getItemModel(FIM_HATSMODE));
ui->hatsModeCB->setField(generalSettings.hatsMode, this);
Expand Down Expand Up @@ -375,6 +385,14 @@ void GeneralSetupPanel::on_usbModeCB_currentIndexChanged(int index)
}
}

void GeneralSetupPanel::on_usbChargeChkB_stateChanged(int)
{
if (!lock) {
generalSettings.usbChargeDisabled = !ui->usbChargeChkB->isChecked();
emit modified();
}
}

void GeneralSetupPanel::on_jackModeCB_currentIndexChanged(int index)
{
if (!lock) {
Expand Down
1 change: 1 addition & 0 deletions companion/src/generaledit/generalsetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class GeneralSetupPanel : public GeneralPanel
void on_hapticLengthCB_currentIndexChanged(int index);
void on_backlightswCB_currentIndexChanged(int index);
void on_usbModeCB_currentIndexChanged(int index);
void on_usbChargeChkB_stateChanged(int);
void on_jackModeCB_currentIndexChanged(int index);
void on_backlightColor_SL_valueChanged();
void on_mavbaud_CB_currentIndexChanged(int index);
Expand Down
32 changes: 23 additions & 9 deletions companion/src/generaledit/generalsetup.ui
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Mode 4:
</property>
</widget>
</item>
<item row="28" column="1">
<item row="29" column="1">
<widget class="QComboBox" name="ppm_units_CB">
<property name="currentText">
<string>0.--</string>
Expand All @@ -417,7 +417,7 @@ Mode 4:
</item>
</widget>
</item>
<item row="27" column="1">
<item row="28" column="1">
<widget class="AutoComboBox" name="hatsModeCB" native="true"/>
</item>
<item row="23" column="1">
Expand Down Expand Up @@ -509,7 +509,7 @@ Acceptable values are 3v..12v</string>
</property>
</widget>
</item>
<item row="28" column="0">
<item row="29" column="0">
<widget class="QLabel" name="ppm_units_label">
<property name="text">
<string>PPM Units</string>
Expand Down Expand Up @@ -862,7 +862,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="26" column="1">
<item row="27" column="1">
<widget class="QComboBox" name="jackModeCB">
<item>
<property name="text">
Expand Down Expand Up @@ -905,6 +905,20 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="26" column="0">
<widget class="QLabel" name="usbChargeLabel">
<property name="text">
<string>USB SD/Joystick/VCP charge</string>
</property>
</widget>
</item>
<item row="26" column="1">
<widget class="QCheckBox" name="usbChargeChkB">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="label_15">
<property name="sizePolicy">
Expand All @@ -924,7 +938,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="27" column="0">
<item row="28" column="0">
<widget class="QLabel" name="hatsModeLabel">
<property name="text">
<string>Hats Mode</string>
Expand Down Expand Up @@ -963,7 +977,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="26" column="0">
<item row="27" column="0">
<widget class="QLabel" name="jackModeLabel">
<property name="text">
<string>Jack Mode</string>
Expand Down Expand Up @@ -1085,7 +1099,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="30" column="0">
<item row="31" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
Expand Down Expand Up @@ -1312,14 +1326,14 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="29" column="0">
<item row="30" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>One log per day</string>
</property>
</widget>
</item>
<item row="29" column="1">
<item row="30" column="1">
<widget class="QCheckBox" name="chkOneLogPerDay">
<property name="text">
<string/>
Expand Down
7 changes: 7 additions & 0 deletions radio/src/boards/rm-h750/usb_charger_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ void usbChargerInit()

bool usbChargerLed()
{
#if defined(USB_CHARGE_CONTROL)
// When charging is disabled via the "USB SD/Joystick/VCP charge" setting,
// the charger-enable pin is driven high to hold the charger off, so it is
// not charging.
if (gpio_read(UCHARGER_EN_GPIO))
return false;
#endif
return (gpio_read(UCHARGER_GPIO) && usbPlugged());
}
6 changes: 5 additions & 1 deletion radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ static inline void check_struct()
#if defined(PCBXLITES)
CHKSIZE(RadioData, 951);
#elif defined(RADIO_ST16) || defined(PCBPA01) || defined(RADIO_TX15) || defined(RADIO_T15PRO) || defined(RADIO_TX16SMK3) || defined(RADIO_T22)
CHKSIZE(RadioData, 1183);
#if defined(USB_CHARGE_CONTROL)
CHKSIZE(RadioData, 1183); // +1 byte for usbChargeDisabled
#else
CHKSIZE(RadioData, 1183);
#endif
#elif defined(COLORLCD)
#if defined(IMU)
CHKSIZE(RadioData, 1063);
Expand Down
5 changes: 5 additions & 0 deletions radio/src/datastructs_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,11 @@ PACK(struct RadioData {
NOBACKUP(uint8_t radioThemesDisabled:1);
NOBACKUP(uint8_t oneLogPerDay:1);
NOBACKUP(uint8_t keyLockEnabled:1);
#if defined(USB_CHARGE_CONTROL)
// 0 = charge while USB active (default), 1 = disable charging (drive
// UCHARGER_EN_GPIO high) when USB is plugged in SD/Joystick/VCP mode
NOBACKUP(uint8_t usbChargeDisabled:1);
#endif
#elif LCD_W == 128
uint8_t invertLCD:1; // Invert B&W LCD display
NOBACKUP(uint8_t oneLogPerDay:1);
Expand Down
10 changes: 10 additions & 0 deletions radio/src/gui/colorlcd/radio/radio_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,16 @@ const static SetupLineDef setupLines[] = {
GET_SET_DEFAULT(g_eeGeneral.USBMode));
}
},
#if defined(USB_CHARGE_CONTROL)
{
// USB SD/Joystick/VCP charge
STR_DEF(STR_USB_CHARGE),
[](Window* parent, coord_t x, coord_t y) {
new ToggleSwitch(parent, {x, y, 0, 0},
GET_SET_INVERTED(g_eeGeneral.usbChargeDisabled));
}
},
#endif
#if defined(ROTARY_ENCODER_NAVIGATION) && !defined(USE_HATS_AS_KEYS)
{
STR_DEF(STR_ROTARY_ENC_MODE),
Expand Down
19 changes: 19 additions & 0 deletions radio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
#include "edgetx.h"
#include "lua/lua_states.h"

#if defined(USB_CHARGE_CONTROL)
#include "hal/gpio.h"
#include "stm32_gpio.h"
#endif

#if defined(COLORLCD)
#include "view_main.h"
#include "startup_shutdown.h"
Expand Down Expand Up @@ -203,12 +208,26 @@ void handleUsbConnection()

usbStart();
TRACE("USB started");

#if defined(USB_CHARGE_CONTROL)
// When "USB SD/Joystick/VCP charge" is set to OFF, disable charging by
// driving the charger-enable pin high while USB is active.
if (g_eeGeneral.usbChargeDisabled) {
gpio_set(UCHARGER_EN_GPIO);
} else {
gpio_clear(UCHARGER_EN_GPIO);
}
#endif
}
}

if (usbStarted() && !usbPlugged()) {
usbStop();
TRACE("USB stopped");
#if defined(USB_CHARGE_CONTROL)
// Restore default charger-enable state on unplug
gpio_clear(UCHARGER_EN_GPIO);
#endif
if (getSelectedUsbMode() == USB_MASS_STORAGE_MODE) {
#if defined(COLORLCD)
usbConnectedWindow->deleteLater();
Expand Down
3 changes: 2 additions & 1 deletion radio/src/storage/yaml/yaml_datastructs_tx15.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
YAML_UNSIGNED( "rotEncMode", 3 ),
YAML_PADDING( 2 ),
YAML_UNSIGNED( "stickDeadZone", 3 ),
YAML_PADDING( 3 ),
YAML_SIGNED( "imuMax", 8 ),
YAML_SIGNED( "imuOffset", 8 ),
YAML_UNSIGNED( "imuInvert", 8 ),
Expand All @@ -482,6 +482,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "radioThemesDisabled", 1 ),
YAML_UNSIGNED( "oneLogPerDay", 1 ),
YAML_UNSIGNED( "keyLockEnabled", 1 ),
YAML_UNSIGNED( "usbChargeDisabled", 1 ),
YAML_UNSIGNED( "pwrOffIfInactive", 8 ),
YAML_ARRAY("keyShortcuts", 8, 6, struct_KeyShortcut, NULL),
YAML_ARRAY("qmFavorites", 8, 12, struct_QMFavorite, NULL),
Expand Down
1 change: 1 addition & 0 deletions radio/src/storage/yaml/yaml_datastructs_tx16smk3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "radioThemesDisabled", 1 ),
YAML_UNSIGNED( "oneLogPerDay", 1 ),
YAML_UNSIGNED( "keyLockEnabled", 1 ),
YAML_UNSIGNED( "usbChargeDisabled", 1 ),
YAML_UNSIGNED( "pwrOffIfInactive", 8 ),
YAML_ARRAY("keyShortcuts", 8, 6, struct_KeyShortcut, NULL),
YAML_ARRAY("qmFavorites", 8, 12, struct_QMFavorite, NULL),
Expand Down
1 change: 1 addition & 0 deletions radio/src/targets/tx15/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ add_definitions(-DFIRMWARE_QSPI)
add_definitions(-DFIRMWARE_FORMAT_UF2)
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
add_definitions(-DUSB_CHARGER)
add_definitions(-DUSB_CHARGE_CONTROL)

set(FLAVOUR tx15)
add_definitions(-DMANUFACTURER_RADIOMASTER)
Expand Down
1 change: 1 addition & 0 deletions radio/src/targets/tx16smk3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ add_definitions(-DFIRMWARE_QSPI)
add_definitions(-DFIRMWARE_FORMAT_UF2)
add_definitions(-DUSE_CUSTOM_EXTI_IRQ)
add_definitions(-DUSB_CHARGER)
add_definitions(-DUSB_CHARGE_CONTROL)
add_definitions(-DLUMINOSITY_SENSOR)

set(FLAVOUR tx16smk3)
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/cn.h
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@
#define TR_SENSOR "传感器"
#define TR_COUNTRY_CODE "国别码"
#define TR_USBMODE "USB模式"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize TR_USB_CHARGE in every affected language header.

The new setting currently displays English text in both localized UIs:

  • radio/src/translations/i18n/cn.h#L987-L987: replace the English value with approved Chinese text.
  • radio/src/translations/i18n/cz.h#L985-L985: replace the English value with approved Czech text.
📍 Affects 2 files
  • radio/src/translations/i18n/cn.h#L987-L987 (this comment)
  • radio/src/translations/i18n/cz.h#L985-L985
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@radio/src/translations/i18n/cn.h` at line 987, Replace the English
TR_USB_CHARGE value with the approved Chinese translation in
radio/src/translations/i18n/cn.h at lines 987-987 and with the approved Czech
translation in radio/src/translations/i18n/cz.h at lines 985-985, preserving the
existing translation macro structure.

#define TR_JACK_MODE "教练插口模式"
#define TR_VOICE_LANGUAGE "播报语言"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/cz.h
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@
#define TR_SENSOR "SENZOR"
#define TR_COUNTRY_CODE "Kód regionu"
#define TR_USBMODE "Režim USB"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Režim Jack"
#define TR_VOICE_LANGUAGE "Jazyk hlasu"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/da.h
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
#define TR_SENSOR "SENSOR"
#define TR_COUNTRY_CODE "Lande kode"
#define TR_USBMODE "USB tilstand"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the new setting label in non-English headers. Both files currently show the English fallback to users.

  • radio/src/translations/i18n/da.h#L992-L992: use USB SD/Joystick/VCP-opladning.
  • radio/src/translations/i18n/de.h#L986-L986: use USB-SD/Joystick/VCP-Laden.
📍 Affects 2 files
  • radio/src/translations/i18n/da.h#L992-L992 (this comment)
  • radio/src/translations/i18n/de.h#L986-L986
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@radio/src/translations/i18n/da.h` at line 992, Localize the TR_USB_CHARGE
label in radio/src/translations/i18n/da.h lines 992-992 to “USB
SD/Joystick/VCP-opladning” and in radio/src/translations/i18n/de.h lines 986-986
to “USB-SD/Joystick/VCP-Laden”, replacing the English fallback in both headers.

#define TR_JACK_MODE "Jack tilstand"
#define TR_VOICE_LANGUAGE "Stemme sprog"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/de.h
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@
#define TR_SENSOR TR_BW_COL("SENSOR", "Sensor")
#define TR_COUNTRY_CODE "Landescode"
#define TR_USBMODE "USB Modus"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Klinken-Modus"
#define TR_VOICE_LANGUAGE "Sprachansagen"
#define TR_TEXT_LANGUAGE "Textsprache"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/en.h
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@
#define TR_SENSOR "SENSOR"
#define TR_COUNTRY_CODE "Country code"
#define TR_USBMODE "USB mode"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Jack mode"
#define TR_VOICE_LANGUAGE "Voice language"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/es.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@
#define TR_SENSOR "SENSOR"
#define TR_COUNTRY_CODE "Código país"
#define TR_USBMODE "Modo USB"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize TR_USB_CHARGE in every affected language header.

The new setting label currently remains English in all three localized headers:

  • radio/src/translations/i18n/es.h#L981-L981: add Spanish text.
  • radio/src/translations/i18n/fi.h#L981-L981: add Finnish text.
  • radio/src/translations/i18n/tw.h#L984-L984: add Traditional Chinese text.
📍 Affects 3 files
  • radio/src/translations/i18n/es.h#L981-L981 (this comment)
  • radio/src/translations/i18n/fi.h#L981-L981
  • radio/src/translations/i18n/tw.h#L984-L984
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@radio/src/translations/i18n/es.h` at line 981, Localize the TR_USB_CHARGE
label in all affected headers: replace the English text in
radio/src/translations/i18n/es.h lines 981-981 with Spanish,
radio/src/translations/i18n/fi.h lines 981-981 with Finnish, and
radio/src/translations/i18n/tw.h lines 984-984 with Traditional Chinese.

#define TR_JACK_MODE "Modo Jack"
#define TR_VOICE_LANGUAGE "Idioma voces"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/fi.h
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@
#define TR_SENSOR "SENSORI"
#define TR_COUNTRY_CODE "Maatunnus"
#define TR_USBMODE "USB-tila"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Jack Mode"
#define TR_VOICE_LANGUAGE "Äänen kieli"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@
#define TR_SENSOR "CAPTEUR"
#define TR_COUNTRY_CODE TR("Zone géo.", "Zone géographique")
#define TR_USBMODE "Mode USB"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Provide localized values for TR_USB_CHARGE.

The new key is currently English in all three locale headers, so the Radio Settings option remains untranslated for French, Hebrew, and Italian users.

  • radio/src/translations/i18n/fr.h#L985-L985: replace the English value with the approved French translation.
  • radio/src/translations/i18n/he.h#L990-L990: replace the English value with the approved Hebrew translation.
  • radio/src/translations/i18n/it.h#L987-L987: replace the English value with the approved Italian translation.
📍 Affects 3 files
  • radio/src/translations/i18n/fr.h#L985-L985 (this comment)
  • radio/src/translations/i18n/he.h#L990-L990
  • radio/src/translations/i18n/it.h#L987-L987
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@radio/src/translations/i18n/fr.h` at line 985, Replace the English
TR_USB_CHARGE value with the approved localized translations in
radio/src/translations/i18n/fr.h:985-985,
radio/src/translations/i18n/he.h:990-990, and
radio/src/translations/i18n/it.h:987-987; keep the key unchanged.

#define TR_JACK_MODE "Mode Jack"
#define TR_VOICE_LANGUAGE TR("Langue voix", "Langue annonces vocales")
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/he.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@
#define TR_SENSOR "חיישן"
#define TR_COUNTRY_CODE "קוד ארץ"
#define TR_USBMODE "USB מצב"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Jack mode"
#define TR_VOICE_LANGUAGE "שפת שמע"
#define TR_TEXT_LANGUAGE "שפת הטקסט"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/it.h
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@
#define TR_SENSOR "SENSORE"
#define TR_COUNTRY_CODE TR("Cod. Paese", "Codice del Paese")
#define TR_USBMODE "Modo USB"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "Modo JACK"
#define TR_VOICE_LANGUAGE "Lingua vocale"
#define TR_TEXT_LANGUAGE "Lingua testo"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/jp.h
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@
#define TR_SENSOR "センサー"
#define TR_COUNTRY_CODE "カントリーコード"
#define TR_USBMODE "USBモード"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== TR_USB_CHARGE occurrences ==\n'
rg -n 'TR_USB_CHARGE' radio/src/translations/i18n

printf '\n== Nearby lines in affected files ==\n'
for f in radio/src/translations/i18n/jp.h radio/src/translations/i18n/ko.h radio/src/translations/i18n/nl.h; do
  echo "--- $f"
  # show a small window around the matching line if present
  line=$(rg -n 'TR_USB_CHARGE' "$f" | head -n1 | cut -d: -f1 || true)
  if [ -n "${line:-}" ]; then
    start=$((line-3)); [ "$start" -lt 1 ] && start=1
    end=$((line+3))
    sed -n "${start},${end}p" "$f" | cat -n
  fi
done

printf '\n== File size hints ==\n'
wc -l radio/src/translations/i18n/jp.h radio/src/translations/i18n/ko.h radio/src/translations/i18n/nl.h

Repository: EdgeTX/edgetx

Length of output: 3686


Translate TR_USB_CHARGE in these locale files. jp.h, ko.h, and nl.h still show the English fallback here; add localized labels or leave a note if the English text is intentional.

📍 Affects 3 files
  • radio/src/translations/i18n/jp.h#L986-L986 (this comment)
  • radio/src/translations/i18n/ko.h#L1030-L1030
  • radio/src/translations/i18n/nl.h#L983-L983
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@radio/src/translations/i18n/jp.h` at line 986, Update TR_USB_CHARGE in
radio/src/translations/i18n/jp.h:986-986,
radio/src/translations/i18n/ko.h:1030-1030, and
radio/src/translations/i18n/nl.h:983-983 with appropriate Japanese, Korean, and
Dutch labels respectively, or add an explicit note in each file if retaining the
English text is intentional.

#define TR_JACK_MODE "Jackモード"
#define TR_VOICE_LANGUAGE "音声言語"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
1 change: 1 addition & 0 deletions radio/src/translations/i18n/ko.h
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@
#define TR_SENSOR "센서"
#define TR_COUNTRY_CODE "국가 코드"
#define TR_USBMODE "USB 모드"
#define TR_USB_CHARGE "USB SD/Joystick/VCP charge"
#define TR_JACK_MODE "잭 모드"
#define TR_VOICE_LANGUAGE "음성 언어"
#define TR_TEXT_LANGUAGE "Text language"
Expand Down
Loading
Loading