From bd739ca3c3ca2717886c75fed2c722fc21f988c3 Mon Sep 17 00:00:00 2001 From: JohnD Date: Thu, 4 Jan 2024 10:24:16 -0500 Subject: [PATCH] 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 --- inst/+arduinoio/AddonBase.m | 6 +++--- inst/+arduinoio/LibraryBase.m | 5 ++--- inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m | 3 +-- inst/+arduinoioaddons/+RTCAddon/DS1307.m | 3 +-- inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m | 3 +-- inst/+arduinoioaddons/+adafruit/dcmotorv2.m | 3 +-- inst/+arduinoioaddons/+adafruit/motorshieldv2.m | 3 +-- inst/+arduinoioaddons/+adafruit/stepper.m | 3 +-- inst/+matlabshared/+addon/LibraryBase.m | 2 +- inst/@shiftRegister/{display.m => disp.m} | 5 ++--- 10 files changed, 14 insertions(+), 22 deletions(-) rename inst/@shiftRegister/{display.m => disp.m} (88%) diff --git a/inst/+arduinoio/AddonBase.m b/inst/+arduinoio/AddonBase.m index b02f65e..f2bd016 100644 --- a/inst/+arduinoio/AddonBase.m +++ b/inst/+arduinoio/AddonBase.m @@ -38,7 +38,7 @@ ## @seealso{arduino, addon} ## @end deftypefn ## - ## @deftypefn {} {} display () + ## @deftypefn {} {} disp () ## Display the addon in a verbose way. ## @end deftypefn @@ -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 diff --git a/inst/+arduinoio/LibraryBase.m b/inst/+arduinoio/LibraryBase.m index 48137fd..564d669 100644 --- a/inst/+arduinoio/LibraryBase.m +++ b/inst/+arduinoio/LibraryBase.m @@ -59,7 +59,7 @@ ## @seealso{arduino, listArduinoLibraries, addon} ## @end deftypefn ## - ## @deftypefn {} {} display () + ## @deftypefn {} {} disp () ## Display the addon in a verbose way. ## @end deftypefn @@ -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"); diff --git a/inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m b/inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m index f01f109..5a13af3 100644 --- a/inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m +++ b/inst/+arduinoioaddons/+EEPRomAddon/EEPRom.m @@ -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 diff --git a/inst/+arduinoioaddons/+RTCAddon/DS1307.m b/inst/+arduinoioaddons/+RTCAddon/DS1307.m index 41b6015..f84a63b 100644 --- a/inst/+arduinoioaddons/+RTCAddon/DS1307.m +++ b/inst/+arduinoioaddons/+RTCAddon/DS1307.m @@ -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 diff --git a/inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m b/inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m index 33f457a..741663d 100644 --- a/inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m +++ b/inst/+arduinoioaddons/+SimpleStepper/SimpleStepper.m @@ -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); diff --git a/inst/+arduinoioaddons/+adafruit/dcmotorv2.m b/inst/+arduinoioaddons/+adafruit/dcmotorv2.m index cf5f619..6663810 100644 --- a/inst/+arduinoioaddons/+adafruit/dcmotorv2.m +++ b/inst/+arduinoioaddons/+adafruit/dcmotorv2.m @@ -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); diff --git a/inst/+arduinoioaddons/+adafruit/motorshieldv2.m b/inst/+arduinoioaddons/+adafruit/motorshieldv2.m index 6d51c8b..d2ac9aa 100644 --- a/inst/+arduinoioaddons/+adafruit/motorshieldv2.m +++ b/inst/+arduinoioaddons/+adafruit/motorshieldv2.m @@ -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 diff --git a/inst/+arduinoioaddons/+adafruit/stepper.m b/inst/+arduinoioaddons/+adafruit/stepper.m index 8c5ab65..978b622 100644 --- a/inst/+arduinoioaddons/+adafruit/stepper.m +++ b/inst/+arduinoioaddons/+adafruit/stepper.m @@ -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); diff --git a/inst/+matlabshared/+addon/LibraryBase.m b/inst/+matlabshared/+addon/LibraryBase.m index 4d1f180..1b2c48f 100644 --- a/inst/+matlabshared/+addon/LibraryBase.m +++ b/inst/+matlabshared/+addon/LibraryBase.m @@ -61,7 +61,7 @@ ## @seealso{arduino, listArduinoLibraries, addon} ## @end deftypefn ## - ## @deftypefn {} {} display () + ## @deftypefn {} {} disp () ## Display the addon in a verbose way. ## @end deftypefn diff --git a/inst/@shiftRegister/display.m b/inst/@shiftRegister/disp.m similarity index 88% rename from inst/@shiftRegister/display.m rename to inst/@shiftRegister/disp.m index c16dd38..080ff38 100644 --- a/inst/@shiftRegister/display.m +++ b/inst/@shiftRegister/disp.m @@ -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 @@ -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);