-
Notifications
You must be signed in to change notification settings - Fork 61
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
based on machine (pi5) set pwmchip to 2, Also set provider priority … #343
Changes from all commits
b7f4f28
2d772e8
ec58be2
950a2a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
* #L% | ||
*/ | ||
|
||
import com.pi4j.boardinfo.util.BoardInfoHelper; | ||
import com.pi4j.context.Context; | ||
import com.pi4j.exception.InitializeException; | ||
import com.pi4j.exception.ShutdownException; | ||
|
@@ -67,8 +68,14 @@ public DigitalOutput create(DigitalOutputConfig config) { | |
|
||
@Override | ||
public int getPriority() { | ||
// GpioD should be used if available | ||
return 150; | ||
// the gpioD driver should be higher priority when on RP1 chip | ||
int rval = 0; | ||
if(BoardInfoHelper.usesRP1()) { | ||
rval = 150; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idem There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be the same as above. |
||
}else{ | ||
rval = 150; | ||
} | ||
return(rval); | ||
} | ||
|
||
@Override | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ | |
* #L% | ||
*/ | ||
|
||
import com.pi4j.io.exception.IOAlreadyExistsException; | ||
|
||
import com.pi4j.boardinfo.util.BoardInfoHelper; | ||
import com.pi4j.io.i2c.I2C; | ||
import com.pi4j.io.i2c.I2CConfig; | ||
import com.pi4j.io.i2c.I2CProviderBase; | ||
|
@@ -47,8 +48,14 @@ public LinuxFsI2CProviderImpl() { | |
|
||
@Override | ||
public int getPriority() { | ||
// the linux FS I2C driver should be used over the pigpio | ||
return 150; | ||
// the linux FS driver should be higher priority when on RP1 chip | ||
int rval = 0; | ||
if(BoardInfoHelper.usesRP1()) { | ||
rval = 150; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idem |
||
}else{ | ||
rval = 150; | ||
} | ||
return(rval); | ||
} | ||
|
||
@Override | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value is the same in both if cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in both are the same to match what Robert did for 2.5 So I did the update and did pay attention to the fact both legs were equal.
Fixed