Skip to content

Commit

Permalink
chore: remove hardcoded aux1 debug hack (#5668)
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc authored Nov 23, 2024
1 parent 6c2f97c commit 740eb44
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 30 deletions.
10 changes: 0 additions & 10 deletions radio/src/serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,10 @@ void serialInit(uint8_t port_nr, int mode)

void initSerialPorts()
{
#if defined(DEBUG)
// AUX1 and serialPortStates was already initialized early in DEBUG config
for (uint8_t port_nr = 0; port_nr < MAX_AUX_SERIAL; port_nr++) {
if (port_nr != SP_AUX1) {
auto mode = getSerialPortMode(port_nr);
serialInit(port_nr, mode);
}
}
#else
for (uint8_t port_nr = 0; port_nr < MAX_AUX_SERIAL; port_nr++) {
auto mode = getSerialPortMode(port_nr);
serialInit(port_nr, mode);
}
#endif
}

int serialGetMode(uint8_t port_nr)
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/horus/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ void boardInit()

__enable_irq();

#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif

TRACE("\nHorus board started :)");
TRACE("RCC->CSR = %08x", RCC->CSR);

Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/nv14/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ void boardInit()
// detect NV14 vs EL18
hardwareOptions.pcbrev = boardGetPcbRev();

#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif

TRACE("\n%s board started :)",
hardwareOptions.pcbrev == PCBREV_NV14 ?
"NV14" : "EL18");
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/pl18/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ void boardInit()
__enable_irq();
#endif

#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif

TRACE("\nPL18 board started :)");
delay_ms(10);
TRACE("RCC->CSR = %08x", RCC->CSR);
Expand Down
5 changes: 0 additions & 5 deletions radio/src/targets/taranis/board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ void boardInit()
ws2812_update(&_led_timer);
#endif

#if defined(DEBUG) && defined(AUX_SERIAL)
serialSetMode(SP_AUX1, UART_MODE_DEBUG); // indicate AUX1 is used
serialInit(SP_AUX1, UART_MODE_DEBUG); // early AUX1 init
#endif

#if defined(HAPTIC)
hapticInit();
#endif
Expand Down

0 comments on commit 740eb44

Please sign in to comment.