mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 02:09:30 +02:00
Fix off-by-one with number_of_batteries, or it sends too many messages and overflows MCP
This commit is contained in:
parent
b6b812690f
commit
d6b33fe679
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ void SolaxInverter::map_can_frame_to_variable(CAN_frame rx_frame) {
|
||||||
#endif
|
#endif
|
||||||
datalayer.system.status.inverter_allows_contactor_closing = false;
|
datalayer.system.status.inverter_allows_contactor_closing = false;
|
||||||
SOLAX_1875.data.u8[4] = (0x00); // Inform Inverter: Contactor 0=off, 1=on.
|
SOLAX_1875.data.u8[4] = (0x00); // Inform Inverter: Contactor 0=off, 1=on.
|
||||||
for (uint8_t i = 0; i <= number_of_batteries; i++) {
|
for (uint8_t i = 0; i < number_of_batteries; i++) {
|
||||||
transmit_can_frame(&SOLAX_187E, can_config.inverter);
|
transmit_can_frame(&SOLAX_187E, can_config.inverter);
|
||||||
transmit_can_frame(&SOLAX_187A, can_config.inverter);
|
transmit_can_frame(&SOLAX_187A, can_config.inverter);
|
||||||
transmit_can_frame(&SOLAX_1872, can_config.inverter);
|
transmit_can_frame(&SOLAX_1872, can_config.inverter);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue