[taranis] trainer detection and main view icons
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user