mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Update KOSTAL-RS485.cpp
This commit is contained in:
parent
56bfcbe664
commit
b8059de996
1 changed files with 2 additions and 3 deletions
|
@ -289,13 +289,12 @@ void KostalInverterProtocol::receive() // Runs as fast as possible to handle th
|
||||||
send_kostal(tmpframe, 40);
|
send_kostal(tmpframe, 40);
|
||||||
datalayer.system.status.inverter_allows_contactor_closing = false;
|
datalayer.system.status.inverter_allows_contactor_closing = false;
|
||||||
dbg_message("inverter_allows_contactor_closing -> false (battery info sent)");
|
dbg_message("inverter_allows_contactor_closing -> false (battery info sent)");
|
||||||
|
info_sent = true;
|
||||||
// Kun første gang sættes startupMillis
|
|
||||||
if (!startupMillis) {
|
if (!startupMillis) {
|
||||||
startupMillis = currentMillis;
|
startupMillis = currentMillis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (code == 0x353) {
|
if (code == 0x353 && info_sent) {
|
||||||
//Send battery error/status
|
//Send battery error/status
|
||||||
uint8_t tmpframe[9]; //copy values to prevent data manipulation during rewrite/crc calculation
|
uint8_t tmpframe[9]; //copy values to prevent data manipulation during rewrite/crc calculation
|
||||||
memcpy(tmpframe, STATUS_FRAME, 9);
|
memcpy(tmpframe, STATUS_FRAME, 9);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue