Add packet filtering (Ioniq only)
Signed-off-by: Martin Kolací <martin.kolaci@lmc.eu>
This commit is contained in:
@@ -237,16 +237,6 @@ uint8_t CommObd2Can::receivePID() {
|
||||
|
||||
Serial.print(msgString);
|
||||
|
||||
// Filter received messages (Ioniq only)
|
||||
if(liveData->settings.carType == CAR_HYUNDAI_IONIQ_2018) {
|
||||
long unsigned int atsh_response = liveData->hexToDec(liveData->currentAtshRequest.substring(4), 2, false) + 8;
|
||||
|
||||
if(rxId != atsh_response) {
|
||||
Serial.println(" [Filtered packet]");
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
if ((rxId & 0x40000000) == 0x40000000) { // Determine if message is a remote request frame.
|
||||
sprintf(msgString, " REMOTE REQUEST FRAME");
|
||||
Serial.print(msgString);
|
||||
@@ -263,6 +253,16 @@ uint8_t CommObd2Can::receivePID() {
|
||||
Serial.println(" [Ignored packet]");
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
// Filter received messages (Ioniq only)
|
||||
if(liveData->settings.carType == CAR_HYUNDAI_IONIQ_2018) {
|
||||
long unsigned int atsh_response = liveData->hexToDec(liveData->currentAtshRequest.substring(4), 2, false) + 8;
|
||||
|
||||
if(rxId != atsh_response) {
|
||||
Serial.println(" [Filtered packet]");
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
Serial.println();
|
||||
processFrameBytes();
|
||||
|
||||
Reference in New Issue
Block a user