Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
write_data.cpp File Reference
#include <CSVFile.h>
#include <SdFat.h>
#include "can.h"
#include "debug.h"
#include "elapsedMillis.h"
#include "write_data.h"
Include dependency graph for write_data.cpp:

Go to the source code of this file.

Functions

void setup_csv ()
 
void initSdFile (char *filename)
 
void write ()
 

Variables

FlexCAN_T4< CAN1, RX_SIZE_256, TX_SIZE_16 > can1
 
CAN_message_t Nact_filtered
 
CAN_message_t Vout_msg
 
CAN_message_t Iq_cmd_msg
 
CAN_message_t Iq_actual_msg
 
CAN_message_t Mout_msg
 
CAN_message_t I_lim_inuse_msg
 
CAN_message_t I_actual_filtered_msg
 
CAN_message_t Tpeak_msg
 
CAN_message_t Imax_peak_msg
 
CAN_message_t I_con_eff_msg
 
int soc
 
int current
 
int packVoltage
 
int Nact
 
int Vout
 
int Iq_cmd
 
int Iq_actual
 
int Mout
 
int I_lim_inuse
 
int I_actual_filtered
 
int Tpeak
 
int Imax_peak
 
int I_con_eff
 
int motorTemp
 
int powerStageTemp
 
SdFat sd
 
CSVFile csv
 
int t = 0
 

Function Documentation

◆ initSdFile()

void initSdFile ( char *  filename)

Definition at line 84 of file write_data.cpp.

Here is the caller graph for this function:

◆ setup_csv()

void setup_csv ( )

Definition at line 48 of file write_data.cpp.

◆ write()

void write ( )

Definition at line 97 of file write_data.cpp.

Here is the call graph for this function:

Variable Documentation

◆ can1

FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> can1
extern

Write CSV fields feature example.

Definition at line 87 of file main.cpp.

◆ csv

CSVFile csv

Definition at line 44 of file write_data.cpp.

◆ current

int current
extern

Definition at line 59 of file main.cpp.

◆ I_actual_filtered

int I_actual_filtered
extern

Definition at line 41 of file can.cpp.

◆ I_actual_filtered_msg

CAN_message_t I_actual_filtered_msg
extern

◆ I_con_eff

int I_con_eff
extern

Definition at line 38 of file can.cpp.

◆ I_con_eff_msg

CAN_message_t I_con_eff_msg
extern

◆ I_lim_inuse

int I_lim_inuse
extern

Definition at line 40 of file can.cpp.

◆ I_lim_inuse_msg

CAN_message_t I_lim_inuse_msg
extern

◆ Imax_peak

int Imax_peak
extern

Definition at line 37 of file can.cpp.

◆ Imax_peak_msg

CAN_message_t Imax_peak_msg
extern

◆ Iq_actual

int Iq_actual
extern

Definition at line 39 of file can.cpp.

◆ Iq_actual_msg

CAN_message_t Iq_actual_msg
extern

◆ Iq_cmd

int Iq_cmd
extern

Definition at line 36 of file can.cpp.

◆ Iq_cmd_msg

CAN_message_t Iq_cmd_msg
extern

◆ motorTemp

int motorTemp
extern

Definition at line 72 of file main.cpp.

◆ Mout

int Mout
extern

Definition at line 32 of file can.cpp.

◆ Mout_msg

CAN_message_t Mout_msg
extern

◆ Nact

int Nact
extern

Definition at line 33 of file can.cpp.

◆ Nact_filtered

CAN_message_t Nact_filtered
extern

◆ packVoltage

int packVoltage
extern

Definition at line 22 of file display.cpp.

◆ powerStageTemp

int powerStageTemp
extern

Definition at line 71 of file main.cpp.

◆ sd

Definition at line 43 of file write_data.cpp.

◆ soc

int soc
extern

Definition at line 12 of file display.cpp.

◆ t

int t = 0

Definition at line 46 of file write_data.cpp.

◆ Tpeak

int Tpeak
extern

Definition at line 35 of file can.cpp.

◆ Tpeak_msg

CAN_message_t Tpeak_msg
extern

◆ Vout

int Vout
extern

Definition at line 34 of file can.cpp.

◆ Vout_msg

CAN_message_t Vout_msg
extern