本文整理汇总了Python中BAL.Devices.Relay.Relay.findItem2方法的典型用法代码示例。如果您正苦于以下问题:Python Relay.findItem2方法的具体用法?Python Relay.findItem2怎么用?Python Relay.findItem2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.Devices.Relay.Relay
的用法示例。
在下文中一共展示了Relay.findItem2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MainWindow
# 需要导入模块: from BAL.Devices.Relay import Relay [as 别名]
# 或者: from BAL.Devices.Relay.Relay import findItem2 [as 别名]
#.........这里部分代码省略.........
elif dev["type"] == SERVO:
self.currentShowDev = Servo(self.DevFrame, self.data, self.servoPorts)
self.currentShowDev.fromDict(dev)
self.servoPorts.removeItem(self.currentShowDev.findItem())
elif dev["type"] == SWITCH:
self.currentShowDev = Switch(self.DevFrame, self.data, self.switchPorts)
self.currentShowDev.fromDict(dev)
self.switchPorts.removeItem(self.currentShowDev.findItem())
elif dev["type"] == IMU:
self.currentShowDev = Imu(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == PPM:
self.currentShowDev = Ppm(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == GPS:
self.currentShowDev = Gps(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == RELAY:
self.currentShowDev = Relay(self.DevFrame, self.data, self.relayPorts)
self.currentShowDev.fromDict(dev)
self.relayPorts.removeItem(self.currentShowDev.findItem())
elif dev["type"] == URF:
self.currentShowDev = Urf(self.DevFrame, self.data, self.urfPorts)
self.currentShowDev.fromDict(dev)
self.urfPorts.removeItem(self.currentShowDev.findItem())
elif dev["type"] == CLOSE_LOP_ONE:
self.currentShowDev = CloseLoop(self.DevFrame, self.data, self.encoders)
self.currentShowDev.fromDict(dev)
self.encoders.removeItem(self.currentShowDev.findItem())
elif dev["type"] == CLOSE_LOP_TWO:
self.currentShowDev = CloseLoopTwo(self.DevFrame, self.data, self.encoders)
self.currentShowDev.fromDict(dev)
self.encoders.removeItem(self.currentShowDev.findItem())
self.encoders.removeItem(self.currentShowDev.findItem2())
elif dev["type"] == OPEN_LOP:
self.currentShowDev = OpenLoop(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == DIFF_CLOSE:
self.currentShowDev = DiffClose(self.DevFrame, self.data, self.motors)
self.currentShowDev.fromDict(dev)
elif dev["type"] == DIFF_CLOSE_FOUR:
self.currentShowDev = DiffCloseFour(self.DevFrame, self.data, self.motors)
self.currentShowDev.fromDict(dev)
elif dev["type"] == DIFF_OPEN:
self.currentShowDev = DiffOpen(self.DevFrame, self.data, self.motors)
self.currentShowDev.fromDict(dev)
elif dev["type"] == HOKUYO:
self.currentShowDev = Hokuyo(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == OPRNNI:
self.currentShowDev = Opennni(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == USBCAM:
self.currentShowDev = UsbCam(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == ROBOT_MODEL:
self.currentShowDev = RobotModel(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == SLAM:
self.currentShowDev = Slam(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == PPMReader:
self.currentShowDev = PPMReader(self.DevFrame, self.data)
self.currentShowDev.fromDict(dev)
elif dev["type"] == Keyboard:
self.currentShowDev = KeyboardTeleop(self.DevFrame, self.data)