8 #include "hantekdso/controlspecification.h" 9 #include "hantekdso/enums.h" 10 #include "hantekprotocol/definitions.h" 13 #define MARKER_COUNT 2 14 #define MARKER_STEP (DIVS_TIME / 100.0) 24 QPointF
pos[MARKER_COUNT] = {{-1.0, -1.0}, {1.0, 1.0}};
29 Dso::GraphFormat
format = Dso::GraphFormat::TY;
38 enum SamplerateSource { Samplerrate, Duration } samplerateSource = Samplerrate;
44 Dso::TriggerMode
mode = Dso::TriggerMode::HARDWARE_SOFTWARE;
46 Dso::Slope
slope = Dso::Slope::Positive;
78 std::vector<double>
gainSteps = {1e-2, 2e-2, 5e-2, 1e-1, 2e-1,
80 std::vector<DsoSettingsScopeSpectrum>
spectrum;
81 std::vector<DsoSettingsScopeVoltage>
voltage;
85 double gain(
unsigned channel)
const {
return gainSteps[
voltage[channel].gainStepIndex]; }
86 bool anyUsed(ChannelID channel) {
return voltage[channel].used |
spectrum[channel].used; }
89 return deviceSpecification->couplings[
voltage[channel].couplingOrMathIndex];
92 unsigned countChannels()
const {
return (
unsigned)
voltage.size(); }
94 double getMarker(
unsigned int marker)
const {
95 return marker < MARKER_COUNT ?
horizontal.cursor.
pos[marker].x() : 0.0;
97 void setMarker(
unsigned int marker,
double value) {
98 if (marker < MARKER_COUNT)
horizontal.cursor.
pos[marker].setX(value);
unsigned int recordLength
Sample count.
Definition: scopesettings.h:33
unsigned couplingOrMathIndex
Different index: coupling for real- and mode for math-channels.
Definition: scopesettings.h:72
std::vector< DsoSettingsScopeSpectrum > spectrum
Spectrum analysis settings.
Definition: scopesettings.h:80
Holds the settings for the spectrum analysis.
Definition: scopesettings.h:61
bool inverted
true if the channel is inverted (mirrored on cross-axis)
Definition: scopesettings.h:73
unsigned swTriggerThreshold
Software trigger, threshold.
Definition: scopesettings.h:49
unsigned int source
Channel that is used as trigger source.
Definition: scopesettings.h:47
double trigger
Trigger level in V.
Definition: scopesettings.h:70
double offset
Vertical offset in divs.
Definition: scopesettings.h:69
double frequencybase
Frequencybase in Hz/div.
Definition: scopesettings.h:30
Holds the settings for the trigger. TODO Use ControlSettingsTrigger.
Definition: scopesettings.h:43
std::vector< double > gainSteps
The selectable voltage gain steps in V/div.
Definition: scopesettings.h:78
double offset
Vertical offset in divs.
Definition: scopesettings.h:62
Dso::TriggerMode mode
Automatic, normal or single trigger.
Definition: scopesettings.h:44
Dso::GraphFormat format
Graph drawing mode of the scope.
Definition: scopesettings.h:29
DsoSettingsScopeHorizontal horizontal
Settings for the horizontal axis.
Definition: scopesettings.h:82
double position
Horizontal position for pretrigger.
Definition: scopesettings.h:45
Holds the cursor parameters.
Definition: scopesettings.h:17
DsoSettingsScopeTrigger trigger
Settings for the trigger.
Definition: scopesettings.h:83
Stores the specifications of the currently connected device.
Definition: controlspecification.h:47
Holds the settings for the horizontal axis.
Definition: scopesettings.h:28
QPointF pos[MARKER_COUNT]
Position in div.
Definition: scopesettings.h:24
bool used
true if the channel is turned on
Definition: scopesettings.h:56
unsigned swTriggerSampleSet
Software trigger, sample set.
Definition: scopesettings.h:50
double timebase
TODO Use ControlSettingsSamplerateTarget.
Definition: scopesettings.h:36
Dso::Slope slope
Rising or falling edge causes trigger.
Definition: scopesettings.h:46
double samplerate
The samplerate of the oscilloscope in S.
Definition: scopesettings.h:37
unsigned gainStepIndex
The vertical resolution in V/div (default = 1.0)
Definition: scopesettings.h:71
Holds the settings for the oscilloscope.
Definition: scopesettings.h:77
bool special
true if the trigger source is not a standard channel
Definition: scopesettings.h:48
std::vector< DsoSettingsScopeVoltage > voltage
Settings for the normal graphs.
Definition: scopesettings.h:81
QString name
Name of this channel.
Definition: scopesettings.h:55
Holds the settings for the normal voltage graphs. TODO Use ControlSettingsVoltage.
Definition: scopesettings.h:68
Base for DsoSettingsScopeSpectrum and DsoSettingsScopeVoltage.
Definition: scopesettings.h:54
double magnitude
The vertical resolution in dB/div.
Definition: scopesettings.h:63