diff --git a/firmware/boards/f1_dual/wideband_board_config.h b/firmware/boards/f1_dual/wideband_board_config.h index 9f1f48a..9ddb377 100644 --- a/firmware/boards/f1_dual/wideband_board_config.h +++ b/firmware/boards/f1_dual/wideband_board_config.h @@ -7,9 +7,6 @@ #define AFR_CHANNELS 2 #define EGT_CHANNELS 2 -// UART used for debug -#define UART_DEBUG - // Fundamental board constants #define VCC_VOLTS (3.3f) #define HALF_VCC (VCC_VOLTS / 2) @@ -61,8 +58,6 @@ // ******************************* // TunerStudio Primary Port // ******************************* -//#define TS_PRIMARY_UART_PORT UARTD1 -//#define TS_PRIMARY_BAUDRATE 38400 #define TS_PRIMARY_SERIAL_PORT SD1 #define TS_PRIMARY_BAUDRATE 115200 diff --git a/firmware/boards/f1_rev3/wideband_board_config.h b/firmware/boards/f1_rev3/wideband_board_config.h index 688f2dd..faa7a10 100644 --- a/firmware/boards/f1_rev3/wideband_board_config.h +++ b/firmware/boards/f1_rev3/wideband_board_config.h @@ -48,8 +48,5 @@ // ******************************* // TunerStudio Primary Port // ******************************* -//#define TS_PRIMARY_SERIAL_PORT SD1 -//#define TS_PRIMARY_BAUDRATE 115200 - -// UART used for debug -#define UART_DEBUG +#define TS_PRIMARY_SERIAL_PORT SD1 +#define TS_PRIMARY_BAUDRATE 115200 diff --git a/firmware/max31855.cpp b/firmware/max31855.cpp index ce97928..c84a74d 100644 --- a/firmware/max31855.cpp +++ b/firmware/max31855.cpp @@ -7,7 +7,7 @@ #include "max31855.h" -#if HAL_USE_SPI +#if (EGT_CHANNELS > 0) static SPIConfig spi_config[2] = { @@ -153,9 +153,9 @@ const struct livedata_egt_s * getEgtLiveDataStructAddr(const int ch) #else -const struct livedata_egt_s * getEgtLiveDataStructAddr(const int ch) +const struct livedata_egt_s * getEgtLiveDataStructAddr(const int) { return NULL; } -#endif /* HAL_USE_SPI */ +#endif /* EGT_CHANNELS > 0 */ diff --git a/firmware/max31855.h b/firmware/max31855.h index 82b8b41..d6ff353 100644 --- a/firmware/max31855.h +++ b/firmware/max31855.h @@ -28,7 +28,7 @@ struct livedata_egt_s { // for all board. in case of no EGT - returns NULL const struct livedata_egt_s * getEgtLiveDataStructAddr(const int ch); -#if HAL_USE_SPI +#if (EGT_CHANNELS > 0) #define MAX31855_THREAD_STACK (512) #define MAX31855_THREAD_PRIO (NORMALPRIO + 1) @@ -64,4 +64,4 @@ private: void StartEgt(); Max31855* getEgtDrivers(); -#endif // HAL_USE_SPI +#endif // (EGT_CHANNELS > 0) diff --git a/firmware/uart.cpp b/firmware/uart.cpp index ca5d0e6..b4a5777 100644 --- a/firmware/uart.cpp +++ b/firmware/uart.cpp @@ -57,7 +57,7 @@ static void UartThread(void*) chnWrite(&SD1, (const uint8_t *)printBuffer, writeCount); } -#if HAL_USE_SPI +#if (EGT_CHANNELS > 0) for (ch = 0; ch < EGT_CHANNELS; ch++) { size_t writeCount = chsnprintf(printBuffer, 200, "EGT[%d]: %d C (int %d C)\r\n", @@ -65,7 +65,7 @@ static void UartThread(void*) (int)getEgtDrivers()[ch].coldJunctionTemperature); chnWrite(&SD1, (const uint8_t *)printBuffer, writeCount); } -#endif /* HAL_USE_SPI */ +#endif /* EGT_CHANNELS > 0 */ chThdSleepMilliseconds(100); }