Update TPMS field handling for Schrader devices.

Thanks to mossmann for discovering these details.
This commit is contained in:
Jared Boone 2016-05-17 11:27:19 -07:00
parent d81d879aac
commit 40859444fe

View File

@ -68,10 +68,13 @@ Optional<Reading> Packet::reading(const SignalType signal_type) const {
}
if( signal_type == SignalType::Schrader ) {
const auto flags = reader_.read(0, 3);
const auto checksum = reader_.read(35, 2);
return Reading {
Reading::Type::Schrader,
reader_.read(3, 25),
Pressure { static_cast<int>(reader_.read(28, 8)) }
reader_.read(3, 24),
Pressure { static_cast<int>(reader_.read(27, 8)) }
};
}