Changeset 2298 for trunk/papywizard/hardware/gigaPanBotHardware.py
- Timestamp:
- 02/15/10 17:14:19 (7 months ago)
- Files:
-
- 1 modified
-
trunk/papywizard/hardware/gigaPanBotHardware.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/papywizard/hardware/gigaPanBotHardware.py
r2286 r2298 189 189 except IOError: 190 190 Logger().exception("GigaPanBotHardware.__sendCmd") 191 Logger().warning("GigaPanBotHardware.__sendCmd(): %s axis %d can't sent command %s. Retrying..." % (NAME,self._axis, repr(cmd)))191 Logger().warning("GigaPanBotHardware.__sendCmd(): axis %d can't sent command %s. Retrying..." % (self._axis, repr(cmd))) 192 192 else: 193 193 break 194 194 else: 195 raise HardwareError(" %s axis %d can't send command %s" % (NAME,self._axis, repr(cmd)))195 raise HardwareError("Axis %d can't send command %s" % (self._axis, repr(cmd))) 196 196 #Logger().debug("GigaPanBotHardware.__sendCmd(): axis %d ans=%s" % (self._axis, repr(answer))) 197 197 … … 199 199 200 200 def init(self): 201 """ Init the GigaPanBot hardware.202 203 Done only once per axis.204 """205 201 self._driver.acquireBus() 206 202 try: … … 217 213 self.__encoderFullCircle = self.__decodeAxisValue(value) 218 214 Logger().debug("GigaPanBotHardware.init(): full circle count=%s" % hex(self.__encoderFullCircle)) 215 216 # Tell the controller we are connected 217 self.__sendCmd("F", "1") 218 219 finally: 220 self._driver.releaseBus() 221 222 def shutdown(self): 223 self._driver.acquireBus() 224 try: 225 226 # Tell the controller we are disconnected 227 self.__sendCmd("F", "0") 219 228 220 229 finally:
