Exemplo n.º 1
0
def op_set():
    board = int(1)
    c_low = int(62.8)
    c_high = int(103.2)
    cobras = [Cobra(board, i) for i in range(c_low, c_high + 1)]
    p0 = get_per(float(self.ent_setf1.get()))
    p1 = get_per(float(self.ent_setf2.get()))
    en = (self.m1_en.get(), self.m2_en.get())
    for c in cobras:
        c.p = SetParams(p0=p0, p1=p1, en=en)
    er = SET(cobras)
    txt = "SetFreq Error!" if er else "SetFreq Ran Successfully."
Exemplo n.º 2
0
 def op_cal(self):
   board = int( self.ent_brd.get() )
   c_low = int( self.ent_cob1.get() )
   c_high = int( self.ent_cob2.get() )
   cobras = [ Cobra(board,i) for i in range(c_low, c_high+1) ]
   m0_low = get_per( float(self.ent_cal1_high.get()) )
   m0_high = get_per( float(self.ent_cal1_low.get()) )
   m1_low = get_per( float(self.ent_cal2_high.get()) )
   m1_high = get_per( float(self.ent_cal2_low.get()) )
   m0rng = (m0_low, m0_high)
   m1rng = (m1_low, m1_high)
   spin = CW_DIR if self.m_cw.get() else CCW_DIR
   en = (self.m1_en.get(), self.m2_en.get())
   for c in cobras:
       c.p = CalParams(m0=m0rng, m1=m1rng, en=en, dir=spin)
   self.msg_str.set("Calibrate running...")
   er = CAL( cobras )
   txt = "Cal Error!" if er else "Cal Ran Successfully."
   self.msg_str.set(txt)
   self.update()