Merge in com port switching from sangaboard v4

I've refactored the use of the serial port, to store the
current serial port in a global variable in a module.
This is set to the most recent port to receive data,
and so we should always be replying to the port
that was used to initiate a command.

If SECONDARY_SERIAL_PORT is not defined, this
should result in no change - if it is, we should be
able to communicate on either port.
This commit is contained in:
Richard Bowman 2023-02-22 12:05:48 +00:00
parent e65c290ae6
commit 3997d66cde
12 changed files with 180 additions and 145 deletions

View file

@ -70,9 +70,9 @@ void test_multiple_argument_parsing(void)
void setup() {
Serial.begin(115200);
comPort->begin(115200);
// NOTE!!! Wait for >2 secs
// if board doesn't support software reset via Serial.DTR/RTS
// if board doesn't support software reset via comPort->DTR/RTS
delay(2000);
UNITY_BEGIN(); // IMPORTANT LINE!
//bizzare string issues caused this to fail in specific sequences, so we run it multiple times