Skip to content

Commit bd739ca

Browse files
committed
More display -> disp usage
* inst/+arduinoio/AddonBase.m, inst/+arduinoio/LibraryBase.m, inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m, inst/+arduinoioaddons/+RTCAddon/DS1307.m, inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m, inst/+arduinoioaddons/+adafruit/dcmotorv2.m, inst/+arduinoioaddons/+adafruit/motorshieldv2.m, inst/+arduinoioaddons/+adafruit/stepper.m, inst/+matlabshared/+addon/LibraryBase.m: display -> disp * inst/@shiftRegister/display.m: rename to inst/@shiftRegister/disp.m
1 parent cf3ba38 commit bd739ca

File tree

10 files changed

+14
-22
lines changed

10 files changed

+14
-22
lines changed

inst/+arduinoio/AddonBase.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
## @seealso{arduino, addon}
3939
## @end deftypefn
4040
##
41-
## @deftypefn {} {} display ()
41+
## @deftypefn {} {} disp ()
4242
## Display the addon in a verbose way.
4343
## @end deftypefn
4444

@@ -50,8 +50,8 @@
5050

5151
methods (Access=public)
5252
# display the base class properties
53-
function display(this)
54-
printf("%s = \n", inputname(1));
53+
function disp(this)
54+
printf(" addon %s\n", class(this));
5555
endfunction
5656
endmethods
5757
endclassdef

inst/+arduinoio/LibraryBase.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
## @seealso{arduino, listArduinoLibraries, addon}
6060
## @end deftypefn
6161
##
62-
## @deftypefn {} {} display ()
62+
## @deftypefn {} {} disp ()
6363
## Display the addon in a verbose way.
6464
## @end deftypefn
6565

@@ -109,8 +109,7 @@
109109

110110
methods (Access=public)
111111
# display the base class properties
112-
function display(this)
113-
printf("%s = \n", inputname(1));
112+
function disp(this)
114113
printf(" %s with properties\n", class(this));
115114
if numel(this.Pins) == 0
116115
printf(" Pins = {}\n");

inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ function write(obj, address, value)
164164
sendCommand(obj.Parent, obj.LibraryName, cmdID, datain);
165165
endfunction
166166

167-
function display (obj)
168-
printf("%s = \n", inputname(1));
167+
function disp (obj)
169168
printf(" %s with properties\n", class(obj));
170169
printf(" length = %d\n", obj.len);
171170
endfunction

inst/+arduinoioaddons/+RTCAddon/DS1307.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ function stop(obj)
260260
endif
261261
endfunction
262262

263-
function display(this)
264-
printf("%s = \n", inputname(1));
263+
function disp(this)
265264
printf(" %s with properties\n", class(this));
266265
printf(" Address = 0x%X\n", this.address);
267266
# show i2c pins as the pins

inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ function rotate(obj, dir)
222222
sendCommand(obj.Parent, obj.LibraryName, cmdID, uint8([obj.Id dir]));
223223
endfunction
224224

225-
function display(this)
226-
printf("%s = \n", inputname(1));
225+
function disp(this)
227226
printf(" %s with properties\n", class(this));
228227
printf(" Speed = %f\n", this.Speed);
229228
printf(" Status = %d\n", this.Status);

inst/+arduinoioaddons/+adafruit/dcmotorv2.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ function stop(this)
158158
endif
159159
endfunction
160160

161-
function display(this)
162-
printf("%s = \n", inputname(1));
161+
function disp(this)
163162
printf(" %s with properties\n", class(this));
164163
printf(" MotorNumber = %d\n", this.MotorNumber);
165164
printf(" Speed = %d\n", this.Speed);

inst/+arduinoioaddons/+adafruit/motorshieldv2.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@
215215

216216
endfunction
217217

218-
function display(this)
219-
printf("%s = \n", inputname(1));
218+
function disp(this)
220219
printf(" %s with properties\n", class(this));
221220
printf(" I2CAddress = %d (0x%X)\n", this.i2c.i2caddress, this.i2c.i2caddress);
222221
# show i2c pins as the pins

inst/+arduinoioaddons/+adafruit/stepper.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ function release(this)
208208
this.StepType = val;
209209
endfunction
210210

211-
function display(this)
212-
printf("%s = \n", inputname(1));
211+
function disp(this)
213212
printf(" %s with properties\n", class(this));
214213
printf(" MotorNumber = %d\n", this.MotorNumber);
215214
printf(" RPM = %d\n", this.RPM);

inst/+matlabshared/+addon/LibraryBase.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
## @seealso{arduino, listArduinoLibraries, addon}
6262
## @end deftypefn
6363
##
64-
## @deftypefn {} {} display ()
64+
## @deftypefn {} {} disp ()
6565
## Display the addon in a verbose way.
6666
## @end deftypefn
6767

inst/@shiftRegister/display.m renamed to inst/@shiftRegister/disp.m

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
## GNU General Public License for more details.
1212

1313
## -*- texinfo -*-
14-
## @deftypefn {} {@var{retval} =} display (@var{register})
14+
## @deftypefn {} {} disp (@var{register})
1515
## Display the register object in a verbose way,
1616
##
1717
## @subsubheading Inputs
@@ -20,9 +20,8 @@
2020
## @seealso{shiftRegister}
2121
## @end deftypefn
2222

23-
function retval = display (register)
23+
function disp (register)
2424

25-
printf ("%s = \n", inputname (1));
2625
printf (" arduino shift register object with fields of: \n");
2726
printf (" model = ")
2827
disp(register.model);

0 commit comments

Comments
 (0)