Merge pull request #167 from halfbakery/dio1action_fix
[SX127x] Dio1Action precondition checks were inverted
This commit is contained in:
commit
99d296e524
1 changed files with 2 additions and 2 deletions
|
@ -403,14 +403,14 @@ void SX127x::clearDio0Action() {
|
|||
}
|
||||
|
||||
void SX127x::setDio1Action(void (*func)(void)) {
|
||||
if(_mod->getGpio() != RADIOLIB_NC) {
|
||||
if(_mod->getGpio() == RADIOLIB_NC) {
|
||||
return;
|
||||
}
|
||||
attachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()), func, RISING);
|
||||
}
|
||||
|
||||
void SX127x::clearDio1Action() {
|
||||
if(_mod->getGpio() != RADIOLIB_NC) {
|
||||
if(_mod->getGpio() == RADIOLIB_NC) {
|
||||
return;
|
||||
}
|
||||
detachInterrupt(RADIOLIB_DIGITAL_PIN_TO_INTERRUPT(_mod->getGpio()));
|
||||
|
|
Loading…
Add table
Reference in a new issue