Fixed ValueCan4 Industrial settings interpretation.

Description:
Possibly was an type - casting was done different structure.
Was not possible to determine or setup settings for ValueCan4 Industrial.
pull/36/head
Tomasz Ziobrowski 2021-06-17 00:36:22 +02:00
parent af2c30885b
commit 14d196cff0
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ class ValueCAN4IndustrialSettings : public IDeviceSettings {
public: public:
ValueCAN4IndustrialSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(valuecan4_industrial_settings_t)) {} ValueCAN4IndustrialSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(valuecan4_industrial_settings_t)) {}
const CAN_SETTINGS* getCANSettingsFor(Network net) const override { const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
auto cfg = getStructurePointer<valuecan4_1_2_settings_t>(); auto cfg = getStructurePointer<valuecan4_industrial_settings_t>();
if(cfg == nullptr) if(cfg == nullptr)
return nullptr; return nullptr;
switch(net.getNetID()) { switch(net.getNetID()) {
@ -25,7 +25,7 @@ public:
} }
} }
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override { const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
auto cfg = getStructurePointer<valuecan4_1_2_settings_t>(); auto cfg = getStructurePointer<valuecan4_industrial_settings_t>();
if(cfg == nullptr) if(cfg == nullptr)
return nullptr; return nullptr;
switch(net.getNetID()) { switch(net.getNetID()) {