Changes

Jump to navigation Jump to search
300 bytes added ,  10:39, 4 March 2016
no edit summary
Line 349: Line 349:  
%
 
%
 
% to wait for a buttonpress:
 
% to wait for a buttonpress:
 +
% buttonbox('clear'); (make sure buttonbox buffer is emptied)
 
% key = buttonbox('wait_keypress')
 
% key = buttonbox('wait_keypress')
 
%
 
%
Line 392: Line 393:  
         disp('Marker might not have been written to button box, please verify setup....?');
 
         disp('Marker might not have been written to button box, please verify setup....?');
 
       end       
 
       end       
 +
      return
 +
  case 'clear'
 +
      if isempty(old_hdl)
 +
        help serial_buttonbox_common
 +
        error('Buttonbox not yet initialized');
 +
      end
 +
      handle = old_hdl;
 +
      IOPort('purge', handle);
 +
      ret = []; % meaningless
 
       return
 
       return
 
   case 'open'
 
   case 'open'
Line 546: Line 556:  
       drawnow;
 
       drawnow;
 
   end
 
   end
 +
 
end</syntaxhighlight>
 
end</syntaxhighlight>

Navigation menu