def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Подготовка'].clicked, self) self.start = Start(self) self.install = Install(self) self.prepare_pressure = common.prepare_pressure(self) self.leak = Leak(self) self.tank = Tank(self) self.pim_0 = Pim0(self) self.enable_menu = EnableMenu(self) self.setInitialState(self.start) self.start.addTransition(self.install) self.install.addTransition(ctrl.button['yes'].clicked, self.prepare_pressure) self.prepare_pressure.addTransition(self.prepare_pressure.finished, self.leak) self.leak.addTransition(ctrl.switch['leak 0,5'].low_value, self.tank) self.tank.addTransition(ctrl.switch_with_neutral['tank'].state_two, self.pim_0) self.pim_0.addTransition(ctrl.server_updated, self.pim_0) self.pim_0.addTransition(self.pim_0.done, self.enable_menu)
def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Время наполнения'].clicked, self) self.start = Start(self) self.prepare_pressure = common.prepare_pressure(self) self.pressure_0 = common.pressure_0(self) self.handle_4 = Handle4(self) self.measure = Measure(self) self.show_result = ShowResult(self) self.setInitialState(self.start) self.start.addTransition(self.prepare_pressure) self.prepare_pressure.addTransition(self.prepare_pressure.finished, self.pressure_0) self.pressure_0.addTransition(ctrl.server_updated, self.pressure_0) self.pressure_0.addTransition(ctrl.button['yes'].clicked, self.handle_4) self.handle_4.addTransition(ctrl.server_updated, self.handle_4) self.handle_4.addTransition(self.handle_4.done, self.measure) self.measure.addTransition(ctrl.server_updated, self.measure) self.measure.addTransition(self.measure.done, self.show_result)
def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition( menu.button['Герметичность соединений'].clicked, self) self.start = Start(self) self.prepare_pressure = common.prepare_pressure(self) self.pressure_4 = common.pressure_4(self) self.check_junctions = CheckJunctions(self) self.junctions_fail = JunctionsFail(self) self.junctions_success = JunctionsSuccess(self) self.setInitialState(self.start) self.start.addTransition(self.prepare_pressure) self.prepare_pressure.addTransition(self.prepare_pressure.finished, self.pressure_4) self.pressure_4.addTransition(ctrl.server_updated, self.pressure_4) self.pressure_4.addTransition(ctrl.button['yes'].clicked, self.check_junctions) self.check_junctions.addTransition(ctrl.button['yes'].clicked, self.junctions_success) self.check_junctions.addTransition(ctrl.button['no'].clicked, self.junctions_fail)
def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Утечка'].clicked, self) self.start = Start(self) self.prepare_pressure = common.prepare_pressure(self) self.pressure_4 = common.pressure_4(self) self.leak_on = LeakOn(self) self.measure = Measure(self) self.leak_off = LeakOff(self) self.show_result = ShowResult(self) self.setInitialState(self.start) self.start.addTransition(self.prepare_pressure) self.prepare_pressure.addTransition(self.prepare_pressure.finished, self.pressure_4) self.pressure_4.addTransition(ctrl.server_updated, self.pressure_4) self.pressure_4.addTransition(ctrl.button['yes'].clicked, self.leak_on) self.leak_on.addTransition(ctrl.switch['leak 0,5'].high_value, self.measure) self.measure.addTransition(ctrl.server_updated, self.measure) self.measure.addTransition(self.measure.done, self.leak_off) self.leak_off.addTransition(ctrl.switch['leak 0,5'].low_value, self.show_result)
def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Подготовка'].clicked, self) self.start = Start(self) self.install = Install(self) self.ku = KU(self) self.tc820 = Tc820(self) self.leak = Leak(self) self.enable_menu = EnableMenu(self) self.setInitialState(self.start) self.start.addTransition(self.install) self.install.addTransition(ctrl.button['yes'].clicked, self.ku) self.ku.addTransition(ctrl.switch['ku 215'].high_value, self.tc820) self.tc820.addTransition(ctrl.switch['tc 820'].low_value, self.leak) self.leak.addTransition(ctrl.switch['leak 0,5'].low_value, self.enable_menu)
def __init__(self, parent): super().__init__(parent=parent.controller.stm) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Ступени торможения'].clicked, self) self.start = Start(self) self.prepare_pressure = common.prepare_pressure(self) self.pressure_0 = common.pressure_0(self) self.breaking_stage_1 = common.breaking_stage(self, 1) self.breaking_stage_2 = common.breaking_stage(self, 2) self.breaking_stage_3 = common.breaking_stage(self, 3) self.breaking_stage_4 = common.breaking_stage(self, 4) self.show_result = ShowResult(self) self.setInitialState(self.start) self.start.addTransition(self.prepare_pressure) self.prepare_pressure.addTransition(self.prepare_pressure.finished, self.pressure_0) self.pressure_0.addTransition(ctrl.server_updated, self.pressure_0) self.pressure_0.addTransition(ctrl.button['yes'].clicked, self.breaking_stage_1) self.breaking_stage_1.addTransition(self.breaking_stage_1.finished, self.breaking_stage_2) self.breaking_stage_2.addTransition(self.breaking_stage_2.finished, self.breaking_stage_3) self.breaking_stage_3.addTransition(self.breaking_stage_3.finished, self.breaking_stage_4) self.breaking_stage_4.addTransition(self.breaking_stage_4.finished, self.show_result)
def __init__(self, parent): super().__init__(parent=parent) global ctrl self.controller: Controller = parent.controller ctrl = self.controller common = Common(self) self.finish = QFinalState(self) self.addTransition(self.finished, parent.menu) self.addTransition(ctrl.button['back'].clicked, self.finish) menu = ctrl.menu.menu['КУ 215'] parent.menu.addTransition(menu.button['Завершение'].clicked, self) self.start = Start(self) self.pressure_0 = common.pressure_0(self) self.ku = Ku(self) self.uninstall = Uninstall(self) self.report = Report(self) self.setInitialState(self.start) self.start.addTransition(self.pressure_0) self.pressure_0.addTransition(ctrl.server_updated, self.pressure_0) self.pressure_0.addTransition(ctrl.button['yes'].clicked, self.ku) self.ku.addTransition(ctrl.switch['ku 215'].low_value, self.uninstall) self.uninstall.addTransition(ctrl.button['yes'].clicked, self.report)