mirror of
https://github.com/okalachev/flix.git
synced 2026-01-11 05:26:53 +00:00
Refactor control subsystem
Add interpretControls function to convert pilot commands and mode into control targets and make control functions independent from the mode. Add ratesExtra target for rates feed-forward; remove yawMode. Rename controlRate to controlRates to reflect rates variable name. Remove USER mode.
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
double t = NAN;
|
||||
float dt;
|
||||
float motors[4];
|
||||
float controlRoll, controlPitch, controlYaw, controlThrottle, controlArmed, controlMode;
|
||||
float controlRoll, controlPitch, controlYaw, controlThrottle = NAN;
|
||||
float controlArmed = NAN, controlMode = NAN;
|
||||
Vector acc;
|
||||
Vector gyro;
|
||||
Vector rates;
|
||||
@@ -28,9 +29,9 @@ void computeLoopRate();
|
||||
void applyGyro();
|
||||
void applyAcc();
|
||||
void control();
|
||||
void interpretRC();
|
||||
void interpretControls();
|
||||
void controlAttitude();
|
||||
void controlRate();
|
||||
void controlRates();
|
||||
void controlTorque();
|
||||
const char* getModeName();
|
||||
void sendMotors();
|
||||
|
||||
Reference in New Issue
Block a user