Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification triggers to many listeners after startup #11

Open
moroff opened this issue Jan 10, 2021 · 0 comments
Open

Notification triggers to many listeners after startup #11

moroff opened this issue Jan 10, 2021 · 0 comments

Comments

@moroff
Copy link

moroff commented Jan 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant