Skip to content

Commit

Permalink
Fix RAK4630 compilation error and SX1280 modemStatus logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobeva committed Feb 13, 2024
1 parent c31cba0 commit 3971869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#include "Modem.h"
#include <variant.h>

#ifndef BOARDS_H
#define BOARDS_H
Expand Down
4 changes: 2 additions & 2 deletions sx128x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,13 @@ uint8_t sx128x::modemStatus() {

uint8_t byte = 0x00;

if (buf[0] & IRQ_PREAMBLE_DET_MASK_8X != 0) {
if ((buf[0] & IRQ_PREAMBLE_DET_MASK_8X) != 0) {
byte = byte | 0x01 | 0x04;
// clear register after reading
clearbuf[0] = 0xFF;
}

if (buf[1] & IRQ_HEADER_DET_MASK_8X != 0) {
if ((buf[1] & IRQ_HEADER_DET_MASK_8X) != 0) {
byte = byte | 0x02 | 0x04;
// clear register after reading
clearbuf[1] = 0xFF;
Expand Down

0 comments on commit 3971869

Please sign in to comment.