Rename the USB_PRODUCT_ID to PRODUCT_ID as it is used for Ethernet as well
parent
8343093708
commit
b254ac991d
|
|
@ -27,7 +27,7 @@ public:
|
|||
static bool SerialStringIsNumeric(const std::string& serial);
|
||||
|
||||
std::string getProductName() const { return data.type; }
|
||||
uint16_t getUSBProductId() const { return usbProductId; }
|
||||
uint16_t getProductId() const { return productId; }
|
||||
std::string getSerial() const { return data.serial; }
|
||||
uint32_t getSerialNumber() const { return Device::SerialStringToNum(getSerial()); }
|
||||
const neodevice_t& getNeoDevice() const { return data; }
|
||||
|
|
@ -51,7 +51,7 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
uint16_t usbProductId = 0;
|
||||
uint16_t productId = 0;
|
||||
bool online = false;
|
||||
int messagePollingCallbackID = 0;
|
||||
std::shared_ptr<Communication> com;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ class NeoOBD2PRO : public Device {
|
|||
public:
|
||||
// Serial numbers are NP****
|
||||
static constexpr const char* PRODUCT_NAME = "neoOBD2 PRO";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x1103;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1103;
|
||||
NeoOBD2PRO(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<STM32>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : STM32::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : STM32::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoOBD2PRO>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ namespace icsneo {
|
|||
class NeoVIFIRE : public Device {
|
||||
public:
|
||||
static constexpr const char* PRODUCT_NAME = "neoVI FIRE";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0701;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0701;
|
||||
NeoVIFIRE(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
enum class Mode : char {
|
||||
|
|
@ -43,7 +43,7 @@ public:
|
|||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIFIRE>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ namespace icsneo {
|
|||
|
||||
class NeoVIFIRE2ETH : public NeoVIFIRE2 {
|
||||
public:
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0004;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0004;
|
||||
NeoVIFIRE2ETH(neodevice_t neodevice) : NeoVIFIRE2(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<PCAP>(getWritableNeoDevice()));
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : PCAP::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : PCAP::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIFIRE2ETH>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ namespace icsneo {
|
|||
|
||||
class NeoVIFIRE2USB : public NeoVIFIRE2 {
|
||||
public:
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x1000;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1000;
|
||||
NeoVIFIRE2USB(neodevice_t neodevice) : NeoVIFIRE2(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIFIRE2USB>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -9,16 +9,16 @@ namespace icsneo {
|
|||
class NeoVIION : public Plasion {
|
||||
public:
|
||||
static constexpr const char* PRODUCT_NAME = "neoVI ION";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0901;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0901;
|
||||
NeoVIION(neodevice_t neodevice) : Plasion(neodevice) {
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIION>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -9,16 +9,16 @@ namespace icsneo {
|
|||
class NeoVIPLASMA : public Plasion {
|
||||
public:
|
||||
static constexpr const char* PRODUCT_NAME = "neoVI PLASMA";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0801;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0801;
|
||||
NeoVIPLASMA(neodevice_t neodevice) : Plasion(neodevice) {
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIPLASMA>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ class RADGalaxy : public Device {
|
|||
public:
|
||||
// Serial numbers start with RG
|
||||
static constexpr const char* PRODUCT_NAME = "RADGalaxy";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0003;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0003;
|
||||
RADGalaxy(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<PCAP>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : PCAP::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : PCAP::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<RADGalaxy>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ class RADStar2 : public Device {
|
|||
public:
|
||||
// Serial numbers start with RS
|
||||
static constexpr const char* PRODUCT_NAME = "RADStar 2";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0005;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0005;
|
||||
RADStar2(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<RADStar2>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@ class RADSupermoon : public Device {
|
|||
public:
|
||||
// Serial numbers start with VV
|
||||
static constexpr const char* PRODUCT_NAME = "RADSupermoon";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x1201;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1201;
|
||||
RADSupermoon(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
|
||||
com->setAlign16Bit(false);
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
// RSM does not connect at all yet (needs FTDI D3xx driver, not the 2xx compatible one)
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<RADSupermoon>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -9,17 +9,17 @@ namespace icsneo {
|
|||
class ValueCAN3 : public Device {
|
||||
public:
|
||||
static constexpr const char* PRODUCT_NAME = "ValueCAN 3";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x0601;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0601;
|
||||
ValueCAN3(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<FTDI>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<ValueCAN3>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -10,17 +10,17 @@ class ValueCAN4 : public Device {
|
|||
public:
|
||||
// Serial numbers are V0 for 4-4, VE for 4-2EL, V2 for 4-2, and V1 for 4-1
|
||||
static constexpr const char* PRODUCT_NAME = "ValueCAN 4";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x1101;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1101;
|
||||
ValueCAN4(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<STM32>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : STM32::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : STM32::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<ValueCAN4>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ class VividCAN : public Device {
|
|||
public:
|
||||
// Serial numbers start with VV
|
||||
static constexpr const char* PRODUCT_NAME = "VividCAN";
|
||||
static constexpr const uint16_t USB_PRODUCT_ID = 0x1102;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1102;
|
||||
VividCAN(neodevice_t neodevice) : Device(neodevice) {
|
||||
com = std::make_shared<Communication>(std::make_shared<STM32>(getWritableNeoDevice()));
|
||||
setProductName(PRODUCT_NAME);
|
||||
usbProductId = USB_PRODUCT_ID;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
bool goOnline() { return false; }
|
||||
|
|
@ -22,7 +22,7 @@ public:
|
|||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : STM32::FindByProduct(USB_PRODUCT_ID))
|
||||
for(auto neodevice : STM32::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<VividCAN>(neodevice));
|
||||
|
||||
return found;
|
||||
|
|
|
|||
Loading…
Reference in New Issue