mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-29 07:53:15 +00:00
AFHDS2A: working version
- Wait for transmit completion before switching to RX (no more fixed delays...) - Verify if data has been received before processing it (better handling of telemetry) - Added TX_RSSI (along with the existing RX_RSSI) Known issue: RX_RSSI value needs to be looked at. I'm seeing only values between 157 (bad) and 196 (good). Is this normal for this protocol?
This commit is contained in:
@@ -320,9 +320,10 @@ uint16_t ReadHubsan()
|
||||
}
|
||||
A7105_Strobe(A7105_RX);
|
||||
// Read TX RSSI
|
||||
RSSI_dBm=256-(A7105_ReadReg(A7105_1D_RSSI_THOLD)*8)/5; // value from A7105 is between 8 for maximum signal strength to 160 or less
|
||||
if(RSSI_dBm<0) RSSI_dBm=0;
|
||||
else if(RSSI_dBm>255) RSSI_dBm=255;
|
||||
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;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user