Add cli commands for switching mode

Make mode variable int instead of enum, which is more convinient.
This commit is contained in:
Oleg Kalachev
2025-08-26 21:55:27 +03:00
parent 8418723ccc
commit b21e81a68b
2 changed files with 9 additions and 2 deletions

View File

@@ -34,8 +34,8 @@
#define TILT_MAX radians(30)
#define RATES_D_LPF_ALPHA 0.2 // cutoff frequency ~ 40 Hz
enum { MANUAL, ACRO, STAB } mode = STAB;
enum { YAW, YAW_RATE } yawMode = YAW;
const int MANUAL = 0, ACRO = 1, STAB = 2; // flight modes
int mode = STAB;
bool armed = false;
PID rollRatePID(ROLLRATE_P, ROLLRATE_I, ROLLRATE_D, ROLLRATE_I_LIM, RATES_D_LPF_ALPHA);