def start_and_decode_LED_sequence_scan(location_byte): ## LED Scanning # fault_detection_output = "12.2" #"1.42" #"Error" # DEBUGGING fault_detection_output = do_LED_scanning(cam, jpeg_streamer, location_byte) if fault_detection_output[0] == ("E" or "e"): # If output starts with E or e return "Error" # Return error else: feedback = str(location_byte) + str(fault_detection_output) + "0000" return feedback # Return that fault was detected
def start_and_decode_LED_sequence_scan(): ## LED Scanning fault_detection_output = do_LED_scanning() if fault_detection_output[0] == ("E" or "e"): # If output starts with E or e return "Error" # Return error elif fault_detection_output[0] == ("F" or "f"): # If output starts with F or f (Faster) return "1" # Return that fault was detected elif fault_detection_output[0] == ("S" or "s"): # If output starts with S or s (Slower) return "0" # Return that fault was not detected return "Error" # Any other option (impossible) - Error