Allow overriding the default Serial console output settings (#2528)

* Implement override_console_serial_port

* It's opposite day in Logictown

* Try to use native serial types for platforms

* Fix for s3

* Trunk

* Screw it... just declare as Print and handle init

* Alright, chatty kathy

* Missed a spot

* I'll take "Kill that FIXME" for 800, Alex

* Badunkadunk

* Refactor out a lot of duplicated code

* Boogers

* Okay I probably should stop changing everything
This commit is contained in:
Ben Meadors
2023-05-30 05:26:34 -05:00
committed by GitHub
co-authored by GitHub
parent 3bc82e59dc
commit 113026c372
10 changed files with 83 additions and 69 deletions
+3 -4
View File
@@ -40,9 +40,8 @@ void PhoneAPI::handleStartConfig()
state = STATE_SEND_MY_INFO;
LOG_INFO("Starting API client config\n");
nodeInfoForPhone = NULL; // Don't keep returning old nodeinfos
nodeDB.resetReadPointer(); // FIXME, this read pointer should be moved out of nodeDB and into this class - because
// this will break once we have multiple instances of PhoneAPI running independently
nodeInfoForPhone = NULL; // Don't keep returning old nodeinfos
resetReadIndex();
}
void PhoneAPI::close()
@@ -373,7 +372,7 @@ bool PhoneAPI::available()
case STATE_SEND_NODEINFO:
if (!nodeInfoForPhone)
nodeInfoForPhone = nodeDB.readNextInfo();
nodeInfoForPhone = nodeDB.readNextInfo(readIndex);
return true; // Always say we have something, because we might need to advance our state machine
case STATE_SEND_PACKETS: {