Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/ngscopeclient/PreferenceSchema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,22 @@ void PreferenceManager::InitializeDefaults()
.EnumValue("16 bits", WIDTH_16_BITS)
);

auto& rsrtb = drivers.AddCategory("RohdeSchwarz RTB");
rsrtb.AddPreference(
Preference::Enum("data_width", WIDTH_16_BITS)
.Label("Data Width")
.Description(
"Data width used when downloading sample data from the instrument.\n\n"
"Even if the instrument has a 10-bit ADC, using 8 rather than 16 bit data format allows faster"
" waveform update rate.\n\n"
"Choose 16 bit mode if you want to privilege data accuracy over refresh rate.\n\n"
"Changes to this setting take effect the next time a connection to the instrument is opened; "
"the transfer format for active sessions is not updated."
)
.EnumValue("8 bits", WIDTH_8_BITS)
.EnumValue("16 bits", WIDTH_16_BITS)
);

auto& siglent = drivers.AddCategory("Siglent SDS HD");
siglent.AddPreference(
Preference::Enum("data_width", WIDTH_AUTO)
Expand Down
14 changes: 14 additions & 0 deletions src/ngscopeclient/Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#include "../scopehal/LeCroyOscilloscope.h"
#include "../scopehal/SiglentSCPIOscilloscope.h"
#include "../scopehal/RSRTB2kOscilloscope.h"
#include "../scopehal/RigolOscilloscope.h"
#include "../scopehal/MockOscilloscope.h"
#include "../scopeprotocols/EyePattern.h"
Expand Down Expand Up @@ -2851,6 +2852,19 @@ void Session::ApplyPreferences(shared_ptr<Oscilloscope> scope)
siglent->ForceHDMode(true);
}
}
auto rsrtb = dynamic_pointer_cast<RSRTB2kOscilloscope>(scope);
if(rsrtb)
{
auto dataWidth = m_preferences.GetEnumRaw("Drivers.RohdeSchwarz RTB.data_width");
if(dataWidth == WIDTH_8_BITS)
{
rsrtb->ForceHDMode(false);
}
else if(dataWidth == WIDTH_16_BITS)
{
rsrtb->ForceHDMode(true);
}
}
auto rigol = dynamic_pointer_cast<RigolOscilloscope>(scope);
if(rigol)
{
Expand Down