mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-12 17:57:53 +00:00
Fix scanner telemetry
This commit is contained in:
parent
d7ef15d435
commit
31d88d6f37
@ -99,13 +99,15 @@ uint16_t Scanner_callback()
|
|||||||
switch (phase)
|
switch (phase)
|
||||||
{
|
{
|
||||||
case SCAN_CHANNEL_CHANGE:
|
case SCAN_CHANNEL_CHANGE:
|
||||||
rf_ch_num++;
|
if(telemetry_link == 0) {
|
||||||
if (rf_ch_num >= (SCAN_MAX_RADIOCHANNEL + 1))
|
rf_ch_num++;
|
||||||
rf_ch_num = 0;
|
if (rf_ch_num >= (SCAN_MAX_RADIOCHANNEL + 1))
|
||||||
if (scan_tlm_index++ == 0)
|
rf_ch_num = 0;
|
||||||
pkt[0] = rf_ch_num; // start channel for telemetry packet
|
if (scan_tlm_index++ == 0)
|
||||||
Scanner_scan_next();
|
pkt[0] = rf_ch_num; // start channel for telemetry packet
|
||||||
phase = SCAN_GET_RSSI;
|
Scanner_scan_next();
|
||||||
|
phase = SCAN_GET_RSSI;
|
||||||
|
}
|
||||||
return SCAN_CHANNEL_LOCK_TIME;
|
return SCAN_CHANNEL_LOCK_TIME;
|
||||||
case SCAN_GET_RSSI:
|
case SCAN_GET_RSSI:
|
||||||
phase = SCAN_CHANNEL_CHANGE;
|
phase = SCAN_CHANNEL_CHANGE;
|
||||||
@ -124,6 +126,7 @@ uint16_t initScanner(void)
|
|||||||
{
|
{
|
||||||
rf_ch_num = SCAN_MAX_RADIOCHANNEL;
|
rf_ch_num = SCAN_MAX_RADIOCHANNEL;
|
||||||
scan_tlm_index = 0;
|
scan_tlm_index = 0;
|
||||||
|
telemetry_link = 0;
|
||||||
phase = SCAN_CHANNEL_CHANGE;
|
phase = SCAN_CHANNEL_CHANGE;
|
||||||
Scanner_cc2500_init();
|
Scanner_cc2500_init();
|
||||||
CC2500_Strobe(CC2500_SRX);
|
CC2500_Strobe(CC2500_SRX);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user