Commit 39d8e84bc5a29e7b82df1661af548ee643e455c7
Committed by
David Graeff
1 parent
3802257a
glscope: allow to toggle cursor visibility
Showing
3 changed files
with
5 additions
and
1 deletions
openhantek/src/dsowidget.cpp
| ... | ... | @@ -115,6 +115,7 @@ DsoWidget::DsoWidget(DsoSettings *settings, DataAnalyzer *dataAnalyzer, QWidget |
| 115 | 115 | this->markerSlider->setStep(marker, 0.2); |
| 116 | 116 | this->markerSlider->setValue(marker, this->settings->scope.horizontal.marker[marker]); |
| 117 | 117 | this->markerSlider->setVisible(marker, true); |
| 118 | + this->settings->scope.horizontal.marker_visible[marker] = true; | |
| 118 | 119 | } |
| 119 | 120 | |
| 120 | 121 | // The table for the settings | ... | ... |
openhantek/src/glscope.cpp
| ... | ... | @@ -156,6 +156,8 @@ void GlScope::paintGL() { |
| 156 | 156 | this->qglColor(this->settings->view.color.screen.markers); |
| 157 | 157 | |
| 158 | 158 | for(int marker = 0; marker < MARKER_COUNT; ++marker) { |
| 159 | + if (!this->settings->scope.horizontal.marker_visible[marker]) | |
| 160 | + continue; | |
| 159 | 161 | if(this->vaMarker[marker].size() != 4) { |
| 160 | 162 | this->vaMarker[marker].resize(2 * 2); |
| 161 | 163 | this->vaMarker[marker][1] = -DIVS_VOLTAGE; | ... | ... |
openhantek/src/settings.h
| ... | ... | @@ -91,7 +91,8 @@ struct DsoSettingsOptions { |
| 91 | 91 | struct DsoSettingsScopeHorizontal { |
| 92 | 92 | Dso::GraphFormat format; ///< Graph drawing mode of the scope |
| 93 | 93 | double frequencybase; ///< Frequencybase in Hz/div |
| 94 | - double marker[2]; ///< Marker positions in div | |
| 94 | + double marker[MARKER_COUNT]; ///< Marker positions in div | |
| 95 | + bool marker_visible[MARKER_COUNT]; | |
| 95 | 96 | double timebase; ///< Timebase in s/div |
| 96 | 97 | unsigned int recordLength; ///< Sample count |
| 97 | 98 | double samplerate; ///< The samplerate of the oscilloscope in S | ... | ... |