mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 17:59:27 +02:00
Merge pull request #1366 from gwk1/Kia-Hyundai_contactor_closing_improvement
Kia/Hyundai 40/64: Respect inverter_allows_contactor_closing on startup
This commit is contained in:
commit
3d76c2a5d9
1 changed files with 4 additions and 2 deletions
|
@ -446,7 +446,8 @@ void KiaHyundai64Battery::transmit_can(unsigned long currentMillis) {
|
||||||
if (currentMillis - previousMillis100 >= INTERVAL_100_MS) {
|
if (currentMillis - previousMillis100 >= INTERVAL_100_MS) {
|
||||||
previousMillis100 = currentMillis;
|
previousMillis100 = currentMillis;
|
||||||
|
|
||||||
if (contactor_closing_allowed == nullptr || *contactor_closing_allowed) {
|
if ((contactor_closing_allowed == nullptr || *contactor_closing_allowed) &&
|
||||||
|
datalayer.system.status.inverter_allows_contactor_closing) {
|
||||||
transmit_can_frame(&KIA64_553);
|
transmit_can_frame(&KIA64_553);
|
||||||
transmit_can_frame(&KIA64_57F);
|
transmit_can_frame(&KIA64_57F);
|
||||||
transmit_can_frame(&KIA64_2A1);
|
transmit_can_frame(&KIA64_2A1);
|
||||||
|
@ -457,7 +458,8 @@ void KiaHyundai64Battery::transmit_can(unsigned long currentMillis) {
|
||||||
if (currentMillis - previousMillis10 >= INTERVAL_10_MS) {
|
if (currentMillis - previousMillis10 >= INTERVAL_10_MS) {
|
||||||
previousMillis10 = currentMillis;
|
previousMillis10 = currentMillis;
|
||||||
|
|
||||||
if (contactor_closing_allowed == nullptr || *contactor_closing_allowed) {
|
if ((contactor_closing_allowed == nullptr || *contactor_closing_allowed) &&
|
||||||
|
datalayer.system.status.inverter_allows_contactor_closing) {
|
||||||
|
|
||||||
switch (counter_200) {
|
switch (counter_200) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue