Esempio n. 1
0
    def on_box_state(self, ind):
        if not ind: return
        state = self.states[ind]

        if self.state_is_after_reset: cp.cgwmain.wlogr.add_separator_err()

        logger.info('-> daq_control_set_state(%s)' % state)
        if not daq_control_set_state(state.lower()):
            logger.warning('on_box_state: STATE %s IS NOT SET' % state)
        self.state_is_after_reset = (state == 'RESET')
Esempio n. 2
0
    def on_but_play(self):
        #txt = self.but_play.accessibleName()
        logger.debug('on_but_play')

        # submit command for "running" or "pause"
        transition, state, cfgtype, recording =\
           cp.s_transition, cp.s_state, cp.s_cfgtype, cp.s_recording

        cmd = self.s_paused if state == self.s_running else self.s_running
        if not daq_control_set_state(cmd):
            logger.warning('on_but_play: STATE %s IS NOT SET' % cmd)
            return

        # set WAIT temporary icon
        ico = icon.icon_wait
        self.but_play.setIconSize(
            QSize(32, 32) if ico == icon.icon_wait else QSize(48, 48))
        #self.but_play.setAccessibleName(self.s_play_wait)
        self.but_play.setIcon(ico)
        self.set_tool_tips()
        self.set_but_play_enabled(
            False)  # lock button untill RUNNING status is received
Esempio n. 3
0
 def on_box_state(self, ind):
     if not ind: return
     state = self.states[ind]
     logger.info('-> daq_control_set_state(%s)' % state)
     if not daq_control_set_state(state.lower()):
         logger.warning('on_box_state: STATE %s IS NOT SET' % state)
Esempio n. 4
0
 def on_but_stop(self):
     #txt = self.but_stop.accessibleName()
     logger.debug('on_but_stop')
     daq_control_set_state('configured')