diff --git a/src/taranis/board_taranis.h b/src/taranis/board_taranis.h index cb3bb865a..5eeb4e406 100644 --- a/src/taranis/board_taranis.h +++ b/src/taranis/board_taranis.h @@ -84,7 +84,8 @@ uint8_t usbPlugged(void); #define BOOTLOADER_REQUEST() (0) #define usbBootloader() -#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/) +#define SLAVE_MODE() (g_model.trainerMode == 1) +#define TRAINER_CONNECTED() (GPIO_ReadInputDataBit(GPIOTRNDET, PIN_TRNDET) == Bit_RESET) void delaysInit(); diff --git a/src/view_main.cpp b/src/view_main.cpp index dba121155..6de3bf0e7 100644 --- a/src/view_main.cpp +++ b/src/view_main.cpp @@ -263,11 +263,11 @@ void displayTopBar() x -= 12; } - if (SLAVE_MODE()) { + if (TRAINER_CONNECTED() && SLAVE_MODE()) { LCD_NOTIF_ICON(x, ICON_TRAINEE); x -= 12; } - else if (0) { + else if (TRAINER_CONNECTED() && !SLAVE_MODE()) { LCD_NOTIF_ICON(x, ICON_TRAINER); x -= 12; }