|
|
@@ -15,7 +15,7 @@
|
|
|
#include "myUart3.h"
|
|
|
#include "myRadio.h"
|
|
|
|
|
|
-#define SOFT_VERSION 0x04
|
|
|
+#define SOFT_VERSION 0x05
|
|
|
#define SET_RF_FREQ_HZ(base, ch,step) base+ch*step*10*1000
|
|
|
//---------------key
|
|
|
KeyParamExt_ts *getKeyReturn;
|
|
|
@@ -72,7 +72,7 @@ static char deviceNameList[DVTP_MAX_COUNT][20] =
|
|
|
|
|
|
userParams_ts deviceInforDef =
|
|
|
{
|
|
|
- .projectModel = "VG237x",
|
|
|
+ .projectModel = "VG3512",
|
|
|
.channelStep = 100,
|
|
|
.packetLen = 12,
|
|
|
.sendPacketCounts = 100,
|
|
|
@@ -404,7 +404,7 @@ void uiEnterCallback(int pageId, int cursorCount, int status, int value)
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_TXPOWER, "%ddBm", rfTxPowerList[deviceInfor.chipType][deviceInfor.txPower]);
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_TYPE, deviceNameList[deviceInfor.chipType]);
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_FREQ, "%03u->%6.2fMHz", deviceInfor.rfChannel, (float)(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep)) / 1000000.0);
|
|
|
- myRadio_setFrequency(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setFrequency(deviceInfor.rfChannel);
|
|
|
setEvent(EVENT_TIMEOUT_TO_SAVE_PARAMS, false, 200);
|
|
|
}
|
|
|
break;
|
|
|
@@ -412,7 +412,7 @@ void uiEnterCallback(int pageId, int cursorCount, int status, int value)
|
|
|
{
|
|
|
deviceInfor.rfChannel = value;
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_FREQ, "%03u->%6.2fMHz", deviceInfor.rfChannel, (float)(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep)) / 1000000.0);
|
|
|
- myRadio_setFrequency(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setFrequency(deviceInfor.rfChannel);
|
|
|
setEvent(EVENT_TIMEOUT_TO_SAVE_PARAMS, false, 200);
|
|
|
}
|
|
|
break;
|
|
|
@@ -421,7 +421,7 @@ void uiEnterCallback(int pageId, int cursorCount, int status, int value)
|
|
|
deviceInfor.channelStep = value;
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_STEP, "%uHz", deviceInfor.channelStep*10*1000);
|
|
|
myDisplay_setting_loadParams(SET_ITEM_INDEX_FREQ, "%03u->%6.2fMHz", deviceInfor.rfChannel, (float)(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep)) / 1000000.0);
|
|
|
- myRadio_setFrequency(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setFrequency(deviceInfor.rfChannel);
|
|
|
setEvent(EVENT_TIMEOUT_TO_SAVE_PARAMS, false, 200);
|
|
|
}
|
|
|
break;
|
|
|
@@ -595,7 +595,7 @@ int main(void)
|
|
|
//³õʼ»¯É䯵
|
|
|
myRadio_setChipType(deviceInfor.chipType);
|
|
|
myRadio_init(0, rfRx_callback);
|
|
|
- myRadio_setFrequency(SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setFrequency(deviceInfor.rfChannel);
|
|
|
myRadio_setTxPower(deviceInfor.txPower);
|
|
|
myRadio_setBaudrate(deviceInfor.rfBaudrate);
|
|
|
|
|
|
@@ -663,21 +663,17 @@ int main(void)
|
|
|
}
|
|
|
if (getEvent(EVENT_RF_CONTINUOUS_RX))
|
|
|
{
|
|
|
- myRadio_setCtrl(RADIO_EXT_CONTROL_RX_SENSITIVITY,
|
|
|
- SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setCtrl(RADIO_EXT_CONTROL_RX_SENSITIVITY, deviceInfor.rfChannel);
|
|
|
startToCountingRx = true;
|
|
|
validPackageCount = 0;
|
|
|
}
|
|
|
if (getEvent(EVENT_RF_CONTINUOUS_TX))
|
|
|
{
|
|
|
- myRadio_setCtrl(RADIO_EXT_CONTROL_TX_UNMODULATED,
|
|
|
- SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setCtrl(RADIO_EXT_CONTROL_TX_UNMODULATED, deviceInfor.rfChannel);
|
|
|
}
|
|
|
if (getEvent(EVENT_RF_CONTINUOUS_TX_MD))
|
|
|
{
|
|
|
- myRadio_setTxPower(deviceInfor.txPower);
|
|
|
- myRadio_setCtrl(RADIO_EXT_CONTROL_TX_MODULATED,
|
|
|
- SET_RF_FREQ_HZ(rfBaseFreqList[deviceInfor.chipType], deviceInfor.rfChannel, deviceInfor.channelStep));
|
|
|
+ myRadio_setCtrl(RADIO_EXT_CONTROL_TX_MODULATED, deviceInfor.rfChannel);
|
|
|
}
|
|
|
if (getEvent(EVENT_RF_PACKET_TX))
|
|
|
{
|