mirror of
https://github.com/okalachev/flix.git
synced 2026-01-12 05:57:52 +00:00
Add accel calibration command
This commit is contained in:
@@ -30,6 +30,7 @@ const char* motd =
|
|||||||
"mot - show motor data\n"
|
"mot - show motor data\n"
|
||||||
"log - dump in-RAM log\n"
|
"log - dump in-RAM log\n"
|
||||||
"cg - calibrate gyro\n"
|
"cg - calibrate gyro\n"
|
||||||
|
"ca - calibrate accel\n"
|
||||||
"fullmot <n> - test motor on all signals\n"
|
"fullmot <n> - test motor on all signals\n"
|
||||||
"wifi - start wi-fi access point\n";
|
"wifi - start wi-fi access point\n";
|
||||||
|
|
||||||
@@ -85,6 +86,8 @@ static void doCommand()
|
|||||||
dumpLog();
|
dumpLog();
|
||||||
} else if (command == "cg") {
|
} else if (command == "cg") {
|
||||||
calibrateGyro();
|
calibrateGyro();
|
||||||
|
} else if (command == "ca") {
|
||||||
|
calibrateAccel();
|
||||||
} else if (command == "mfr") {
|
} else if (command == "mfr") {
|
||||||
cliTestMotor(MOTOR_FRONT_RIGHT);
|
cliTestMotor(MOTOR_FRONT_RIGHT);
|
||||||
} else if (command == "mfl") {
|
} else if (command == "mfl") {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
// Declarations of some functions and variables in Arduino code
|
// Declarations of some functions and variables in Arduino code
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <stdio.h>
|
||||||
#include "vector.h"
|
#include "vector.h"
|
||||||
#include "quaternion.h"
|
#include "quaternion.h"
|
||||||
|
|
||||||
@@ -41,7 +42,8 @@ static void cliTestMotor(uint8_t n);
|
|||||||
|
|
||||||
// mocks
|
// mocks
|
||||||
void setLED(bool on) {};
|
void setLED(bool on) {};
|
||||||
void calibrateGyro() {};
|
void calibrateGyro() { printf("Skip gyro calibrating\n"); };
|
||||||
|
void calibrateAccel() { printf("Skip accel calibrating\n"); };
|
||||||
void fullMotorTest(int n) {};
|
void fullMotorTest(int n) {};
|
||||||
void sendMotors() {};
|
void sendMotors() {};
|
||||||
void printIMUCal() { Serial.print("cal: N/A\n"); };
|
void printIMUCal() { Serial.print("cal: N/A\n"); };
|
||||||
|
|||||||
Reference in New Issue
Block a user