diff --git a/src/ngscopeclient/PreferenceSchema.cpp b/src/ngscopeclient/PreferenceSchema.cpp index 6ae14ff9..eafd20a6 100644 --- a/src/ngscopeclient/PreferenceSchema.cpp +++ b/src/ngscopeclient/PreferenceSchema.cpp @@ -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) diff --git a/src/ngscopeclient/Session.cpp b/src/ngscopeclient/Session.cpp index 0a931d4a..a8963a22 100644 --- a/src/ngscopeclient/Session.cpp +++ b/src/ngscopeclient/Session.cpp @@ -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" @@ -2851,6 +2852,19 @@ void Session::ApplyPreferences(shared_ptr scope) siglent->ForceHDMode(true); } } + auto rsrtb = dynamic_pointer_cast(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(scope); if(rigol) {