Skip to content

Commit

Permalink
conditionally compile TS as it's a memory hog
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Nov 23, 2023
1 parent f784d5d commit f53da88
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
15 changes: 10 additions & 5 deletions firmware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,21 @@ CPPSRC = $(ALLCPPSRC) \
max3185x.cpp \
uart.cpp \
auxout.cpp \
livedata.cpp \
indication.cpp \
console/binary/tunerstudio.cpp \
console/binary/tunerstudio_io.cpp \
console/binary/tunerstudio_io_serial.cpp \
console/binary/tunerstudio_commands.cpp \
sampling_thread.cpp \
heater_thread.cpp \
main.cpp

ifneq ($(ENABLE_TS),)
CPPSRC += console/binary/tunerstudio.cpp \
console/binary/tunerstudio_io.cpp \
console/binary/tunerstudio_io_serial.cpp \
console/binary/tunerstudio_commands.cpp \
livedata.cpp \

DDEFS += -DTS_ENABLED=TRUE
endif

# List ASM source files here.
ASMSRC = $(ALLASMSRC)

Expand Down
1 change: 1 addition & 0 deletions firmware/boards/f1_dual/board.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
USE_BOOTLOADER = no
ENABLE_TS = yes

MCU = cortex-m3

Expand Down
1 change: 1 addition & 0 deletions firmware/boards/f1_dual_rev1/board.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
USE_BOOTLOADER = no
ENABLE_TS = yes

MCU = cortex-m3

Expand Down
1 change: 1 addition & 0 deletions firmware/boards/f1_rev2/board.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
USE_BOOTLOADER = no
ENABLE_TS = yes

MCU = cortex-m3

Expand Down
1 change: 1 addition & 0 deletions firmware/boards/f1_rev3/board.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
USE_BOOTLOADER = no
ENABLE_TS = yes

MCU = cortex-m3

Expand Down
2 changes: 2 additions & 0 deletions firmware/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ int main() {
StartPumpControl();
InitAuxDac();

#if ENABLE_TS
startTunerStudioConnectivity();
#endif

InitCan();
InitUart();
Expand Down
7 changes: 0 additions & 7 deletions firmware/wideband_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,3 @@
#define HEATER_BATTERY_ON_VOLTAGE 9.5
// mininal battery voltage to continue heating
#define HEATER_BATTETY_OFF_VOLTAGE 8.5

// *******************************
// TunerStudio configuration
// *******************************
#if defined(TS_PRIMARY_UART_PORT) || defined(TS_PRIMARY_SERIAL_PORT)
#define TS_ENABLED
#endif

0 comments on commit f53da88

Please sign in to comment.