mirror of
https://github.com/okalachev/flix.git
synced 2026-06-28 05:56:44 +00:00
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:
+2
-1
@@ -11,7 +11,7 @@ extern const int MOTOR_REAR_LEFT, MOTOR_REAR_RIGHT, MOTOR_FRONT_RIGHT, MOTOR_FRO
|
||||
extern const int RAW, ACRO, STAB, AUTO;
|
||||
extern float t, dt, loopRate;
|
||||
extern uint16_t channels[16];
|
||||
extern float controlRoll, controlPitch, controlThrottle, controlYaw, controlMode;
|
||||
extern float controlTime;
|
||||
extern int mode;
|
||||
extern bool armed;
|
||||
|
||||
@@ -132,6 +132,7 @@ void doCommand(String str, bool echo = false) {
|
||||
}
|
||||
print("\nroll: %g pitch: %g yaw: %g throttle: %g mode: %g\n",
|
||||
controlRoll, controlPitch, controlYaw, controlThrottle, controlMode);
|
||||
print("time: %.1f\n", controlTime);
|
||||
print("mode: %s\n", getModeName());
|
||||
print("armed: %d\n", armed);
|
||||
} else if (command == "wifi") {
|
||||
|
||||
Reference in New Issue
Block a user