pigpioj
pigpioj copied to clipboard
Notification triggers to many listeners after startup
With my program, a total of six sensors are connected with two GPIO pins each (e.g. pin 15 and 16). At the sensor output (and thus at the GPIO input), one pin is high and the other low. If a sensor is triggered for the first time, events are generated for other pins on which no level change has taken place. I guess for all input pins whose level is high.
Jan 10, 2021 12:18:12 PM uk.pigpioj.PigpioSocket notificationReceived
FINE: changed_level_mask: 270011263
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 19 (Pin=35) = HIGH;
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 20 (Pin=38) = HIGH;
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 6 (Pin=31) = HIGH;
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 9 (Pin=21) = HIGH;
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 11 (Pin=23) = HIGH;
Jan 10, 2021 12:18:12 PM uk.pigpioj.PigpioSocket notificationReceived
With the next signal change everything works fine.
FINE: changed_level_mask: 8388608
Jan 10, 2021 12:18:12 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 23 (Pin=16) = HIGH;
Jan 10, 2021 12:18:13 PM uk.pigpioj.PigpioSocket notificationReceived
FINE: changed_level_mask: 12582928
Jan 10, 2021 12:18:13 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 22 (Pin=15) = HIGH;
Jan 10, 2021 12:18:13 PM info.moroff.raspi.raincontrol.GPIOService$1 stateChanged
INFORMATION: Thread nioEventLoopGroup-2-2 --> GPIO PIN STATE CHANGE: GPIO 23 (Pin=16) = LOW;
I guess the problem might be in the class PgioSocket#notificationReceived, the element lastGpioLevelMask is changed only in this method, but does not respect the initial values correctly.