mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-15 22:57:42 +00:00
TPMS: Quick implementation of "flags" column.
For now, shows only for Schrader OOK packets: top (left) nibble is function code, bottom nibble has two-bit checksum.
This commit is contained in:
@@ -74,7 +74,9 @@ Optional<Reading> Packet::reading(const SignalType signal_type) const {
|
||||
return Reading {
|
||||
Reading::Type::Schrader,
|
||||
reader_.read(3, 24),
|
||||
Pressure { static_cast<int>(reader_.read(27, 8)) }
|
||||
Pressure { static_cast<int>(reader_.read(27, 8)) * 4 / 3 },
|
||||
{ },
|
||||
Flags { (flags << 4) | checksum }
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user