Skip to content

Commit

Permalink
Merge pull request #344 from fusetim/develop
Browse files Browse the repository at this point in the history
fix(io): IOBase constructor do not update the fields id, name & description
  • Loading branch information
eitch authored Apr 15, 2024
2 parents a3b6794 + 102a9fd commit 4ed7933
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions pi4j-core/src/main/java/com/pi4j/io/IOBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public PROVIDER_TYPE provider(){
*/
public IOBase(PROVIDER_TYPE provider, CONFIG_TYPE config){
super();
this.id = config.id();
this.name = config.name();
this.description = config.description();
this.provider = provider;
this.config = config;
}
Expand Down
3 changes: 0 additions & 3 deletions pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public abstract class GpioBase<IO_TYPE extends Gpio<IO_TYPE, CONFIG_TYPE, PROVID
*/
public GpioBase(PROVIDER_TYPE provider, CONFIG_TYPE config){
super(provider, config);
this.name = config.name();
this.id = config.id();
this.description = config.description();
}

/** {@inheritDoc} */
Expand Down
3 changes: 0 additions & 3 deletions pi4j-core/src/main/java/com/pi4j/io/i2c/I2CBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public abstract class I2CBase extends IOBase<I2C, I2CConfig, I2CProvider> implem
*/
public I2CBase(I2CProvider provider, I2CConfig config) {
super(provider, config);
this.name = config.name();
this.id = config.id();
this.description = config.description();
this.isOpen = true;
}

Expand Down
3 changes: 0 additions & 3 deletions pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public abstract class PwmBase extends IOBase<Pwm, PwmConfig, PwmProvider> implem
*/
public PwmBase(PwmProvider provider, PwmConfig config) {
super(provider, config);
this.name = config.name();
this.id = config.id();
this.description = config.description();
for(PwmPreset preset : config.presets()){
this.presets.put(preset.name().toLowerCase().trim(), preset);
}
Expand Down
3 changes: 0 additions & 3 deletions pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public abstract class SpiBase extends IOBase<Spi, SpiConfig, SpiProvider> implem
*/
public SpiBase(SpiProvider provider, SpiConfig config) {
super(provider, config);
this.name = config.name();
this.id = config.id();
this.description = config.description();
}

/** {@inheritDoc} */
Expand Down

0 comments on commit 4ed7933

Please sign in to comment.