From 860db237b763d5846b90b83267d497413ffacdf9 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 13 Dec 2023 07:48:23 +0300 Subject: [PATCH] Add reset command to cli --- flix/cli.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flix/cli.ino b/flix/cli.ino index fd74e85..ecf9ad8 100644 --- a/flix/cli.ino +++ b/flix/cli.ino @@ -30,6 +30,7 @@ const char* motd = "cg - calibrate gyro\n" "ca - calibrate accel\n" "fullmot - test motor on all signals\n" +"reset - reset state\n" "wifi - start wi-fi access point\n"; const struct Param { @@ -99,6 +100,8 @@ void doCommand(String& command, String& value) cliTestMotor(MOTOR_REAR_LEFT); } else if (command == "fullmot") { fullMotorTest(value.toInt(), false); + } else if (command == "reset") { + attitude = Quaternion(); } else { float val = value.toFloat(); // TODO: on error returns 0, check invalid value