Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ros_lib_kinetic
gimbal.cpp@4:89ebfa37663b, 2018-03-05 (annotated)
- Committer:
- MikeGray92
- Date:
- Mon Mar 05 23:08:34 2018 +0000
- Revision:
- 4:89ebfa37663b
- Parent:
- 3:527f0b949839
- Child:
- 6:2ffa254e8f6e
Added chat modes; Defined new limits for gimbal
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 1 | |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 2 | #include <stdint.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 3 | #include "mbed.h" |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 4 | #include <ros.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 5 | #include <std_msgs/Empty.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 6 | #include <std_msgs/Float32MultiArray.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 7 | #include <BNO055.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 8 | #include <initializations.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 9 | #include <definitions.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 10 | #include <prototypes.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 11 | #include <Mx28.h> |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 12 | |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 13 | static int i = 0; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 14 | |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 15 | void runGimbal(void){ |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 16 | switch(i){ |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 17 | case(0): |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 18 | gimbal.servo(YAWID, control.yaw, 30); |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 19 | i++; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 20 | break; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 21 | case(1): |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 22 | gimbal.servo(PITCHID, control.pitch, 30); |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 23 | i++; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 24 | break; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 25 | case(2): |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 26 | gimbal.servo(ROLLID, control.roll, 30); |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 27 | i = 0; |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 28 | break; |
MikeGray92 | 4:89ebfa37663b | 29 | } |
group-UVic-Assistive-Technolog | 0:3a767f41cf04 | 30 | } |