mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-05 08:15:11 -04:00
Move TPMS packet handling to TPMSAppView.
Also rename TPMSModel to TPMSLogger, considering that's what it was *really* doing.
This commit is contained in:
parent
32818ee9ab
commit
feec99ac6a
2 changed files with 19 additions and 14 deletions
|
@ -30,13 +30,13 @@
|
|||
|
||||
namespace tpms {
|
||||
|
||||
using Packet = ManchesterFormatted;
|
||||
using Packet = ManchesterDecoder;
|
||||
|
||||
} /* namespace tpms */
|
||||
|
||||
class TPMSModel {
|
||||
class TPMSLogger {
|
||||
public:
|
||||
tpms::Packet on_packet(const TPMSPacketMessage& message);
|
||||
void on_packet(const Timestamp& timestamp, const tpms::Packet& packet);
|
||||
|
||||
private:
|
||||
LogFile log_file { "tpms.txt" };
|
||||
|
@ -52,11 +52,12 @@ public:
|
|||
void set_parent_rect(const Rect new_parent_rect) override;
|
||||
|
||||
private:
|
||||
TPMSModel model;
|
||||
TPMSLogger logger;
|
||||
|
||||
Console console;
|
||||
|
||||
void log(const tpms::Packet& formatted);
|
||||
void on_packet(const baseband::Packet& packet);
|
||||
void draw(const tpms::Packet& packet);
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue