19 #define SPEED_THRESHOLD 8
26 #define COUNT_PER_ROTATION 3533
27 #define CHAIN_LENGTH_M 0.741
28 #define VEL_UPDATE_RATE_MS 20
38 #define VEL2TORQUE_RATIO 1.0
42 #define PRINT_RATE_MS 500
45 #define UART_BAUD_RATE 57600
46 #define MAX_PACKET_LENGTH 50
47 #define PACKAGE_LENGTH_NO_P 10
50 #define UART_TRANSMIT_MS 10
51 #define PACKAGE_PAUSE_MS 10
53 #define START_BYTE_POS 0
54 #define FRAME_TYPE_POS 1
55 #define PAYLOAD_LENGTH_POS 2
56 #define COMPONENT_POS 3
57 #define TIMESTAMP_POS 4
61 #define FRAME_TYPE_STARTBIT 7
62 #define FRAME_TYPE_ENDBIT 5
64 #define COMPONENT_STARTBIT 7
65 #define COMPONENT_ENDBIT 4
67 #define START_BYTE 0xAA
69 #define REQUEST_DRIVE_MOTOR 0x01
70 #define REQUEST_RESET_TIMESTAMP 0x02
73 #define FT_REQUEST_BV 32
74 #define FT_RESPONSE_BV 64
75 #define CP_DEFAULT_BV 0
76 #define CP_LEFT_M_BV 16
77 #define CP_RIGHT_M_BV 32
78 #define CP_ALL_M_BV 48
80 #define LAST(k,n) ((k) & ((1<<(n))-1))
81 #define MID(k,m,n) LAST((k)>>(m),((n)-(m)))
enum frametypes U_FrameType
components
Definition: constants.h:87
@ LEFT_MOTOR
Definition: constants.h:88
@ ALL_MOTORS
Definition: constants.h:88
@ RIGHT_MOTOR
Definition: constants.h:88
@ DEFAULT_COMPONENT
Definition: constants.h:88
enum components U_Component
requests
Definition: constants.h:91
@ RESET_TIMESTAMP
Definition: constants.h:92
@ PID_PARAMETER
Definition: constants.h:92
@ DEFAULT_REQUEST
Definition: constants.h:92
@ DRIVE_ENCODER
Definition: constants.h:92
@ DRIVE_MOTOR
Definition: constants.h:92
frametypes
Definition: constants.h:83
@ REQUEST
Definition: constants.h:84
@ VALUE
Definition: constants.h:84
@ RESPONSE
Definition: constants.h:84