Implement RC calibration, common for the real drone and the simulation

This commit is contained in:
Oleg Kalachev
2024-01-02 11:54:09 +03:00
parent 78f3f6e3b3
commit f520b57abe
9 changed files with 74 additions and 20 deletions

13
gazebo/SBUS.h Normal file
View File

@@ -0,0 +1,13 @@
// Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com>
// Repository: https://github.com/okalachev/flix
// SBUS library mock to make it possible to compile simulator with rc.ino
#include "joystick.h"
class SBUS {
public:
SBUS(HardwareSerial& bus) {};
void begin() {};
bool read(int16_t* channels, bool* failsafe, bool* lostFrame) { joystickGet(); return true; }; // NOTE: on the hardware channels is uint16_t
};