diff --git a/src/Makefile b/src/Makefile index a63ec9ea1..80db36daf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -345,33 +345,6 @@ ifeq ($(DSM2), PPM) CPPDEFS += -DDSM2 -DDSM2_PPM endif -#---------------- Compiler Options C ---------------- -# -g*: generate debugging information -# -O*: optimization level -# -f...: tuning, see GCC manual and avr-libc documentation -# -Wall...: warning level -# -Wa,...: tell GCC to pass this to the assembler. -# -adhlns...: create assembler listing -CFLAGS = -g$(DEBUG) -CFLAGS += $(CDEFS) -CFLAGS += -O$(OPT) -#CFLAGS += -mint8 -#CFLAGS += -mshort-calls -CFLAGS += -funsigned-char -CFLAGS += -funsigned-bitfields -CFLAGS += -fpack-struct -CFLAGS += -fshort-enums -#CFLAGS += -fno-unit-at-a-time -CFLAGS += -Wall -CFLAGS += -Wstrict-prototypes -CFLAGS += -Wundef -#CFLAGS += -Wunreachable-code -#CFLAGS += -Wsign-compare -CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst) -CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -CFLAGS += $(CSTANDARD) -CFLAGS += -fwhole-program - #---------------- Compiler Options C++ ---------------- # -g*: generate debugging information # -O*: optimization level @@ -393,7 +366,6 @@ CPPFLAGS += -O$(OPT) CPPFLAGS += -Wall CPPFLAGS += -Wno-strict-aliasing #CPPFLAGS += -Wstrict-prototypes -#CFLAGS += -Wundef #CPPFLAGS += -Wunreachable-code #CPPFLAGS += -Wsign-compare #CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst) @@ -402,10 +374,7 @@ CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) GCCVERSIONGTE462 := $(shell expr 4.6.2 \<= `$(CC) -dumpversion`) ifeq ($(GCCVERSIONGTE462),1) - CFLAGS += -flto CPPFLAGS += -flto -else - CFLAGS += --combine endif AVRGCCFLAGS = -fno-inline-small-functions @@ -567,16 +536,6 @@ MSG_ASSEMBLING = Assembling: MSG_CLEANING = Cleaning project: MSG_CREATING_LIBRARY = Creating library: - - - -# Define all object files. -OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o) - -# Define all listing files. -LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst) - - # Compiler flags to generate dependency files. GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d @@ -763,8 +722,6 @@ extcoff: $(TARGET).elf @echo $(MSG_EXTENDED_COFF) $(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof - - # Create final output files (.hex, .eep) from ELF output file. %.hex: %.elf @echo @@ -820,24 +777,12 @@ clean_list : $(REMOVE) *.d $(REMOVEDIR) .dep - -# Create object files directory -$(shell mkdir $(OBJDIR) 2>/dev/null) - - # Include the dependency files. -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*) - -# Listing of phony targets. -.PHONY : all begin finish end sizebefore sizeafter gccversion \ -build elf hex eep lss sym coff extcoff \ -clean clean_list program debug gdb-config stamp_header - - #### GOOGLE TESTS -GTEST_DIR = ../gtest-1.6.0/ +GTEST_DIR = ../gtest-1.6.0 # Where to find user code. USER_DIR = ./ diff --git a/src/model_menus.cpp b/src/model_menus.cpp index 7fa9aa528..a9276cefa 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -442,7 +442,7 @@ void menuProcModel(uint8_t event) uint16_t timer_val = timer->val; switch (m_posHorz) { case 0: - CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS+2*(MAX_PSWITCH+NUM_CSW)); + CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW)); break; case 1: { @@ -1762,7 +1762,7 @@ void menuProcFunctionSwitches(uint8_t event) case 0: putsSwitches(1*FW, y, sd->swtch, attr); if (active) { - CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH+1); + CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH); } break; case 1: