summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/gui/skin_engine/skin_display.c6
-rw-r--r--apps/gui/skin_engine/skin_parser.c5
-rw-r--r--apps/gui/skin_engine/skin_tokens.c2
-rw-r--r--apps/recorder/radio.c7
-rw-r--r--firmware/export/tuner.h3
-rw-r--r--uisimulator/common/fmradio.c19
6 files changed, 38 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 16b2dc1213..7710d58cea 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -58,8 +58,10 @@
#endif
#include "backdrop.h"
#include "viewport.h"
+#if CONFIG_TUNER
#include "radio.h"
#include "tuner.h"
+#endif
#include "root_menu.h"
@@ -1349,6 +1351,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode)
bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
{
(void)screen;
+ (void)data;
bool draw = false;
#ifdef HAVE_LCD_BITMAP
if (data->wps_sb_tag)
@@ -1365,9 +1368,10 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
*/
int skin_wait_for_action(struct gui_wps *gwps, int context, int timeout)
{
+ (void)gwps; /* silence charcell warning */
+ int button = ACTION_NONE;
#ifdef HAVE_LCD_BITMAP
int i;
- int button = ACTION_NONE;
/* when the peak meter is enabled we want to have a
few extra updates to make it look smooth. On the
other hand we don't want to waste energy if it
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 93df300335..bb8f8c57d1 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -52,7 +52,10 @@
#include "skin_engine.h"
#include "settings.h"
#include "settings_list.h"
+#if CONFIG_TUNER
#include "radio.h"
+#include "tuner.h"
+#endif
#include "skin_fonts.h"
#ifdef HAVE_LCD_BITMAP
@@ -362,7 +365,7 @@ static const struct wps_tag all_tags[] = {
{ WPS_TOKEN_PRESET_FREQ, "Tf", WPS_REFRESH_STATIC, NULL },
{ WPS_TOKEN_PRESET_COUNT, "Tc", WPS_REFRESH_STATIC, NULL },
{ WPS_TOKEN_HAVE_RDS, "tx", WPS_REFRESH_STATIC, NULL },
-#ifdef HAVE_RDS_CAPS
+#ifdef HAVE_RDS_CAP
{ WPS_TOKEN_RDS_NAME, "ty", WPS_REFRESH_DYNAMIC, NULL },
{ WPS_TOKEN_RDS_TEXT, "tz", WPS_REFRESH_DYNAMIC, NULL },
#endif
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 4acf7ea840..e5a34c4318 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -61,8 +61,10 @@
#endif
#include "language.h"
#include "usb.h"
+#if CONFIG_TUNER
#include "radio.h"
#include "tuner.h"
+#endif
extern struct wps_state wps_state;
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 10ae109739..6e79adf302 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -520,7 +520,11 @@ void fms_data_load(enum screen_type screen, const char *buf, bool isfile)
#if CONFIG_CODEC != SWCODEC && !defined(SIMULATOR)
"%?Rr<%Sx|Time:| %Rh:%Rn:%Rs|"
"%?St|prerecording time|<%Sx|Prerecord Time| %Rs|%pm>>\n"
-#endif
+#endif
+#ifdef HAVE_RDS_CAP
+ "\n%s%ty\n"
+ "%s%tz\n"
+#endif
;
skin_data_load(screen, data, default_fms, false);
}
@@ -593,7 +597,6 @@ int radio_screen(void)
bool have_recorded = false;
int timeout = current_tick + HZ/10;
unsigned int last_seconds = 0;
- int hours, minutes;
#ifndef SIMULATOR
unsigned int seconds = 0;
struct audio_recording_options rec_options;
diff --git a/firmware/export/tuner.h b/firmware/export/tuner.h
index cac038841a..03b6bd79d1 100644
--- a/firmware/export/tuner.h
+++ b/firmware/export/tuner.h
@@ -93,6 +93,9 @@ extern const struct fm_region_data fm_region_data[TUNER_NUM_REGIONS];
#ifdef SIMULATOR
int tuner_set(int setting, int value);
int tuner_get(int setting);
+#ifdef HAVE_RDS_CAP
+char* tuner_get_rds_info(int setting);
+#endif
#else
#ifdef CONFIG_TUNER_MULTI
diff --git a/uisimulator/common/fmradio.c b/uisimulator/common/fmradio.c
index 64bd7f1f91..cef9abf94e 100644
--- a/uisimulator/common/fmradio.c
+++ b/uisimulator/common/fmradio.c
@@ -19,6 +19,7 @@
*
****************************************************************************/
#include <stdbool.h>
+#include <stdlib.h>
#include "config.h"
#include "debug.h"
#include "tuner.h"
@@ -96,4 +97,22 @@ bool tuner_power(bool status)
return oldstatus;
}
+#ifdef HAVE_RDS_CAP
+char* tuner_get_rds_info(int setting)
+{
+ char *text = NULL;
+
+ switch(setting)
+ {
+ case RADIO_RDS_NAME:
+ text = "Rockbox Radio";
+ break;
+
+ case RADIO_RDS_TEXT:
+ text = "http://www.rockbox.org" ;
+ break;
+ }
+ return text;
+}
+#endif
#endif