summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--software/rda1846dongle/rda1846.c2
-rw-r--r--software/rda1846dongle/rda1846dongle.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/software/rda1846dongle/rda1846.c b/software/rda1846dongle/rda1846.c
index 46b29cc..ecab5d3 100644
--- a/software/rda1846dongle/rda1846.c
+++ b/software/rda1846dongle/rda1846.c
@@ -159,7 +159,7 @@ int16_t rda1846_get_vssi(void)
uint16_t rda1846_get_flags(void)
{
uint16_t data;
- if(rda1846_read_register(RDA1846_REG_VSSI, &data))
+ if(rda1846_read_register(RDA1846_REG_FLAG, &data))
return 0xFFFF;
return data;
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;
}
}