diff --git a/openhantek/src/hantekdso/hantekdsocontrol.h b/openhantek/src/hantekdso/hantekdsocontrol.h index 1765da4f..72f7bfaf 100644 --- a/openhantek/src/hantekdso/hantekdsocontrol.h +++ b/openhantek/src/hantekdso/hantekdsocontrol.h @@ -113,6 +113,9 @@ class HantekDsoControl : public QObject { } const ControlCommand *getCommand(Hantek::ControlCode code) const; + /// \brief Update the minimum and maximum supported samplerate. + void updateSamplerateLimits(); + private: bool isRollMode() const; bool isFastRate() const; @@ -169,9 +172,6 @@ class HantekDsoControl : public QObject { /// \brief Restore the samplerate/timebase targets after divider updates. void restoreTargets(); - /// \brief Update the minimum and maximum supported samplerate. - void updateSamplerateLimits(); - private: /// Pointers to bulk/control commands BulkCommand *command[255] = {0}; diff --git a/openhantek/src/main.cpp b/openhantek/src/main.cpp index f5f3b5a8..b7651cce 100644 --- a/openhantek/src/main.cpp +++ b/openhantek/src/main.cpp @@ -77,6 +77,7 @@ void applySettingsToDevice(HantekDsoControl *dsoControl, DsoSettingsScope *scope dsoControl->setPretriggerPosition(scope->trigger.position * scope->horizontal.timebase * DIVS_TIME); dsoControl->setTriggerSlope(scope->trigger.slope); dsoControl->setTriggerSource(scope->trigger.special, scope->trigger.source); + dsoControl->updateSamplerateLimits(); } /// \brief Initialize resources and translations and show the main window.