1#ifndef __INSTRUCTIONS_H__
2#define __INSTRUCTIONS_H__
8#define SET_OPENLOOP_VELOCITIES_OPCODE 0x13
10#define GET_CODEWHEELS_COUNTERS_OPCODE 0x1C
12#define SET_VELOCITIES_OPCODE 0x10
14#define START_PUREPURSUIT_OPCODE 0x11
15#define START_TURNONTHESPOT_OPCODE 0x12
17#define POSITION_REACHED_OPCODE 0x14
19#define SET_POSITION_OPCODE 0x15
20#define GET_POSITION_OPCODE 0x16
21#define GET_VELOCITIES_OPCODE 0x17
23#define SET_PARAMETER_VALUE_OPCODE 0x18
24#define GET_PARAMETER_VALUE_OPCODE 0x19
26#define RESET_PUREPURSUIT_OPCODE 0x1A
27#define ADD_PUREPURSUIT_WAYPOINT_OPCODE 0x1B
29#define GET_VELOCITIES_WANTED_OPCODE 0x1D
30#define GOTO_DELTA_OPCODE 0x1E
32#define RESET_PARAMETERS_OPCODE 0x1F
33#define SAVE_PARAMETERS_OPCODE 0x20
34#define START_TURNONTHESPOT_DIR_OPCODE 0x21
35#define PRINT_PARAMS_OPCODE 0x22
39#define LEFTWHEEL_RADIUS_ID 0x10
40#define LEFTWHEEL_CONSTANT_ID 0x11
41#define LEFTWHEEL_MAXPWM_ID 0x12
42#define RIGHTWHEEL_RADIUS_ID 0x20
43#define RIGHTWHEEL_CONSTANT_ID 0x21
44#define RIGHTWHEEL_MAXPWM_ID 0x22
45#define LEFTCODEWHEEL_RADIUS_ID 0x40
46#define LEFTCODEWHEEL_COUNTSPERREV_ID 0x41
47#define RIGHTCODEWHEEL_RADIUS_ID 0x50
48#define RIGHTCODEWHEEL_COUNTSPERREV_ID 0x51
49#define ODOMETRY_AXLETRACK_ID 0x60
50#define ODOMETRY_SLIPPAGE_ID 0x61
51#define VELOCITYCONTROL_AXLETRACK_ID 0x80
52#define VELOCITYCONTROL_MAXLINACC_ID 0x81
53#define VELOCITYCONTROL_MAXLINDEC_ID 0x82
54#define VELOCITYCONTROL_MAXANGACC_ID 0x83
55#define VELOCITYCONTROL_MAXANGDEC_ID 0x84
56#define VELOCITYCONTROL_SPINSHUTDOWN_ID 0x85
57#define LINVELPID_KP_ID 0xA0
58#define LINVELPID_KI_ID 0xA1
59#define LINVELPID_KD_ID 0xA2
60#define LINVELPID_MINOUTPUT_ID 0xA3
61#define LINVELPID_MAXOUTPUT_ID 0xA4
62#define ANGVELPID_KP_ID 0xB0
63#define ANGVELPID_KI_ID 0xB1
64#define ANGVELPID_KD_ID 0xB2
65#define ANGVELPID_MINOUTPUT_ID 0xB3
66#define ANGVELPID_MAXOUTPUT_ID 0xB4
67#define POSITIONCONTROL_LINVELKP_ID 0xD0
68#define POSITIONCONTROL_ANGVELKP_ID 0xD1
69#define POSITIONCONTROL_LINVELMAX_ID 0xD2
70#define POSITIONCONTROL_ANGVELMAX_ID 0xD3
71#define POSITIONCONTROL_LINPOSTHRESHOLD_ID 0xD4
72#define POSITIONCONTROL_ANGPOSTHRESHOLD_ID 0xD5
73#define PUREPURSUIT_LOOKAHED_ID 0xE0
74#define PUREPURSUIT_LOOKAHEADBIS_ID 0xE2
85void RESET_PARAMETERS();
87void SET_OPENLOOP_VELOCITIES();
89void GET_CODEWHEELS_COUNTERS();
93void RESET_PUREPURSUIT();
95void ADD_PUREPURSUIT_WAYPOINT();
97void START_PUREPURSUIT();
99void START_TURNONTHESPOT();
101void START_TURNONTHESPOT_DIR();
103void POSITION_REACHED();
105void GET_VELOCITIES_WANTED();
111void GET_VELOCITIES();
113void SET_PARAMETER_VALUE();
115void GET_PARAMETER_VALUE();
117void RESET_PARAMETERS();
119void SAVE_PARAMETERS();
SerialTalking Lib Work In progess: CRINSA 2024.