mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
Add reset command to cli
This commit is contained in:
parent
2a06155cbe
commit
860db237b7
@ -30,6 +30,7 @@ const char* motd =
|
|||||||
"cg - calibrate gyro\n"
|
"cg - calibrate gyro\n"
|
||||||
"ca - calibrate accel\n"
|
"ca - calibrate accel\n"
|
||||||
"fullmot <n> - test motor on all signals\n"
|
"fullmot <n> - test motor on all signals\n"
|
||||||
|
"reset - reset state\n"
|
||||||
"wifi - start wi-fi access point\n";
|
"wifi - start wi-fi access point\n";
|
||||||
|
|
||||||
const struct Param {
|
const struct Param {
|
||||||
@ -99,6 +100,8 @@ void doCommand(String& command, String& value)
|
|||||||
cliTestMotor(MOTOR_REAR_LEFT);
|
cliTestMotor(MOTOR_REAR_LEFT);
|
||||||
} else if (command == "fullmot") {
|
} else if (command == "fullmot") {
|
||||||
fullMotorTest(value.toInt(), false);
|
fullMotorTest(value.toInt(), false);
|
||||||
|
} else if (command == "reset") {
|
||||||
|
attitude = Quaternion();
|
||||||
} else {
|
} else {
|
||||||
float val = value.toFloat();
|
float val = value.toFloat();
|
||||||
// TODO: on error returns 0, check invalid value
|
// TODO: on error returns 0, check invalid value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user