diff --git a/flix/cli.ino b/flix/cli.ino index 9c82419..19c942e 100644 --- a/flix/cli.ino +++ b/flix/cli.ino @@ -54,6 +54,7 @@ const char* motd = "mfr, mfl, mrr, mrl - test motor (remove props)\n" "log - show log info\n" "log header - show log header\n" +"log reset - reset log\n" "log - setup log topic rate\n" "l - show log values starting with str\n" "l expose - expose log value to telemetry\n" @@ -164,6 +165,8 @@ void doCommand(String str, bool echo = false) { configLogThrottle(arg0.c_str(), arg1.toFloat()); } else if (command == "log" && arg0 == "header") { printLogHeader(); + } else if (command == "log" && arg0 == "reset") { + resetLog(); } else if (command == "l" && arg0 == "expose" && arg1 != "") { exposeLogValue(arg1.c_str()); } else if (command == "l") { diff --git a/flix/log.ino b/flix/log.ino index 7d4e758..b4f94e4 100644 --- a/flix/log.ino +++ b/flix/log.ino @@ -161,6 +161,8 @@ void resetLog() { value.lastValue = NAN; } } + logCursor = 0; + logLength = 0; } void writeLog(const void *data, size_t size) {