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

compile fix

parent 3b5ed783
......@@ -40,7 +40,7 @@ void OsciloskopConnection::m_choiceConnectionOnChoice(wxCommandEvent& event)
// TODO: Implement m_choiceConnectionOnChoice
if(m_choiceConnection->GetSelection() == 0)
{
pOsciloscope->thread.function(EThreadApiFunction::afSetUsb);
pOsciloscope->thread.function(afSetUsb);
m_buttonConnect->Disable();
m_buttonDisconnect->Disable();
m_textCtrlIP->Disable();
......@@ -49,7 +49,7 @@ void OsciloskopConnection::m_choiceConnectionOnChoice(wxCommandEvent& event)
}
else
{
pOsciloscope->thread.function(EThreadApiFunction::afSetNetwork);
pOsciloscope->thread.function(afSetNetwork);
m_buttonConnect->Enable();
m_buttonDisconnect->Enable();
m_textCtrlIP->Enable();
......@@ -77,8 +77,8 @@ void OsciloskopConnection::m_buttonConnectOnButtonClick(wxCommandEvent& event)
{
// TODO: Implement m_buttonConnectOnButtonClick
pOsciloscope->thread.setIpPort((const char*)m_textCtrlIP->GetValue(), (int)atoi(m_textCtrlPort->GetValue()));
pOsciloscope->thread.function(EThreadApiFunction::afClientConnect);
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afClientConnect);
pOsciloscope->thread.function(afServerUpload);
wxApp* app = (wxApp*)wxApp::GetInstance();
if(app)
{
......@@ -94,7 +94,7 @@ void OsciloskopConnection::m_buttonDisconnectOnButtonClick(wxCommandEvent& event
{
// TODO: Implement m_buttonDisconnectOnButtonClick
// disconnect first, becouse mode change has no affect then ...
pOsciloscope->thread.function(EThreadApiFunction::afClientDisconnect);
pOsciloscope->thread.function(afClientDisconnect);
// automatic mode change
pOsciloscope->window.horizontal.Mode = SIGNAL_MODE_PAUSE;
pOsciloscope->signalMode = (SignalMode)pOsciloscope->window.horizontal.Mode;
......
......@@ -955,8 +955,9 @@ void OsciloskopOsciloskop::m_checkBoxETSOnCheckBox(wxCommandEvent& event)
pOsciloscope->redrawEts = 1;
pOsciloscope->clearRenderTarget = 1;
pOsciloscope->thread.setSimulateData( &pOsciloscope->GetServerSim() );
pOsciloscope->thread.function(EThreadApiFunction::afSetSimulateData);
pOsciloscope->sim = pOsciloscope->GetServerSim();
pOsciloscope->thread.setSimulateData( &pOsciloscope->sim );
pOsciloscope->thread.function(afSetSimulateData);
}
void OsciloskopOsciloskop::m_checkBoxFullOnCheckBox(wxCommandEvent& event)
......@@ -1030,9 +1031,9 @@ void OsciloskopOsciloskop::m_textCtrlTimeFrameSizeOnTextEnter(wxCommandEvent& ev
int data = 0;
int packet = 0;
uint frameSize = 0;
pOsciloscope->thread.function(EThreadApiFunction::afServerDownload);
pOsciloscope->thread.function(afServerDownload);
pOsciloscope->thread.wait();
pOsciloscope->thread.function(EThreadApiFunction::afGetFrame);
pOsciloscope->thread.function(afGetFrame);
pOsciloscope->thread.wait();
pOsciloscope->thread.getFrame(&version, &header, &data, &packet);
frameSize = atoi(m_textCtrlTimeFrameSize->GetValue().ToAscii().data());
......@@ -1051,8 +1052,8 @@ void OsciloskopOsciloskop::m_textCtrlTimeFrameSizeOnTextEnter(wxCommandEvent& ev
data = pOsciloscope->window.horizontal.FrameSize * 4;
}
pOsciloscope->thread.setFrame(version, header, data, packet);
pOsciloscope->thread.function(EThreadApiFunction::afSetFrame);
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afSetFrame);
pOsciloscope->thread.function(afServerUpload);
m_textCtrlTimeFrameSize->SetValue(wxString::FromAscii(pFormat->integerToString(pOsciloscope->control.getSampleSize())));
pOsciloscope->control.transferData();
}
......@@ -1955,7 +1956,7 @@ void OsciloskopOsciloskop::m_menuItemVersion1OnMenuSelection(wxCommandEvent& eve
{
SetDigital13To16(true);
pOsciloscope->thread.setFrame(HARDWARE_VERSION_1, SCOPEFUN_FRAME_1_HEADER, SCOPEFUN_FRAME_1_DATA, SCOPEFUN_FRAME_1_PACKET);
pOsciloscope->thread.function(EThreadApiFunction::afSetFrame);
pOsciloscope->thread.function(afSetFrame);
GetMenuBar()->GetMenu(8)->FindItemByPosition(0)->Check(1);
GetMenuBar()->GetMenu(8)->FindItemByPosition(1)->Check(0);
......@@ -1967,7 +1968,7 @@ void OsciloskopOsciloskop::m_menuItemVersion1OnMenuSelection(wxCommandEvent& eve
m_comboBoxTimeCapture->Append(captureTimeToStr(i));
}
m_comboBoxTimeCapture->SetSelection(pOsciloscope->control.getXRange());
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afServerUpload);
}
void OsciloskopOsciloskop::SetDigital13To16(bool enable)
......@@ -1998,7 +1999,7 @@ void OsciloskopOsciloskop::m_menuItemVersion2OnMenuSelection(wxCommandEvent& eve
header = SCOPEFUN_FRAME_2_HEADER;
packet = pOsciloscope->window.storage.getPacketSize(HARDWARE_VERSION_2);
pOsciloscope->thread.setFrame(version, header, data, packet);
pOsciloscope->thread.function(EThreadApiFunction::afSetFrame);
pOsciloscope->thread.function(afSetFrame);
GetMenuBar()->GetMenu(8)->FindItemByPosition(0)->Check(0);
GetMenuBar()->GetMenu(8)->FindItemByPosition(1)->Check(1);
......@@ -2010,7 +2011,7 @@ void OsciloskopOsciloskop::m_menuItemVersion2OnMenuSelection(wxCommandEvent& eve
m_comboBoxTimeCapture->Append(captureTimeToStr(i));
}
m_comboBoxTimeCapture->SetSelection(pOsciloscope->control.getXRange());
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afServerUpload);
// setupControl(pOsciloscope->window);
}
......@@ -2251,12 +2252,12 @@ void OsciloskopOsciloskop::m_menuItemResetEEPROMOnMenuSelection(wxCommandEvent&
void OsciloskopOsciloskop::m_buttonConnectOnButtonClick(wxCommandEvent& event)
{
pOsciloscope->thread.setUSB(&pOsciloscope->settings.getHardware()->getUSB());
pOsciloscope->thread.function(EThreadApiFunction::afOpenUsb);
pOsciloscope->thread.function(afOpenUsb);
}
void OsciloskopOsciloskop::m_buttonDisconnectOnButtonClick(wxCommandEvent& event)
{
pOsciloscope->thread.function(EThreadApiFunction::afCloseUsb);
pOsciloscope->thread.function(afCloseUsb);
pOsciloscope->signalMode = SIGNAL_MODE_PAUSE;
pOsciloscope->window.horizontal.Mode = SIGNAL_MODE_PAUSE;
......
......@@ -75,8 +75,8 @@ void OsciloskopStorage::m_choicePacketSizeOnChoice(wxCommandEvent& event)
packet = pOsciloscope->window.storage.getPacketSize(version);
pOsciloscope->thread.setFrame(version,header,data,packet);
pOsciloscope->thread.function(EThreadApiFunction::afSetFrame);
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afSetFrame);
pOsciloscope->thread.function(afServerUpload);
}
void OsciloskopStorage::m_buttonOkOnButtonClick(wxCommandEvent& event)
......
......@@ -543,7 +543,7 @@ int ThreadApi::writeFpgaToArtix7(SHardware1* ctrl1, SHardware2* ctrl2, OscHardwa
}
// open
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
wait();
// fpga
......@@ -567,7 +567,7 @@ int ThreadApi::writeUsbToEEPROM(OscHardware* hw)
{
SUsb usb = hw->getUSB();
setUSB(&usb);
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
wait();
}
......@@ -597,7 +597,7 @@ int ThreadApi::writeUsbToEEPROM(OscHardware* hw)
fileLoadPtr(path, (char*)&eepromData, &eepromSize);
}
SDL_AtomicUnlock(&lock);
function(EThreadApiFunction::afEEPROMWrite);
function(afEEPROMWrite);
wait();
}
int iret = SDL_AtomicGet(&ret);
......@@ -625,8 +625,8 @@ int ThreadApi::readUsbFromEEPROM(OscHardware* hw)
{
SUsb usb = hw->getUSB();
setUSB(&usb);
function(EThreadApiFunction::afOpenUsb);
function(EThreadApiFunction::afIsOpened);
function(afOpenUsb);
function(afIsOpened);
wait();
}
......@@ -647,7 +647,7 @@ int ThreadApi::readUsbFromEEPROM(OscHardware* hw)
eepromOffset = 0;
}
SDL_AtomicUnlock(&lock);
function(EThreadApiFunction::afEEPROMRead);
function(afEEPROMRead);
wait();
}
int iret = SDL_AtomicGet(&ret);
......@@ -676,7 +676,7 @@ int ThreadApi::writeCallibrateSettingsToEEPROM(OscHardware* hw)
{
SUsb usb = hw->getUSB();
setUSB(&usb);
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
wait();
}
......@@ -687,7 +687,7 @@ int ThreadApi::writeCallibrateSettingsToEEPROM(OscHardware* hw)
eepromOffset = 256000;
fileLoadPtr((char*)hw, (char*)&eepromData, &eepromSize);
SDL_AtomicUnlock(&lock);
function(EThreadApiFunction::afEEPROMWrite);
function(afEEPROMWrite);
wait();
}
int iret = SDL_AtomicGet(&ret);
......@@ -714,7 +714,7 @@ int ThreadApi::readCallibrateSettingsFromEEPROM(OscHardware* hw)
{
SUsb usb = hw->getUSB();
setUSB(&usb);
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
}
if ( SDL_AtomicGet(&open) > 0 )
......@@ -723,7 +723,7 @@ int ThreadApi::readCallibrateSettingsFromEEPROM(OscHardware* hw)
eepromSize = sizeof(OscHardware);
eepromOffset = 256000;
SDL_AtomicUnlock(&lock);
function(EThreadApiFunction::afEEPROMRead);
function(afEEPROMRead);
wait();
SDL_AtomicLock(&lock);
SDL_memcpy((char*)hw, (char*)&eepromData, sizeof(OscHardware));
......@@ -748,7 +748,7 @@ int ThreadApi::eraseEEPROM(OscHardware* hw)
{
SUsb usb = hw->getUSB();
setUSB(&usb);
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
}
// upload
......@@ -762,10 +762,10 @@ int ThreadApi::eraseEEPROM(OscHardware* hw)
function(afCloseUsb);
// open
function(EThreadApiFunction::afOpenUsb);
function(afOpenUsb);
}
function(EThreadApiFunction::afEEPROMErase);
function(afEEPROMErase);
wait();
int iret = SDL_AtomicGet(&ret);
......@@ -785,7 +785,7 @@ int ThreadApi::simulateTime(double time)
SDL_AtomicLock(&lock);
simulateTimeValue = time;
SDL_AtomicUnlock(&lock);
function(EThreadApiFunction::afSimulate);
function(afSimulate);
return 0;
}
......@@ -802,11 +802,11 @@ int ThreadApi::hardwareControlFunction(SHardware1* hw1, SHardware2* hw2)
int ver = SDL_AtomicGet(&version);
if (ver == HARDWARE_VERSION_1)
{
function(EThreadApiFunction::afHardwareConfig1);
function(afHardwareConfig1);
}
if (ver == HARDWARE_VERSION_2)
{
function(EThreadApiFunction::afHardwareConfig2);
function(afHardwareConfig2);
}
return 0;
}
......@@ -878,11 +878,11 @@ int OsciloscopeManager::start()
// api
////////////////////////////////////////////////
pOsciloscope->thread.setInit(settings.getSettings()->memoryFrame * MEGABYTE,0,1,0);
pOsciloscope->thread.function(EThreadApiFunction::afInit);
pOsciloscope->thread.function(afInit);
sim = pOsciloscope->GetServerSim();
pOsciloscope->transmitSim(sim);
pOsciloscope->thread.setFrame(HARDWARE_VERSION_2, SCOPEFUN_FRAME_2_HEADER, 40000, SCOPEFUN_FRAME_2_PACKET);
pOsciloscope->thread.function(EThreadApiFunction::afSetFrame);
pOsciloscope->thread.function(afSetFrame);
////////////////////////////////////////////////
// apply settings
......@@ -3277,15 +3277,15 @@ SSimulate OsciloscopeManager::GetServerSim()
void OsciloscopeManager::transmitSim(SSimulate& sim)
{
pOsciloscope->thread.setSimulateData(&sim);
pOsciloscope->thread.function(EThreadApiFunction::afSetSimulateData);
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afSetSimulateData);
pOsciloscope->thread.function(afServerUpload);
}
void OsciloscopeManager::simOnOff(int value)
{
pOsciloscope->thread.setSimulateOnOff(value);
pOsciloscope->thread.function(EThreadApiFunction::afSetSimulateOnOff);
pOsciloscope->thread.function(EThreadApiFunction::afServerUpload);
pOsciloscope->thread.function(afSetSimulateOnOff);
pOsciloscope->thread.function(afServerUpload);
}
void OsciloscopeManager::setupControl(WndMain window)
......@@ -3548,8 +3548,8 @@ int SDLCALL CaptureDataThreadFunction(void* data)
// client display ?
if(isConnected)
{
pOsciloscope->thread.function(EThreadApiFunction::afServerDownload);
pOsciloscope->thread.function(EThreadApiFunction::afGetClientDisplay);
pOsciloscope->thread.function(afServerDownload);
pOsciloscope->thread.function(afGetClientDisplay);
}
bandWidth += received;
if(mbTimer > 1.0)
......
......@@ -329,13 +329,13 @@ void WndHardwareGenerator::loadCustomDigital(const char* path)
void WndHardwareGenerator::upload()
{
pOsciloscope->thread.setGeneratorData(&custom);
pOsciloscope->thread.function(EThreadApiFunction::afUploadGenerator);
pOsciloscope->thread.function(afUploadGenerator);
}
void WndHardwareGenerator::uploadDigital()
{
pOsciloscope->thread.setGeneratorData(&custom);
pOsciloscope->thread.function(EThreadApiFunction::afUploadGenerator);
pOsciloscope->thread.function(afUploadGenerator);
}
void WndHardwareGenerator::Default()
......
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