Skip to content

Commit

Permalink
Increase default FT8 output (ugly hack)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdyuldin committed Aug 21, 2024
1 parent 2e4d79e commit 90bf33c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dialog_ft8.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ static void load_band() {
static void clean() {
reset();

lv_table_set_row_cnt(table, 0);
lv_table_set_row_cnt(table, 1);
lv_table_set_cell_value(table, 0, 0, "Wait sync");

Expand Down Expand Up @@ -1179,7 +1180,8 @@ static void tx_worker() {
radio_set_freq(radio_freq + params.ft8_tx_freq.x - signal_freq);
radio_set_modem(true);

float gain_scale = -12.0f + log10f(params.pwr) * 5;
float gain_scale = -8.2f + params.ft8_output_gain_offset + log10f(params.pwr) * 5;

while (true) {
if (n_samples <= 0 || state != TX_PROCESS) {
state = RX_PROCESS;
Expand Down
6 changes: 6 additions & 0 deletions src/params/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ params_t params = {
.ft8_band = 5,
.ft8_tx_freq = { .x = 1325, .name = "ft8_tx_freq" },
.ft8_auto = { .x = true, .name = "ft8_auto" },
.ft8_output_gain_offset = 0.0f,

.long_gen = ACTION_SCREENSHOT,
.long_app = ACTION_APP_RECORDER,
Expand Down Expand Up @@ -696,6 +697,11 @@ void params_init() {
pthread_create(&thread, NULL, params_thread, NULL);
pthread_detach(thread);
params_modulation_setup(&params_lo_offset_get);

// Fix for different output poser on different devices
if (access("/mnt/.fix_ft8_power", F_OK) == 0) {
params.ft8_output_gain_offset = -4.0f;
}
}

int32_t params_lo_offset_get() {
Expand Down
3 changes: 3 additions & 0 deletions src/params/params.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ typedef struct {
params_uint16_t ft8_tx_freq;
params_bool_t ft8_auto;

// Temporal fix for different output power on FT8
float ft8_output_gain_offset;

/* Long press actions */

uint8_t long_gen;
Expand Down

0 comments on commit 90bf33c

Please sign in to comment.