diff options
Diffstat (limited to 'software/rda1846dongle/rda1846dongle.c')
-rw-r--r-- | software/rda1846dongle/rda1846dongle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/software/rda1846dongle/rda1846dongle.c b/software/rda1846dongle/rda1846dongle.c index 9e0c1b6..4c78168 100644 --- a/software/rda1846dongle/rda1846dongle.c +++ b/software/rda1846dongle/rda1846dongle.c @@ -65,7 +65,7 @@ static void update_current_freq(void) printf("ok\r\n"); current_freq_kHz = print_actual_freq(); - if(current_freq_kHz < 0) + if(current_freq_kHz < 0) current_freq_kHz = DEFAULT_FREQ; } @@ -84,7 +84,7 @@ static void print_status(void) printf("vssi: %d mV\r\n", vssi); uint16_t flags = rda1846_get_flags(); - if(vssi < 0) + if(flags == 0xFFFF) printf("flags: ERROR\r\n"); else printf("flags: %04X\r\n", flags); @@ -109,11 +109,12 @@ static void handle_cmd(uint8_t cmd) case '1': led_on(); printf("led ON\r\n"); break; case 't': led_toggle(); printf("led TOGGLE\r\n"); break; case '!': reset2bootloader(); break; + case 'r': rda1846_soft_reset(); printf("soft resetting RDA1846.\r\n"); break; case 'f': print_actual_freq(); break; case 's': print_status(); break; case 'd': print_dtmf(); break; - case '+': current_freq_kHz+=500; update_current_freq(); break; - case '-': current_freq_kHz-=500; update_current_freq(); break; + case '+': current_freq_kHz+=25; update_current_freq(); break; + case '-': current_freq_kHz-=25; update_current_freq(); break; default: printf("\r\n"); return; } } |