Move TPMS packet handling to TPMSAppView.

Also rename TPMSModel to TPMSLogger, considering that's what it was *really* doing.
This commit is contained in:
Jared Boone 2016-01-18 14:21:24 -08:00
parent 32818ee9ab
commit feec99ac6a
2 changed files with 19 additions and 14 deletions

View file

@ -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 */