コード例 #1
0
def lineFollowRightTimed(time):
    u.setWait(time)
    while u.getWait():
        if analog(c.TOPHAT) < 300:
            x._drive(40, 60)
        elif analog(c.TOPHAT) > 2400:
            x._drive(60, 40)
コード例 #2
0
ファイル: device.py プロジェクト: mlyko/tadek-ui
 def expandAccessible(self, item):
     '''
     Expands an accessible item.
     '''
     if self._manualExpand or not self._active:
         return
     log.debug("Expanding device accessible item: %s" % self.device)
     path = self._itemPath(item)
     self._disableAccessibleItem(item)
     id = self.device.requestDevice("requestAccessible", path, 0)
     self._registerRequest(id, self._responseExpand)
     setWait(self._view.view)
コード例 #3
0
 def expandAccessible(self, item):
     '''
     Expands an accessible item.
     '''
     if self._manualExpand or not self._active:
         return
     log.debug("Expanding device accessible item: %s" % self.device)
     path = self._itemPath(item)
     self._disableAccessibleItem(item)
     id = self.device.requestDevice("requestAccessible", path, 0)
     self._registerRequest(id, self._responseExpand)
     setWait(self._view.view)
コード例 #4
0
 def showAccessible(self):
     '''
     Shows an accessible represented by the selected tree item.
     '''
     if self._manualSelect:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Selecting device accessible item: %s" % self.device)
     id = self.device.requestDevice("requestAccessible", path, 0, all=True)
     self._registerRequest(id, self._responseRefresh)
     setWait(self._view.view)
コード例 #5
0
ファイル: device.py プロジェクト: mlyko/tadek-ui
 def showAccessible(self):
     '''
     Shows an accessible represented by the selected tree item.
     '''
     if self._manualSelect:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Selecting device accessible item: %s" % self.device)
     id = self.device.requestDevice("requestAccessible",
                                    path, 0, all=True)
     self._registerRequest(id, self._responseRefresh)
     setWait(self._view.view)
コード例 #6
0
ファイル: device.py プロジェクト: mlyko/tadek-ui
 def changeText(self):
     '''
     Changes text of selected accessible item.
     '''
     if not self._active:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Changing text of device accessible item: %s" % self.device)
     text = self._view.accessibleText()
     id = self.device.requestDevice("requestSetAccessible", path, text=text)
     self._registerRequest(id, self._responseChange)
     id = self.device.requestDevice("requestAccessible", path, 0, all=True)
     self._registerRequest(id, self._responseRefresh, True)
     setWait(self._view.view)
コード例 #7
0
 def changeText(self):
     '''
     Changes text of selected accessible item.
     '''
     if not self._active:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Changing text of device accessible item: %s" % self.device)
     text = self._view.accessibleText()
     id = self.device.requestDevice("requestSetAccessible", path, text=text)
     self._registerRequest(id, self._responseChange)
     id = self.device.requestDevice("requestAccessible", path, 0, all=True)
     self._registerRequest(id, self._responseRefresh, True)
     setWait(self._view.view)
コード例 #8
0
ファイル: device.py プロジェクト: mlyko/tadek-ui
 def doAction(self, button):
     '''
     Executes action on selected accessible item.
     '''
     if not self._active:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Execution action %s of device accessible item: %s"
               % (button.text(), self.device))
     action = str(button.text())
     id = self.device.requestDevice("requestDoAccessible", path, action)
     self._registerRequest(id, self._responseAction)
     id = self.device.requestDevice("requestAccessible", path, 0, all=True)
     self._registerRequest(id, self._responseRefresh, True)
     setWait(self._view.view)
コード例 #9
0
 def doAction(self, button):
     '''
     Executes action on selected accessible item.
     '''
     if not self._active:
         return
     path = self.selectedItemPath()
     if not path:
         return
     log.debug("Execution action %s of device accessible item: %s" %
               (button.text(), self.device))
     action = str(button.text())
     id = self.device.requestDevice("requestDoAccessible", path, action)
     self._registerRequest(id, self._responseAction)
     id = self.device.requestDevice("requestAccessible", path, 0, all=True)
     self._registerRequest(id, self._responseRefresh, True)
     setWait(self._view.view)