Commit ab6c0dee authored by David Košenina's avatar David Košenina

use callibration from eeprom

parent 48f29b62
......@@ -2323,6 +2323,7 @@ void OsciloskopOsciloskop::m_menuItemResetEEPROMOnMenuSelection(wxCommandEvent&
void OsciloskopOsciloskop::m_buttonConnectOnButtonClick(wxCommandEvent& event)
{
pOsciloscope->thread.openUSB(pOsciloscope->settings.getHardware());
pOsciloscope->thread.useEepromCallibration(pOsciloscope->settings.getHardware());
}
void OsciloskopOsciloskop::m_buttonDisconnectOnButtonClick(wxCommandEvent& event)
......
......@@ -570,8 +570,10 @@ int ThreadApi::writeFpgaToArtix7(SHardware1* ctrl1, SHardware2* ctrl2, OscHardwa
}
// open
function(afOpenUsb);
wait();
openUSB(hw);
// callibration
useEepromCallibration(hw);
// fpga
function(afUploadFpga);
......@@ -604,7 +606,11 @@ int ThreadApi::openUSB(OscHardware* hw)
function(afOpenUsb);
wait();
}
}
return 0;
}
int ThreadApi::useEepromCallibration(OscHardware* hw)
{
// callibration
if (SDL_AtomicGet(&open) == 1)
{
......@@ -623,7 +629,6 @@ int ThreadApi::openUSB(OscHardware* hw)
hw->json = json;
}
}
}
return 0;
}
int ThreadApi::writeUsbToEEPROM(OscHardware* hw)
......
......@@ -904,6 +904,7 @@ public:
public:
// controlThread
int openUSB(OscHardware* hw);
int useEepromCallibration(OscHardware* hw);
int writeFpgaToArtix7(SHardware1* ctrl1, SHardware2* ctrl2, OscHardware* hw);
int writeUsbToEEPROM(OscHardware* hw);
......
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