ValueCAN 4-2EL: Fix wrong structure used in settings

The old structure lined up with the correct one, so the wrong
way did work, but it was just by sheer luck.
pull/32/head
Paul Hollinsky 2021-04-06 18:03:41 -04:00
parent 4a1d0382f2
commit 4e245db94e
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class ValueCAN4_4_2ELSettings : public IDeviceSettings {
public: public:
ValueCAN4_4_2ELSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(valuecan4_4_2el_settings_t)) {} ValueCAN4_4_2ELSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(valuecan4_4_2el_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_4_2el_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_4_2el_settings_t>();
if(cfg == nullptr) if(cfg == nullptr)
return nullptr; return nullptr;
switch(net.getNetID()) { switch(net.getNetID()) {