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
- Committer:
- MikeGray92
- Date:
- 2018-02-08
- Revision:
- 3:527f0b949839
- Parent:
- 2:0537a8007a39
- Child:
- 4:89ebfa37663b
File content as of revision 3:527f0b949839:
#include <stdint.h> #include "mbed.h" #include <ros.h> #include <std_msgs/Empty.h> #include <std_msgs/Float32MultiArray.h> #include <BNO055.h> #include <initializations.h> #include <definitions.h> #include <prototypes.h> #include <Mx28.h> static int i = 0; void runGimbal(void){ if (control.gimbalRun){ switch(i){ case(0): gimbal.servo(YAWID, control.yaw, 30); i++; break; case(1): gimbal.servo(PITCHID, control.pitch, 30); i++; break; case(2): gimbal.servo(ROLLID, control.roll, 30); i = 0; break; } control.gimbalRun = FALSE; } }