Skip to content

Commit

Permalink
make calibration frequency setting persistent
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <[email protected]>
  • Loading branch information
Ho-Ro committed Mar 30, 2020
1 parent 43cd7f4 commit 26c1a49
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openhantek/src/OH_BUILD.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Do not edit, will be re-created at each commit!
#define OH_BUILD "20200325 build 620"
#define OH_BUILD "20200330 build 621"
2 changes: 2 additions & 0 deletions openhantek/src/dsosettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void DsoSettings::load() {
if (store->contains("timebase")) scope.horizontal.timebase = store->value("timebase").toDouble();
if (store->contains("recordLength")) scope.horizontal.recordLength = store->value("recordLength").toUInt();
if (store->contains("samplerate")) scope.horizontal.samplerate = store->value("samplerate").toDouble();
if (store->contains("calfreq")) scope.horizontal.calfreq = store->value("calfreq").toDouble();
store->endGroup();
// Trigger
store->beginGroup("trigger");
Expand Down Expand Up @@ -225,6 +226,7 @@ void DsoSettings::save() {
store->setValue("timebase", scope.horizontal.timebase);
store->setValue("recordLength", scope.horizontal.recordLength);
store->setValue("samplerate", scope.horizontal.samplerate);
store->setValue("calfreq", scope.horizontal.calfreq);
store->endGroup(); // horizontal
// Trigger
store->beginGroup("trigger");
Expand Down
1 change: 1 addition & 0 deletions openhantek/src/hantekdso/hantekdsocontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ void HantekDsoControl::applySettings(DsoSettingsScope *scope) {
}

setRecordTime(scope->horizontal.timebase * DIVS_TIME);
setCalFreq(scope->horizontal.calfreq);
setTriggerMode(scope->trigger.mode);
setTriggerOffset (scope->trigger.offset);
setTriggerSlope(scope->trigger.slope);
Expand Down

0 comments on commit 26c1a49

Please sign in to comment.