mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-26 05:13:17 +00:00
Compare commits
1 Commits
dcbc557bf7
...
pascallang
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec7b4cd189 |
@@ -232,7 +232,7 @@ static void __attribute__((unused)) RLINK_send_packet()
|
|||||||
packet[1] |= 0x21; //air 0x21 on dump but it looks to support telemetry at least RSSI
|
packet[1] |= 0x21; //air 0x21 on dump but it looks to support telemetry at least RSSI
|
||||||
break;
|
break;
|
||||||
case RLINK_DUMBORC:
|
case RLINK_DUMBORC:
|
||||||
packet[1] |= 0x01; //always 0x00 on dump but does appear to support telemtry on newer transmitters
|
packet[1] = 0x00; //always 0x00 on dump
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -384,9 +384,8 @@ uint16_t RLINK_callback()
|
|||||||
debug("Telem:");
|
debug("Telem:");
|
||||||
#endif
|
#endif
|
||||||
CC2500_ReadData(packet_in, len);
|
CC2500_ReadData(packet_in, len);
|
||||||
if(packet_in[0]==RLINK_RX_PACKET_LEN && (packet_in[len-1] & 0x80) && memcmp(&packet[2],rx_tx_addr,RLINK_TX_ID_LEN)==0 && (packet_in[6]==packet[1] || sub_protocol == RLINK_DUMBORC))
|
if(packet_in[0]==RLINK_RX_PACKET_LEN && (packet_in[len-1] & 0x80) && memcmp(&packet[2],rx_tx_addr,RLINK_TX_ID_LEN)==0 && packet_in[6]==packet[1])
|
||||||
{//Correct telemetry received: length, CRC, ID and type
|
{//Correct telemetry received: length, CRC, ID and type
|
||||||
//packet_in[6] is 0x00 on almost all DumboRC RX so assume it is always valid
|
|
||||||
#ifdef RLINK_DEBUG_TELEM
|
#ifdef RLINK_DEBUG_TELEM
|
||||||
for(uint8_t i=0;i<len;i++)
|
for(uint8_t i=0;i<len;i++)
|
||||||
debug(" %02X",packet_in[i]);
|
debug(" %02X",packet_in[i]);
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ uint16_t SGF22_callback()
|
|||||||
{
|
{
|
||||||
#ifdef SGF22_HUB_TELEMETRY
|
#ifdef SGF22_HUB_TELEMETRY
|
||||||
bool rx = false;
|
bool rx = false;
|
||||||
static uint8_t telem_count = 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch(phase)
|
switch(phase)
|
||||||
@@ -196,8 +195,6 @@ uint16_t SGF22_callback()
|
|||||||
{//packets: 00 0B 00 -> 00 0B 01
|
{//packets: 00 0B 00 -> 00 0B 01
|
||||||
telemetry_link = 1;
|
telemetry_link = 1;
|
||||||
v_lipo1 = packet_in[2] ? 0 : 255; //2.9V for 1S, 7.0V for 2S
|
v_lipo1 = packet_in[2] ? 0 : 255; //2.9V for 1S, 7.0V for 2S
|
||||||
telemetry_lost = 0;
|
|
||||||
telem_count = 0;
|
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
debug("L %d ",p_len);
|
debug("L %d ",p_len);
|
||||||
@@ -207,20 +204,6 @@ uint16_t SGF22_callback()
|
|||||||
debugln("");
|
debugln("");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if(telem_count > 4*63) // Around 3.5sec with no telemetry
|
|
||||||
telemetry_lost = 1;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
telem_count++;
|
|
||||||
if(!telemetry_lost && (telem_count & 0x3F) == 0)
|
|
||||||
{// Should have received a telem packet but... Send telem to the radio to keep it alive
|
|
||||||
telemetry_link = 1;
|
|
||||||
#if 0
|
|
||||||
debugln("Miss");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
phase++;
|
phase++;
|
||||||
break;
|
break;
|
||||||
@@ -262,7 +245,6 @@ void SGF22_init()
|
|||||||
phase = SGF22_DATA1;
|
phase = SGF22_DATA1;
|
||||||
#ifdef SGF22_HUB_TELEMETRY
|
#ifdef SGF22_HUB_TELEMETRY
|
||||||
RX_RSSI = 100; // Dummy value
|
RX_RSSI = 100; // Dummy value
|
||||||
telemetry_lost = 1;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ uint16_t V761_callback()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
packet_count++;
|
packet_count++;
|
||||||
if(!telemetry_lost && !rx && (packet_count & 0x3F) == 0)
|
if(!telemetry_lost && !rx && (packet_count%64) == 0)
|
||||||
{// Should have received a telem packet but... Send telem to the radio to keep it alive
|
{// Should have received a telem packet but... Send telem to the radio to keep it alive
|
||||||
telemetry_link = 1;
|
telemetry_link = 1;
|
||||||
#ifdef V761_TELEM_DEBUG
|
#ifdef V761_TELEM_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user