-
Notifications
You must be signed in to change notification settings - Fork 9
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
PWM: v4.14.x: (udev delays) #44
Comments
The JavaScript library should be asynchronous. What system event can I use to trigger the update rather than an arbitrary stall that could be unreliable? |
From @RobertCNelson on January 4, 2018 20:41 can you loop over the dir? it should change from root:root -> root:pwm |
From @RobertCNelson on January 4, 2018 20:42 This would be overkill: https://www.npmjs.com/package/udev Regards, |
From @fivdi on January 23, 2018 20:0 The approach taken by beaglebone-io is to repeatedly access the files until there's no exception. see https://github.com/julianduque/beaglebone-io/blob/v3.0.0/lib/pwm-output.js#L20-L53 As mentioned in the comments it's a bit of a hack but it works. |
#161 proposed solution:using async.js (until method) try accessing(for a maximum 10 times) until no EACCES error is thrown, works well after 5 tries,when tested on: Linux beaglebone 4.9.82-ti-r102, BeagleBoard.org Debian Image 2018-03-05
From @RobertCNelson on January 2, 2018 21:8
Fix in Adafruit-lib: 100ms delay:
https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/source/c_pwm.c#L415-L418
On first startup, the pwm will fail in user mode:
However, If you re-run it, it works fine, as udev has had time to fix the permissions..
Copied from original issue: jadonk#161
The text was updated successfully, but these errors were encountered: