Пример #1
0
def create_umtrx_lms(lms_num, ip_address, bcast_addr):
        umtrx_lms_dev = umtrx_ctrl.create_umtrx_lms_device(lms_num, ip_address=ip_address, bcast_addr=bcast_addr)
        if umtrx_lms_dev is None: # UmTRX is not found
            print "UmTRX is not found"
            sys.exit(1)

        return umtrx_lms_dev
Пример #2
0
        self.lms_panel = lms_ctrl_panel(panel, umtrx_lms_dev)
        
        vbox.Add(self.lms_panel, 0, wx.CENTER)
        
    def _set_status_msg(self, msg):
        self.frame.GetStatusBar().SetStatusText(msg, 0)


def main ():
    app = stdgui2.stdapp(demo_app_flow_graph, "UmTRX control GUI", nstatus=1)
    app.MainLoop ()

if __name__ == '__main__':
    lms_num = 1
    umtrx_lms_dev = umtrx_ctrl.create_umtrx_lms_device(lms_num)
    if umtrx_lms_dev is None:
        # No UmTRX found
        import sys
        sys.exit(1)

    if 0:
        umtrx_lms.lms_init(umtrx_lms_dev)
        umtrx_lms.lms_rx_enable(umtrx_lms_dev)
        umtrx_lms.lms_tx_enable(umtrx_lms_dev)
        # 0x0f - 0.75MHz
        lpf_bw_code = 0x0f
        pll_ref_clock = 26e6
        umtrx_lms.lms_auto_calibration(umtrx_lms_dev, int(pll_ref_clock), int(lpf_bw_code))
        umtrx_lms.lms_rx_disable(umtrx_lms_dev)
        umtrx_lms.lms_tx_disable(umtrx_lms_dev)