lms7002_pnlTxTSP_view::lms7002_pnlTxTSP_view( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
    : pnlTxTSP_view(parent, id, pos, size, style), lmsControl(nullptr)
{
    wndId2Enum[rgrMODE_TX] = MODE_TX;
    wndId2Enum[chkBSTART_TXTSP] = BSTART_TXTSP;
    wndId2Enum[chkCMIX_BYP_TXTSP] = CMIX_BYP_TXTSP;
    wndId2Enum[cmbCMIX_GAIN_TXTSP] = CMIX_GAIN_TXTSP;
    wndId2Enum[cmbDCCORRI_TXTSP] = DCCORRI_TXTSP;
    wndId2Enum[cmbDCCORRQ_TXTSP] = DCCORRQ_TXTSP;
    wndId2Enum[chkDC_BYP_TXTSP] = DC_BYP_TXTSP;
    wndId2Enum[chkEN_TXTSP] = EN_TXTSP;
    wndId2Enum[cmbGCORRI_TXTSP] = GCORRI_TXTSP;
    wndId2Enum[cmbGCORRQ_TXTSP] = GCORRQ_TXTSP;
    wndId2Enum[chkGC_BYP_TXTSP] = GC_BYP_TXTSP;
    wndId2Enum[chkGFIR1_BYP_TXTSP] = GFIR1_BYP_TXTSP;
    wndId2Enum[cmbGFIR1_L_TXTSP] = GFIR1_L_TXTSP;
    wndId2Enum[cmbGFIR1_N_TXTSP] = GFIR1_N_TXTSP;
    wndId2Enum[chkGFIR2_BYP_TXTSP] = GFIR2_BYP_TXTSP;
    wndId2Enum[cmbGFIR2_L_TXTSP] = GFIR2_L_TXTSP;
    wndId2Enum[cmbGFIR2_N_TXTSP] = GFIR2_N_TXTSP;
    wndId2Enum[chkGFIR3_BYP_TXTSP] = GFIR3_BYP_TXTSP;
    wndId2Enum[cmbGFIR3_L_TXTSP] = GFIR3_L_TXTSP;
    wndId2Enum[cmbGFIR3_N_TXTSP] = GFIR3_N_TXTSP;
    wndId2Enum[cmbHBI_OVR_TXTSP] = HBI_OVR_TXTSP;
    wndId2Enum[cmbIQCORR_TXTSP] = IQCORR_TXTSP;
    wndId2Enum[chkISINC_BYP_TXTSP] = ISINC_BYP_TXTSP;
    wndId2Enum[chkPH_BYP_TXTSP] = PH_BYP_TXTSP;
    wndId2Enum[cmbCMIX_SC_TXTSP] = CMIX_SC_TXTSP;

    wndId2Enum[rgrTSGFCW_TXTSP] = TSGFCW_TXTSP;
    wndId2Enum[chkTSGSWAPIQ_TXTSP] = TSGSWAPIQ_TXTSP;
    wndId2Enum[rgrTSGMODE_TXTSP] = TSGMODE_TXTSP;
    wndId2Enum[rgrINSEL_TXTSP] = INSEL_TXTSP;
    wndId2Enum[rgrTSGFC_TXTSP] = TSGFC_TXTSP;
    wndId2Enum[cmbDTHBIT_TX] = DTHBIT_TX;

    wndId2Enum[rgrSEL0] = SEL_TX;
    wndId2Enum[rgrSEL01] = SEL_TX;
    wndId2Enum[rgrSEL02] = SEL_TX;
    wndId2Enum[rgrSEL03] = SEL_TX;
    wndId2Enum[rgrSEL04] = SEL_TX;
    wndId2Enum[rgrSEL05] = SEL_TX;
    wndId2Enum[rgrSEL06] = SEL_TX;
    wndId2Enum[rgrSEL07] = SEL_TX;
    wndId2Enum[rgrSEL08] = SEL_TX;
    wndId2Enum[rgrSEL09] = SEL_TX;
    wndId2Enum[rgrSEL10] = SEL_TX;
    wndId2Enum[rgrSEL11] = SEL_TX;
    wndId2Enum[rgrSEL12] = SEL_TX;
    wndId2Enum[rgrSEL13] = SEL_TX;
    wndId2Enum[rgrSEL14] = SEL_TX;
    wndId2Enum[rgrSEL15] = SEL_TX;

    lblNCOangles.push_back(txtAnglePHO0);
    lblNCOangles.push_back(txtAnglePHO01);
    lblNCOangles.push_back(txtAnglePHO02);
    lblNCOangles.push_back(txtAnglePHO03);
    lblNCOangles.push_back(txtAnglePHO04);
    lblNCOangles.push_back(txtAnglePHO05);
    lblNCOangles.push_back(txtAnglePHO06);
    lblNCOangles.push_back(txtAnglePHO07);
    lblNCOangles.push_back(txtAnglePHO08);
    lblNCOangles.push_back(txtAnglePHO09);
    lblNCOangles.push_back(txtAnglePHO10);
    lblNCOangles.push_back(txtAnglePHO11);
    lblNCOangles.push_back(txtAnglePHO12);
    lblNCOangles.push_back(txtAnglePHO13);
    lblNCOangles.push_back(txtAnglePHO14);
    lblNCOangles.push_back(txtAnglePHO15);

    rgrNCOselections.push_back(rgrSEL0);
    rgrNCOselections.push_back(rgrSEL01);
    rgrNCOselections.push_back(rgrSEL02);
    rgrNCOselections.push_back(rgrSEL03);
    rgrNCOselections.push_back(rgrSEL04);
    rgrNCOselections.push_back(rgrSEL05);
    rgrNCOselections.push_back(rgrSEL06);
    rgrNCOselections.push_back(rgrSEL07);
    rgrNCOselections.push_back(rgrSEL08);
    rgrNCOselections.push_back(rgrSEL09);
    rgrNCOselections.push_back(rgrSEL10);
    rgrNCOselections.push_back(rgrSEL11);
    rgrNCOselections.push_back(rgrSEL12);
    rgrNCOselections.push_back(rgrSEL13);
    rgrNCOselections.push_back(rgrSEL14);
    rgrNCOselections.push_back(rgrSEL15);

    txtNCOinputs.push_back(txtFCWPHO0);
    txtNCOinputs.push_back(txtFCWPHO01);
    txtNCOinputs.push_back(txtFCWPHO02);
    txtNCOinputs.push_back(txtFCWPHO03);
    txtNCOinputs.push_back(txtFCWPHO04);
    txtNCOinputs.push_back(txtFCWPHO05);
    txtNCOinputs.push_back(txtFCWPHO06);
    txtNCOinputs.push_back(txtFCWPHO07);
    txtNCOinputs.push_back(txtFCWPHO08);
    txtNCOinputs.push_back(txtFCWPHO09);
    txtNCOinputs.push_back(txtFCWPHO10);
    txtNCOinputs.push_back(txtFCWPHO11);
    txtNCOinputs.push_back(txtFCWPHO12);
    txtNCOinputs.push_back(txtFCWPHO13);
    txtNCOinputs.push_back(txtFCWPHO14);
    txtNCOinputs.push_back(txtFCWPHO15);

    wxArrayString temp;

    temp.clear();
    for(int i=0; i<8; ++i)
        temp.push_back(wxString::Format(_("%i"), i));
    cmbGFIR1_L_TXTSP->Set(temp);
    cmbGFIR2_L_TXTSP->Set(temp);
    cmbGFIR3_L_TXTSP->Set(temp);

    temp.clear();
    for (int i = 0; i<16; ++i)
        temp.push_back(wxString::Format(_("%i"), i));
    cmbDTHBIT_TX->Set(temp);

    temp.clear();
    temp.push_back("2^1");
    temp.push_back("2^2");
    temp.push_back("2^3");
    temp.push_back("2^4");
    temp.push_back("2^5");
    temp.push_back("Bypass");
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(0, 0));
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(1, 1));
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(2, 2));
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(3, 3));
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(4, 4));
    hbi_ovr_txtsp_IndexValuePairs.push_back(indexValuePair(5, 7));
    cmbHBI_OVR_TXTSP->Set(temp);

    tsgfcw_txtsp_IndexValuePairs.push_back(indexValuePair(0, 1));
    tsgfcw_txtsp_IndexValuePairs.push_back(indexValuePair(1, 2));

    LMS7002_WXGUI::UpdateTooltips(wndId2Enum, true);
}
lms7002_pnlRFE_view::lms7002_pnlRFE_view(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : pnlRFE_view(parent, id, pos, size, style), lmsControl(nullptr)
{
    //ids for updating from chip
	wndId2Enum[cmbCAP_RXMXO_RFE] = CAP_RXMXO_RFE;
    wndId2Enum[cmbCCOMP_TIA_RFE] = CCOMP_TIA_RFE;
    wndId2Enum[cmbCFB_TIA_RFE] = CFB_TIA_RFE;
    wndId2Enum[cmbCGSIN_LNA_RFE] = CGSIN_LNA_RFE;
    wndId2Enum[cmbDCOFFI_RFE] = DCOFFI_RFE;
    wndId2Enum[cmbDCOFFQ_RFE] = DCOFFQ_RFE;
    wndId2Enum[chkEN_DCOFF_RXFE_RFE] = EN_DCOFF_RXFE_RFE;
    wndId2Enum[chkEN_G_RFE] = EN_G_RFE;
    wndId2Enum[chkEN_INSHSW_LB1_RFE] = EN_INSHSW_LB1_RFE;
    wndId2Enum[chkEN_INSHSW_LB2_RFE] = EN_INSHSW_LB2_RFE;
    wndId2Enum[chkEN_INSHSW_L_RFE] = EN_INSHSW_L_RFE;
    wndId2Enum[chkEN_INSHSW_W_RFE] = EN_INSHSW_W_RFE;
    wndId2Enum[chkEN_NEXTRX_RFE] = EN_NEXTRX_RFE;
    wndId2Enum[cmbG_LNA_RFE] = G_LNA_RFE;
    wndId2Enum[cmbG_RXLOOPB_RFE] = G_RXLOOPB_RFE;
    wndId2Enum[cmbG_TIA_RFE] = G_TIA_RFE;
    wndId2Enum[cmbICT_LNACMO_RFE] = ICT_LNACMO_RFE;
    wndId2Enum[cmbICT_LNA_RFE] = ICT_LNA_RFE;
    wndId2Enum[cmbICT_LODC_RFE] = ICT_LODC_RFE;
    wndId2Enum[cmbICT_LOOPB_RFE] = ICT_LOOPB_RFE;
    wndId2Enum[cmbICT_TIAMAIN_RFE] = ICT_TIAMAIN_RFE;
    wndId2Enum[cmbICT_TIAOUT_RFE] = ICT_TIAOUT_RFE;
    wndId2Enum[chkPD_LNA_RFE] = PD_LNA_RFE;
    wndId2Enum[chkPD_MXLOBUF_RFE] = PD_MXLOBUF_RFE;
    wndId2Enum[chkPD_QGEN_RFE] = PD_QGEN_RFE;
    wndId2Enum[chkPD_RLOOPB_1_RFE] = PD_RLOOPB_1_RFE;
    wndId2Enum[chkPD_RLOOPB_2_RFE] = PD_RLOOPB_2_RFE;
    wndId2Enum[chkPD_RSSI_RFE] = PD_RSSI_RFE;
    wndId2Enum[chkPD_TIA_RFE] = PD_TIA_RFE;
    wndId2Enum[cmbRCOMP_TIA_RFE] = RCOMP_TIA_RFE;
    wndId2Enum[cmbRFB_TIA_RFE] = RFB_TIA_RFE;
    wndId2Enum[cmbSEL_PATH_RFE] = SEL_PATH_RFE;
    wndId2Enum[cmbCDC_I_RFE] = CDC_I_RFE;
    wndId2Enum[cmbCDC_Q_RFE] = CDC_Q_RFE;
    wndId2Enum[chkEN_DIR_RFE] = EN_DIR_RFE;

    wxArrayString temp;
    temp.clear();
    for (int i = 0; i<32; ++i)
        temp.push_back(wxString::Format(_("%i fF"), (i + 1) * 80));
    cmbCAP_RXMXO_RFE->Set(temp);

    for (int i = 0; i < 15; ++i)
        g_lna_rfe_IndexValuePairs.push_back(indexValuePair(i, i + 1));
    temp.clear();
    temp.push_back(_("Gmax-30"));
    temp.push_back(_("Gmax-27"));
    temp.push_back(_("Gmax-24"));
    temp.push_back(_("Gmax-21"));
    temp.push_back(_("Gmax-18"));
    temp.push_back(_("Gmax-15"));
    temp.push_back(_("Gmax-12"));
    temp.push_back(_("Gmax-9"));
    temp.push_back(_("Gmax-6"));
    temp.push_back(_("Gmax-5"));
    temp.push_back(_("Gmax-4"));
    temp.push_back(_("Gmax-3"));
    temp.push_back(_("Gmax-2"));
    temp.push_back(_("Gmax-1"));
    temp.push_back(_("Gmax"));
    cmbG_LNA_RFE->Set(temp);

    temp.clear();
    temp.push_back(_("Gmax-40"));
    temp.push_back(_("Gmax-24"));
    temp.push_back(_("Gmax-17"));
    temp.push_back(_("Gmax-14"));
    temp.push_back(_("Gmax-11"));
    temp.push_back(_("Gmax-9"));
    temp.push_back(_("Gmax-7.5"));
    temp.push_back(_("Gmax-6.2"));
    temp.push_back(_("Gmax-5"));
    temp.push_back(_("Gmax-4"));
    temp.push_back(_("Gmax-3"));
    temp.push_back(_("Gmax-2.4"));
    temp.push_back(_("Gmax-1.6"));
    temp.push_back(_("Gmax-1"));
    temp.push_back(_("Gmax-0.5"));
    temp.push_back(_("Gmax"));
    cmbG_RXLOOPB_RFE->Set(temp);


    for (int i = 0; i < 3; ++i)
        g_tia_rfe_IndexValuePairs.push_back(indexValuePair(i, i + 1));
    temp.clear();
    temp.push_back(_("Gmax-12"));
    temp.push_back(_("Gmax-3"));
    temp.push_back(_("Gmax"));
    cmbG_TIA_RFE->Set(temp);

    temp.clear();
    float nominalCurrent = 500; //uA
    for (int i = 0; i<32; ++i)
        temp.push_back(wxString::Format(_("%.1f uA"), nominalCurrent*(i / 12.0)));
    cmbICT_LNA_RFE->Set(temp);

    temp.clear();
    float Vth = 0.440; //V
    for (int i = 0; i<32; ++i)
        temp.push_back(wxString::Format(_("%.3f V"), Vth + 3500 * 0.000020*(i / 12.0)));
    cmbICT_LODC_RFE->Set(temp);

    temp.clear();
    float IsupplyNominal = 1.80; //uA
    for (int i = 0; i<32; ++i)
        temp.push_back(wxString::Format(_("%.3f uA"), IsupplyNominal*(i / 12.0)));
    cmbICT_LOOPB_RFE->Set(temp);

    temp.clear();
    for (int i = 0; i<32; ++i)
        temp.push_back(wxString::Format(_("%i"), i));
    cmbRFB_TIA_RFE->Set(temp);
    cmbICT_LNACMO_RFE->Set(temp);
    cmbCGSIN_LNA_RFE->Set(temp);

    temp.clear();
    for (int i = 0; i<16; ++i)
        temp.push_back(wxString::Format(_("%i"), i));
    cmbRCOMP_TIA_RFE->Set(temp);
    cmbCDC_I_RFE->Set(temp);
    cmbCDC_Q_RFE->Set(temp);
    cmbCCOMP_TIA_RFE->Set(temp);

    LMS7002_WXGUI::UpdateTooltips(wndId2Enum, true);
}