atexit.register(close)在程序终止时未运行关闭功能

时间:2019-01-21 01:21:33

标签: python raspberry-pi3 pyqtgraph

我正在我的树莓派3上运行一个程序,该程序连接到ACDC转换器以读取房间的亮度。然后将这些数据中继回pi,pi然后使用pyqtgraph绘制房间的亮度,并反过来控制led的亮度。但是,当我退出pyqtgraph窗口时,altexit.register(close)没有运行。协助故障排除将不胜感激。

let bottomView = UIView(frame: CGRect(x: 0, y: scrollViewSize.height-3, width: tabBarViewWidth, height: 3))
    bottomView.backgroundColor = UIColorFromRGB(rgbValue: 0x92D2CD)
self.tabBarView.addSubview(bottomView)
...
//tab button click event
...
UIView.animate(withDuration: 0.3, animations: {
        self.bottomView.frame.origin.x = _sender.superview?.frame.origin.x ?? 0
    })

当我重新运行该程序时,我不应该收到任何“已经运行”的gpio警告,但是我仍然可以。

0 个答案:

没有答案