Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
can.h File Reference
#include <FlexCAN_T4.h>
#include <elapsedMillis.h>
Include dependency graph for can.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define C3_ID   0x123
 
#define R2D_ID   0x665
 
#define BMS_ID   0x675
 
#define MASTER_ID   0x300
 
#define BAMO_COMMAND_ID   0x201
 
#define BAMO_RESPONSE_ID   0x181
 
#define REGID_MOUT   0xA0
 
#define REGID_IGBT   0x4A
 
#define REGID_NACT   0xA8
 
#define REGID_VOUT   0x8A
 
#define REGID_T_PEAK   0xF0
 
#define REGID_CMD_IQ   0x26
 
#define REGID_I_CON_EFF   0xC5
 
#define REGID_ACTUAL_IQ   0x27
 
#define REGID_I_MAX_PEAK   0xC4
 
#define REGID_DC_VOLTAGE   0xEB
 
#define REGID_AC_CURRENT   0x20
 
#define REGID_MOTOR_TEMP   0x49
 
#define REGID_I_LIM_INUSE   0x48
 
#define REGID_ACTUAL_SPEED   0x30
 
#define REGID_I_ACT_FILTERED   0x5F
 
#define MAX_I   250
 
#define ADC_MAX   65536
 

Functions

void canSetup ()
 
void sendTorqueVal (int value_bamo)
 
void initBamocarD3 ()
 
void request_dataLOG_messages ()
 
void sendAPPS (int val1, int val2)
 

Macro Definition Documentation

◆ ADC_MAX

#define ADC_MAX   65536

Definition at line 32 of file can.h.

◆ BAMO_COMMAND_ID

#define BAMO_COMMAND_ID   0x201

Definition at line 12 of file can.h.

◆ BAMO_RESPONSE_ID

#define BAMO_RESPONSE_ID   0x181

Definition at line 13 of file can.h.

◆ BMS_ID

#define BMS_ID   0x675

Definition at line 9 of file can.h.

◆ C3_ID

#define C3_ID   0x123

Definition at line 7 of file can.h.

◆ MASTER_ID

#define MASTER_ID   0x300

Definition at line 10 of file can.h.

◆ MAX_I

#define MAX_I   250

Definition at line 31 of file can.h.

◆ R2D_ID

#define R2D_ID   0x665

Definition at line 8 of file can.h.

◆ REGID_AC_CURRENT

#define REGID_AC_CURRENT   0x20

Definition at line 25 of file can.h.

◆ REGID_ACTUAL_IQ

#define REGID_ACTUAL_IQ   0x27

Definition at line 22 of file can.h.

◆ REGID_ACTUAL_SPEED

#define REGID_ACTUAL_SPEED   0x30

Definition at line 28 of file can.h.

◆ REGID_CMD_IQ

#define REGID_CMD_IQ   0x26

Definition at line 20 of file can.h.

◆ REGID_DC_VOLTAGE

#define REGID_DC_VOLTAGE   0xEB

Definition at line 24 of file can.h.

◆ REGID_I_ACT_FILTERED

#define REGID_I_ACT_FILTERED   0x5F

Definition at line 29 of file can.h.

◆ REGID_I_CON_EFF

#define REGID_I_CON_EFF   0xC5

Definition at line 21 of file can.h.

◆ REGID_I_LIM_INUSE

#define REGID_I_LIM_INUSE   0x48

Definition at line 27 of file can.h.

◆ REGID_I_MAX_PEAK

#define REGID_I_MAX_PEAK   0xC4

Definition at line 23 of file can.h.

◆ REGID_IGBT

#define REGID_IGBT   0x4A

Definition at line 16 of file can.h.

◆ REGID_MOTOR_TEMP

#define REGID_MOTOR_TEMP   0x49

Definition at line 26 of file can.h.

◆ REGID_MOUT

#define REGID_MOUT   0xA0

Definition at line 15 of file can.h.

◆ REGID_NACT

#define REGID_NACT   0xA8

Definition at line 17 of file can.h.

◆ REGID_T_PEAK

#define REGID_T_PEAK   0xF0

Definition at line 19 of file can.h.

◆ REGID_VOUT

#define REGID_VOUT   0x8A

Definition at line 18 of file can.h.

Function Documentation

◆ canSetup()

void canSetup ( )

Definition at line 333 of file can.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initBamocarD3()

void initBamocarD3 ( )

Definition at line 244 of file can.cpp.

Here is the caller graph for this function:

◆ request_dataLOG_messages()

void request_dataLOG_messages ( )

Definition at line 152 of file can.cpp.

Here is the caller graph for this function:

◆ sendAPPS()

void sendAPPS ( int  val1,
int  val2 
)

Definition at line 227 of file can.cpp.

Here is the caller graph for this function:

◆ sendTorqueVal()

void sendTorqueVal ( int  value_bamo)

Definition at line 218 of file can.cpp.

Here is the caller graph for this function: