Communication uses instantiated Packetizers and Decoders now

This commit is contained in:
Paul Hollinsky
2018-09-25 17:47:27 -04:00
parent 585abe7cbb
commit aa25ba1728
17 changed files with 161 additions and 107 deletions
+4 -1
View File
@@ -11,7 +11,10 @@ public:
static constexpr const char* PRODUCT_NAME = "neoVI FIRE";
static constexpr const uint16_t PRODUCT_ID = 0x0701;
NeoVIFIRE(neodevice_t neodevice) : Device(neodevice) {
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
auto transport = std::make_shared<FTDI>(getWritableNeoDevice());
auto packetizer = std::make_shared<Packetizer>();
auto decoder = std::make_shared<MessageDecoder>();
com = std::make_shared<Communication>(transport, packetizer, decoder);
setProductName(PRODUCT_NAME);
productId = PRODUCT_ID;
}