CAN FD transmission on non CAN FD hardware now fails as would be expected

This commit is contained in:
Paul Hollinsky
2018-10-19 17:00:40 -04:00
parent 80bccb59a5
commit 0f703f494f
7 changed files with 18 additions and 11 deletions
+9
View File
@@ -14,6 +14,15 @@ public:
NeoVIFIRE2(neodevice_t neodevice) : Device(neodevice) {
getWritableNeoDevice().type = DEVICE_TYPE;
}
protected:
static std::shared_ptr<Communication> MakeCommunication(std::unique_ptr<ICommunication> transport) {
auto packetizer = std::make_shared<Packetizer>();
auto encoder = std::unique_ptr<Encoder>(new Encoder(packetizer));
encoder->supportCANFD = true;
auto decoder = std::unique_ptr<Decoder>(new Decoder());
return std::make_shared<Communication>(std::move(transport), packetizer, std::move(encoder), std::move(decoder));
}
};
}
+1 -5
View File
@@ -12,11 +12,7 @@ class NeoVIFIRE2ETH : public NeoVIFIRE2 {
public:
static constexpr const uint16_t PRODUCT_ID = 0x0004;
NeoVIFIRE2ETH(neodevice_t neodevice) : NeoVIFIRE2(neodevice) {
auto transport = std::unique_ptr<ICommunication>(new PCAP(getWritableNeoDevice()));
auto packetizer = std::make_shared<Packetizer>();
auto encoder = std::unique_ptr<Encoder>(new Encoder(packetizer));
auto decoder = std::unique_ptr<Decoder>(new Decoder());
com = std::make_shared<Communication>(std::move(transport), packetizer, std::move(encoder), std::move(decoder));
com = MakeCommunicaiton(std::unique_ptr<ICommunication>(new PCAP(getWritableNeoDevice())));
settings = std::unique_ptr<IDeviceSettings>(new NeoVIFIRE2Settings(com));
settings->readonly = true;
productId = PRODUCT_ID;
+1 -5
View File
@@ -11,11 +11,7 @@ class NeoVIFIRE2USB : public NeoVIFIRE2 {
public:
static constexpr const uint16_t PRODUCT_ID = 0x1000;
NeoVIFIRE2USB(neodevice_t neodevice) : NeoVIFIRE2(neodevice) {
auto transport = std::unique_ptr<ICommunication>(new FTDI(getWritableNeoDevice()));
auto packetizer = std::make_shared<Packetizer>();
auto encoder = std::unique_ptr<Encoder>(new Encoder(packetizer));
auto decoder = std::unique_ptr<Decoder>(new Decoder());
com = std::make_shared<Communication>(std::move(transport), packetizer, std::move(encoder), std::move(decoder));
com = MakeCommunication(std::unique_ptr<ICommunication>(new FTDI(getWritableNeoDevice())));
settings = std::unique_ptr<IDeviceSettings>(new NeoVIFIRE2Settings(com));
productId = PRODUCT_ID;
}