Support MAVLink console

Implement receiving and sending SERIAL_CONTROL message
Use global defined print function instead of Serial.printf
This commit is contained in:
Oleg Kalachev
2025-02-18 10:33:01 +03:00
parent bfef7bd26a
commit d60628e14d
13 changed files with 103 additions and 55 deletions
+2 -2
View File
@@ -67,13 +67,13 @@ void logData() {
void dumpLog() {
// Print header
for (int i = 0; i < logColumns; i++) {
Serial.printf("%s%s", logEntries[i].name, i < logColumns - 1 ? "," : "\n");
print("%s%s", logEntries[i].name, i < logColumns - 1 ? "," : "\n");
}
// Print data
for (int i = 0; i < LOG_SIZE; i++) {
if (logBuffer[i][0] == 0) continue; // skip empty records
for (int j = 0; j < logColumns; j++) {
Serial.printf("%g%s", logBuffer[i][j], j < logColumns - 1 ? "," : "\n");
print("%g%s", logBuffer[i][j], j < logColumns - 1 ? "," : "\n");
}
}
}