コード例 #1
0
    def doClean(self, level):
        try:
            try:
                self.dev.open()
            except Error:
                CheckDeviceUI(self)
            else:
                if self.dev.isIdleAndNoError():
                    if self.clean_type in (
                            CLEAN_TYPE_PCL,  # 1
                            CLEAN_TYPE_PCL_WITH_PRINTOUT):  # 3

                        if level == 1:
                            maint.cleanType1(self.dev)

                        elif level == 2:
                            maint.primeType1(self.dev)

                        else:  # 3
                            maint.wipeAndSpitType1(self.dev)

                    elif self.clean_type == CLEAN_TYPE_LIDIL:  # 2
                        if level == 1:
                            maint.cleanType2(self.dev)

                        elif level == 2:
                            maint.primeType2(self.dev)

                        else:  # 3
                            maint.wipeAndSpitType2(self.dev)

                    maint.print_clean_test_page(self.dev)

                else:
                    CheckDeviceUI(self)

        finally:
            if self.dev is not None:
                self.dev.close()
コード例 #2
0
    def doClean(self, level):
        try:
            try:
                self.dev.open()
            except Error:
                CheckDeviceUI(self)
            else:
                if self.dev.isIdleAndNoError():
                    if self.clean_type in (CLEAN_TYPE_PCL, # 1
                                      CLEAN_TYPE_PCL_WITH_PRINTOUT): # 3

                        if level == 1:
                            maint.cleanType1(self.dev)

                        elif level == 2:
                            maint.primeType1(self.dev)

                        else: # 3
                            maint.wipeAndSpitType1(self.dev)


                    elif self.clean_type == CLEAN_TYPE_LIDIL: # 2
                        if level == 1:
                            maint.cleanType2(self.dev)

                        elif level == 2:
                            maint.primeType2(self.dev)

                        else: # 3
                            maint.wipeAndSpitType2(self.dev)

                    maint.print_clean_test_page(self.dev)

                else:
                    CheckDeviceUI(self)

        finally:
            if self.dev is not None:
                self.dev.close()
コード例 #3
0
    def doClean(self, level):
        try:
            try:
                self.dev.open()
            except Error:
                CheckDeviceUI(self)
            else:
                if self.dev.isIdleAndNoError():
                    if self.clean_type in (
                            CLEAN_TYPE_PCL,  # 1
                            CLEAN_TYPE_PCL_WITH_PRINTOUT):  # 3

                        if level == 1:
                            maint.cleanType1(self.dev)
                            maint.print_clean_test_page(self.dev)

                        elif level == 2:
                            maint.primeType1(self.dev)
                            maint.print_clean_test_page(self.dev)

                        else:  # 3
                            maint.wipeAndSpitType1(self.dev)
                            maint.print_clean_test_page(self.dev)

                    elif self.clean_type == CLEAN_TYPE_LIDIL:  # 2
                        if level == 1:
                            maint.cleanType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                        elif level == 2:
                            maint.primeType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                        else:  # 3
                            maint.wipeAndSpitType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                    elif self.clean_type == CLEAN_TYPE_LEDM:  # 4
                        IPCap_data = maint.getCleanLedmCapacity(self.dev)
                        print_verification_page = True
                        if LEDM_CLEAN_VERIFY_PAGE_JOB not in IPCap_data:
                            print_verification_page = False

                        if level == 1:
                            maint.cleanTypeLedm(self.dev)
                            maint.cleanTypeVerify(self.dev, level,
                                                  print_verification_page)
                            if print_verification_page is False:
                                self.setCustomMessage(
                                    self.Prompt_5,
                                    "Cleaning level 1 is Completed. \nPress \"Cancel\" to Finish. Press \"Clean\" for next level clean"
                                )

                        elif level == 2:
                            maint.cleanTypeLedm1(self.dev)
                            maint.cleanTypeVerify(self.dev, level,
                                                  print_verification_page)
                            if print_verification_page is False:
                                self.setCustomMessage(
                                    self.Prompt_6,
                                    "Cleaning level 2 is Completed. \nPress \"Cancel\" to Finish. Press \"Clean\" for next level clean"
                                )

                        else:  # 3
                            maint.cleanTypeLedm2(self.dev)
                            maint.cleanTypeVerify(self.dev, level,
                                                  print_verification_page)

                else:
                    CheckDeviceUI(self)

        finally:
            if self.dev is not None:
                self.dev.close()
コード例 #4
0
ファイル: cleandialog.py プロジェクト: danwallach/VoteBox-v1
    def doClean(self, level):
        try:
            try:
                self.dev.open()
            except Error:
                CheckDeviceUI(self)
            else:
                if self.dev.isIdleAndNoError():
                    if self.clean_type in (CLEAN_TYPE_PCL, # 1
                                      CLEAN_TYPE_PCL_WITH_PRINTOUT): # 3

                        if level == 1:
                            maint.cleanType1(self.dev)
                            maint.print_clean_test_page(self.dev)

                        elif level == 2:
                            maint.primeType1(self.dev)
                            maint.print_clean_test_page(self.dev)

                        else: # 3
                            maint.wipeAndSpitType1(self.dev)
                            maint.print_clean_test_page(self.dev)


                    elif self.clean_type == CLEAN_TYPE_LIDIL: # 2
                        if level == 1:
                            maint.cleanType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                        elif level == 2:
                            maint.primeType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                        else: # 3
                            maint.wipeAndSpitType2(self.dev)
                            maint.print_clean_test_page(self.dev)

                    elif self.clean_type == CLEAN_TYPE_LEDM: # 4
                        IPCap_data = maint.getCleanLedmCapacity(self.dev)
                        print_verification_page = True
                        if LEDM_CLEAN_VERIFY_PAGE_JOB not in IPCap_data:
                            print_verification_page = False

                        if level == 1:
                            maint.cleanTypeLedm(self.dev)
                            maint.cleanTypeVerify(self.dev,level, print_verification_page)
                            if print_verification_page is False:
                                self.setCustomMessage(self.Prompt_5,"Cleaning level 1 is Completed. \nPress \"Cancel\" to Finish. Press \"Clean\" for next level clean")

                        elif level == 2:
                            maint.cleanTypeLedm1(self.dev)
                            maint.cleanTypeVerify(self.dev,level, print_verification_page)
                            if print_verification_page is False:
                                self.setCustomMessage(self.Prompt_6,"Cleaning level 2 is Completed. \nPress \"Cancel\" to Finish. Press \"Clean\" for next level clean")

                        else: # 3
                            maint.cleanTypeLedm2(self.dev)
                            maint.cleanTypeVerify(self.dev,level, print_verification_page)

                else:
                    CheckDeviceUI(self)

        finally:
            if self.dev is not None:
                self.dev.close()