Move all global variable declarations to the appropriate subsystems

As it makes the subsystems code easier to understand.
Declare the most used variables in main sketch file as forward declarations.
Make all control input zero by default (except controlMode).
Minor changes.
This commit is contained in:
Oleg Kalachev
2026-01-03 13:28:18 +03:00
parent a5e3dfcf69
commit c8e5e08b03
10 changed files with 42 additions and 36 deletions
+2 -1
View File
@@ -17,7 +17,8 @@
#define PWM_MIN 0
#define PWM_MAX 1000000 / PWM_FREQUENCY
// Motors array indexes:
float motors[4]; // normalized motor thrusts in range [0..1]
const int MOTOR_REAR_LEFT = 0;
const int MOTOR_REAR_RIGHT = 1;
const int MOTOR_FRONT_RIGHT = 2;