mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Device component initialization done more intelligently
This commit is contained in:
@@ -11,19 +11,21 @@ class NeoVIION : public Plasion {
|
||||
public:
|
||||
static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::ION;
|
||||
static constexpr const uint16_t PRODUCT_ID = 0x0901;
|
||||
NeoVIION(neodevice_t neodevice) : Plasion(neodevice) {
|
||||
getWritableNeoDevice().type = DEVICE_TYPE;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
|
||||
static std::vector<std::shared_ptr<Device>> Find() {
|
||||
std::vector<std::shared_ptr<Device>> found;
|
||||
|
||||
for(auto neodevice : FTDI::FindByProduct(PRODUCT_ID))
|
||||
found.push_back(std::make_shared<NeoVIION>(neodevice));
|
||||
found.emplace_back(new NeoVIION(neodevice));
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
private:
|
||||
NeoVIION(neodevice_t neodevice) : Plasion(neodevice) {
|
||||
initialize<FTDI>();
|
||||
getWritableNeoDevice().type = DEVICE_TYPE;
|
||||
productId = PRODUCT_ID;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user