@@ -91,10 +91,6 @@ ThunderScopeOscilloscope::ThunderScopeOscilloscope(SCPITransport* transport)
91
91
SetChannelVoltageRange (i, 0 , 5 );
92
92
}
93
93
94
- // Set initial memory configuration.
95
- SetSampleRate (1000000000L );
96
- SetSampleDepth (10000 );
97
-
98
94
// Set up the data plane socket
99
95
auto csock = dynamic_cast <SCPITwinLanTransport*>(m_transport);
100
96
if (!csock)
@@ -118,6 +114,10 @@ ThunderScopeOscilloscope::ThunderScopeOscilloscope(SCPITransport* transport)
118
114
PushTrigger ();
119
115
SetTriggerOffset (1000000000 ); // 1us to allow trigphase interpolation
120
116
117
+ // Set initial memory configuration.
118
+ SetSampleRate (1000000000L );
119
+ SetSampleDepth (10000 );
120
+
121
121
m_diagnosticValues[" Hardware WFM/s" ] = &m_diag_hardwareWFMHz;
122
122
m_diagnosticValues[" Received WFM/s" ] = &m_diag_receivedWFMHz;
123
123
m_diagnosticValues[" Total Waveforms Received" ] = &m_diag_totalWFMs;
@@ -233,7 +233,20 @@ string ThunderScopeOscilloscope::GetDriverNameInternal()
233
233
234
234
void ThunderScopeOscilloscope::FlushConfigCache ()
235
235
{
236
- lock_guard<recursive_mutex> lock (m_cacheMutex);
236
+ // Refresh sample rate from hardware
237
+ RefreshSampleRate ();
238
+ }
239
+
240
+ void ThunderScopeOscilloscope::RefreshSampleRate ()
241
+ {
242
+ auto reply = m_transport->SendCommandQueuedWithReply (" RATE?" );
243
+ m_srate = stoi (reply);
244
+ }
245
+
246
+ void ThunderScopeOscilloscope::EnableChannel (size_t i)
247
+ {
248
+ RemoteBridgeOscilloscope::EnableChannel (i);
249
+ RefreshSampleRate ();
237
250
}
238
251
239
252
double ThunderScopeOscilloscope::GetChannelAttenuation (size_t i)
0 commit comments