diff --git a/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalInputProviderImpl.java b/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalInputProviderImpl.java index 8a0d8c14..83ed03b9 100644 --- a/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalInputProviderImpl.java +++ b/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalInputProviderImpl.java @@ -36,14 +36,8 @@ public DigitalInput create(DigitalInputConfig config) { @Override public int getPriority() { - // the gpioD driver should be higher priority when on Rp1 chip - int rval = 0; - if(BoardInfoHelper.usesRP1()) { - rval = 150; - }else{ - rval = 150; - } - return(rval); + // the gpioD driver should be higher priority always + return(150); } /** diff --git a/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalOutputProviderImpl.java b/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalOutputProviderImpl.java index 97228d7d..4f327a09 100644 --- a/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalOutputProviderImpl.java +++ b/plugins/pi4j-plugin-gpiod/src/main/java/com/pi4j/plugin/gpiod/provider/gpio/digital/GpioDDigitalOutputProviderImpl.java @@ -68,14 +68,8 @@ public DigitalOutput create(DigitalOutputConfig config) { @Override public int getPriority() { - // the gpioD driver should be higher priority when on RP1 chip - int rval = 0; - if(BoardInfoHelper.usesRP1()) { - rval = 150; - }else{ - rval = 150; - } - return(rval); + // the gpioD driver should be higher priority always + return(150); } @Override diff --git a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalInputProviderImpl.java b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalInputProviderImpl.java index 23596f52..da41b09a 100644 --- a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalInputProviderImpl.java +++ b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalInputProviderImpl.java @@ -55,12 +55,10 @@ public LinuxFsDigitalInputProviderImpl(String gpioFileSystemPath) { @Override public int getPriority() { - // the linux FS Digital driver should be higher priority than Pigpio on RP1 chip - int rval = 0; + // the linux FS Digital driver should be higher priority on RP1 chip + int rval = 50; if(BoardInfoHelper.usesRP1()) { rval = 100; - }else{ - rval = 50; } return(rval); } diff --git a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalOutputProviderImpl.java b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalOutputProviderImpl.java index a289e087..5bcd8cf0 100644 --- a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalOutputProviderImpl.java +++ b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/gpio/digital/LinuxFsDigitalOutputProviderImpl.java @@ -56,12 +56,10 @@ public LinuxFsDigitalOutputProviderImpl(String gpioFileSystemPath) { @Override public int getPriority() { - // the linux FS Digital driver should be higher priority than Pigpio on RP1 chip. - int rval = 0; + // the linux FS Digital driver should be higher priority on RP1 chip. + int rval = 50; if(BoardInfoHelper.usesRP1()) { rval = 100; - }else{ - rval = 50; } return(rval); } diff --git a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/i2c/LinuxFsI2CProviderImpl.java b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/i2c/LinuxFsI2CProviderImpl.java index 4c8f1d4a..788ed390 100644 --- a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/i2c/LinuxFsI2CProviderImpl.java +++ b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/i2c/LinuxFsI2CProviderImpl.java @@ -48,14 +48,8 @@ public LinuxFsI2CProviderImpl() { @Override public int getPriority() { - // the linux FS driver should be higher priority when on RP1 chip - int rval = 0; - if(BoardInfoHelper.usesRP1()) { - rval = 150; - }else{ - rval = 150; - } - return(rval); + // the linux FS driver should always be higher priority + return(150); } @Override diff --git a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/pwm/LinuxFsPwmProviderImpl.java b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/pwm/LinuxFsPwmProviderImpl.java index 96f41341..70a47259 100644 --- a/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/pwm/LinuxFsPwmProviderImpl.java +++ b/plugins/pi4j-plugin-linuxfs/src/main/java/com/pi4j/plugin/linuxfs/provider/pwm/LinuxFsPwmProviderImpl.java @@ -60,12 +60,10 @@ public LinuxFsPwmProviderImpl(String pwmFileSystemPath, int pwmChip) { @Override public int getPriority() { - // the linux FS PWM driver should be higher priority than Pigpio on RP1 chip - int rval = 0; + // the linux FS PWM driver should be higher priority on RP1 chip + int rval = 50; if(BoardInfoHelper.usesRP1()) { rval = 100; - }else{ - rval = 50; } return(rval); } diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalInputProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalInputProviderImpl.java index ccb748a9..946939bb 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalInputProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalInputProviderImpl.java @@ -58,10 +58,8 @@ public PiGpioDigitalInputProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on RP1 chip - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalOutputProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalOutputProviderImpl.java index 90f2377b..45bf08bb 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalOutputProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/gpio/digital/PiGpioDigitalOutputProviderImpl.java @@ -58,10 +58,8 @@ public PiGpioDigitalOutputProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on RP1 chip. - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/i2c/PiGpioI2CProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/i2c/PiGpioI2CProviderImpl.java index 5deaa8d0..03452a3b 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/i2c/PiGpioI2CProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/i2c/PiGpioI2CProviderImpl.java @@ -58,10 +58,8 @@ public PiGpioI2CProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on RP1 chip - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/pwm/PiGpioPwmProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/pwm/PiGpioPwmProviderImpl.java index 33a3c6d2..32443b6f 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/pwm/PiGpioPwmProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/pwm/PiGpioPwmProviderImpl.java @@ -59,10 +59,8 @@ public PiGpioPwmProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on RP1 chip. - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/serial/PiGpioSerialProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/serial/PiGpioSerialProviderImpl.java index 9d8d9b66..9dc3d3a0 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/serial/PiGpioSerialProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/serial/PiGpioSerialProviderImpl.java @@ -57,10 +57,8 @@ public PiGpioSerialProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on Rp1 chip. - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); diff --git a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/spi/PiGpioSpiProviderImpl.java b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/spi/PiGpioSpiProviderImpl.java index 4c8bfc12..e8978157 100644 --- a/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/spi/PiGpioSpiProviderImpl.java +++ b/plugins/pi4j-plugin-pigpio/src/main/java/com/pi4j/plugin/pigpio/provider/spi/PiGpioSpiProviderImpl.java @@ -57,14 +57,11 @@ public PiGpioSpiProviderImpl(PiGpio piGpio) { @Override public int getPriority() { // the Pigpio driver should be higher priority when NOT on RP1 chip. - int rval = 0; - if(!BoardInfoHelper.usesRP1()) { - rval = 100; - }else{ + int rval = 100; + if(BoardInfoHelper.usesRP1()) { rval = 50; } return(rval); - } /**