Example #1
0
 def start_track(self, comp):
     if self.m_button_toggle_xbee.is_running:
         self.add_work(TRACK_OBJECT)
         util.toggle_button(comp, u'开始', u'结束')
         self.m_button_select_object.Enable(False)
         self.trackctrl = TrackController(self.camcap.get_frame_size(),1.0/TASK_LOW_FREQ)
     else:
         wx.MessageBox(u"请先打开XBee再进行跟踪。", u"无效操作",wx.OK | wx.ICON_INFORMATION)
Example #2
0
 def start_record(self, comp):
     try:
         self.mov_rec.touch()
         self.add_work(RECORD_VIDEO)
         util.toggle_button(comp, u'开始', u'结束')
         self.m_filePicker_output.Enable(False)
     except AssertionError,e:
         wx.MessageBox(str(e), u'错误',wx.OK | wx.ICON_ERROR)
Example #3
0
 def close_track_video(self, comp):
     self.remove_work(DISPLAY_TRACK_VIDEO)
     self.display_track_state = None
     self.dc_track.DrawBitmap(util.get_null_bitmap(), 0, 0)
     util.toggle_button(comp, u'显示视频', u'关闭显示')
     self.m_button_select_object.Enable(False)
     if self.m_button_toggle_track.is_running:   
         self.stop_track(self.m_button_toggle_track)
     self.m_button_toggle_track.Enable(False)
 def open_joystick(self, comp):
     try:
         self.joy = JoyCtrl()
         util.toggle_button(comp, u'开启', u'关闭')
         self.add_work(USING_JOYSTICK)
     except AssertionError,e:
         if e.args[0] is 'NOJOYSTICK':
             wx.MessageBox(u"未找到摇杆", u"出现错误",wx.OK | wx.ICON_ERROR)
         else:
             raise AssertionError, e
Example #5
0
 def stop_track(self, comp):
     
     self.remove_work(TRACK_OBJECT)
     util.toggle_button(comp, u'开始', u'结束')
     self.m_button_select_object.Enable(True)
Example #6
0
 def open_track_video(self, comp):
     self.track_image_adjust_value = Objtrack.get_image_adjust_value()
     self.add_work(DISPLAY_TRACK_VIDEO)
     self.display_track_state = DISPLAY_TRACK_STATE_RAW
     util.toggle_button(comp, u'显示视频', u'关闭显示')
     self.m_button_select_object.Enable(True)
 def close_joystick(self, comp):
     self.remove_work(USING_JOYSTICK)
     self.joy.release()
     self.m_staticText_joystick.SetLabel('Joystick OFF')
     util.toggle_button(comp, u'开启', u'关闭')
Example #8
0
 def stop_record(self, comp):
     self.remove_work(RECORD_VIDEO)
     self.mov_rec.stop()
     util.toggle_button(comp, u'开始', u'结束')
     self.m_button_record.Enable(False)
     self.m_filePicker_output.Enable(True)