def start_and_decode_orange_flap_scan(): ## Orange flap scanning fault_detection_output = do_Orange_Flap_scanning() # Start the scan if fault_detection_output[0] == ("E" or "e"): # If output starts with E or e return "Error" # Return error elif fault_detection_output[0] == ("S" or "s"): # If output starts with S or s (Slope) return "1" # Return that fault was detected elif fault_detection_output[0] == ("F" or "f"): # If output starts with F or f (Flat) return "0" # Return that fault was not detected return "Error" # Any other option (impossible) - Error
def start_and_decode_orange_flap_scan(location_byte): ## Orange flap scanning fault_detection_output = do_Orange_Flap_scanning(cam, jpeg_streamer, location_byte) # Start the scan # fault_detection_output = "Error" #"Flat position" #"Slope position" # "Error" # DEBUGGING if fault_detection_output[0] == ("E" or "e"): # If output starts with E or e return "Error" # Return error elif fault_detection_output[0] == ("S" or "s"): # If output starts with S or s (Slope) feedback = str(location_byte) + "11111111" return feedback # Return that fault was detected elif fault_detection_output[0] == ("F" or "f"): # If output starts with F or f (Flat) feedback = str(location_byte) + "00000000" return feedback # Return that fault was not detected return "Error" # Any other option (impossible) - Error
def start_and_decode_orange_flap_scan(location_byte): ## Orange flap scanning fault_detection_output = do_Orange_Flap_scanning( cam, jpeg_streamer, location_byte) # Start the scan # fault_detection_output = "Error" #"Flat position" #"Slope position" # "Error" # DEBUGGING if fault_detection_output[0] == ("E" or "e"): # If output starts with E or e return "Error" # Return error elif fault_detection_output[0] == ( "S" or "s"): # If output starts with S or s (Slope) feedback = str(location_byte) + "11111111" return feedback # Return that fault was detected elif fault_detection_output[0] == ( "F" or "f"): # If output starts with F or f (Flat) feedback = str(location_byte) + "00000000" return feedback # Return that fault was not detected return "Error" # Any other option (impossible) - Error