diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOBase.java b/pi4j-core/src/main/java/com/pi4j/io/IOBase.java index b8e1181e..e8c41c6e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOBase.java @@ -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; } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java index b86bbaa5..d48349b1 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java @@ -47,9 +47,6 @@ public abstract class GpioBase 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; } diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java index 4a91c148..ffd01e38 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java @@ -57,9 +57,6 @@ public abstract class PwmBase extends IOBase 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); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java index 751bc801..80f807ee 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java @@ -48,9 +48,6 @@ public abstract class SpiBase extends IOBase implem */ public SpiBase(SpiProvider provider, SpiConfig config) { super(provider, config); - this.name = config.name(); - this.id = config.id(); - this.description = config.description(); } /** {@inheritDoc} */