2018.07.26
Dependencies: EthernetInterface TextLCD USBDevice USBHost3 mbed
Fork of USBHostHub_HelloWorld by
Diff: common.h
- Revision:
- 13:2c70c772fe24
- Parent:
- 12:3e6b6fcf540b
- Child:
- 14:3a5ae61ab1f4
--- a/common.h Fri Feb 19 07:02:35 2016 +0000 +++ b/common.h Mon Mar 28 00:07:19 2016 +0000 @@ -9,9 +9,14 @@ #define Author "Y.Saito" #define Company "Revast Co.,Ltd." +// Read motor current +#define __READ_TFM_MOTOR_CURRENT__ + +#define __IIC_COMAMND_SEND__ + #define __DEBUG_L0__ #define __DEBUG_L1__ -#define __DEBUG_L2__ +//#define __DEBUG_L2__ #define __DEBUG_L3__ //#define __DEBUG_L4__ //#define __DEBUG_L5__ @@ -51,11 +56,11 @@ #define __DISP_GAMAPAD_STATUS_ALL__ #define __DISP_WRITE_VALUE__ -#define I2C_ADDRESS_HANDY 0x50 -#define I2C_ADDRESS_WINCH 0x40 -#define I2C_ADDRESS_TRANSFORM 0x30 -#define I2C_ADDRESS_CRAWLER 0x70 -#define I2C_ADDRESS_RESOLVER 0x10 +#define I2C_ADDRESS_HANDY 0x20 +#define I2C_ADDRESS_WINCH 0x10 +#define I2C_ADDRESS_TRANSFORM 0x08 +#define I2C_ADDRESS_CRAWLER 0x04 +#define I2C_ADDRESS_RESOLVER 0x02 #define _OK_ 1 @@ -124,7 +129,9 @@ typedef struct { int8_t sv_JS_ShapeMode; // JS Shape: 0=I, 1=KO int8_t sv_JS_OpeMode; // JS Operation: 0=single, 1=dual -} operation_t; + int8_t sv_WinchValid; // Winch function valid or not: 0=Tfm, Crawler valid, 1=Winch valid + int8_t res; +} basic_operation_t; typedef struct { uint16_t sv_RFTM_ith_F; @@ -193,7 +200,7 @@ } js_SetValue_t; typedef struct SetValue { - operation_t operation; +// operation_t operation; tfm_SetValue_t tfmCtrl; winch_SetValue_t winchCtrl; crawler_SetValue_t crawlerCtrl; @@ -204,6 +211,7 @@ #define SLOWDOWN_DISTANCE 10 +#define SLOWDOWN_NEAR_DISTANCE 3 /* typedef struct { int16_t dt_WinchCntPosition; // Current winch posittion