diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-12 11:44:09 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-05-12 11:44:09 +0000 |
commit | a5d8d215964b31c3257083846dab71af51eb1af2 (patch) | |
tree | 37adcb974089c139638dc8c86c4c78f36284372f | |
parent | 7b931f0a5a7dc90bc488c9f521ed5aeae42f8d73 (diff) | |
download | rockbox-a5d8d215964b31c3257083846dab71af51eb1af2.tar.gz rockbox-a5d8d215964b31c3257083846dab71af51eb1af2.zip |
fix the last of the reds, and make RDS tags actually work (and add them to the hardcoded radio skin)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25966 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 6 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 5 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 2 | ||||
-rw-r--r-- | apps/recorder/radio.c | 7 | ||||
-rw-r--r-- | firmware/export/tuner.h | 3 | ||||
-rw-r--r-- | uisimulator/common/fmradio.c | 19 |
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 @@ | |||
58 | #endif | 58 | #endif |
59 | #include "backdrop.h" | 59 | #include "backdrop.h" |
60 | #include "viewport.h" | 60 | #include "viewport.h" |
61 | #if CONFIG_TUNER | ||
61 | #include "radio.h" | 62 | #include "radio.h" |
62 | #include "tuner.h" | 63 | #include "tuner.h" |
64 | #endif | ||
63 | #include "root_menu.h" | 65 | #include "root_menu.h" |
64 | 66 | ||
65 | 67 | ||
@@ -1349,6 +1351,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1349 | bool skin_has_sbs(enum screen_type screen, struct wps_data *data) | 1351 | bool skin_has_sbs(enum screen_type screen, struct wps_data *data) |
1350 | { | 1352 | { |
1351 | (void)screen; | 1353 | (void)screen; |
1354 | (void)data; | ||
1352 | bool draw = false; | 1355 | bool draw = false; |
1353 | #ifdef HAVE_LCD_BITMAP | 1356 | #ifdef HAVE_LCD_BITMAP |
1354 | if (data->wps_sb_tag) | 1357 | if (data->wps_sb_tag) |
@@ -1365,9 +1368,10 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data) | |||
1365 | */ | 1368 | */ |
1366 | int skin_wait_for_action(struct gui_wps *gwps, int context, int timeout) | 1369 | int skin_wait_for_action(struct gui_wps *gwps, int context, int timeout) |
1367 | { | 1370 | { |
1371 | (void)gwps; /* silence charcell warning */ | ||
1372 | int button = ACTION_NONE; | ||
1368 | #ifdef HAVE_LCD_BITMAP | 1373 | #ifdef HAVE_LCD_BITMAP |
1369 | int i; | 1374 | int i; |
1370 | int button = ACTION_NONE; | ||
1371 | /* when the peak meter is enabled we want to have a | 1375 | /* when the peak meter is enabled we want to have a |
1372 | few extra updates to make it look smooth. On the | 1376 | few extra updates to make it look smooth. On the |
1373 | other hand we don't want to waste energy if it | 1377 | 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 @@ | |||
52 | #include "skin_engine.h" | 52 | #include "skin_engine.h" |
53 | #include "settings.h" | 53 | #include "settings.h" |
54 | #include "settings_list.h" | 54 | #include "settings_list.h" |
55 | #if CONFIG_TUNER | ||
55 | #include "radio.h" | 56 | #include "radio.h" |
57 | #include "tuner.h" | ||
58 | #endif | ||
56 | #include "skin_fonts.h" | 59 | #include "skin_fonts.h" |
57 | 60 | ||
58 | #ifdef HAVE_LCD_BITMAP | 61 | #ifdef HAVE_LCD_BITMAP |
@@ -362,7 +365,7 @@ static const struct wps_tag all_tags[] = { | |||
362 | { WPS_TOKEN_PRESET_FREQ, "Tf", WPS_REFRESH_STATIC, NULL }, | 365 | { WPS_TOKEN_PRESET_FREQ, "Tf", WPS_REFRESH_STATIC, NULL }, |
363 | { WPS_TOKEN_PRESET_COUNT, "Tc", WPS_REFRESH_STATIC, NULL }, | 366 | { WPS_TOKEN_PRESET_COUNT, "Tc", WPS_REFRESH_STATIC, NULL }, |
364 | { WPS_TOKEN_HAVE_RDS, "tx", WPS_REFRESH_STATIC, NULL }, | 367 | { WPS_TOKEN_HAVE_RDS, "tx", WPS_REFRESH_STATIC, NULL }, |
365 | #ifdef HAVE_RDS_CAPS | 368 | #ifdef HAVE_RDS_CAP |
366 | { WPS_TOKEN_RDS_NAME, "ty", WPS_REFRESH_DYNAMIC, NULL }, | 369 | { WPS_TOKEN_RDS_NAME, "ty", WPS_REFRESH_DYNAMIC, NULL }, |
367 | { WPS_TOKEN_RDS_TEXT, "tz", WPS_REFRESH_DYNAMIC, NULL }, | 370 | { WPS_TOKEN_RDS_TEXT, "tz", WPS_REFRESH_DYNAMIC, NULL }, |
368 | #endif | 371 | #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 @@ | |||
61 | #endif | 61 | #endif |
62 | #include "language.h" | 62 | #include "language.h" |
63 | #include "usb.h" | 63 | #include "usb.h" |
64 | #if CONFIG_TUNER | ||
64 | #include "radio.h" | 65 | #include "radio.h" |
65 | #include "tuner.h" | 66 | #include "tuner.h" |
67 | #endif | ||
66 | 68 | ||
67 | extern struct wps_state wps_state; | 69 | extern struct wps_state wps_state; |
68 | 70 | ||
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) | |||
520 | #if CONFIG_CODEC != SWCODEC && !defined(SIMULATOR) | 520 | #if CONFIG_CODEC != SWCODEC && !defined(SIMULATOR) |
521 | "%?Rr<%Sx|Time:| %Rh:%Rn:%Rs|" | 521 | "%?Rr<%Sx|Time:| %Rh:%Rn:%Rs|" |
522 | "%?St|prerecording time|<%Sx|Prerecord Time| %Rs|%pm>>\n" | 522 | "%?St|prerecording time|<%Sx|Prerecord Time| %Rs|%pm>>\n" |
523 | #endif | 523 | #endif |
524 | #ifdef HAVE_RDS_CAP | ||
525 | "\n%s%ty\n" | ||
526 | "%s%tz\n" | ||
527 | #endif | ||
524 | ; | 528 | ; |
525 | skin_data_load(screen, data, default_fms, false); | 529 | skin_data_load(screen, data, default_fms, false); |
526 | } | 530 | } |
@@ -593,7 +597,6 @@ int radio_screen(void) | |||
593 | bool have_recorded = false; | 597 | bool have_recorded = false; |
594 | int timeout = current_tick + HZ/10; | 598 | int timeout = current_tick + HZ/10; |
595 | unsigned int last_seconds = 0; | 599 | unsigned int last_seconds = 0; |
596 | int hours, minutes; | ||
597 | #ifndef SIMULATOR | 600 | #ifndef SIMULATOR |
598 | unsigned int seconds = 0; | 601 | unsigned int seconds = 0; |
599 | struct audio_recording_options rec_options; | 602 | 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]; | |||
93 | #ifdef SIMULATOR | 93 | #ifdef SIMULATOR |
94 | int tuner_set(int setting, int value); | 94 | int tuner_set(int setting, int value); |
95 | int tuner_get(int setting); | 95 | int tuner_get(int setting); |
96 | #ifdef HAVE_RDS_CAP | ||
97 | char* tuner_get_rds_info(int setting); | ||
98 | #endif | ||
96 | #else | 99 | #else |
97 | 100 | ||
98 | #ifdef CONFIG_TUNER_MULTI | 101 | #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 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include <stdbool.h> | 21 | #include <stdbool.h> |
22 | #include <stdlib.h> | ||
22 | #include "config.h" | 23 | #include "config.h" |
23 | #include "debug.h" | 24 | #include "debug.h" |
24 | #include "tuner.h" | 25 | #include "tuner.h" |
@@ -96,4 +97,22 @@ bool tuner_power(bool status) | |||
96 | return oldstatus; | 97 | return oldstatus; |
97 | } | 98 | } |
98 | 99 | ||
100 | #ifdef HAVE_RDS_CAP | ||
101 | char* tuner_get_rds_info(int setting) | ||
102 | { | ||
103 | char *text = NULL; | ||
104 | |||
105 | switch(setting) | ||
106 | { | ||
107 | case RADIO_RDS_NAME: | ||
108 | text = "Rockbox Radio"; | ||
109 | break; | ||
110 | |||
111 | case RADIO_RDS_TEXT: | ||
112 | text = "http://www.rockbox.org" ; | ||
113 | break; | ||
114 | } | ||
115 | return text; | ||
116 | } | ||
117 | #endif | ||
99 | #endif | 118 | #endif |