ValueCAN 4-2EL: Add communication over Ethernet

The device can communicate with the PC over its Ethernet if the
enablePcEthernetComm setting is set within the structure.

This stops the Ethernet port from being used for vehicle data.
This commit is contained in:
Paul Hollinsky
2020-09-14 12:35:43 -04:00
parent d2676afa11
commit 8843ace87e
10 changed files with 172 additions and 47 deletions
@@ -5,13 +5,13 @@
#include "icsneo/device/device.h"
#include "icsneo/device/devicetype.h"
#include "icsneo/platform/stm32.h"
namespace icsneo {
class ValueCAN4 : public Device {
public:
static constexpr const uint16_t PRODUCT_ID = 0x1101;
// All ValueCAN 4 devices share a USB PID
static constexpr const uint16_t USB_PRODUCT_ID = 0x1101;
protected:
virtual void setupEncoder(Encoder& encoder) override {
@@ -19,9 +19,7 @@ protected:
encoder.supportCANFD = true;
}
ValueCAN4(neodevice_t neodevice) : Device(neodevice) {
productId = PRODUCT_ID;
}
ValueCAN4(neodevice_t neodevice) : Device(neodevice) {}
};
}