mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-10 02:35:17 -04:00
Add TPMS signal_type.
This commit is contained in:
parent
635b1fd4c3
commit
b35a8c4501
4 changed files with 9 additions and 5 deletions
|
@ -156,7 +156,7 @@ TPMSAppView::TPMSAppView(NavigationView&) {
|
|||
[this](Message* const p) {
|
||||
const auto message = static_cast<const TPMSPacketMessage*>(p);
|
||||
const tpms::Packet packet { message->packet };
|
||||
this->on_packet(packet);
|
||||
this->on_packet(message->signal_type, packet);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -194,12 +194,12 @@ void TPMSAppView::set_parent_rect(const Rect new_parent_rect) {
|
|||
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
||||
}
|
||||
|
||||
void TPMSAppView::on_packet(const tpms::Packet& packet) {
|
||||
void TPMSAppView::on_packet(const tpms::SignalType signal_type, const tpms::Packet& packet) {
|
||||
if( logger ) {
|
||||
logger->on_packet(packet, target_frequency());
|
||||
}
|
||||
|
||||
const auto reading_opt = packet.reading();
|
||||
const auto reading_opt = packet.reading(signal_type);
|
||||
if( reading_opt.is_valid() ) {
|
||||
const auto reading = reading_opt.value();
|
||||
recent.on_packet({ reading.type(), reading.id() }, reading);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue