mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 19:42:08 +02:00
Add skeleton for SOFAR can
This commit is contained in:
parent
a3c1f4da27
commit
dd1efb8405
5 changed files with 164 additions and 1 deletions
34
Software/SOFAR-CAN.h
Normal file
34
Software/SOFAR-CAN.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef SOFAR_CAN_H
|
||||
#define SOFAR_CAN_H
|
||||
#include <Arduino.h>
|
||||
#include "ESP32CAN.h"
|
||||
#include "USER_SETTINGS.h"
|
||||
|
||||
extern uint16_t SOC;
|
||||
extern uint16_t StateOfHealth;
|
||||
extern uint16_t battery_voltage;
|
||||
extern uint16_t battery_current;
|
||||
extern uint16_t capacity_Wh;
|
||||
extern uint16_t remaining_capacity_Wh;
|
||||
extern uint16_t max_target_discharge_power;
|
||||
extern uint16_t max_target_charge_power;
|
||||
extern uint16_t bms_status;
|
||||
extern uint16_t bms_char_dis_status;
|
||||
extern uint16_t stat_batt_power;
|
||||
extern uint16_t temperature_min;
|
||||
extern uint16_t temperature_max;
|
||||
extern uint16_t CANerror;
|
||||
extern uint16_t min_volt_pylon_can;
|
||||
extern uint16_t max_volt_pylon_can;
|
||||
// Definitions for BMS status
|
||||
#define STANDBY 0
|
||||
#define INACTIVE 1
|
||||
#define DARKSTART 2
|
||||
#define ACTIVE 3
|
||||
#define FAULT 4
|
||||
#define UPDATING 5
|
||||
|
||||
void update_values_can_sofar();
|
||||
void receive_can_sofar(CAN_frame_t rx_frame);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue