Add support for neoOBD2 PRO
parent
63d13cdb88
commit
6d4652f03f
|
|
@ -4,6 +4,8 @@ Hardware
|
||||||
STM32 devices
|
STM32 devices
|
||||||
ValueCAN 4
|
ValueCAN 4
|
||||||
CAN 2.0 works
|
CAN 2.0 works
|
||||||
|
neoOBD2 PRO
|
||||||
|
CAN 2.0 works
|
||||||
|
|
||||||
FTDI devices
|
FTDI devices
|
||||||
neoVI FIRE
|
neoVI FIRE
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#include "device/include/devicefinder.h"
|
#include "device/include/devicefinder.h"
|
||||||
|
#include "device/neoobd2pro/include/neoobd2pro.h"
|
||||||
#include "device/neovifire/include/neovifire.h"
|
#include "device/neovifire/include/neovifire.h"
|
||||||
#include "device/neovifire2/include/neovifire2.h"
|
#include "device/neovifire2/include/neovifire2.h"
|
||||||
#include "device/plasion/include/neoviion.h"
|
#include "device/plasion/include/neoviion.h"
|
||||||
|
|
@ -15,6 +16,7 @@ std::vector<std::shared_ptr<Device>> DeviceFinder::FindAll() {
|
||||||
std::vector<std::shared_ptr<Device>> foundDevices;
|
std::vector<std::shared_ptr<Device>> foundDevices;
|
||||||
std::vector<std::vector<std::shared_ptr<Device>>> findResults;
|
std::vector<std::vector<std::shared_ptr<Device>>> findResults;
|
||||||
|
|
||||||
|
findResults.push_back(NeoOBD2PRO::Find());
|
||||||
findResults.push_back(NeoVIFIRE::Find());
|
findResults.push_back(NeoVIFIRE::Find());
|
||||||
findResults.push_back(NeoVIFIRE2::Find());
|
findResults.push_back(NeoVIFIRE2::Find());
|
||||||
findResults.push_back(NeoVIION::Find());
|
findResults.push_back(NeoVIION::Find());
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
Loading…
Reference in New Issue