mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-23 17:01:31 -04: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:
parent
40859444fe
commit
05df04df7e
4 changed files with 30 additions and 4 deletions
|
@ -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 }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue