Skip to content
Snippets Groups Projects
Commit fe8af017 authored by C-Glick's avatar C-Glick
Browse files

Merge branch 'attitude_rate_control'

parents eefa1ae8 a9c65d7b
No related branches found
No related tags found
1 merge request!73Attitude rate control
...@@ -52,7 +52,7 @@ bool controllerStudentTest(void) ...@@ -52,7 +52,7 @@ bool controllerStudentTest(void)
* *
* @param angle * @param angle
* @return float * @return float
*/ *
static float capAngle(float angle) { static float capAngle(float angle) {
//TODO MICROCART: remove //TODO MICROCART: remove
...@@ -68,6 +68,7 @@ static float capAngle(float angle) { ...@@ -68,6 +68,7 @@ static float capAngle(float angle) {
return result; return result;
} }
*/
/** /**
* This function is called periodically to update the PID loop, * This function is called periodically to update the PID loop,
...@@ -101,7 +102,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat ...@@ -101,7 +102,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
control->yaw = 0; control->yaw = 0;
return; return;
} }
//set desired roll and pitch and yaw angles //set desired roll and pitch and yaw angles
attitudeDesired.roll = setpoint->attitude.roll; attitudeDesired.roll = setpoint->attitude.roll;
attitudeDesired.pitch = setpoint->attitude.pitch; attitudeDesired.pitch = setpoint->attitude.pitch;
...@@ -133,6 +134,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat ...@@ -133,6 +134,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
rateDesired.yaw = setpoint->attitudeRate.yaw; rateDesired.yaw = setpoint->attitudeRate.yaw;
attitudeControllerResetYawAttitudePID(); attitudeControllerResetYawAttitudePID();
} }
//update the attitude rate PID, given the current angular rate //update the attitude rate PID, given the current angular rate
//read by the gyro and the desired rate //read by the gyro and the desired rate
......
...@@ -72,7 +72,6 @@ enum packet_type { ...@@ -72,7 +72,6 @@ enum packet_type {
fullStateType = 6, fullStateType = 6,
positionType = 7, positionType = 7,
attitudeRateType = 8, attitudeRateType = 8,
}; };
/* ---===== 2 - Decoding functions =====--- */ /* ---===== 2 - Decoding functions =====--- */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment