Fixed TX gain setting

This commit is contained in:
Thomas Kolb 2024-01-03 17:04:47 +01:00
parent c9d53ed96e
commit 5564f1751a
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@
// gain configuration
#define SDR_GAIN_TX_AMP 0.0f // extra power amplifier. Set to 14.0f to activate.
#define SDR_GAIN_TX_LNA 0.0f // normal variable gain amplifier.
#define SDR_GAIN_TX_VGA 0.0f // normal variable gain amplifier.
#define SDR_GAIN_RX_AMP 0.0f // extra input amplifier. Set to 14.0f to activate.
#define SDR_GAIN_RX_LNA 30.0f // RF variable gain amplifier.

View File

@ -249,7 +249,7 @@ result_t sdr_start_tx(sdr_ctx_t *ctx, size_t burst_size)
result = hackrf_set_amp_enable(ctx->hackrf, SDR_GAIN_TX_AMP > 0);
CHECK_HACKRF_RESULT(result, "hackrf_set_amp_enable");
result = hackrf_set_txvga_gain(ctx->hackrf, SDR_GAIN_TX_AMP);
result = hackrf_set_txvga_gain(ctx->hackrf, SDR_GAIN_TX_VGA);
CHECK_HACKRF_RESULT(result, "hackrf_set_txvga_gain");
result = hackrf_start_tx(ctx->hackrf, tx_callback, ctx);