From 7d8ba5df7d883c86c24aa38449c4a6dd126e920f Mon Sep 17 00:00:00 2001
From: QuakeGod <quakegod@sina.com>
Date: 星期二, 06 八月 2024 14:41:31 +0800
Subject: [PATCH] Radio_LLCC68 1.15, Stable version

---
 Radio_LLCC68/Radio/KWireLess.h |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/Radio_LLCC68/Radio/KWireLess.h b/Radio_LLCC68/Radio/KWireLess.h
index ea94fac..f7ebad2 100644
--- a/Radio_LLCC68/Radio/KWireLess.h
+++ b/Radio_LLCC68/Radio/KWireLess.h
@@ -56,7 +56,13 @@
 	uint32_t RF_T_Freq;					//Hz
 	uint32_t RF_R_Freq;					//Hz
 	uint16_t nChnSpacing;		//kHz
+	uint16_t nCycleTime;			//
 	uchar workMode;			//0: FSK,    1: LoRa	
+	uchar nChannel;
+	uchar bMaster;
+	uchar nRadioAddr;
+	uchar bEnableMulti;
+	
 	uchar Tx_Power;			// dBm		5 - 22 dBm
 	uchar LoraBandWidth;		//		[0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] 
 	uchar LoRaFactor;				//		[SF5 .. SF 12]
@@ -67,8 +73,8 @@
 	uchar bEnableEncrypt;
 	uchar bEnableRelay;	
 	uchar LoRaPreambleLen;			// 2 - 12
+	uchar bAutoPower;				//鑷姩鍔熺巼
 	uchar bAutoReSend;		//鑷姩閲嶅彂
-	
 	
 //	uchar ;		//
 //	uchar 
@@ -87,9 +93,12 @@
 
 
 typedef enum tag_runstep{
-	RS_IDEL,
+	RS_IDLE,
+	RS_MASTER_CAD,
 	RS_SENDING,
+	RS_SENT,
 	RS_RECVING,
+	RS_RECVED,
 }enRunStep;
 
 #pragma anon_unions
@@ -137,15 +146,20 @@
 	uint32_t lastErrTime;				//涓婃閿欒鏃堕棿
 	uint32_t latancy;						//寤惰繜
 	uint32_t cycleTime;					//寰幆鏃堕棿
+	
 	uint16_t LostPackets;				//涓㈠寘璁℃暟
 	uint16_t CtnLstPkts;				//杩炵画涓㈠寘璁℃暟
 	uint16_t MaxCtnLstPkts;			//鏈�澶ц繛缁涪鍖呰鏁�
 	uint16_t TXErr;							//鍙戦�侀敊璇鏁�
 	uint16_t RXErr;							//鎺ユ敹閿欒璁℃暟
 	uint16_t CRCErr; 						//CRC閿欒璁℃暟
-	uint16_t ChnErr;						//棰戦亾閿欒
-	uint16_t PktErr;						//鍖呴敊璇�
+	uint16_t PktErr;						//鍖呴敊璇�	;
+	uint16_t ChnErr;						//棰戦亾閿欒;
+	uint16_t nErrChn;						//閿欒鐨勯閬撳彿;
 	uint16_t CADDoneCount;			//CAD 瀹屾垚娆℃暟
+	uint16_t CADOkCount;				//CAD 鏄鏁�
+	uint16_t CADNgCount;				//CAD 鍚︽鏁�
+	uint16_t CADTimeOut;				//CAD 瓒呮椂娆℃暟
 	uint16_t StepErr1;					//姝ラ閿欒1
 	uint16_t StepErr2;					//姝ラ閿欒2
 	uint16_t Err1Count;					//寰棯鎶ヨ娆℃暟
@@ -217,8 +231,8 @@
 int KWSendPkg(void* pPkg, int len);
 int KWProcPkg(void);
 
-extern uchar nRadioChannel;
-extern uchar nRadioAddr;
+//extern uchar nRadioChannel;
+//extern uchar nRadioAddr;
 
 extern stWLConfig WLCfg ;
 extern stWLRunStat KwRunStat;

--
Gitblit v1.9.1