Skip to content

Commit ee5b150

Browse files
committed
fix: update ui from command operation
1 parent 150156c commit ee5b150

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

main.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ void set_modulation(modulation_t mod)
174174
set_fs(mod_table[mod].fs);
175175
signal_process = mod_table[mod].demod_func;
176176
mode_freq_offset = mod_table[mod].freq_offset;
177+
uistat.modulation = mod;
178+
disp_update();
177179
}
178180

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

437439
gain = atoi(argv[0]);
438440
tlv320aic3204_set_volume(gain);
441+
uistat.volume = gain;
442+
disp_update();
439443
}
440444

441445
static void cmd_dcreject(BaseSequentialStream *chp, int argc, char *argv[])
@@ -550,19 +554,14 @@ static void cmd_mode(BaseSequentialStream *chp, int argc, char *argv[])
550554
cmd = argv[0];
551555
if (strncmp(cmd, "am", 1) == 0) {
552556
set_modulation(MOD_AM);
553-
disp_update();
554557
} else if (strncmp(cmd, "lsb", 1) == 0) {
555558
set_modulation(MOD_LSB);
556-
disp_update();
557559
} else if (strncmp(cmd, "usb", 1) == 0) {
558560
set_modulation(MOD_USB);
559-
disp_update();
560561
} else if (strncmp(cmd, "fms", 3) == 0) {
561562
set_modulation(MOD_FM_STEREO);
562-
disp_update();
563563
} else if (strncmp(cmd, "fm", 1) == 0) {
564564
set_modulation(MOD_FM);
565-
disp_update();
566565
}
567566
}
568567

0 commit comments

Comments
 (0)