mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Fixed TPMS type 5 sensor readings
Fixed issue with temperature & pressure values for OOK-8400-Schrader TPMS sensor type 5 (temperature & pressure were swapped and using wrong conversion ratio). Tested fix against 14 sensors of this type.
This commit is contained in:
parent
3db3e78b44
commit
be691fd278
@ -100,8 +100,8 @@ Optional<Reading> Packet::reading_ook_8k4_schrader() const {
|
||||
* Preamble: 01*40
|
||||
* System ID: 01100101, ??*20 (not really sure what this data is)
|
||||
* ID: 32 Manchester symbols
|
||||
* Value: 8 Manchester symbols (temperature?)
|
||||
* Value: 8 Manchester symbols (pressure?)
|
||||
* Value: 8 Manchester symbols (pressure)
|
||||
* Value: 8 Manchester symbols (temperature)
|
||||
* Checksum: 8 Manchester symbols (uint8_t sum of bytes starting with system ID)
|
||||
*/
|
||||
/* NOTE: First four bits of packet are consumed in preamble detection.
|
||||
@ -123,8 +123,8 @@ Optional<Reading> Packet::reading_ook_8k4_schrader() const {
|
||||
return Reading {
|
||||
Reading::Type::GMC_96,
|
||||
(uint32_t)id,
|
||||
Pressure { static_cast<int>(value_1) * 4 / 3 },
|
||||
Temperature { static_cast<int>(value_0) - 56 }
|
||||
Pressure { static_cast<int>(value_0) * 8 / 3 },
|
||||
Temperature { static_cast<int>(value_1) - 61 }
|
||||
};
|
||||
} else {
|
||||
return { };
|
||||
|
Loading…
Reference in New Issue
Block a user