Disable controls while SPI is switched to MCU
@@ -46,6 +46,18 @@ lms7002_mainPanel::~lms7002_mainPanel()
void lms7002_mainPanel::UpdateVisiblePanel()
{
+ wxWindow* currentPage = tabsNotebook->GetCurrentPage();
+ uint16_t spisw_ctrl = 0;
+ LMS_ReadLMSReg(lmsControl, 0x0006, &spisw_ctrl);
+ if(spisw_ctrl & 1) // transceiver controlled by MCU
+ {
+ if(currentPage != mTabMCU && currentPage != mTabTrxGain)
+ currentPage->Disable();
+ return;
+ }
+ else
+ currentPage->Enable();
+
wxLongLong t1, t2;
t1 = wxGetUTCTimeMillis();
long visibleTabId = tabsNotebook->GetCurrentPage()->GetId();
