diff --git a/src/comms/USB/FX3/FX3.cpp b/src/comms/USB/FX3/FX3.cpp index 700173ee4..6bae88d80 100644 --- a/src/comms/USB/FX3/FX3.cpp +++ b/src/comms/USB/FX3/FX3.cpp @@ -334,15 +334,11 @@ void FX3::AbortEndpointXfers(uint8_t endPointAddr) for (int i = 0; i < MAX_EP_CNT; i++) { std::scoped_lock lock{ FX3mutex }; + USBTransferContext_FX3* FX3context = &static_cast(contexts)[i]; - if (InEndPt[i] && InEndPt[i]->Address == endPointAddr) - { - InEndPt[i]->Abort(); - } - - if (OutEndPt[i] && OutEndPt[i]->Address == endPointAddr) + if (FX3context->used && FX3context->EndPt->Address == endPointAddr) { - OutEndPt[i]->Abort(); + FX3context->EndPt->Abort(); } } @@ -355,8 +351,7 @@ void FX3::WaitForXfers(uint8_t endPointAddr) { USBTransferContext_FX3* FX3context = &static_cast(contexts)[i]; - if (FX3context->used && - ((OutEndPt[i] && OutEndPt[i]->Address == endPointAddr) || (InEndPt[i] && InEndPt[i]->Address == endPointAddr))) + if (FX3context->used && FX3context->EndPt->Address == endPointAddr) { WaitForXfer(i, 250); FinishDataXfer(nullptr, 0, i); diff --git a/src/lms7suiteApp.h b/src/lms7suiteApp.h index 129b17121..6d4626e6d 100644 --- a/src/lms7suiteApp.h +++ b/src/lms7suiteApp.h @@ -12,8 +12,6 @@ #include -class ConnectionManager; - class lms7suiteApp : public wxApp { public: diff --git a/src/lms7suiteAppFrame.cpp b/src/lms7suiteAppFrame.cpp index 779cf243e..1cc403fda 100644 --- a/src/lms7suiteAppFrame.cpp +++ b/src/lms7suiteAppFrame.cpp @@ -436,6 +436,11 @@ ISOCPanel* CreateGUI(wxWindow* parent, eDeviceNodeClass deviceNodeClass, void* s void LMS7SuiteAppFrame::DeviceTreeSelectionChanged(wxTreeEvent& event) { DeviceTreeItemData* item = reinterpret_cast(deviceTree->GetItemData(event.GetItem())); + if (item->gui != nullptr && mContent == item->gui) + { + return; + } + if (item->gui == nullptr) item->gui = CreateGUI(m_scrolledWindow1, item->soc->deviceNodeClass, item->soc->ptr); diff --git a/src/oglGraph/OpenGLGraph.cpp b/src/oglGraph/OpenGLGraph.cpp index eb5a353a9..e6e00375d 100644 --- a/src/oglGraph/OpenGLGraph.cpp +++ b/src/oglGraph/OpenGLGraph.cpp @@ -32,6 +32,8 @@ const int OpenGLGraph::GLCanvasAttributes[8] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, WX_GL_STENCIL_SIZE, 0, 0, 0 }; +bool OpenGLGraph::hasNotRecentEnoughOpenGLVersionWarningBeenThrownYet = false; + static constexpr bool IsGlew1_5() { #ifdef __GNUC__ @@ -191,12 +193,17 @@ bool OpenGLGraph::Initialize(int width, int height) if (!oglOk) { - wxMessageBox( - wxString::Format( - "Your OpenGL version is %s, required version is 2.0\nPlease update your graphics card drivers", userOGLversion), - _("WARNING"), - wxOK, - this); + if (!hasNotRecentEnoughOpenGLVersionWarningBeenThrownYet) + { + hasNotRecentEnoughOpenGLVersionWarningBeenThrownYet = true; + wxMessageBox( + wxString::Format( + "Your OpenGL version is %s, required version is 2.0\nPlease update your graphics card drivers", userOGLversion), + _("WARNING"), + wxOK, + this); + } + return false; } diff --git a/src/oglGraph/OpenGLGraph.h b/src/oglGraph/OpenGLGraph.h index b8ecdb452..597c43555 100644 --- a/src/oglGraph/OpenGLGraph.h +++ b/src/oglGraph/OpenGLGraph.h @@ -435,6 +435,8 @@ class OpenGLGraph : public wxGLCanvas bool m_currentlyDrawing; wxTimer* m_timer; wxGLContext* m_glContext; + + static bool hasNotRecentEnoughOpenGLVersionWarningBeenThrownYet; }; #endif