mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Implement DeviceType and icsneo_getProductName
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define __RADSUPERMOON_H_
|
||||
|
||||
#include "device/include/device.h"
|
||||
#include "device/include/devicetype.h"
|
||||
#include "platform/include/ftdi.h"
|
||||
|
||||
namespace icsneo {
|
||||
@@ -9,7 +10,7 @@ namespace icsneo {
|
||||
class RADSupermoon : public Device {
|
||||
public:
|
||||
// Serial numbers start with VV
|
||||
static constexpr const char* PRODUCT_NAME = "RADSupermoon";
|
||||
static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::RADSupermoon;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x1201;
|
||||
RADSupermoon(neodevice_t neodevice) : Device(neodevice) {
|
||||
auto transport = std::make_shared<FTDI>(getWritableNeoDevice());
|
||||
@@ -18,7 +19,7 @@ public:
|
||||
packetizer->align16bit = false;
|
||||
auto decoder = std::make_shared<Decoder>();
|
||||
com = std::make_shared<Communication>(transport, packetizer, decoder);
|
||||
setProductName(PRODUCT_NAME);
|
||||
getWritableNeoDevice().type = DEVICE_TYPE;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
// RSM does not connect at all yet (needs FTDI D3xx driver, not the 2xx compatible one)
|
||||
|
||||
Reference in New Issue
Block a user