[taranis] trainer detection and main view icons

This commit is contained in:
bernet.andre@gmail.com
2013-04-13 08:52:05 +00:00
parent f14a874bf5
commit 064c8d8a5c
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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
View File
@@ -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;
}