Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Power LQ and sensitivity #13

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

JBKingdon
Copy link
Contributor

Adjusts the power of the TX based on RSSI and LQ from telemetry packets. When using dynamic power the power level set on the radio is treated as the maximum to be used, and the actual power will be reduced from that according to the signal strength at the receiver.

Enable by adding #define USE_DYNAMIC_POWER to user_config.h

The thresholds and filter speed are set via #defines in main.cpp

DYN_POWER_INCREASE_MARGIN - relative to the rsSensitivity of the current packet rate mode
DYN_POWER_DECREASE_MARGIN - relative to the above threshold
DYN_POWER_LQ_THRESHOLD - LQ below which power will be gradually increased
DYN_POWER_LQ_PANIC_THRESHOLD - LQ below which power will be set directly to configured max
DYN_POWER_MISSED_TELEM_PACKET_THRESHOLD - The number of consecutive missed telemetry packets that will trigger a transition to the configured max power
DYN_POWER_RSSI_FILTER_CUTOFF_HZ - The filter cuttoff frequency for smoothing the RSSI values. Smaller values will produce a slower response when reducing power. Increases in power happen immediately.

Make dynamic power respond to reduced LQ as well as RSSI. LQ below a 'panic'
threshold raises the power directly to the configured maximum. LQ below a
more moderate threshold increments power by 1 dB.
Loss of telemetry is now handled directly using a "number of consecutive
missed telemetry packets" counter instead of waiting for the normal rx
disconnected timeout.
RSSI thresholds are now calculated relative to the rx sensitivity of the
current packet rate.
TX power can be sent in the sync packets for logging via BF black box and
display on the OSD (requires modified RX and BF firmwares).
@JBKingdon JBKingdon merged commit 2f9be25 into ExpressLRS:master Jul 16, 2021
@JBKingdon JBKingdon deleted the dynamicPower branch July 16, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant