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
definitions.h
- Committer:
- MikeGray92
- Date:
- 2018-02-08
- Revision:
- 3:527f0b949839
- Parent:
- 2:0537a8007a39
- Child:
- 4:89ebfa37663b
File content as of revision 3:527f0b949839:
#ifndef __DEFINITIONS_H__ #define __DEFINITIONS_H__ #include "mbed.h" #include <BNO055.h> #include <Mx28.h> // Generic definitions #define TRUE 1 #define FALSE 0 // ROS definitions #define ROSDATALENGTH 5 #define ROSCONTROL 0 #define ROSYAW 1 #define ROSPITCH 2 #define ROSROLL 3 #define ROSHEIGHT 4 #define ROSMODE 5 // Gimbal definitions #define YAWID 1 #define PITCHID 2 #define ROLLID 3 #define YAWZERO 2015 #define PITCHZERO 2350 #define ROLLZERO 2302 #define YAWMIN 0 // -177 degrees. #define YAWMAX 4063 // +177 degrees. #define PITCHMIN 1326 // -90 degrees. #define PITCHMAX 3374 // +90 degrees. #define ROLLMIN 1278 // -90 degrees. #define ROLLMAX 3326 // +90 degrees. // Lift definitions #define LIFTUP 0 #define LIFTDOWN 1 #define LIFTHEIGHTMAX 3000 // 119.6 cm #define LIFTHEIGHTMIN 5 //51.6 cm // Delta Height for Lift is 68cm // Classes struct fields{ int yaw; int yawSpeed; int pitch; int pitchSpeed; int roll; int rollSpeed; int height; bool stabilize; bool masterOn; bool liftRun; bool gimbalRun; bool shutdown; bool initialize; bool mode; }; struct fields_float{ float yaw; float yawSpeed; float pitch; float pitchSpeed; float roll; float rollSpeed; float height; bool stabilize; bool masterOn; bool liftRun; bool gimbalRun; bool shutdown; bool initialize; bool mode; }; extern struct fields control; extern struct fields rosInput; extern volatile int currentPosition; extern int prevPosition; extern bool stall; extern Ticker hallInt; extern Timer filter_hall1; extern PwmOut liftSpeed; extern DigitalOut liftDirection; extern DigitalOut LED; extern DynamixelClass gimbal; #endif