mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Add TPMS signal_type.
This commit is contained in:
parent
635b1fd4c3
commit
b35a8c4501
@ -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;
|
||||
|
@ -78,6 +78,6 @@ void TPMSProcessor::consume_symbol(
|
||||
void TPMSProcessor::payload_handler(
|
||||
const baseband::Packet& packet
|
||||
) {
|
||||
const TPMSPacketMessage message { packet };
|
||||
const TPMSPacketMessage message { tpms::SignalType::FLM, packet };
|
||||
shared_memory.application_queue.push(message);
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
#include "baseband_packet.hpp"
|
||||
#include "ert_packet.hpp"
|
||||
#include "tpms_packet.hpp"
|
||||
#include "dsp_fir_taps.hpp"
|
||||
#include "dsp_iir.hpp"
|
||||
#include "fifo.hpp"
|
||||
@ -275,12 +276,15 @@ public:
|
||||
class TPMSPacketMessage : public Message {
|
||||
public:
|
||||
constexpr TPMSPacketMessage(
|
||||
const tpms::SignalType signal_type,
|
||||
const baseband::Packet& packet
|
||||
) : Message { ID::TPMSPacket },
|
||||
signal_type { signal_type },
|
||||
packet { packet }
|
||||
{
|
||||
}
|
||||
|
||||
tpms::SignalType signal_type;
|
||||
baseband::Packet packet;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user