update function name map_can_frame_to_variable_battery() to handle_incoming_can_frame_battery()

This commit is contained in:
lenvm 2024-12-29 18:10:33 +01:00
parent 0b096010c1
commit eb4e5bc2b8
29 changed files with 30 additions and 30 deletions

View file

@ -112,7 +112,7 @@
#include "SERIAL-LINK-RECEIVER-FROM-BATTERY.h"
#endif
void map_can_frame_to_variable_battery(CAN_frame rx_frame);
void handle_incoming_can_frame_battery(CAN_frame rx_frame);
void update_values_battery();
void transmit_can_battery();
void setup_battery(void);

View file

@ -502,7 +502,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer_extended.bmwi3.ST_cold_shutoff_valve = battery_status_cold_shutoff_valve;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x112: //BMS [10ms] Status Of High-Voltage Battery - 2
battery_awake = true;

View file

@ -516,7 +516,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer.battery.info.min_cell_voltage_mV = MIN_CELL_VOLTAGE_MV;
}
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
battery_awake = true;
switch (rx_frame.ID) {
case 0x112:

View file

@ -254,7 +254,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer_extended.boltampera.battery_current_7E4 = battery_current_7E4;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x200:
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;

View file

@ -162,7 +162,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer_extended.bydAtto3.voltage_polled = BMS_voltage;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) { //Log values taken with 422V from battery
case 0x244: //00,00,00,04,41,0F,20,8B - Static, values never changes between logs
break;

View file

@ -213,7 +213,7 @@ void update_values_battery() {
//TODO, shall we react on this?
}
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x1A4: //PDO1_TX - 200ms

View file

@ -367,7 +367,7 @@ inline void process_vehicle_vendor_ID(CAN_frame rx_frame) {
((rx_frame.data.u8[2] << 8) | rx_frame.data.u8[1]); //Actually more bytes, but not needed for our purpose
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
#ifdef CH_CAN_DEBUG
logging.print(millis()); // Example printout, time, ID, length, data: 7553 1DB 8 FF C0 B9 EA 0 0 2 5D
logging.print(" ");
@ -819,7 +819,7 @@ void handle_chademo_sequence() {
case CHADEMO_INIT:
/* Transient state while awaiting CAN from Vehicle.
* Used for triggers/error handling elsewhere;
* State change to CHADEMO_NEGOTIATE occurs in map_can_frame_to_variable_battery(..)
* State change to CHADEMO_NEGOTIATE occurs in handle_incoming_can_frame_battery(..)
*/
#ifdef DEBUG_LOG
// logging.println("Awaiting initial vehicle CAN to trigger negotiation");

View file

@ -72,7 +72,7 @@ void update_values_battery() {
datalayer.battery.status.cell_max_voltage_mV = max_cell_mv_value;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x125:

View file

@ -129,7 +129,7 @@ void update_values_battery() { //This function maps all the values fetched via
#endif
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x374: //BMU message, 10ms - SOC
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;

View file

@ -119,7 +119,7 @@ void update_values_battery() {
#endif
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
// Do not log noisy startup messages - there are many !
if (rx_frame.ID == 0 && rx_frame.DLC == 8 && rx_frame.data.u8[0] == 0 && rx_frame.data.u8[1] == 0 &&

View file

@ -750,7 +750,7 @@ void update_values_battery() { //This function maps all the values fetched via
#endif
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
startedUp = true;
switch (rx_frame.ID) {
case 0x055:

View file

@ -220,7 +220,7 @@ void update_number_of_cells() {
}
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x4DE:
startedUp = true;

View file

@ -86,7 +86,7 @@ void update_values_battery() { //This function maps all the values fetched via
}
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x5F1:

View file

@ -618,7 +618,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer_extended.meb.rt_battery_unathorized = realtime_warning_battery_unathorized;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
last_can_msg_timestamp = millis();
if (first_can_msg == 0)
first_can_msg = last_can_msg_timestamp;

View file

@ -44,7 +44,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer.battery.status.temperature_max_dC;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x171: //Following messages were detected on a MG5 battery BMS

View file

@ -740,7 +740,7 @@ void map_can_frame_to_variable_battery2(CAN_frame rx_frame) {
}
#endif // DOUBLE_BATTERY
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x1DB:
if (is_message_corrupt(rx_frame)) {

View file

@ -80,7 +80,7 @@ void update_values_battery() {
datalayer.battery.info.min_design_voltage_dV = discharge_cutoff_voltage;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x7310:

View file

@ -180,7 +180,7 @@ void update_values_battery() {
datalayer.battery.info.min_design_voltage_dV = DischargeVoltageLimit * 10;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x080: // 15ms

View file

@ -137,7 +137,7 @@ void update_values_battery() { //This function maps all the values fetched via
#endif
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x155: //BMS1

View file

@ -65,7 +65,7 @@ void update_values_battery() {
max_value(cell_temperatures_dC, sizeof(cell_temperatures_dC) / sizeof(*cell_temperatures_dC));
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x155:

View file

@ -135,7 +135,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer.battery.status.voltage_dV = static_cast<uint32_t>((calculated_total_pack_voltage_mV / 100)); // mV to dV
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x155: //10ms - Charging power, current and SOC
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;

View file

@ -218,7 +218,7 @@ void update_values_battery() { //This function maps all the values fetched via
datalayer_extended.zoePH2.battery_soc_max = battery_soc_max;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x18DAF1DB: // LBC Reply from active polling

View file

@ -158,7 +158,7 @@ void update_values_battery() {
datalayer.battery.status.cell_min_voltage_mV = minimum_cell_voltage;
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
/*
// All CAN messages recieved will be logged via serial

View file

@ -116,7 +116,7 @@ void update_values_battery() { //This function maps all the values fetched via
}
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
switch (rx_frame.ID) {
case 0x1FF:
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;

View file

@ -225,6 +225,6 @@ void setup_battery(void) {
// Needed to make the compiler happy
void update_values_battery() {}
void transmit_can_battery() {}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {}
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {}
#endif

View file

@ -1149,7 +1149,7 @@ void update_values_battery() { //This function maps all the values fetched via
#endif //DEBUG_LOG
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
static uint8_t mux = 0;
static uint16_t temp = 0;

View file

@ -127,7 +127,7 @@ void map_can_frame_to_variable_battery2(CAN_frame rx_frame) {
}
#endif // DOUBLE_BATTERY
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
}
void transmit_can_battery() {

View file

@ -140,7 +140,7 @@ void update_values_battery() { //This function maps all the values fetched via
#endif
}
void map_can_frame_to_variable_battery(CAN_frame rx_frame) {
void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
datalayer.battery.status.CAN_battery_still_alive = CAN_STILL_ALIVE;
switch (rx_frame.ID) {
case 0x3A:

View file

@ -321,7 +321,7 @@ void map_can_frame_to_variable(CAN_frame* rx_frame, int interface) {
#endif
if (interface == can_config.battery) {
map_can_frame_to_variable_battery(*rx_frame);
handle_incoming_can_frame_battery(*rx_frame);
#ifdef CHADEMO_BATTERY
ISA_handleFrame(rx_frame);
#endif