Skip to content

Commit

Permalink
More display -> disp usage
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
lostbard committed Jan 4, 2024
1 parent cf3ba38 commit bd739ca
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 22 deletions.
6 changes: 3 additions & 3 deletions inst/+arduinoio/AddonBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
## @seealso{arduino, addon}
## @end deftypefn
##
## @deftypefn {} {} display ()
## @deftypefn {} {} disp ()
## Display the addon in a verbose way.
## @end deftypefn

Expand All @@ -50,8 +50,8 @@

methods (Access=public)
# display the base class properties
function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" addon %s\n", class(this));
endfunction
endmethods
endclassdef
5 changes: 2 additions & 3 deletions inst/+arduinoio/LibraryBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
## @seealso{arduino, listArduinoLibraries, addon}
## @end deftypefn
##
## @deftypefn {} {} display ()
## @deftypefn {} {} disp ()
## Display the addon in a verbose way.
## @end deftypefn

Expand Down Expand Up @@ -109,8 +109,7 @@

methods (Access=public)
# display the base class properties
function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
if numel(this.Pins) == 0
printf(" Pins = {}\n");
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ function write(obj, address, value)
sendCommand(obj.Parent, obj.LibraryName, cmdID, datain);
endfunction

function display (obj)
printf("%s = \n", inputname(1));
function disp (obj)
printf(" %s with properties\n", class(obj));
printf(" length = %d\n", obj.len);
endfunction
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+RTCAddon/DS1307.m
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ function stop(obj)
endif
endfunction

function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
printf(" Address = 0x%X\n", this.address);
# show i2c pins as the pins
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ function rotate(obj, dir)
sendCommand(obj.Parent, obj.LibraryName, cmdID, uint8([obj.Id dir]));
endfunction

function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
printf(" Speed = %f\n", this.Speed);
printf(" Status = %d\n", this.Status);
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+adafruit/dcmotorv2.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ function stop(this)
endif
endfunction

function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
printf(" MotorNumber = %d\n", this.MotorNumber);
printf(" Speed = %d\n", this.Speed);
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+adafruit/motorshieldv2.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@

endfunction

function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
printf(" I2CAddress = %d (0x%X)\n", this.i2c.i2caddress, this.i2c.i2caddress);
# show i2c pins as the pins
Expand Down
3 changes: 1 addition & 2 deletions inst/+arduinoioaddons/+adafruit/stepper.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ function release(this)
this.StepType = val;
endfunction

function display(this)
printf("%s = \n", inputname(1));
function disp(this)
printf(" %s with properties\n", class(this));
printf(" MotorNumber = %d\n", this.MotorNumber);
printf(" RPM = %d\n", this.RPM);
Expand Down
2 changes: 1 addition & 1 deletion inst/+matlabshared/+addon/LibraryBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
## @seealso{arduino, listArduinoLibraries, addon}
## @end deftypefn
##
## @deftypefn {} {} display ()
## @deftypefn {} {} disp ()
## Display the addon in a verbose way.
## @end deftypefn

Expand Down
5 changes: 2 additions & 3 deletions inst/@shiftRegister/display.m → inst/@shiftRegister/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
## GNU General Public License for more details.

## -*- texinfo -*-
## @deftypefn {} {@var{retval} =} display (@var{register})
## @deftypefn {} {} disp (@var{register})
## Display the register object in a verbose way,
##
## @subsubheading Inputs
Expand All @@ -20,9 +20,8 @@
## @seealso{shiftRegister}
## @end deftypefn

function retval = display (register)
function disp (register)

printf ("%s = \n", inputname (1));
printf (" arduino shift register object with fields of: \n");
printf (" model = ")
disp(register.model);
Expand Down

0 comments on commit bd739ca

Please sign in to comment.