Skip to content

Commit bf0e649

Browse files
committed
IO: Remove superfluous super in examples
1 parent 1f76c41 commit bf0e649

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

java/libraries/io/examples/SPIAnalogDigitalOOP/MCP3001.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ class MCP3001 extends SPI {
77

88
MCP3001(String dev) {
99
super(dev);
10-
super.settings(500000, SPI.MSBFIRST, SPI.MODE0);
10+
settings(500000, SPI.MSBFIRST, SPI.MODE0);
1111
}
1212

1313
float getAnalog() {
1414
// dummy write, actual values don't matter
1515
byte[] out = { 0, 0 };
16-
byte[] in = super.transfer(out);
16+
byte[] in = transfer(out);
1717
// some input bit shifting according to the datasheet p. 16
1818
int val = ((in[0] & 0x1f) << 5) | ((in[1] & 0xf8) >> 3);
1919
// val is between 0 and 1023

java/libraries/io/examples/SPIAnalogDigitalOOP8/MCP3008.pde

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MCP3008 extends SPI {
88

99
MCP3008(String dev) {
1010
super(dev);
11-
super.settings(500000, SPI.MSBFIRST, SPI.MODE0);
11+
settings(500000, SPI.MSBFIRST, SPI.MODE0);
1212
}
1313

1414
float getAnalog(int channel) {
@@ -19,7 +19,7 @@ class MCP3008 extends SPI {
1919
byte[] out = { 0, 0, 0 };
2020
// encode the channel number in the first byte
2121
out[0] = (byte)(0x18 | channel);
22-
byte[] in = super.transfer(out);
22+
byte[] in = transfer(out);
2323
int val = ((in[1] & 0x03) << 8) | (in[2] & 0xff);
2424
// val is between 0 and 1023
2525
return val/1023.0;

0 commit comments

Comments
 (0)