diff options
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 128 |
1 files changed, 80 insertions, 48 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index bfe4c2e099..458861c591 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -975,8 +975,10 @@ bool recording_screen(void) | |||
975 | if (peak_meter_trigger_status() != TRIG_OFF) | 975 | if (peak_meter_trigger_status() != TRIG_OFF) |
976 | { | 976 | { |
977 | peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h); | 977 | peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h); |
978 | lcd_update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h, | 978 | FOR_NB_SCREENS(i){ |
979 | TRIG_WIDTH + 2, TRIG_HEIGHT); | 979 | screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h, |
980 | TRIG_WIDTH + 2, TRIG_HEIGHT); | ||
981 | } | ||
980 | } | 982 | } |
981 | } | 983 | } |
982 | 984 | ||
@@ -996,7 +998,10 @@ bool recording_screen(void) | |||
996 | { | 998 | { |
997 | gui_syncsplash(0, true, str(LANG_DISK_FULL)); | 999 | gui_syncsplash(0, true, str(LANG_DISK_FULL)); |
998 | gui_syncstatusbar_draw(&statusbars, true); | 1000 | gui_syncstatusbar_draw(&statusbars, true); |
999 | lcd_update(); | 1001 | |
1002 | FOR_NB_SCREENS(i) | ||
1003 | screens[i].update(); | ||
1004 | |||
1000 | audio_error_clear(); | 1005 | audio_error_clear(); |
1001 | 1006 | ||
1002 | while(1) | 1007 | while(1) |
@@ -1026,7 +1031,8 @@ bool recording_screen(void) | |||
1026 | 1031 | ||
1027 | sound_settings_apply(); | 1032 | sound_settings_apply(); |
1028 | 1033 | ||
1029 | lcd_setfont(FONT_UI); | 1034 | FOR_NB_SCREENS(i) |
1035 | screens[i].setfont(FONT_UI); | ||
1030 | 1036 | ||
1031 | if (have_recorded) | 1037 | if (have_recorded) |
1032 | reload_directory(); | 1038 | reload_directory(); |
@@ -1042,34 +1048,47 @@ bool f2_rec_screen(void) | |||
1042 | { | 1048 | { |
1043 | bool exit = false; | 1049 | bool exit = false; |
1044 | bool used = false; | 1050 | bool used = false; |
1045 | int w, h; | 1051 | int w, h, i; |
1046 | char buf[32]; | 1052 | char buf[32]; |
1047 | int button; | 1053 | int button; |
1048 | 1054 | ||
1049 | lcd_setfont(FONT_SYSFIXED); | 1055 | FOR_NB_SCREENS(i) |
1050 | lcd_getstringsize("A",&w,&h); | 1056 | { |
1057 | screens[i].setfont(FONT_SYSFIXED); | ||
1058 | screens[i].getstringsize("A",&w,&h); | ||
1059 | } | ||
1051 | 1060 | ||
1052 | while (!exit) { | 1061 | while (!exit) { |
1053 | const char* ptr=NULL; | 1062 | const char* ptr=NULL; |
1054 | 1063 | ||
1055 | lcd_clear_display(); | 1064 | FOR_NB_SCREENS(i) |
1065 | { | ||
1066 | screens[i].clear_display(); | ||
1056 | 1067 | ||
1057 | /* Recording quality */ | 1068 | /* Recording quality */ |
1058 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_QUALITY)); | 1069 | screens[i].putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_QUALITY)); |
1059 | snprintf(buf, 32, "%d", global_settings.rec_quality); | 1070 | } |
1060 | lcd_putsxy(0, LCD_HEIGHT/2-h, buf); | 1071 | |
1061 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 1072 | snprintf(buf, 32, "%d", global_settings.rec_quality); |
1073 | FOR_NB_SCREENS(i) | ||
1074 | { | ||
1075 | screens[i].putsxy(0, LCD_HEIGHT/2-h, buf); | ||
1076 | screens[i].mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | ||
1062 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | 1077 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); |
1078 | } | ||
1063 | 1079 | ||
1064 | /* Frequency */ | 1080 | /* Frequency */ |
1065 | snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY)); | 1081 | snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY)); |
1066 | lcd_getstringsize(buf,&w,&h); | ||
1067 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, buf); | ||
1068 | ptr = freq_str[global_settings.rec_frequency]; | 1082 | ptr = freq_str[global_settings.rec_frequency]; |
1069 | lcd_getstringsize(ptr, &w, &h); | 1083 | FOR_NB_SCREENS(i) |
1070 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); | 1084 | { |
1071 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 1085 | screens[i].getstringsize(buf,&w,&h); |
1072 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 1086 | screens[i].putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, buf); |
1087 | screens[i].getstringsize(ptr, &w, &h); | ||
1088 | screens[i].putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); | ||
1089 | screens[i].mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], | ||
1090 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | ||
1091 | } | ||
1073 | 1092 | ||
1074 | /* Channel mode */ | 1093 | /* Channel mode */ |
1075 | switch ( global_settings.rec_channels ) { | 1094 | switch ( global_settings.rec_channels ) { |
@@ -1082,17 +1101,20 @@ bool f2_rec_screen(void) | |||
1082 | break; | 1101 | break; |
1083 | } | 1102 | } |
1084 | 1103 | ||
1085 | lcd_getstringsize(str(LANG_RECORDING_CHANNELS), &w, &h); | 1104 | FOR_NB_SCREENS(i) |
1086 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, | 1105 | { |
1087 | str(LANG_RECORDING_CHANNELS)); | 1106 | screens[i].getstringsize(str(LANG_RECORDING_CHANNELS), &w, &h); |
1088 | lcd_getstringsize(str(LANG_F2_MODE), &w, &h); | 1107 | screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, |
1089 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE)); | 1108 | str(LANG_RECORDING_CHANNELS)); |
1090 | lcd_getstringsize(ptr, &w, &h); | 1109 | screens[i].getstringsize(str(LANG_F2_MODE), &w, &h); |
1091 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr); | 1110 | screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE)); |
1092 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward], | 1111 | screens[i].getstringsize(ptr, &w, &h); |
1112 | screens[i].putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr); | ||
1113 | screens[i].mono_bitmap(bitmap_icons_7x8[Icon_FastForward], | ||
1093 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); | 1114 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); |
1094 | 1115 | ||
1095 | lcd_update(); | 1116 | screens[i].update(); |
1117 | } | ||
1096 | 1118 | ||
1097 | button = button_get(true); | 1119 | button = button_get(true); |
1098 | switch (button) { | 1120 | switch (button) { |
@@ -1150,7 +1172,8 @@ bool f2_rec_screen(void) | |||
1150 | set_gain(); | 1172 | set_gain(); |
1151 | 1173 | ||
1152 | settings_save(); | 1174 | settings_save(); |
1153 | lcd_setfont(FONT_UI); | 1175 | FOR_NB_SCREENS(i) |
1176 | screens[i].setfont(FONT_UI); | ||
1154 | 1177 | ||
1155 | return false; | 1178 | return false; |
1156 | } | 1179 | } |
@@ -1161,7 +1184,7 @@ bool f3_rec_screen(void) | |||
1161 | { | 1184 | { |
1162 | bool exit = false; | 1185 | bool exit = false; |
1163 | bool used = false; | 1186 | bool used = false; |
1164 | int w, h; | 1187 | int w, h, i; |
1165 | int button; | 1188 | int button; |
1166 | char *src_str[] = | 1189 | char *src_str[] = |
1167 | { | 1190 | { |
@@ -1169,31 +1192,39 @@ bool f3_rec_screen(void) | |||
1169 | str(LANG_RECORDING_SRC_LINE), | 1192 | str(LANG_RECORDING_SRC_LINE), |
1170 | str(LANG_RECORDING_SRC_DIGITAL) | 1193 | str(LANG_RECORDING_SRC_DIGITAL) |
1171 | }; | 1194 | }; |
1172 | 1195 | FOR_NB_SCREENS(i) | |
1173 | lcd_setfont(FONT_SYSFIXED); | 1196 | { |
1174 | lcd_getstringsize("A",&w,&h); | 1197 | screens[i].setfont(FONT_SYSFIXED); |
1175 | 1198 | screens[i].getstringsize("A",&w,&h); | |
1199 | } | ||
1200 | |||
1176 | while (!exit) { | 1201 | while (!exit) { |
1177 | char* ptr=NULL; | 1202 | char* ptr=NULL; |
1178 | |||
1179 | lcd_clear_display(); | ||
1180 | |||
1181 | /* Recording source */ | ||
1182 | lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_SOURCE)); | ||
1183 | ptr = src_str[global_settings.rec_source]; | 1203 | ptr = src_str[global_settings.rec_source]; |
1184 | lcd_getstringsize(ptr, &w, &h); | 1204 | FOR_NB_SCREENS(i) |
1185 | lcd_putsxy(0, LCD_HEIGHT/2-h, ptr); | 1205 | { |
1186 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 1206 | screens[i].clear_display(); |
1187 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | 1207 | |
1208 | /* Recording source */ | ||
1209 | screens[i].putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_SOURCE)); | ||
1210 | |||
1211 | screens[i].getstringsize(ptr, &w, &h); | ||
1212 | screens[i].putsxy(0, LCD_HEIGHT/2-h, ptr); | ||
1213 | screens[i].mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | ||
1214 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); | ||
1215 | } | ||
1188 | 1216 | ||
1189 | /* trigger setup */ | 1217 | /* trigger setup */ |
1190 | ptr = str(LANG_RECORD_TRIGGER); | 1218 | ptr = str(LANG_RECORD_TRIGGER); |
1191 | lcd_getstringsize(ptr,&w,&h); | 1219 | FOR_NB_SCREENS(i) |
1192 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr); | 1220 | { |
1193 | lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], | 1221 | screens[i].getstringsize(ptr,&w,&h); |
1222 | screens[i].putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr); | ||
1223 | screens[i].mono_bitmap(bitmap_icons_7x8[Icon_DownArrow], | ||
1194 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); | 1224 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); |
1195 | 1225 | ||
1196 | lcd_update(); | 1226 | screens[i].update(); |
1227 | } | ||
1197 | 1228 | ||
1198 | button = button_get(true); | 1229 | button = button_get(true); |
1199 | switch (button) { | 1230 | switch (button) { |
@@ -1245,7 +1276,8 @@ bool f3_rec_screen(void) | |||
1245 | set_gain(); | 1276 | set_gain(); |
1246 | 1277 | ||
1247 | settings_save(); | 1278 | settings_save(); |
1248 | lcd_setfont(FONT_UI); | 1279 | FOR_NB_SCREENS(i) |
1280 | screens[i].setfont(FONT_UI); | ||
1249 | 1281 | ||
1250 | return false; | 1282 | return false; |
1251 | } | 1283 | } |