Support MAVLink console

Implement receiving and sending SERIAL_CONTROL message
Use global defined print function instead of Serial.printf
This commit is contained in:
Oleg Kalachev
2025-02-18 10:33:01 +03:00
parent bfef7bd26a
commit d60628e14d
13 changed files with 103 additions and 55 deletions

View File

@@ -34,7 +34,8 @@ void controlTorque();
void showTable();
void sendMotors();
bool motorsActive();
void doCommand(String str);
void print(const char* format, ...);
void doCommand(String str, bool echo);
void cliTestMotor(uint8_t n);
void normalizeRC();
void printRCCal();
@@ -43,6 +44,7 @@ void sendMavlink();
void sendMessage(const void *msg);
void receiveMavlink();
void handleMavlink(const void *_msg);
void mavlinkPrint(const char* str);
void failsafe();
void armingFailsafe();
void rcLossFailsafe();
@@ -51,8 +53,8 @@ inline Quaternion FLU2FRD(const Quaternion &q);
// mocks
void setLED(bool on) {};
void calibrateGyro() { printf("Skip gyro calibrating\n"); };
void calibrateAccel() { printf("Skip accel calibrating\n"); };
void printIMUCal() { printf("cal: N/A\n"); };
void calibrateGyro() { print("Skip gyro calibrating\n"); };
void calibrateAccel() { print("Skip accel calibrating\n"); };
void printIMUCal() { print("cal: N/A\n"); };
void printIMUInfo() {};
Vector accBias, gyroBias, accScale(1, 1, 1);