コード例 #1
0
ファイル: turnon.py プロジェクト: pm-steiner/LabPSU
import PowerInputControl

PowerInputControl.setupIOs()
PowerInputControl.turnOnSupply()

コード例 #2
0
 def closeStuff(signum,stack):
     app.shutdown()
     PowerInputControl.turnOffSupply()
コード例 #3
0
ファイル: MainWindow.py プロジェクト: tom-biskupic/LabPSU
 def closeStuff(signum,stack):
     app.shutdown()
     PowerInputControl.turnOffSupply()
コード例 #4
0
    def build(self):
        self.control_window = ControlWindow()
        self.fan_controller = FanController()
        self.control_window.bind_channels(self.fan_controller)
        Window.full_screen = 1
        return self.control_window

    def shutdown(self):
       if self.control_window is not None:
           self.control_window.shutdown()


if __name__ == '__main__':
    app = LabPowerSupplyCtrlApp()

    def closeStuff(signum,stack):
        app.shutdown()
        PowerInputControl.turnOffSupply()

    try:
        PowerInputControl.turnOnSupply()
        #signal.signal(signal.SIGINT,closeStuff)
        #signal.signal(signal.SIGHUP,closeStuff)
        app.run()
    except:
        print("Unexpected error:", sys.exc_info()[0])
        raise
    finally:
        app.shutdown()
        PowerInputControl.turnOffSupply()
コード例 #5
0
ファイル: MainWindow.py プロジェクト: tom-biskupic/LabPSU
        App.__init__(self)
        self.control_window = None

    def build(self):
        self.control_window = ControlWindow()
        self.fan_controller = FanController()
        self.control_window.bind_channels(self.fan_controller)
        Window.full_screen = 1
        return self.control_window

    def shutdown(self):
       if self.control_window is not None:
           self.control_window.shutdown()


if __name__ == '__main__':
    app = LabPowerSupplyCtrlApp()

    def closeStuff(signum,stack):
        app.shutdown()
        PowerInputControl.turnOffSupply()

    try:
        PowerInputControl.turnOnSupply()
        #signal.signal(signal.SIGINT,closeStuff)
        #signal.signal(signal.SIGHUP,closeStuff)
        app.run()
    finally:
        app.shutdown()
        PowerInputControl.turnOffSupply()