Skip to content

Commit

Permalink
fix: update ui from command operation
Browse files Browse the repository at this point in the history
  • Loading branch information
edy555 committed Feb 11, 2018
1 parent 150156c commit ee5b150
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ void set_modulation(modulation_t mod)
set_fs(mod_table[mod].fs);
signal_process = mod_table[mod].demod_func;
mode_freq_offset = mod_table[mod].freq_offset;
uistat.modulation = mod;
disp_update();
}

void
Expand Down Expand Up @@ -436,6 +438,8 @@ static void cmd_volume(BaseSequentialStream *chp, int argc, char *argv[])

gain = atoi(argv[0]);
tlv320aic3204_set_volume(gain);
uistat.volume = gain;
disp_update();
}

static void cmd_dcreject(BaseSequentialStream *chp, int argc, char *argv[])
Expand Down Expand Up @@ -550,19 +554,14 @@ static void cmd_mode(BaseSequentialStream *chp, int argc, char *argv[])
cmd = argv[0];
if (strncmp(cmd, "am", 1) == 0) {
set_modulation(MOD_AM);
disp_update();
} else if (strncmp(cmd, "lsb", 1) == 0) {
set_modulation(MOD_LSB);
disp_update();
} else if (strncmp(cmd, "usb", 1) == 0) {
set_modulation(MOD_USB);
disp_update();
} else if (strncmp(cmd, "fms", 3) == 0) {
set_modulation(MOD_FM_STEREO);
disp_update();
} else if (strncmp(cmd, "fm", 1) == 0) {
set_modulation(MOD_FM);
disp_update();
}
}

Expand Down

0 comments on commit ee5b150

Please sign in to comment.