mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 16:28:10 +00:00
Bugs: fixed telemetry disable compilation error
This commit is contained in:
parent
5cf8d8d263
commit
b40e7d6e97
@ -427,14 +427,16 @@ uint16_t ReadBUGS(void)
|
||||
if (!(mode & 0x01))
|
||||
{
|
||||
A7105_ReadData(16);
|
||||
v_lipo1=packet[10] == 0xff ? 0xff : 0x00; // Voltage in this case is only an alert on level good or bad.
|
||||
RX_RSSI=packet[3];
|
||||
// Read TX RSSI
|
||||
int16_t temp=256-(A7105_ReadReg(A7105_1D_RSSI_THOLD)*8)/5; // Value from A7105 is between 8 for maximum signal strength to 160 or less
|
||||
if(temp<0) temp=0;
|
||||
else if(temp>255) temp=255;
|
||||
TX_RSSI=temp;
|
||||
telemetry_link=1;
|
||||
#if defined(BUGS_HUB_TELEMETRY)
|
||||
v_lipo1=packet[10] == 0xff ? 0xff : 0x00; // Voltage in this case is only an alert on level good or bad.
|
||||
RX_RSSI=packet[3];
|
||||
// Read TX RSSI
|
||||
int16_t temp=256-(A7105_ReadReg(A7105_1D_RSSI_THOLD)*8)/5; // Value from A7105 is between 8 for maximum signal strength to 160 or less
|
||||
if(temp<0) temp=0;
|
||||
else if(temp>255) temp=255;
|
||||
TX_RSSI=temp;
|
||||
telemetry_link=1;
|
||||
#endif
|
||||
}
|
||||
phase = BUGS_DATA_1;
|
||||
packet_period = BUGS_DELAY_POST_RX;
|
||||
|
@ -259,6 +259,7 @@ static void __attribute__((unused)) CX10_initialize_txid()
|
||||
|
||||
uint16_t initCX10(void)
|
||||
{
|
||||
BIND_IN_PROGRESS; // autobind protocol
|
||||
if(sub_protocol==CX10_BLUE)
|
||||
{
|
||||
packet_length = CX10A_PACKET_SIZE;
|
||||
@ -282,7 +283,6 @@ uint16_t initCX10(void)
|
||||
}
|
||||
CX10_initialize_txid();
|
||||
CX10_init();
|
||||
BIND_IN_PROGRESS; // autobind protocol
|
||||
return CX10_INITIAL_WAIT+packet_period;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_PATCH_LEVEL 1
|
||||
#define VERSION_PATCH_LEVEL 2
|
||||
|
||||
//******************
|
||||
// Protocols
|
||||
@ -68,6 +68,7 @@ enum PROTOCOLS
|
||||
PROTO_HITEC = 39, // =>CC2500
|
||||
PROTO_WFLY = 40, // =>CYRF6936
|
||||
PROTO_BUGS = 41, // =>A7105
|
||||
PROTO_TEST = 63, // =>NRF24L01
|
||||
};
|
||||
|
||||
enum Flysky
|
||||
|
@ -1187,6 +1187,12 @@ static void protocol_init()
|
||||
remote_callback = cflie_callback;
|
||||
break;
|
||||
#endif
|
||||
#if defined(TEST_NRF24L01_INO)
|
||||
case PROTO_TEST:
|
||||
next_callback=initTest();
|
||||
remote_callback = Test_callback;
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user