More flash savings when GUI=NO
This commit is contained in:
+12
-3
@@ -150,7 +150,7 @@ PWM_BACKLIGHT = NO
|
|||||||
|
|
||||||
# SPLASH on START
|
# SPLASH on START
|
||||||
# Values = YES, NO, FIXED
|
# Values = YES, NO, FIXED
|
||||||
SPLASH = YES
|
SPLASH = $(GUI)
|
||||||
|
|
||||||
# GRAPHICS (sliders / checkboxes / bold / batt graph)
|
# GRAPHICS (sliders / checkboxes / bold / batt graph)
|
||||||
GRAPHICS = YES
|
GRAPHICS = YES
|
||||||
@@ -389,7 +389,10 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR))
|
|||||||
INCDIRS += targets/stock
|
INCDIRS += targets/stock
|
||||||
CPPDEFS = -DF_CPU=$(F_CPU)UL -DPCBSTD -DCPUM64 -DEEPROM_VARIANT=$(shell echo ${EEPROM_VARIANT} | bc)
|
CPPDEFS = -DF_CPU=$(F_CPU)UL -DPCBSTD -DCPUM64 -DEEPROM_VARIANT=$(shell echo ${EEPROM_VARIANT} | bc)
|
||||||
BOARDSRC = main_avr.cpp targets/stock/board_stock.cpp
|
BOARDSRC = main_avr.cpp targets/stock/board_stock.cpp
|
||||||
EXTRABOARDSRC = targets/stock/lcd_driver.cpp targets/common_avr/telemetry_driver.cpp
|
EXTRABOARDSRC = targets/common_avr/telemetry_driver.cpp
|
||||||
|
ifeq ($(GUI), YES)
|
||||||
|
EXTRABOARDSRC += targets/stock/lcd_driver.cpp
|
||||||
|
endif
|
||||||
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
EEPROMSRC = eeprom_common.cpp eeprom_rlc.cpp
|
||||||
PULSESSRC = pulses/pulses_avr.cpp
|
PULSESSRC = pulses/pulses_avr.cpp
|
||||||
CPPSRC += debug.cpp
|
CPPSRC += debug.cpp
|
||||||
@@ -950,7 +953,13 @@ ifeq ($(GUI), YES)
|
|||||||
GUISRC = gui/$(GUIDIRECTORY)/helpers.cpp gui/$(GUIDIRECTORY)/navigation.cpp gui/$(GUIDIRECTORY)/popups.cpp gui/$(GUIDIRECTORY)/widgets.cpp gui/$(GUIDIRECTORY)/menus.cpp $(GUIMODELSRC) $(GUIGENERALSRC) gui/$(GUIDIRECTORY)/view_main.cpp gui/$(GUIDIRECTORY)/view_statistics.cpp
|
GUISRC = gui/$(GUIDIRECTORY)/helpers.cpp gui/$(GUIDIRECTORY)/navigation.cpp gui/$(GUIDIRECTORY)/popups.cpp gui/$(GUIDIRECTORY)/widgets.cpp gui/$(GUIDIRECTORY)/menus.cpp $(GUIMODELSRC) $(GUIGENERALSRC) gui/$(GUIDIRECTORY)/view_main.cpp gui/$(GUIDIRECTORY)/view_statistics.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CPPSRC += opentx.cpp functions.cpp strhelpers.cpp $(PULSESSRC) switches.cpp curves.cpp mixer.cpp stamp.cpp $(GUISRC) $(EEPROMSRC) gui/$(GUIDIRECTORY)/lcd.cpp gui/$(GUIDIRECTORY)/splash.cpp keys.cpp maths.cpp translations.cpp gui/$(GUIDIRECTORY)/fonts.cpp $(TTS_SRC)
|
CPPSRC += opentx.cpp functions.cpp strhelpers.cpp $(PULSESSRC) switches.cpp curves.cpp mixer.cpp stamp.cpp $(GUISRC) $(EEPROMSRC)
|
||||||
|
|
||||||
|
ifeq ($(GUI), YES)
|
||||||
|
GUISRC += gui/$(GUIDIRECTORY)/lcd.cpp gui/$(GUIDIRECTORY)/splash.cpp gui/$(GUIDIRECTORY)/fonts.cpp
|
||||||
|
endif
|
||||||
|
|
||||||
|
GUISRC += keys.cpp maths.cpp translations.cpp $(TTS_SRC)
|
||||||
|
|
||||||
# Debugging format.
|
# Debugging format.
|
||||||
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
|
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
|
||||||
|
|||||||
@@ -975,9 +975,11 @@ void eeLoadModel(uint8_t id)
|
|||||||
logicalSwitchesReset();
|
logicalSwitchesReset();
|
||||||
|
|
||||||
if (pulsesStarted()) {
|
if (pulsesStarted()) {
|
||||||
|
#if defined(GUI)
|
||||||
if (!newModel) {
|
if (!newModel) {
|
||||||
checkAll();
|
checkAll();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
resumePulses();
|
resumePulses();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-2
@@ -1011,6 +1011,7 @@ void doSplash()
|
|||||||
#define doSplash()
|
#define doSplash()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GUI)
|
||||||
void checkAll()
|
void checkAll()
|
||||||
{
|
{
|
||||||
#if !defined(PCBSKY9X)
|
#if !defined(PCBSKY9X)
|
||||||
@@ -1049,6 +1050,7 @@ void checkAll()
|
|||||||
|
|
||||||
START_SILENCE_PERIOD();
|
START_SILENCE_PERIOD();
|
||||||
}
|
}
|
||||||
|
#endif // GUI
|
||||||
|
|
||||||
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
||||||
void checkStartupWarnings()
|
void checkStartupWarnings()
|
||||||
@@ -1154,6 +1156,7 @@ void alert(const pm_char * t, const pm_char *s MESSAGE_SOUND_ARG)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(GUI)
|
||||||
void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SOUND_ARG)
|
void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SOUND_ARG)
|
||||||
{
|
{
|
||||||
lcd_clear();
|
lcd_clear();
|
||||||
@@ -1206,6 +1209,7 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO
|
|||||||
lcdSetContrast();
|
lcdSetContrast();
|
||||||
clearKeyEvents();
|
clearKeyEvents();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(GVARS)
|
#if defined(GVARS)
|
||||||
int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 };
|
int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 };
|
||||||
@@ -1971,8 +1975,10 @@ void opentxStart()
|
|||||||
eeLoadModel(g_eeGeneral.currModel);
|
eeLoadModel(g_eeGeneral.currModel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GUI)
|
||||||
checkAlarm();
|
checkAlarm();
|
||||||
checkAll();
|
checkAll();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(GUI)
|
#if defined(GUI)
|
||||||
if (g_eeGeneral.chkSum != evalChkSum()) {
|
if (g_eeGeneral.chkSum != evalChkSum()) {
|
||||||
@@ -2629,7 +2635,9 @@ void opentxInit(OPENTX_INIT_ARGS)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(GUI)
|
||||||
lcdSetContrast();
|
lcdSetContrast();
|
||||||
|
#endif
|
||||||
backlightOn();
|
backlightOn();
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
@@ -2670,7 +2678,7 @@ int main(void)
|
|||||||
|
|
||||||
boardInit();
|
boardInit();
|
||||||
|
|
||||||
#if !defined(PCBTARANIS)
|
#if defined(GUI) && !defined(PCBTARANIS)
|
||||||
lcdInit();
|
lcdInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2683,7 +2691,7 @@ int main(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(PCBTARANIS)
|
#if defined(GUI) && !defined(PCBTARANIS)
|
||||||
lcdSetRefVolt(25);
|
lcdSetRefVolt(25);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -649,7 +649,11 @@ void readKeysAndTrims();
|
|||||||
|
|
||||||
uint16_t evalChkSum();
|
uint16_t evalChkSum();
|
||||||
|
|
||||||
#if defined(VOICE)
|
#if !defined(GUI)
|
||||||
|
#define MESSAGE_SOUND_ARG
|
||||||
|
#define MESSAGE(...)
|
||||||
|
#define ALERT(...)
|
||||||
|
#elif defined(VOICE)
|
||||||
#define MESSAGE_SOUND_ARG , uint8_t sound
|
#define MESSAGE_SOUND_ARG , uint8_t sound
|
||||||
#define MESSAGE(title, msg, info, sound) message(title, msg, info, sound)
|
#define MESSAGE(title, msg, info, sound) message(title, msg, info, sound)
|
||||||
#define ALERT(title, msg, sound) alert(title, msg, sound)
|
#define ALERT(title, msg, sound) alert(title, msg, sound)
|
||||||
|
|||||||
@@ -636,6 +636,7 @@ int8_t getMovedSwitch()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(GUI)
|
||||||
void checkSwitches()
|
void checkSwitches()
|
||||||
{
|
{
|
||||||
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
||||||
@@ -798,6 +799,7 @@ void checkSwitches()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif // GUI
|
||||||
|
|
||||||
void logicalSwitchesTimerTick()
|
void logicalSwitchesTimerTick()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user