@@ -1751,7 +1751,7 @@ void StreamBrowserDialog::renderChannelNode(
17511751 m_parent->ShowChannelProperties (scopechan);
17521752 }
17531753 renderChannelProperties (scope,scopechan,channelIndex,scopeState);
1754- EndBlock ();
1754+ EndBlock ();
17551755 }
17561756 }
17571757 size_t streamCount = channel->GetStreamCount ();
@@ -1778,15 +1778,25 @@ void StreamBrowserDialog::renderChannelNode(
17781778 @param channelIndex the index of the channel
17791779 @param scopeState the OscilloscopeState
17801780 */
1781- void StreamBrowserDialog::renderChannelProperties (std::shared_ptr<Oscilloscope> scope, OscilloscopeChannel* scopechan, size_t channelIndex, shared_ptr<OscilloscopeState> scopeState)
1781+ void StreamBrowserDialog::renderChannelProperties (
1782+ shared_ptr<Oscilloscope> scope,
1783+ OscilloscopeChannel* scopechan,
1784+ size_t channelIndex,
1785+ shared_ptr<OscilloscopeState> scopeState)
17821786{
17831787 float fontSize = ImGui::GetFontSize ();
1784- float width = 6 *fontSize;
1788+ float width = 8 *fontSize;
17851789
17861790 Unit counts (Unit::UNIT_COUNTS);
1787- if (renderEditableProperty (width," Attenuation" ,scopeState->m_strAttenuation [channelIndex],scopeState->m_committedAttenuation [channelIndex],counts,
1788- " Attenuation setting for the probe (for example, 10 for a 10:1 probe)" ))
1789- { // Update offset
1791+ if (renderEditableProperty (
1792+ width,
1793+ " Attenuation" ,
1794+ scopeState->m_strAttenuation [channelIndex],
1795+ scopeState->m_committedAttenuation [channelIndex],
1796+ counts,
1797+ " Attenuation setting for the probe (for example, 10 for a 10:1 probe)" ))
1798+ {
1799+ // Update offset
17901800 scopechan->SetAttenuation (scopeState->m_committedAttenuation [channelIndex]);
17911801 scopeState->m_needsUpdate [channelIndex] = true ;
17921802 }
@@ -1823,7 +1833,8 @@ void StreamBrowserDialog::renderChannelProperties(std::shared_ptr<Oscilloscope>
18231833 0 ,
18241834 false ))
18251835 {
1826- scopechan->SetBandwidthLimit (scopeState->m_bandwidthLimits [channelIndex][scopeState->m_channelBandwidthLimit [channelIndex]]);
1836+ scopechan->SetBandwidthLimit (
1837+ scopeState->m_bandwidthLimits [channelIndex][scopeState->m_channelBandwidthLimit [channelIndex]]);
18271838 scopeState->m_needsUpdate [channelIndex] = true ;
18281839 }
18291840 HelpMarker (" Hardware bandwidth limiter setting" );
@@ -1843,6 +1854,38 @@ void StreamBrowserDialog::renderChannelProperties(std::shared_ptr<Oscilloscope>
18431854 );
18441855 }
18451856
1857+ // Per channel ADC mode switch
1858+ if (scope->IsADCModeConfigurable () && scope->IsADCModePerChannel ())
1859+ {
1860+ auto config = GetTimebaseInfoFor (scope);
1861+ bool nomodes = config->m_adcmodeNames .size () <= 1 ;
1862+ if (nomodes)
1863+ ImGui::BeginDisabled ();
1864+ ImGui::SetNextItemWidth (width);
1865+
1866+ if (renderCombo (
1867+ " ADC mode" ,
1868+ false ,
1869+ ImGui::GetStyleColorVec4 (ImGuiCol_FrameBg),
1870+ scopeState->m_adcMode [channelIndex],
1871+ config->m_adcmodeNames ,
1872+ false ,
1873+ 0 ,
1874+ false ))
1875+ {
1876+ scope->SetADCMode (channelIndex, scopeState->m_adcMode [channelIndex]);
1877+ }
1878+ if (nomodes)
1879+ ImGui::EndDisabled ();
1880+
1881+ HelpMarker (
1882+ " Operating mode for the analog-to-digital converter.\n\n "
1883+ " Some instruments allow the ADC to operate in several modes, typically trading bit depth "
1884+ " against sample rate. Available modes may vary depending on the current sample rate and "
1885+ " which channels are in use."
1886+ );
1887+ }
1888+
18461889}
18471890
18481891/* *
0 commit comments