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:
- group-UVic-Assistive-Technolog
- Date:
- 2018-01-31
- Revision:
- 0:3a767f41cf04
- Child:
- 2:0537a8007a39
File content as of revision 0:3a767f41cf04:
#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){ // At 1ms update the gimbal. if (motorFlag && control.gimbalRun){ motorFlag = 0; 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; } }