CUER
/
charger_code
Code to run on the charger board (used to charge the car from the mains).
CANParserCharger.h
- Committer:
- DasSidG
- Date:
- 2017-07-06
- Revision:
- 1:0c77e20b4d4c
- Child:
- 3:a7626dffb64a
File content as of revision 1:0c77e20b4d4c:
#include "CAN_Data.h" #include "CAN_IDs.h" #ifndef CANParserCharger_H #define CANParserCharger_H #define CHARGER_CAN_BIT_RATE 250000 //note this is different to the car CAN bit rate //@TODO add some comments void get_charger_control_info(CANMessage msg, float &_voltage_error, float &_temp_margin, float &_discharge_error, float &_pack_capacity); void get_max_min_voltage(CANMessage msg, float &_min_cell_voltage, float &_max_cell_voltage); void get_battery_status(CANMessage msg, bool &error); void get_charger_VI_info(CANMessage msg, float &_charger_voltage, float &_charger_current, uint8_t &_charger_status); CANMessage generate_charger_control_msg(float _desired_voltage, float _desired_current, uint8_t _charger_control); CANMessage generate_charger_info_msg(float _charger_voltage, float _charger_current, uint8_t _charger_status); #endif