]> git.tnoah.ca Git - lora-radio.git/commitdiff
Fix RAK4630 compilation error and SX1280 modemStatus logic
authorjacob.eva <x00010@disroot.org>
Tue, 13 Feb 2024 20:13:07 +0000 (20:13 +0000)
committerjacob.eva <x00010@disroot.org>
Tue, 13 Feb 2024 20:13:07 +0000 (20:13 +0000)
Boards.h
sx128x.cpp

index 4f079f3447c6db60b84473059f579fcfacf243ee..338543187d788b1fac0b4b607ef9a1b4f1083d80 100644 (file)
--- a/Boards.h
+++ b/Boards.h
@@ -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
index 759b73a08f1ad3aea36eb9de78361f0b91bb346d..065598d9c7e8d855a223388bda6689e7ce364847 100644 (file)
@@ -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;