Merge branch 'dalathegreat:main' into tesla-feature-bmsreset

This commit is contained in:
greenoem 2025-04-08 08:57:53 +01:00 committed by GitHub
commit a3b7edf6f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View file

@ -101,8 +101,8 @@ struct x108_EVSE_Capabilities { // Frame byte
uint16_t available_output_voltage = MAX_EVSE_OUTPUT_VOLTAGE; // 1,2
uint8_t available_output_current = MAX_EVSE_OUTPUT_CURRENT; // 3
uint16_t threshold_voltage = 297; // 4,5 voltage that EVSE will stop if car fails to
// perhaps vehicle minus 3%, hardcoded initially to 96*2.95
// 6,7 = unused
// perhaps vehicle minus 3%, hardcoded initially to 96*2.95
// 6,7 = unused
};
/* Does double duty for charging and discharging */

View file

@ -177,9 +177,9 @@ void handle_incoming_can_frame_battery(CAN_frame rx_frame) {
cycle_count = (uint16_t)(rx_frame.data.u8[7] << 8 | rx_frame.data.u8[6]);
break;
case 0x1876: //BMS_PackTemps
// 0x1876 b0 bit 0 appears to be 1 when at maxsoc and BMS says charge is not allowed -
// when at 0 indicates charge is possible - additional note there is something more to it than this,
// it's not as straight forward - needs more testing to find what sets/unsets bit0 of byte0
// 0x1876 b0 bit 0 appears to be 1 when at maxsoc and BMS says charge is not allowed -
// when at 0 indicates charge is possible - additional note there is something more to it than this,
// it's not as straight forward - needs more testing to find what sets/unsets bit0 of byte0
if ((rx_frame.data.u8[0] & 0x01) > 0) {
max_charge_power_dA = 0;
charging_disabled = true;

View file

@ -469,7 +469,7 @@ void update_values_can_inverter() { //This function maps all the CAN values fet
FOXESS_1879.data.u8[0] = (uint8_t)0; // Error codes go here, still unsure of bitmasking
if (datalayer.battery.status.current_dA > 0) {
FOXESS_1879.data.u8[1] = 0x35; //Charging
} // Mappings taken from https://github.com/FozzieUK/FoxESS-Canbus-Protocol
} // Mappings taken from https://github.com/FozzieUK/FoxESS-Canbus-Protocol
else {
FOXESS_1879.data.u8[1] = 0x2B; //Discharging
}