Fix serial port switching, archive firmware.elf
This commit is contained in:
parent
ffb0b04c03
commit
54c34683c0
3 changed files with 12 additions and 9 deletions
13
src/main.cpp
13
src/main.cpp
|
|
@ -186,13 +186,14 @@ void setup()
|
|||
|
||||
comPort = (HardwareSerial*) &PRIMARY_SERIAL_PORT;
|
||||
PRIMARY_SERIAL_PORT.begin(115200);
|
||||
while (!PRIMARY_SERIAL_PORT)
|
||||
delay(1);
|
||||
#if defined(SECONDARY_SERIAL_PORT)
|
||||
SECONDARY_SERIAL_PORT.begin(115200);
|
||||
while (!SECONDARY_SERIAL_PORT)
|
||||
delay(1);
|
||||
#ifdef SECONDARY_SERIAL_PORT
|
||||
SECONDARY_SERIAL_PORT.begin(115200);
|
||||
//wait for either port to be ready
|
||||
while (!PRIMARY_SERIAL_PORT && !SECONDARY_SERIAL_PORT)
|
||||
#else
|
||||
while (!PRIMARY_SERIAL_PORT)
|
||||
#endif
|
||||
delay(1);
|
||||
|
||||
register_module(core_commands, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue