Merge pull request #11 from nickn17/packet_filtering
Add packet filtering (Ioniq only)
This commit is contained in:
@@ -254,6 +254,16 @@ uint8_t CommObd2Can::receivePID() {
|
||||
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();
|
||||
//processFrame();
|
||||
|
||||
Reference in New Issue
Block a user