Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
communicatorSettings.hpp
Go to the documentation of this file.
1#pragma once
2
3// IDS
4constexpr auto MASTER_ID = 0x300;
5constexpr auto BMS_ID = 0x666;
6constexpr auto BAMO_RESPONSE_ID = 0x181;
7constexpr auto C1_ID = 0x123;
8constexpr auto C3_ID = 0x111;
9constexpr auto AS_CU_ID = 0x400;
10constexpr auto STEERING_ID = 0x295d;
11
12// PC
13constexpr auto AS_CU_EMERGENCY_SIGNAL = 0x43;
14constexpr auto MISSION_FINISHED = 0x42;
15constexpr auto PC_ALIVE = 0x41;
16
17// Sensors
18constexpr auto RIGHT_WHEEL_CODE = 0x11;
19constexpr auto LEFT_WHEEL_CODE = 0x12;
20constexpr auto HYDRAULIC_LINE = 0x90;
21constexpr auto HYDRAULIC_BRAKE_THRESHOLD = 165;
22
23constexpr auto WHEEL_PRECISION = 1e-2;
24
25// Logging Status
26constexpr auto DRIVING_STATE = 0x500;
27constexpr auto DRIVING_CONTROL = 0x501;
28constexpr auto SYSTEM_STATUS = 0x502;
29
30// RES
31constexpr auto NODE_ID = 0x011; // Competition Defined
32constexpr auto RES_STATE = (0x180 + NODE_ID);
33constexpr auto RES_READY = (0x700 + NODE_ID);
34constexpr auto RES_ACTIVATE = 0x000;
35
36// Master State
37constexpr auto STATE_MSG = 0x31;
38constexpr auto MISSION_MSG = 0x32;
39constexpr auto LEFT_WHEEL_MSG = 0x33;
40constexpr auto DBG_LOG_MSG = 0x34;
41constexpr auto DBG_LOG_MSG_2 = 0x35;
42
43// Bamocar
44constexpr auto BTB_READY = 0xE2;
45constexpr auto VDC_BUS = 0xEB;
46constexpr auto DC_THRESHOLD = 1890; // same as 60 volts
constexpr auto RIGHT_WHEEL_CODE
constexpr auto AS_CU_EMERGENCY_SIGNAL
constexpr auto RES_ACTIVATE
constexpr auto STEERING_ID
constexpr auto C3_ID
constexpr auto SYSTEM_STATUS
constexpr auto RES_READY
constexpr auto RES_STATE
constexpr auto DRIVING_CONTROL
constexpr auto MISSION_FINISHED
constexpr auto LEFT_WHEEL_MSG
constexpr auto AS_CU_ID
constexpr auto MISSION_MSG
constexpr auto NODE_ID
constexpr auto HYDRAULIC_LINE
constexpr auto LEFT_WHEEL_CODE
constexpr auto STATE_MSG
constexpr auto VDC_BUS
constexpr auto MASTER_ID
constexpr auto BTB_READY
constexpr auto DC_THRESHOLD
constexpr auto DBG_LOG_MSG_2
constexpr auto BAMO_RESPONSE_ID
constexpr auto PC_ALIVE
constexpr auto C1_ID
constexpr auto DBG_LOG_MSG
constexpr auto BMS_ID
constexpr auto HYDRAULIC_BRAKE_THRESHOLD
constexpr auto DRIVING_STATE
constexpr auto WHEEL_PRECISION