mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39:33 +00:00
Add accel calibration command
This commit is contained in:
parent
147eef0af7
commit
c5323f5723
@ -30,6 +30,7 @@ const char* motd =
|
||||
"mot - show motor data\n"
|
||||
"log - dump in-RAM log\n"
|
||||
"cg - calibrate gyro\n"
|
||||
"ca - calibrate accel\n"
|
||||
"fullmot <n> - test motor on all signals\n"
|
||||
"wifi - start wi-fi access point\n";
|
||||
|
||||
@ -85,6 +86,8 @@ static void doCommand()
|
||||
dumpLog();
|
||||
} else if (command == "cg") {
|
||||
calibrateGyro();
|
||||
} else if (command == "ca") {
|
||||
calibrateAccel();
|
||||
} else if (command == "mfr") {
|
||||
cliTestMotor(MOTOR_FRONT_RIGHT);
|
||||
} else if (command == "mfl") {
|
||||
|
@ -4,6 +4,7 @@
|
||||
// Declarations of some functions and variables in Arduino code
|
||||
|
||||
#include <cmath>
|
||||
#include <stdio.h>
|
||||
#include "vector.h"
|
||||
#include "quaternion.h"
|
||||
|
||||
@ -41,7 +42,8 @@ static void cliTestMotor(uint8_t n);
|
||||
|
||||
// mocks
|
||||
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 sendMotors() {};
|
||||
void printIMUCal() { Serial.print("cal: N/A\n"); };
|
||||
|
Loading…
x
Reference in New Issue
Block a user