Changeset 250
- Timestamp:
- 09/08/08 15:08:57 (5 years ago)
- Files:
-
- 1 modified
-
branches/telle/RWTHMindstormsNXT/@NXTmotor/wait.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/telle/RWTHMindstormsNXT/@NXTmotor/wait.m
r218 r250 29 29 % Author: Aulis Telle, IND, RWTH Aachen 30 30 31 timedOut = 0; 31 if nargout > 0 32 timedOut = 0; 33 end 32 34 33 35 if ~exist('timeout','var') … … 39 41 40 42 data = read(obj); 41 if data.TachoLimit == 0 && data.RunStateByte ~= 043 if data.TachoLimit == 0 && ~ strcmp(data.RunState,'idle') 42 44 warning('RWTHMINDSTORMS:MotorWait',... 43 45 'Motor running infinitely. Not waiting for this motor!'); … … 45 47 end 46 48 47 while data.RunStateByte ~= 048 if timeout > 0 && now >= endtime49 while ~ strcmp(data.RunState,'idle') 50 if exist('timedOut', 'var') && timeout > 0 && now >= endtime 49 51 timedOut = 1; 50 52 break;
