For coursework of group 3 in SOFT564Z

Dependencies:   Motordriver ros_lib_kinetic

Committer:
Jonathan738
Date:
Sun Jan 05 15:42:22 2020 +0000
Revision:
12:82b8fe254222
Parent:
4:8afc50a3e4ac
Added working version of TOF code

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jonathan738 4:8afc50a3e4ac 1 /******************************************************************************/
Jonathan738 4:8afc50a3e4ac 2 /* General definitions */
Jonathan738 4:8afc50a3e4ac 3 /******************************************************************************/
Jonathan738 4:8afc50a3e4ac 4 // define all datatypes to make data sizes more understandable
Jonathan738 4:8afc50a3e4ac 5 #define S_BYTE signed char
Jonathan738 4:8afc50a3e4ac 6 #define BYTE char
Jonathan738 4:8afc50a3e4ac 7 #define U_BYTE unsigned char
Jonathan738 4:8afc50a3e4ac 8 #define INT_16 short int
Jonathan738 4:8afc50a3e4ac 9 #define UINT_16 unsigned short int
Jonathan738 4:8afc50a3e4ac 10 #define INT_32 int
Jonathan738 4:8afc50a3e4ac 11 #define UINT_32 unsigned int
Jonathan738 4:8afc50a3e4ac 12 #define INT_64 long int
Jonathan738 4:8afc50a3e4ac 13 #define UINT_64 unsigned long int
Jonathan738 4:8afc50a3e4ac 14 #define FLOAT_32 float
Jonathan738 4:8afc50a3e4ac 15 #define FLOAT_64 double
Jonathan738 4:8afc50a3e4ac 16 #define FLOAT_96 long double
Jonathan738 0:3dfee562823a 17
Jonathan738 4:8afc50a3e4ac 18 // define ERROR levels
Jonathan738 4:8afc50a3e4ac 19 #define criticalFAILURE 0 // critical FAILURE shows full system broken
Jonathan738 4:8afc50a3e4ac 20 #define criticalERROR 1 // critical ERROR means atleast one system failed
Jonathan738 4:8afc50a3e4ac 21 #define fault 2 // FAULT means atleast one system is not working properly
Jonathan738 4:8afc50a3e4ac 22 #define warning 3 // warning means atleast one system may be functioning incorecctly
Jonathan738 0:3dfee562823a 23 /******************************************************************************/
Jonathan738 0:3dfee562823a 24
Jonathan738 0:3dfee562823a 25
Jonathan738 0:3dfee562823a 26 /******************************************************************************/
Jonathan738 0:3dfee562823a 27 /* Defentions of Pins and Topics for ROS and attached peripherals */
Jonathan738 0:3dfee562823a 28 /******************************************************************************/
Jonathan738 12:82b8fe254222 29 #define Control_Topic "/Nucleo/cmd_vel"
Jonathan738 12:82b8fe254222 30 #define TOF_Topic "/Nucleo/TOF_Ranges"
Jonathan738 12:82b8fe254222 31 #define Status_Topic "/Nucleo/Status"
Jonathan738 0:3dfee562823a 32
Jonathan738 0:3dfee562823a 33 #define Serial_Error_Tx SERIAL_TX
Jonathan738 0:3dfee562823a 34 #define Serial_Error_Rx SERIAL_RX
Jonathan738 0:3dfee562823a 35
Jonathan738 0:3dfee562823a 36 #define ROS_Tx PD_5
Jonathan738 0:3dfee562823a 37 #define ROS_Rx PD_6
Jonathan738 12:82b8fe254222 38 #define ROS_BaudRate 115200
Jonathan738 0:3dfee562823a 39 /******************************************************************************/
Jonathan738 0:3dfee562823a 40
Jonathan738 0:3dfee562823a 41
Jonathan738 3:7da9888ac8dc 42 #ifndef Define_ONCE_General
Jonathan738 3:7da9888ac8dc 43 #define Define_ONCE_General
Jonathan738 3:7da9888ac8dc 44
Jonathan738 0:3dfee562823a 45 #endif