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:
Jared Boone 2016-05-17 14:23:03 -07:00
parent 40859444fe
commit 05df04df7e
4 changed files with 30 additions and 4 deletions

View file

@ -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 }
};
}