File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -269,16 +269,16 @@ private void GpioControllerValueChanged(
269269 // sanity check
270270 if ( gpioPin != null )
271271 {
272- if ( ( ( gpioPin . GpioEvents & PinEventTypes . Falling ) == PinEventTypes . Falling )
273- && ( ( e . ChangeType & PinEventTypes . Falling ) == PinEventTypes . Falling ) )
272+ if ( gpioPin . GpioEvents . HasFlag ( PinEventTypes . Falling )
273+ && e . ChangeType . HasFlag ( PinEventTypes . Falling ) )
274274 {
275275 gpioPin . GpioPinChange . Invoke (
276276 this ,
277277 new PinValueChangedEventArgs ( PinEventTypes . Falling , gpioPin . PinNumber ) ) ;
278278 }
279279
280- if ( ( ( gpioPin . GpioEvents & PinEventTypes . Rising ) == PinEventTypes . Rising )
281- && ( ( e . ChangeType & PinEventTypes . Rising ) == PinEventTypes . Rising ) )
280+ if ( gpioPin . GpioEvents . HasFlag ( PinEventTypes . Rising )
281+ && e . ChangeType . HasFlag ( PinEventTypes . Rising ) )
282282 {
283283 gpioPin . GpioPinChange . Invoke (
284284 this ,
You can’t perform that action at this time.
0 commit comments