elif datetime.now() >= start_time_target_found + timedelta(seconds=float(param['time_target'])) and not mode.target_found(start_target_found): # # target not validated # mode.task_info['description'] = 'target not reached' mode.task_info['time'] = datetime.now().strftime("%H:%M:%S.%f") log(poll_thread.logfile, poll_thread.joy_status, mode.task_info) validation_target = False start_target_found = False if validation_target: validation_target = False mode.need_display_target = True # # next target # mode.task_info['numTarget'] += 1 if mode.task_info['numTarget'] >= param['nbKeys']: # # log end of a bloc # mode.task_info['description'] = 'end bloc' mode.task_info['time'] = datetime.now().strftime("%H:%M:%S.%f") log(poll_thread.logfile, poll_thread.joy_status, mode.task_info)
# # Fill screen in black - edged in white # mode.display.fill(colors.BLACK) mode.display_edges() # # display all targets # mode.display_all_targets() # # display one target # mode.display_target(False) mode.need_display_target = False if mode.task_info['numTarget'] > len(param_task['seqUsed'])-1: keep_learning = mode.display_text('Continue (y/n) ?', colors.RED, 45, None, 3600, True) mode.task_info['numTarget'] = 0 else: num_list = 0 for recognition in list_seq_recognition: answer = 'r' while answer == 'r': # # Example of sequence # mode.display_sequence(recognition,len(param_task['seqUsed'])) #
seconds=float(param['time_target'])) and not mode.target_found( start_target_found): # # target not validated # mode.task_info['description'] = 'target not reached' mode.task_info['time'] = datetime.now().strftime("%H:%M:%S.%f") log(poll_thread.logfile, poll_thread.joy_status, mode.task_info) validation_target = False start_target_found = False if validation_target: validation_target = False mode.need_display_target = True # # next target # mode.task_info['numTarget'] += 1 if mode.task_info['numTarget'] >= param['nbKeys']: # # log end of a bloc # mode.task_info['description'] = 'end bloc' mode.task_info['time'] = datetime.now().strftime("%H:%M:%S.%f") log(poll_thread.logfile, poll_thread.joy_status, mode.task_info)
# # Fill screen in black - edged in white # mode.display.fill(colors.BLACK) mode.display_edges() # # display all targets # mode.display_all_targets() # # display one target # mode.display_target(False) mode.need_display_target = False if mode.task_info['numTarget'] > len(param_task['seqUsed']) - 1: keep_learning = mode.display_text('Continue (y/n) ?', colors.RED, 45, None, 3600, True) mode.task_info['numTarget'] = 0 else: num_list = 0 for recognition in list_seq_recognition: answer = 'r' while answer == 'r': # # Example of sequence # mode.display_sequence(recognition, len(param_task['seqUsed']))