khang 230620

Dependencies:   ISL29011

Revision:
41:76130744ebe5
Parent:
21:09d05faf0e13
diff -r afbcb9dcb0ac -r 76130744ebe5 examples/inc/RadioEvent.h
--- a/examples/inc/RadioEvent.h	Mon Feb 24 02:48:35 2020 +0000
+++ b/examples/inc/RadioEvent.h	Tue Jun 23 15:35:35 2020 +0000
@@ -4,6 +4,8 @@
 #include "dot_util.h"
 #include "mDotEvent.h"
 
+extern uint8_t flag_RX_data;
+
 class RadioEvent : public mDotEvent
 {
  
@@ -59,13 +61,16 @@
                      info->RxRssi, info->RxSnr, info->Energy, info->DemodMargin, info->NbGateways);
         }
  
-        if (flags->Bits.Rx) {
-            
+        if (flags->Bits.Rx) 
+        {
+            flag_RX_data =0;
             logDebug("Rx %d bytes", info->RxBufferSize);
-            if (info->RxBufferSize > 0) {
+            if (info->RxBufferSize > 0) 
+            {
                 // print RX data as string and hexadecimal 
                 std::string rx((const char*)info->RxBuffer, info->RxBufferSize);
                 printf("Rx data: %s [%s]\r\n", rx.c_str(), mts::Text::bin2hexString(info->RxBuffer, info->RxBufferSize).c_str());
+                flag_RX_data = 1;
             }
         }
     }