Add support for neoOBD2 PRO

This commit is contained in:
Paul Hollinsky
2018-09-18 16:35:22 -04:00
parent 63d13cdb88
commit 6d4652f03f
3 changed files with 36 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef __NEOOBD2PRO_H_
#define __NEOOBD2PRO_H_
#include "device/include/device.h"
#include "platform/include/stm32.h"
namespace icsneo {
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;
NeoOBD2PRO(neodevice_t neodevice) : Device(neodevice) {
com = std::make_shared<Communication>(std::make_shared<STM32>(getWritableNeoDevice()));
setProductName(PRODUCT_NAME);
usbProductId = USB_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))
found.push_back(std::make_shared<NeoOBD2PRO>(neodevice));
return found;
}
};
};
#endif