mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 19:29:55 +00:00
Add TPMS signal_type.
This commit is contained in:
@@ -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);
|
||||
|
@@ -107,7 +107,7 @@ private:
|
||||
|
||||
TPMSRecentEntriesView recent_entries_view { recent };
|
||||
|
||||
void on_packet(const tpms::Packet& packet);
|
||||
void on_packet(const tpms::SignalType signal_type, const tpms::Packet& packet);
|
||||
void on_show_list();
|
||||
|
||||
uint32_t target_frequency() const;
|
||||
|
Reference in New Issue
Block a user