Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
can.h
Go to the documentation of this file.
1#ifndef _CAN_H_
2#define _CAN_H_
3
4#include <FlexCAN_T4.h>
5#include <elapsedMillis.h>
6
7#define C3_ID 0x123
8#define R2D_ID 0x665
9#define BMS_ID 0x675
10#define MASTER_ID 0x300
11
12#define BAMO_COMMAND_ID 0x201
13#define BAMO_RESPONSE_ID 0x181
14
15#define REGID_MOUT 0xA0
16#define REGID_IGBT 0x4A
17#define REGID_NACT 0xA8
18#define REGID_VOUT 0x8A
19#define REGID_T_PEAK 0xF0
20#define REGID_CMD_IQ 0x26
21#define REGID_I_CON_EFF 0xC5
22#define REGID_ACTUAL_IQ 0x27
23#define REGID_I_MAX_PEAK 0xC4
24#define REGID_DC_VOLTAGE 0xEB
25#define REGID_AC_CURRENT 0x20
26#define REGID_MOTOR_TEMP 0x49
27#define REGID_I_LIM_INUSE 0x48
28#define REGID_ACTUAL_SPEED 0x30
29#define REGID_I_ACT_FILTERED 0x5F
30
31#define MAX_I 250
32#define ADC_MAX 65536
33
34
35void canSetup();
36void sendTorqueVal(int value_bamo);
37void initBamocarD3();
39void sendAPPS(int val1, int val2);
40#endif
void sendAPPS(int val1, int val2)
Definition can.cpp:227
void sendTorqueVal(int value_bamo)
Definition can.cpp:218
void request_dataLOG_messages()
Definition can.cpp:152
void canSetup()
Definition can.cpp:333
void initBamocarD3()
Definition can.cpp:244