mainmenu.lbm removed from Taranis. Cmake dependencies fixed.

This commit is contained in:
Damjan Adamic
2015-11-19 18:31:44 +01:00
parent 32d0e3890a
commit f05058252f
4 changed files with 4 additions and 70 deletions
@@ -148,7 +148,7 @@ add_library(opentx-taranisplus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-taranisx9e${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
add_library(opentx-horus${SUFFIX}-simulator SHARED ${OPENTX_SRC_FILES})
set(dependencies_9x lbm_9x_bitmaps firmware_translations)
set(dependencies_9x lbm_9x_bitmaps firmware_translations stamp)
add_dependencies(opentx-9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xr${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9x128${SUFFIX}-simulator ${dependencies_9x})
@@ -158,7 +158,7 @@ add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
set(dependencies_taranis lbm_taranis_bitmaps lua_export_taranis firmware_translations)
set(dependencies_taranis lbm_taranis_bitmaps lua_export_taranis firmware_translations stamp)
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis})
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis})
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis})
+1 -4
View File
@@ -923,7 +923,7 @@ ifeq ($(PCB), TARANIS)
endif
TRGT = arm-none-eabi-
OPT = s
BITMAPS += $(patsubst %.png,%.lbm,$(wildcard bitmaps/Taranis/*.png)) bitmaps/Taranis/mainmenu.lbm
BITMAPS += $(patsubst %.png,%.lbm,$(wildcard bitmaps/Taranis/*.png))
SDCARD = YES
THR_TRACE = YES
EXT = FRSKY_SPORT
@@ -1907,9 +1907,6 @@ bitmaps/9X/%.lbm: bitmaps/9X/%.png
bitmaps/Taranis/%.lbm: bitmaps/Taranis/%.png
$(IMG2LBM) $^ $@ $(LCDSIZE) 4bits
bitmaps/Taranis/mainmenu.png: ../util/taranisicons.py $(wildcard bitmaps/Taranis/std/*.png)
@$(PYTHON) ../util/taranisicons.py
bitmaps/Flamenco/%.lbm: bitmaps/Flamenco/%.png
$(IMG2LBM) $^ $@ $(LCDSIZE) 4/4/4/4
+1 -50
View File
@@ -439,20 +439,6 @@ bool isMenuAvailable(int index)
}
}
#define GRAPHICAL_MENUS 0
#if GRAPHICAL_MENUS == 1
#define DECLARE_MAIN_MENU() static int currentMenuIndex = -1
#define INIT_MAIN_MENU() currentMenuIndex = -1
#define IS_MAIN_MENU_DISPLAYED() currentMenuIndex > 0
#define TOGGLE_MAIN_MENU() currentMenuIndex = -currentMenuIndex
#else
#define DECLARE_MAIN_MENU()
#define INIT_MAIN_MENU()
#define IS_MAIN_MENU_DISPLAYED() 0
#define TOGGLE_MAIN_MENU()
#endif
int getSwitchCount()
{
int count = 0;
@@ -466,14 +452,11 @@ int getSwitchCount()
void menuMainView(uint8_t event)
{
DECLARE_MAIN_MENU();
STICK_SCROLL_DISABLE();
switch(event) {
case EVT_ENTRY:
INIT_MAIN_MENU();
killEvents(KEY_EXIT);
killEvents(KEY_UP);
killEvents(KEY_DOWN);
@@ -496,20 +479,12 @@ void menuMainView(uint8_t event)
#if MENUS_LOCK != 2/*no menus*/
case EVT_KEY_BREAK(KEY_MENU):
#if GRAPHICAL_MENUS == 1
TOGGLE_MAIN_MENU();
#else
pushMenu(menuModelSelect);
#endif
break;
case EVT_KEY_LONG(KEY_MENU):
#if GRAPHICAL_MENUS == 1
pushMenu(lastPopMenu());
#else
pushMenu(menuGeneralSetup);
killEvents(event);
#endif
break;
#endif
@@ -529,11 +504,8 @@ void menuMainView(uint8_t event)
break;
case EVT_KEY_FIRST(KEY_EXIT):
if (IS_MAIN_MENU_DISPLAYED()) {
TOGGLE_MAIN_MENU();
}
#if defined(GVARS)
else if (s_gvar_timer > 0) {
if (s_gvar_timer > 0) {
s_gvar_timer = 0;
}
#endif
@@ -626,25 +598,4 @@ void menuMainView(uint8_t event)
lcd_outdezAtt(BITMAP_X+5*FW+FW/2, BITMAP_Y+2*FH+3, GVAR_VALUE(s_gvar_last, getGVarFlightPhase(mixerCurrentFlightMode, s_gvar_last)), BOLD);
}
#endif
#if GRAPHICAL_MENUS > 0
if (IS_MAIN_MENU_DISPLAYED()) {
displayMenuBar(MAIN_MENU, currentMenuIndex-1);
switch (event) {
case EVT_KEY_FIRST(KEY_MINUS):
currentMenuIndex = circularIncDec(currentMenuIndex, +1, 1, DIM(MAIN_MENU), isMenuAvailable);
break;
case EVT_KEY_FIRST(KEY_PLUS):
currentMenuIndex = circularIncDec(currentMenuIndex, -1, 1, DIM(MAIN_MENU), isMenuAvailable);
break;
case EVT_KEY_FIRST(KEY_ENTER):
killEvents(event);
pushMenu(MAIN_MENU[currentMenuIndex-1].action);
TOGGLE_MAIN_MENU();
break;
}
}
#endif
}
-14
View File
@@ -92,20 +92,6 @@ void drawScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uint16_t co
lcdDrawVerticalLine(x, y + yofs, yhgt, SOLID, FORCE);
}
const pm_uchar MAINMENU_LBM[] PROGMEM = {
#include "bitmaps/Taranis/mainmenu.lbm"
};
void displayMenuBar(const MenuItem *menu, int index)
{
drawFilledRect(0, 0, LCD_W, 32, SOLID, ERASE);
drawFilledRect(0, 24, LCD_W, 7, SOLID, GREY_DEFAULT);
lcd_bmp(1, 0, MAINMENU_LBM);
lcdDrawText(0, 24, menu[index].name, INVERS);
lcdDrawRect(index*24, 0, 26, 24, SOLID, FORCE);
lcdDrawHorizontalLine(0, 31, LCD_W, SOLID, FORCE);
}
void drawProgressBar(const char *label)
{
lcd_putsLeft(4*FH, label);