kubeedge / examples

Examples for KubeEdge
Apache License 2.0
246 stars 171 forks source link

bug: example led-raspberrypi unable to open gpio on Raspberry Pi 4 #114

Open EnableAsync opened 2 years ago

EnableAsync commented 2 years ago

Hi, I found a bug in led-raspberrypi. When I run it I get the following:

I0421 13:09:45.685260       1 light_mapper.go:168] Changing the state of the device to online
I0421 13:09:45.685930       1 light_mapper.go:242] Watching on the device twin values for device: led-light-instance-01
I0421 13:09:46.688850       1 light_mapper.go:248] Expected Value : ON
I0421 13:09:46.688901       1 light_mapper.go:250] Actual Value: <nil>
I0421 13:09:46.688922       1 light_mapper.go:254] Equating the actual  value to expected value
I0421 13:09:46.688936       1 light_mapper.go:257] Turning ON the light
E0421 13:09:46.689119       1 light_driver.go:14] operation not permitted

The bug comes from go-rpio[1][2]. So should this bug be fixed? (I would be happy to submit the relevant pull requests)

[1]https://github.com/stianeikeland/go-rpio/pull/70 [2]https://github.com/stianeikeland/go-rpio/issues/72

RyanZhaoXB commented 2 years ago

hello. please feel free to submit a pr to fix this bug. thanks :)