Initial hal changes

This commit is contained in:
Jaakko Haakana 2025-06-22 23:30:11 +03:00
parent d6cbd1bcdd
commit 12b402f994
77 changed files with 924 additions and 672 deletions

View file

@ -70,7 +70,14 @@ void DalyBms::setup(void) { // Performs one time setup at startup
datalayer.battery.info.total_capacity_Wh = BATTERY_WH_MAX;
datalayer.system.status.battery_allows_contactor_closing = true;
Serial2.begin(baud_rate(), SERIAL_8N1, RS485_RX_PIN, RS485_TX_PIN);
auto rx_pin = esp32hal->RS485_RX_PIN();
auto tx_pin = esp32hal->RS485_TX_PIN();
if (!esp32hal->alloc_pins(Name, rx_pin, tx_pin)) {
return;
}
Serial2.begin(baud_rate(), SERIAL_8N1, rx_pin, tx_pin);
}
uint8_t calculate_checksum(uint8_t buff[12]) {