Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
900381d8
Commit
900381d8
authored
3 years ago
by
C-Glick
Browse files
Options
Downloads
Patches
Plain Diff
Changed CF student controller
parent
7162a5b9
No related branches found
No related tags found
3 merge requests
!76
lots of gui updates
,
!75
Lost of gui updates
,
!74
lots of gui updates among others
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
crazyflie_software/crazyflie-firmware-2021.06/src/modules/src/controller_student.c
+8
-4
8 additions, 4 deletions
...lie-firmware-2021.06/src/modules/src/controller_student.c
with
8 additions
and
4 deletions
crazyflie_software/crazyflie-firmware-2021.06/src/modules/src/controller_student.c
+
8
−
4
View file @
900381d8
...
@@ -102,6 +102,13 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
...
@@ -102,6 +102,13 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
control
->
yaw
=
0
;
control
->
yaw
=
0
;
return
;
return
;
}
}
// Rate-controled YAW is moving YAW angle setpoint
if
(
setpoint
->
mode
.
yaw
==
modeVelocity
)
{
attitudeDesired
.
yaw
+=
setpoint
->
attitudeRate
.
yaw
*
STUDENT_UPDATE_DT
;
}
else
{
attitudeDesired
.
yaw
=
setpoint
->
attitude
.
yaw
;
}
//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
;
...
@@ -130,10 +137,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
...
@@ -130,10 +137,7 @@ void controllerStudent(control_t *control, setpoint_t *setpoint, const sensorDat
rateDesired
.
pitch
=
setpoint
->
attitudeRate
.
pitch
;
rateDesired
.
pitch
=
setpoint
->
attitudeRate
.
pitch
;
studentAttitudeControllerResetPitchAttitudePID
();
studentAttitudeControllerResetPitchAttitudePID
();
}
}
if
(
setpoint
->
mode
.
yaw
==
modeVelocity
)
{
rateDesired
.
yaw
=
setpoint
->
attitudeRate
.
yaw
;
studentAttitudeControllerResetYawAttitudePID
();
}
//update the attitude rate PID, given the current angular rate
//update the attitude rate PID, given the current angular rate
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment