Team Virgo v3 / Orion_newPCB_test_LV

Dependencies:   mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo

Fork of Orion_newPCB_test by Team Virgo v3

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers globalExterns.h Source File

globalExterns.h

Go to the documentation of this file.
00001  /*
00002  * Copyright (C) 2016 Akash Vibhute <akash.roboticist@gmail.com>
00003  * 
00004  * Header to link all global extern variables, functions referenced in different functions
00005  *
00006  *
00007  * Initial Release: May/05/2016
00008  *
00009  */
00010  
00011 /**
00012  * @file globalExterns.h
00013  *
00014  * Header to link all global extern variables, functions referenced in different functions
00015  */
00016  
00017 #ifndef globalExterns_H
00018 #define globalExterns_H
00019 
00020 #include "main.h"
00021 
00022 /**
00023  * Linked variables from main.cpp
00024  *
00025  */
00026  
00027 //** Drivetrain **
00028 extern odometer odometry;  //odometer function
00029 extern float rpm_cmd[2]; //drive motor rpm command
00030 extern float rpm_compensated[2]; //rpm command compensated by acc limit
00031 extern float targetAcceleration; //RPM/s acceleration
00032 extern float pwm_cmd[2]; //drive motor pwm command 
00033 //-------------
00034 
00035 //** Localization **
00036 extern IMU_BNO055 imu; //Bosch BNO055 IMU wrapper class. For Invensense IMU use IMU_MPU6050 imu;    //MPU9150 / MPU6050 wrapper class
00037 extern float imuTime;
00038 extern Localization localization;  //localization function
00039 //-------------
00040 
00041 //-------------
00042 
00043 //** Power Monitor **
00044 //extern BattGuage battery; //Battery fuel gauge wrapper
00045 //-------------
00046 
00047 //** Trajectory tracking **
00048 extern uint8_t totalWaypoints;
00049 extern int16_t waypoints_set[][4];
00050 extern float waypointZone; //diameter around desired waypoint, if robot reaches within that zone then waypoint is reached.
00051 extern uint8_t waypointReached_flag; //indicates if the desired waypoint has been reached
00052 extern uint8_t waypointSetFinish_flag; //indicates if the desired waypoint set is over and the robot needs to stop.
00053 extern float target_waypoint[2]; //coordinates in millimeters for pure-pursuit's use. initialize with 0,0 this is necessary to prevent comparison to a garbage value
00054 extern float target_velocity; //target velocity in mm/s
00055 extern float distanceToWaypoint; //distance from robot to waypoint
00056 extern uint8_t waypoint_index;
00057 extern uint8_t go_cmd; //make robot run a waypoint set
00058 //-------------
00059 
00060 //** Camera **
00061 extern uint8_t cameraFlag; //flag to enable camera: 0 - off, 1 - frequency controlled, 2 - permanantly on
00062 //-------------
00063 
00064 //** Robot data recorder **
00065 //extern RDR virgoRDR;
00066 extern uint8_t recordFlag; //flag to enable / disable recording: 0 - off, 1 - frequency controlled
00067 //-------------
00068 
00069 
00070 
00071 #endif