当前位置: 首页>>代码示例>>Python>>正文


Python Relay.findItem2方法代码示例

本文整理汇总了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)
开发者ID:nirlevi5,项目名称:bgumodo_ws,代码行数:70,代码来源:MainWindow.py


注:本文中的BAL.Devices.Relay.Relay.findItem2方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。