dropLin 1 deň pred
rodič
commit
b652549020
3 zmenil súbory, kde vykonal 15 pridanie a 3 odobranie
  1. 1 1
      keil_v5/project.uvprojx
  2. 1 1
      project/main.c
  3. 13 1
      radio/myRadio.c

+ 1 - 1
keil_v5/project.uvprojx

@@ -2609,7 +2609,7 @@
             <InvalidFlash>1</InvalidFlash>
           </TargetStatus>
           <OutputDirectory>.\Objects\</OutputDirectory>
-          <OutputName>VGKitBoard_239xS_ST_APP_V12</OutputName>
+          <OutputName>VGKitBoard_239xS_ST_APP_V13</OutputName>
           <CreateExecutable>1</CreateExecutable>
           <CreateLib>0</CreateLib>
           <CreateHexFile>1</CreateHexFile>

+ 1 - 1
project/main.c

@@ -15,7 +15,7 @@
 #include "myUart3.h"
 #include "myRadio.h"
 
-#define SOFT_VERSION 0x12
+#define SOFT_VERSION 0x13
 #define SET_RF_FREQ_HZ(base, ch,step) base+ch*step*10*1000
 //---------------key
 KeyParamExt_ts *getKeyReturn;

+ 13 - 1
radio/myRadio.c

@@ -430,6 +430,10 @@ void myRadio_process(void)
     {
         return;
     }
+    if ((Radio.GetOpMode() != MODE_TX) || (Radio.GetOpMode() != MODE_RX) || (Radio.GetOpMode() != MODE_CAD))
+    {
+        return;
+    }
     SX1280ProcessIrqs(); 
 }
 /**
@@ -577,7 +581,15 @@ uint8_t myRadio_getChipType(void)
 }
 int16_t myRadio_getRssi(void)
 {
-    return Radio.GetRssiInst();;
+    if (Radio.GetOpMode() == MODE_RX)
+    {        
+        return Radio.GetRssiInst();
+    }
+    else
+    {
+        return -127;
+    }
+    
 }
 /**
  * @brief 无线发送数据包