123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- function [Par] = JA_interim_feedback_warming_up(Par)
- CF_screen_position = Par.screen_dimensions(3:4)/2;
- SBJ_screen_position = [0 Par.screen_dimensions(4)/2];
- %% check CF's "performance" first
- if strcmp(Par.final_design.Type{Par.tr}, 'ok_catch') || strcmp(Par.final_design.Type{Par.tr}, 'failed_catch')
-
- switch Par.CF_classification{Par.tr}
-
- case 'no_response' % correct
- text_CF.string = 'ottimo!'
- text_CF.color = [0 1 0];
- Par.CF_RT{Par.tr} = [];
-
- otherwise % not correct (it implies a movement)
- text_CF.string = 'presta \n attenzione!';
- text_CF.color = [1 0 0];
- Par.CF_RT{Par.tr} = [];
- end
-
- else % in the case is a standard trial...produce text output in the following cases
-
- switch Par.final_design.CF_performance_Type{Par.tr}
-
- case 'no_response'
- text_CF.string = 'prova ad essere \n pi? veloce!';
- text_CF.color = [1 0 0];
- Par.CF_RT{Par.tr} = [];
-
- case {'out_fast_press', 'out_fast_lift'}
- text_CF.string = 'aspetta il colore \n prima di muoverti!';
- text_CF.color = [1 0 0];
- Par.CF_RT{Par.tr} = [];
-
- case 'wrong_response'
- text_CF.string = 'risposta_sbagliata';
- text_CF.color = [1 0 0];
- Par.CF_RT{Par.tr} = [];
-
- otherwise % in case of lift or press
- text_CF.string = '';
- text_CF.color = [0 0 0];
- Par.CF_RT{Par.tr} = Par.SBJ_RT_tmp{Par.tr};
- end
-
- end
- %% if it is a catch trial
- if strcmp(Par.final_design.Type{Par.tr}, 'ok_catch') || strcmp(Par.final_design.Type{Par.tr}, 'failed_catch')
-
- switch Par.SBJ_classification{Par.tr}
-
- case 'no_response' % correct
- text_SBJ.string = 'ottimo!'
- text_SBJ.color = [0 1 0];
- Par.SBJ_RT{Par.tr} = [];
-
- otherwise % not correct (it implies a movement)
- text_SBJ.string = 'presta \n attenzione!';
- text_SBJ.color = [1 0 0];
- Par.SBJ_RT{Par.tr} = [];
- end
-
- else % in the case is a standard trial...produce text output in the following cases
-
- switch Par.final_design.SBJ_performance_Type{Par.tr}
-
- case 'no_response'
- text_SBJ.string = 'prova ad essere \n pi? veloce!';
- text_SBJ.color = [1 0 0];
- Par.SBJ_RT{Par.tr} = [];
-
- case {'out_fast_press', 'out_fast_lift'}
- text_SBJ.string = 'aspetta il colore \n prima di muoverti!';
- text_SBJ.color = [1 0 0];
- Par.SBJ_RT{Par.tr} = [];
-
- case 'wrong_response'
- text_SBJ.string = 'risposta_sbagliata';
- text_SBJ.color = [1 0 0];
- Par.SBJ_RT{Par.tr} = [];
-
- otherwise % in case of lift or press
- text_SBJ.string = '';
- text_SBJ.color = [0 0 0];
- Par.SBJ_RT{Par.tr} = Par.SBJ_RT_tmp{Par.tr};
- end
-
- end
- %% set texts position
- text_CF.position = CF_screen_position;
- text_SBJ.position = SBJ_screen_position;
- %% draw on the screen with text
- Screen('FillRect', Par.window, [0 0 0], Par.screen_dimensions);
- Screen('TextSize', Par.window, 30); % prova 20
- DrawFormattedText(Par.window, text_CF.string, text_CF.position(1),...
- text_CF.position(2), text_CF.color);
- DrawFormattedText(Par.window, text_SBJ.string, text_SBJ.position(1),...
- text_SBJ.position(2), text_SBJ.color);
- [Par.VBL] = Screen(Par.window, 'Flip');
-
-
-
- % is there smthng to show?
- if strcmp(text_CF.string, '') && strcmp(text_SBJ.string, '')
- % if there is nothing to show, go on fast
- WaitSecs(1);
- else
- % if there is something to show leave it on the screen for 2 seconds
- WaitSecs(2);
- end
|