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

Typo selecting speed argument for wiringPiSPISetup #18

Closed
Noddy76 opened this issue Feb 14, 2015 · 1 comment
Closed

Typo selecting speed argument for wiringPiSPISetup #18

Noddy76 opened this issue Feb 14, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@Noddy76
Copy link

Noddy76 commented Feb 14, 2015

There is a typo in wiringPiSPI.cc where the first argument to wiringPiSPI.cc is selected for the channel and the speed. The following patch fixes it.

diff --git a/src/wiringPiSPI.cc b/src/wiringPiSPI.cc
index a8210f6..37920fc 100644
--- a/src/wiringPiSPI.cc
+++ b/src/wiringPiSPI.cc
@@ -63,7 +63,7 @@ IMPLEMENT(wiringPiSPISetup) {
   CHECK_ARGUMENT_TYPE_INT32(1);

   int channel = GET_ARGUMENT_AS_INT32(0);
-  int speed = GET_ARGUMENT_AS_INT32(0);
+  int speed = GET_ARGUMENT_AS_INT32(1);

   CHECK_ARGUMENT_IN_INTS(0, channel, (0, 1));
@nekuz0r
Copy link
Collaborator

nekuz0r commented Feb 26, 2015

Thanks for reporting this bug, it will be included in the next release (will be released in the next weeks)

@nekuz0r nekuz0r added the bug label Feb 26, 2015
@nekuz0r nekuz0r self-assigned this Feb 26, 2015
@nekuz0r nekuz0r added this to the v2.1.0 milestone Feb 26, 2015
nekuz0r added a commit to nekuz0r/wiring-pi that referenced this issue Feb 26, 2015
@nekuz0r nekuz0r closed this as completed Feb 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants