-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Exception if non root user uses the library #428
Conversation
In my case I use the following code to handle the exception. My environment is a Raspberry Pi.
The library is compatible with Arduino. |
This is the second attempt to address #424. |
Won’t this break things for users running as non-root? With spidev for example, the lib can be run as non root user. Should the fix be put into the bcm driver instead of rf24?
… On Apr 20, 2018, at 16:41, Apostolos Katranitsas ***@***.***> wrote:
This is the second attempt to address #424.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I thought not to put this in bcm driver in order to be easy updating the driver. If you make changes to the bcm library before you put it into the repo then it is fine to add one more but if not then you will have to apply this everytime! If the late is not a problem then I will apply it into the bcm driver. May I propose to put it into the spi.cpp? That way you can easily update the bcm driver and will be used only for Raspberry Pi. |
Yeah, SPI.cpp seems like the best place for it.
… On Apr 21, 2018, at 13:26, Apostolos Katranitsas ***@***.***> wrote:
I thought not to put this in bcm driver in order to be easy updating the driver.
If you make changes to the bcm library before you put it into the repo then it is fine to add one more but if not then you will have to apply this everytime!
If the late is not a problem then I will apply it into the bcm driver.
May I propose to put it into the spi.cpp? That way you can easily update the bcm driver and will be used only for Raspberry Pi.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Per @TMRh20 comment I'll move the exception into SPI.cpp! |
OK, it is ready! |
The library will throw and error if user has not effective root access.
The error could be handled from above layers like another library or main program!