More flash savings when GUI=NO
This commit is contained in:
+12
-3
@@ -150,7 +150,7 @@ PWM_BACKLIGHT = NO
|
||||
|
||||
# SPLASH on START
|
||||
# Values = YES, NO, FIXED
|
||||
SPLASH = YES
|
||||
SPLASH = $(GUI)
|
||||
|
||||
# GRAPHICS (sliders / checkboxes / bold / batt graph)
|
||||
GRAPHICS = YES
|
||||
@@ -389,7 +389,10 @@ ifeq ($(PCB), $(filter $(PCB), STD 9X 9XR))
|
||||
INCDIRS += targets/stock
|
||||
CPPDEFS = -DF_CPU=$(F_CPU)UL -DPCBSTD -DCPUM64 -DEEPROM_VARIANT=$(shell echo ${EEPROM_VARIANT} | bc)
|
||||
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
|
||||
PULSESSRC = pulses/pulses_avr.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
|
||||
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.
|
||||
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
|
||||
|
||||
@@ -975,9 +975,11 @@ void eeLoadModel(uint8_t id)
|
||||
logicalSwitchesReset();
|
||||
|
||||
if (pulsesStarted()) {
|
||||
#if defined(GUI)
|
||||
if (!newModel) {
|
||||
checkAll();
|
||||
}
|
||||
#endif
|
||||
resumePulses();
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -1011,6 +1011,7 @@ void doSplash()
|
||||
#define doSplash()
|
||||
#endif
|
||||
|
||||
#if defined(GUI)
|
||||
void checkAll()
|
||||
{
|
||||
#if !defined(PCBSKY9X)
|
||||
@@ -1049,6 +1050,7 @@ void checkAll()
|
||||
|
||||
START_SILENCE_PERIOD();
|
||||
}
|
||||
#endif // GUI
|
||||
|
||||
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
||||
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)
|
||||
{
|
||||
lcd_clear();
|
||||
@@ -1206,6 +1209,7 @@ void message(const pm_char *title, const pm_char *t, const char *last MESSAGE_SO
|
||||
lcdSetContrast();
|
||||
clearKeyEvents();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(GVARS)
|
||||
int8_t trimGvar[NUM_STICKS] = { -1, -1, -1, -1 };
|
||||
@@ -1971,8 +1975,10 @@ void opentxStart()
|
||||
eeLoadModel(g_eeGeneral.currModel);
|
||||
#endif
|
||||
|
||||
#if defined(GUI)
|
||||
checkAlarm();
|
||||
checkAll();
|
||||
#endif
|
||||
|
||||
#if defined(GUI)
|
||||
if (g_eeGeneral.chkSum != evalChkSum()) {
|
||||
@@ -2628,8 +2634,10 @@ void opentxInit(OPENTX_INIT_ARGS)
|
||||
eeDirty(EE_GENERAL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(GUI)
|
||||
lcdSetContrast();
|
||||
#endif
|
||||
backlightOn();
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
@@ -2670,7 +2678,7 @@ int main(void)
|
||||
|
||||
boardInit();
|
||||
|
||||
#if !defined(PCBTARANIS)
|
||||
#if defined(GUI) && !defined(PCBTARANIS)
|
||||
lcdInit();
|
||||
#endif
|
||||
|
||||
@@ -2683,7 +2691,7 @@ int main(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(PCBTARANIS)
|
||||
#if defined(GUI) && !defined(PCBTARANIS)
|
||||
lcdSetRefVolt(25);
|
||||
#endif
|
||||
|
||||
|
||||
+5
-1
@@ -649,7 +649,11 @@ void readKeysAndTrims();
|
||||
|
||||
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(title, msg, info, sound) message(title, msg, info, sound)
|
||||
#define ALERT(title, msg, sound) alert(title, msg, sound)
|
||||
|
||||
@@ -636,6 +636,7 @@ int8_t getMovedSwitch()
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(GUI)
|
||||
void checkSwitches()
|
||||
{
|
||||
#if defined(MODULE_ALWAYS_SEND_PULSES)
|
||||
@@ -798,6 +799,7 @@ void checkSwitches()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // GUI
|
||||
|
||||
void logicalSwitchesTimerTick()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user