2018.07.26

Dependencies:   TextLCD USBDevice mbed-rtos mbed

Committer:
sayzyas
Date:
Tue Feb 16 16:35:14 2016 +0000
Revision:
0:f4e2a62331ef
Child:
1:368ba89c2e6b
Rev0.95 160216;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sayzyas 0:f4e2a62331ef 1
sayzyas 0:f4e2a62331ef 2 /* Information */
sayzyas 0:f4e2a62331ef 3 #define LatestUpDate "2016.01.20"
sayzyas 0:f4e2a62331ef 4 #define ProgramRevision "Rev. 0.93"
sayzyas 0:f4e2a62331ef 5 #define Author "zinsor"
sayzyas 0:f4e2a62331ef 6 #define Company "nRST"
sayzyas 0:f4e2a62331ef 7 #define Targetmbed "mbed LPC1768"
sayzyas 0:f4e2a62331ef 8
sayzyas 0:f4e2a62331ef 9 /* Debug macro */
sayzyas 0:f4e2a62331ef 10 #define __DEBUG_L0__
sayzyas 0:f4e2a62331ef 11 #define __DEBUG_L1__
sayzyas 0:f4e2a62331ef 12 #define __DEBUG_L2__
sayzyas 0:f4e2a62331ef 13 //#define __DEBUG_L3__
sayzyas 0:f4e2a62331ef 14 //#define __DEBUG_L4__
sayzyas 0:f4e2a62331ef 15
sayzyas 0:f4e2a62331ef 16 #ifdef __DEBUG_L0__
sayzyas 0:f4e2a62331ef 17 #define DEBUG_PRINT_L0(...) pc.printf(__VA_ARGS__)
sayzyas 0:f4e2a62331ef 18 #else
sayzyas 0:f4e2a62331ef 19 #define DEBUG_PRINT_L0(...)
sayzyas 0:f4e2a62331ef 20 #endif
sayzyas 0:f4e2a62331ef 21 #ifdef __DEBUG_L1__
sayzyas 0:f4e2a62331ef 22 #define DEBUG_PRINT_L1(...) pc.printf(__VA_ARGS__)
sayzyas 0:f4e2a62331ef 23 #else
sayzyas 0:f4e2a62331ef 24 #define DEBUG_PRINT_L1(...)
sayzyas 0:f4e2a62331ef 25 #endif
sayzyas 0:f4e2a62331ef 26 #ifdef __DEBUG_L2__
sayzyas 0:f4e2a62331ef 27 #define DEBUG_PRINT_L2(...) pc.printf(__VA_ARGS__)
sayzyas 0:f4e2a62331ef 28 #else
sayzyas 0:f4e2a62331ef 29 #define DEBUG_PRINT_L2(...)
sayzyas 0:f4e2a62331ef 30 #endif
sayzyas 0:f4e2a62331ef 31 #ifdef __DEBUG_L3__
sayzyas 0:f4e2a62331ef 32 #define DEBUG_PRINT_L3(...) pc.printf(__VA_ARGS__)
sayzyas 0:f4e2a62331ef 33 #else
sayzyas 0:f4e2a62331ef 34 #define DEBUG_PRINT_L3(...)
sayzyas 0:f4e2a62331ef 35 #endif
sayzyas 0:f4e2a62331ef 36 #ifdef __DEBUG_L4__
sayzyas 0:f4e2a62331ef 37 #define DEBUG_PRINT_L4(...) pc.printf(__VA_ARGS__)
sayzyas 0:f4e2a62331ef 38 #else
sayzyas 0:f4e2a62331ef 39 #define DEBUG_PRINT_L4(...)
sayzyas 0:f4e2a62331ef 40 #endif
sayzyas 0:f4e2a62331ef 41
sayzyas 0:f4e2a62331ef 42 /* ***************** */
sayzyas 0:f4e2a62331ef 43 /* Target definition */
sayzyas 0:f4e2a62331ef 44 /* ***************** */
sayzyas 0:f4e2a62331ef 45 #define i2c_addr_handy (0x50); // Handy Controller
sayzyas 0:f4e2a62331ef 46 #define i2c_addr_winch (0x40); // Ctrl Board1 : Winch
sayzyas 0:f4e2a62331ef 47 #define i2c_addr_tfansform (0x30); // Ctrl Board2 : Transform
sayzyas 0:f4e2a62331ef 48 #define i2c_addr_crawler (0x20); // Ctrl Board3 : Crawler
sayzyas 0:f4e2a62331ef 49
sayzyas 0:f4e2a62331ef 50 #define Target_IIC_ADDR i2c_addr_handy // For Winch motor controller
sayzyas 0:f4e2a62331ef 51 //#define Target_IIC_ADDR i2c_addr_tfansform // For Transform controller
sayzyas 0:f4e2a62331ef 52 //#define Target_IIC_ADDR i2c_addr_crawler // For Crawler motor controller
sayzyas 0:f4e2a62331ef 53
sayzyas 0:f4e2a62331ef 54 #define NumberOfI2CCommand 10
sayzyas 0:f4e2a62331ef 55
sayzyas 0:f4e2a62331ef 56 #define DEAD_ZONE_BAND_WIDTH 5
sayzyas 0:f4e2a62331ef 57 #define CALIBRATION_COUNT 300
sayzyas 0:f4e2a62331ef 58
sayzyas 0:f4e2a62331ef 59 #define MOTOR_FWD_ROTATION 0
sayzyas 0:f4e2a62331ef 60 #define MOTOR_RVS_ROTATION 1
sayzyas 0:f4e2a62331ef 61