eniro door status fixes

This commit is contained in:
Lubos Petrovic
2020-12-24 20:20:01 +01:00
parent bd93829026
commit fe6501fd6a
4 changed files with 7 additions and 7 deletions

View File

@@ -1220,7 +1220,7 @@ void Board320_240::redrawScreen() {
spr.fillRect(320 - 20, 20, 20, 98, TFT_YELLOW); spr.fillRect(320 - 20, 20, 20, 98, TFT_YELLOW);
if (liveData->params.rightRearDoorOpen) if (liveData->params.rightRearDoorOpen)
spr.fillRect(320 - 20, 122, 20, 98, TFT_YELLOW); spr.fillRect(320 - 20, 122, 20, 98, TFT_YELLOW);
if (liveData->params.hoodOpen) if (liveData->params.hoodDoorOpen)
spr.fillRect(20, 240 - 20, 320 - 40, 20, TFT_YELLOW); spr.fillRect(20, 240 - 20, 320 - 40, 20, TFT_YELLOW);
// BLE not connected // BLE not connected

View File

@@ -125,15 +125,15 @@ void CarKiaEniro::parseRowMerged() {
if (liveData->commandRequest.equals("22BC03")) { if (liveData->commandRequest.equals("22BC03")) {
// //
tempByte = liveData->hexToDecFromResponse(14, 16, 1, false); tempByte = liveData->hexToDecFromResponse(14, 16, 1, false);
liveData->params.trunkDoorOpen = (bitRead(tempByte, 7) == 1); liveData->params.hoodDoorOpen = (bitRead(tempByte, 7) == 1);
liveData->params.leftFrontDoorOpen = (bitRead(tempByte, 5) == 1); liveData->params.leftFrontDoorOpen = (bitRead(tempByte, 5) == 1);
liveData->params.rightFrontDoorOpen = (bitRead(tempByte, 4) == 1); liveData->params.rightFrontDoorOpen = (bitRead(tempByte, 0) == 1);
liveData->params.leftRearDoorOpen = (bitRead(tempByte, 4) == 1);
liveData->params.rightRearDoorOpen = (bitRead(tempByte, 2) == 1); liveData->params.rightRearDoorOpen = (bitRead(tempByte, 2) == 1);
liveData->params.leftRearDoorOpen = (bitRead(tempByte, 0) == 1);
// //
tempByte = liveData->hexToDecFromResponse(16, 18, 1, false); tempByte = liveData->hexToDecFromResponse(16, 18, 1, false);
liveData->params.ignitionOn = (bitRead(tempByte, 5) == 1); liveData->params.ignitionOn = (bitRead(tempByte, 5) == 1);
liveData->params.hoodOpen = (bitRead(tempByte, 0) == 1); liveData->params.trunkDoorOpen = (bitRead(tempByte, 0) == 1);
if (liveData->params.ignitionOn) { if (liveData->params.ignitionOn) {
liveData->params.lastIgnitionOnTime = liveData->params.currentTime; liveData->params.lastIgnitionOnTime = liveData->params.currentTime;
} }

View File

@@ -36,7 +36,7 @@ void LiveData::initParams() {
params.rightFrontDoorOpen = false; params.rightFrontDoorOpen = false;
params.leftRearDoorOpen = false; params.leftRearDoorOpen = false;
params.rightRearDoorOpen = false; params.rightRearDoorOpen = false;
params.hoodOpen = false; params.hoodDoorOpen = false;
params.forwardDriveMode = false; params.forwardDriveMode = false;
params.reverseDriveMode = false; params.reverseDriveMode = false;
params.parkModeOrNeutral = false; params.parkModeOrNeutral = false;

View File

@@ -73,7 +73,7 @@ typedef struct {
bool rightFrontDoorOpen; bool rightFrontDoorOpen;
bool leftRearDoorOpen; bool leftRearDoorOpen;
bool rightRearDoorOpen; bool rightRearDoorOpen;
bool hoodOpen; bool hoodDoorOpen;
/* uint8_t lightInfo; /* uint8_t lightInfo;
uint8_t brakeLightInfo; uint8_t brakeLightInfo;
uint8_t espState;*/ uint8_t espState;*/