[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2025-04-07 16:35:33 +00:00
parent 7d8456d8c8
commit 0e975dfea6
4 changed files with 7 additions and 7 deletions

View file

@ -101,8 +101,8 @@ struct x108_EVSE_Capabilities { // Frame byte
uint16_t available_output_voltage = MAX_EVSE_OUTPUT_VOLTAGE; // 1,2 uint16_t available_output_voltage = MAX_EVSE_OUTPUT_VOLTAGE; // 1,2
uint8_t available_output_current = MAX_EVSE_OUTPUT_CURRENT; // 3 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 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 // perhaps vehicle minus 3%, hardcoded initially to 96*2.95
// 6,7 = unused // 6,7 = unused
}; };
/* Does double duty for charging and discharging */ /* 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]); cycle_count = (uint16_t)(rx_frame.data.u8[7] << 8 | rx_frame.data.u8[6]);
break; break;
case 0x1876: //BMS_PackTemps case 0x1876: //BMS_PackTemps
// 0x1876 b0 bit 0 appears to be 1 when at maxsoc and BMS says charge is not allowed - // 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, // 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 // 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) { if ((rx_frame.data.u8[0] & 0x01) > 0) {
max_charge_power_dA = 0; max_charge_power_dA = 0;
charging_disabled = true; 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 FOXESS_1879.data.u8[0] = (uint8_t)0; // Error codes go here, still unsure of bitmasking
if (datalayer.battery.status.current_dA > 0) { if (datalayer.battery.status.current_dA > 0) {
FOXESS_1879.data.u8[1] = 0x35; //Charging 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 { else {
FOXESS_1879.data.u8[1] = 0x2B; //Discharging FOXESS_1879.data.u8[1] = 0x2B; //Discharging
} }

View file

@ -112,7 +112,7 @@ inline void printFailed(const char* message, FILE* file = stdout) {
class AssertFailedException : public std::exception { class AssertFailedException : public std::exception {
public: public:
AssertFailedException(std::string description, std::string filepath, int line) AssertFailedException(std::string description, std::string filepath, int line)
: std::exception(), description_(description), filepath_(filepath), line_(line){}; : std::exception(), description_(description), filepath_(filepath), line_(line) {};
virtual const char* what() const throw() { return description_.c_str(); } virtual const char* what() const throw() { return description_.c_str(); }