Changeset 243
- Timestamp:
- 08/28/08 22:21:45 (5 years ago)
- Location:
- branches/telle/RWTHMindstormsNXT
- Files:
-
- 2 modified
-
@NXTmotor/set.m (modified) (2 diffs)
-
@NXTmotorsettings/private/applyProperties.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/telle/RWTHMindstormsNXT/@NXTmotor/set.m
r218 r243 57 57 case 'Port' 58 58 if isscalar(val) && isnumeric(val) && val >= 0 && val <= 2 59 obj. port = val;59 obj.data('port', val); 60 60 elseif ischar(val) 61 61 val = lower(val); … … 66 66 obj.data('port', 1); 67 67 case 'c' 68 obj. closure('port', 2);68 obj.data('port', 2); 69 69 otherwise 70 70 error('MotorSettingError:InvalidPort',... -
branches/telle/RWTHMindstormsNXT/@NXTmotorsettings/private/applyProperties.m
r222 r243 12 12 end 13 13 14 if ischar(val) 14 if ischar(val) && (strcmp(prop,'Port') == 0) 15 15 val = {val}; 16 16 end 17 17 18 18 switch prop 19 case 'Port' 20 setProperty(data.motors, 'Port', val); 19 21 case 'Power' 20 22 setProperty(data.motors, 'Power', val); … … 55 57 'Number of elements must be 1 or the number of motors.'); 56 58 end 59 57 60 if iscell(val) 58 61 for k = 1:length(motors)
