Serial.print now covered by LogSerial class
This commit is contained in:
@@ -19,12 +19,12 @@ void CommInterface::initComm(LiveData* pLiveData, BoardInterface* pBoard) {
|
||||
void CommInterface::mainLoop() {
|
||||
|
||||
// Send command from TTY to OBD2
|
||||
if (Serial.available()) {
|
||||
ch = Serial.read();
|
||||
if (syslog->available()) {
|
||||
ch = syslog->read();
|
||||
if (ch == '\r' || ch == '\n') {
|
||||
board->customConsoleCommand(response);
|
||||
response = response + ch;
|
||||
Serial.println(response);
|
||||
syslog->println(response);
|
||||
executeCommand(response);
|
||||
response = "";
|
||||
} else {
|
||||
@@ -59,8 +59,8 @@ bool CommInterface::doNextQueueCommand() {
|
||||
liveData->currentAtshRequest = liveData->commandRequest;
|
||||
}
|
||||
|
||||
Serial.print(">>> ");
|
||||
Serial.println(liveData->commandRequest);
|
||||
syslog->print(">>> ");
|
||||
syslog->println(liveData->commandRequest);
|
||||
liveData->responseRowMerged = "";
|
||||
executeCommand(liveData->commandRequest);
|
||||
liveData->commandQueueIndex++;
|
||||
@@ -72,7 +72,7 @@ bool CommInterface::doNextQueueCommand() {
|
||||
bool CommInterface::parseResponse() {
|
||||
|
||||
// 1 frame data
|
||||
Serial.println(liveData->responseRow);
|
||||
syslog->println(liveData->responseRow);
|
||||
|
||||
// Merge frames 0:xxxx 1:yyyy 2:zzzz to single response xxxxyyyyzzzz string
|
||||
if (liveData->responseRow.length() >= 2 && liveData->responseRow.charAt(1) == ':') {
|
||||
|
||||
Reference in New Issue
Block a user