Commit 41463c5b authored by David Košenina's avatar David Košenina

frequency divider, ui response time

parent 27f82cdf
......@@ -2294,6 +2294,8 @@ void OsciloskopOsciloskop::m_textCtrlFreqDividerOnTextEnter(wxCommandEvent& even
uint divider = pFormat->stringToInteger(m_textCtrlFreqDivider->GetValue().ToAscii().data());
pOsciloscope->window.digitalSetup.divider = divider;
double freq = 100000000.0 / (double(divider) + 1.0);
if( pOsciloscope->thread.getVersion() == HARDWARE_VERSION_2 )
freq = 250000000.0 / (double(divider) + 1.0);
m_staticTextMhz->SetLabel(wxString(pFormat->doubleToString(freq)).append(wxT(" Hz")));
pOsciloscope->control.setDigitalClockDivide(divider);
pOsciloscope->control.transferData();
......
......@@ -1196,7 +1196,7 @@ Osciloskop::Osciloskop( wxWindow* parent, wxWindowID id, const wxString& title,
m_spinBtnDigVoltage = new wxSpinButton( m_panel25, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_VERTICAL );
bSizer109->Add( m_spinBtnDigVoltage, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText108 = new wxStaticText( m_panel25, wxID_ANY, _("Frequency(100Mhz) divider:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText108 = new wxStaticText( m_panel25, wxID_ANY, _("Frequency divider:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText108->Wrap( -1 );
bSizer109->Add( m_staticText108, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
......
......@@ -10907,7 +10907,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Frequency(100Mhz) divider:</property>
<property name="label">Frequency divider:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
......@@ -172,7 +172,7 @@ void ThreadApi::wait()
{
while (SDL_AtomicCAS(&sync, 0, 0) == SDL_FALSE)
{
SDL_Delay(100);
SDL_Delay(1);
}
}
......@@ -3862,7 +3862,7 @@ int SDLCALL ControlHardwareThreadFunction(void* data)
while (pOsciloscope->controlHardwareThreadActive)
{
pOsciloscope->thread.update();
SDL_Delay(100);
SDL_Delay(1);
}
SDL_MemoryBarrierRelease();
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment