Exemplo n.º 1
0
 def __init__(self, dut):
     super().__init__(dut, "Do Motor Calibration test")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = ("馬達校準測試,按Enter繼續", )
     else:
         self.message = (
             "Motor Calibration, Press ENTER to begin: pay attention to hold the motor",
         )
Exemplo n.º 2
0
 def __init__(self, dut):
     super().__init__(dut, "Check Brake Detect")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "------------------------- \n煞車Brake檢測,準備好後按Enter鍵繼續\n----------------------------",
             "請捏緊左邊的前煞,同時按Enter鍵", "請捏緊右邊的後煞,同時按Enter鍵", "測試結束,下一項。。。")
     else:
         self.message = (
             "Ready to do the Brake DETECT test? Go!",
             "Apply only Left Brake, and press ENTER",
             "Apply only Right Brake, and Press ENTER",
             "Test finished, please remove the battery, Then press ENTER..."
         )
Exemplo n.º 3
0
 def __init__(self, dut):
     super().__init__(dut, "Check Check Stack Detect")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
         "停車測試",
         "短接單車右側兩個電磁鐵金屬觸點,按Enter鍵繼續 ",
         "測試結束,按Enter下一項。。。"
     )
     else:
         self.message = (
         "Ready to do the STACK DETECT test? Go!",
         "Connect (short-circuit) the 2 stack point at right side of Bike",
         "Turn off the switch, Test finished, Press ENTER...",
     )
 def __init__(self, dut):
     super().__init__(dut, "Chec Electromagnet")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = ("電磁鐵檢測", "請確認車子右側,前後兩端的磁鐵正常工作,準備好後按Enter鍵繼續 ",
                         "請確認車子右側,前後兩端的磁鐵均已失效", "磁鐵是否失效??,Yes/No?",
                         "測試結束,下一項。。。")
     else:
         self.message = (
             "Ready to do the electromagnet check test? Go!",
             "Check if Magnet on the right side of bike works, then press ENTER...",
             "Measure the voltage of Electromagnet OUTPUT, Or check the status of the Magnet",
             "Does the magnet lose its attraction???",
             "Test finished, please remove the battery, Then press ENTER..."
         )
Exemplo n.º 5
0
 def __init__(self, dut):
     super().__init__(dut, "Check Next Bike Stack Detect")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "有車來泊功能檢測",
             "正常狀態,單車後輪左右兩個觸點連結斷開,按Enter鍵繼續",  # 此行不會顯示
             "連結單車後輪兩側的磁鐵觸點,按Enter鍵繼續 ",
             "測試結束,按Enter下一項。。。")
     else:
         self.message = (
             "Ready to do the NEXT Bike DETECT test? Go!",
             "First make sure switch is off, No new bike",
             "Connect (short-circuit) the 2 rear stack point.",
             "Test finished, Press ENTER...",
         )
Exemplo n.º 6
0
 def __init__(self, dut):
     super().__init__(dut, "Check Sound Bip")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "Speak 喇叭測試 ",
             "請聽是否有BiBi聲,並按鍵確認",
             "是否聽到BiBi聲??Yes/No?",
             "測試結束,進入下一項。。。",
         )
     else:
         self.message = (
             "Ready to do the SPEAKER test? Go!!",
             "Please ready to listen to the beep sound, press Enter to Begin...",
             "Did you hear the BipBip? Yes/No?",
             "Test finished, Next...",
         )
Exemplo n.º 7
0
 def __init__(self, dut):
     super().__init__(dut, "Check Front and Rear light")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "車燈檢測,按Enter鍵繼續",
             "請注意查看前後車燈是否點亮,並按鍵確認",
             "車證是否正常?Yes/No?",
             "測試結束,進入下一項。。。",
         )
     else:
         self.message = (
             "Ready to do the Light check test? Go!",
             "Check Light",
             "Are both the Front and Rear Light ON?? Yes/No?",
             "Turn off the switch, Test finished, Press ENTER...",
         )
Exemplo n.º 8
0
 def __init__(self, dut):
     super().__init__(dut, "Check POWER LED")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "電池架上紅色 POWER 指示燈檢測,按Enter鍵繼續",
             "請注意查看POWER燈是否點亮,並按鍵確認",
             "紅色POWER燈是否正常點亮?Yes/No?",
             "測試結束,進入下一項。。。",
         )
     else:
         self.message = (
             "Ready to do the POWER LED check test? Go!!",
             "check the RED POWER LED is on or off!",
             "is POWER LED on? Yes/No?",
             "Test finished, Next...",
         )
    def test(self):
        ENCODING = get_encoding()
        if ENCODING == 1 or ENCODING == 2:
            op_messager("動力電池檢測,按Enter鍵繼續 >>> ")
        else:
            op_messager(
                "Battery Detect, please put the personal battery on the holder, or Turn on 36V power supply, Then press ENTER..."
            )
        flag = True

        res = CommandResult.parse(
            self.dut.execute_command("batt_detect", 5000)[1])
        if res.rc == 0 and res.data["value"] == "0":
            self.logger.info("CSVFILE Battery_detect ok ok pass")
        else:
            self.logger.info("CSVFILE Battery_detect ok ng fail")
            flag = False

        colorprint("Test finished, Press ENTER...", "GREEN")
        return flag
Exemplo n.º 10
0
 def __init__(self, dut):
     super().__init__(dut, "Check Low Power Link flag")
     ENCODING = get_encoding()
     if ENCODING == 1 or ENCODING == 2:
         # Language setting
         self.message = (
             "LOW POWER LINK 檢測",
             "請量測 Low Power Pin測點電壓。",
             "電壓是否穩定在3V左右,Yes/No?",
             "電壓是否降到0V,Yes/No?",
             "測試結束,進入下一項。。。",
         )
     else:
         self.message = (
             "Ready to do the LOW POWER LINK test? Go?",
             "Measure the voltage of low power link pin!!!",
             "Is low power flag PIN around 3V? Yes/No? ",
             "Is low power flag PIN falls to 0V? Yes/No? ",
             "Turn off the switch, Test finished, Press ENTER...",
         )