mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 03:47:45 +00:00
Merge pull request #869 from NotherNgineer/next
#868 TPMS app displays incorrect readings for Type 5 sensors
This commit is contained in:
@@ -100,8 +100,8 @@ Optional<Reading> Packet::reading_ook_8k4_schrader() const {
|
|||||||
* Preamble: 01*40
|
* Preamble: 01*40
|
||||||
* System ID: 01100101, ??*20 (not really sure what this data is)
|
* System ID: 01100101, ??*20 (not really sure what this data is)
|
||||||
* ID: 32 Manchester symbols
|
* 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)
|
* Checksum: 8 Manchester symbols (uint8_t sum of bytes starting with system ID)
|
||||||
*/
|
*/
|
||||||
/* NOTE: First four bits of packet are consumed in preamble detection.
|
/* 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 {
|
return Reading {
|
||||||
Reading::Type::GMC_96,
|
Reading::Type::GMC_96,
|
||||||
(uint32_t)id,
|
(uint32_t)id,
|
||||||
Pressure { static_cast<int>(value_1) * 4 / 3 },
|
Pressure { static_cast<int>(value_0) * 11 / 4 },
|
||||||
Temperature { static_cast<int>(value_0) - 56 }
|
Temperature { static_cast<int>(value_1) - 61 }
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return { };
|
return { };
|
||||||
|
Reference in New Issue
Block a user