Пример #1
0
import PowerInputControl

PowerInputControl.setupIOs()
PowerInputControl.turnOnSupply()

Пример #2
0
 def closeStuff(signum,stack):
     app.shutdown()
     PowerInputControl.turnOffSupply()
Пример #3
0
 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
        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()