diff options
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 06a6fd9b94..b45fc13345 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -111,6 +111,7 @@ | |||
111 | #define REC_RC_NEXT BUTTON_RC_FF | 111 | #define REC_RC_NEXT BUTTON_RC_FF |
112 | #define REC_RC_PREV BUTTON_RC_REW | 112 | #define REC_RC_PREV BUTTON_RC_REW |
113 | #define REC_RC_SETTINGS BUTTON_RC_MODE | 113 | #define REC_RC_SETTINGS BUTTON_RC_MODE |
114 | #define BUTTON_RC_DISPLAY BUTTON_RC_VOL_DOWN | ||
114 | 115 | ||
115 | #elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) | 116 | #elif (CONFIG_KEYPAD == IAUDIO_X5_PAD) |
116 | #define REC_SHUTDOWN (BUTTON_POWER | BUTTON_REPEAT) | 117 | #define REC_SHUTDOWN (BUTTON_POWER | BUTTON_REPEAT) |
@@ -155,6 +156,8 @@ bool f3_rec_screen(void); | |||
155 | 156 | ||
156 | #define MAX_FILE_SIZE 0x7F800000 /* 2 GB - 4 MB */ | 157 | #define MAX_FILE_SIZE 0x7F800000 /* 2 GB - 4 MB */ |
157 | 158 | ||
159 | int screen_update = NB_SCREENS; | ||
160 | bool remote_display_on = true; | ||
158 | const char* const freq_str[6] = | 161 | const char* const freq_str[6] = |
159 | { | 162 | { |
160 | "44.1kHz", | 163 | "44.1kHz", |
@@ -422,6 +425,16 @@ bool recording_screen(void) | |||
422 | 425 | ||
423 | if(rec_create_directory() > 0) | 426 | if(rec_create_directory() > 0) |
424 | have_recorded = true; | 427 | have_recorded = true; |
428 | |||
429 | if (!remote_display_on) | ||
430 | { | ||
431 | screens[1].clear_display(); | ||
432 | snprintf(buf, 32, str(LANG_REMOTE_LCD_ON)); | ||
433 | screens[1].puts((screens[1].width/w - strlen(buf))/2, | ||
434 | screens[1].height/(h*2) + 1, buf); | ||
435 | screens[1].update(); | ||
436 | gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF)); | ||
437 | } | ||
425 | 438 | ||
426 | while(!done) | 439 | while(!done) |
427 | { | 440 | { |
@@ -479,7 +492,7 @@ bool recording_screen(void) | |||
479 | #endif /* CONFIG_LED */ | 492 | #endif /* CONFIG_LED */ |
480 | 493 | ||
481 | /* Wait for a button a while (HZ/10) drawing the peak meter */ | 494 | /* Wait for a button a while (HZ/10) drawing the peak meter */ |
482 | button = peak_meter_draw_get_btn(0, pm_y, h * PM_HEIGHT); | 495 | button = peak_meter_draw_get_btn(0, pm_y, h * PM_HEIGHT, screen_update); |
483 | 496 | ||
484 | if (last_audio_stat != audio_stat) | 497 | if (last_audio_stat != audio_stat) |
485 | { | 498 | { |
@@ -492,6 +505,26 @@ bool recording_screen(void) | |||
492 | 505 | ||
493 | switch(button) | 506 | switch(button) |
494 | { | 507 | { |
508 | #ifdef BUTTON_RC_DISPLAY | ||
509 | case BUTTON_RC_DISPLAY: | ||
510 | if (remote_display_on) | ||
511 | { | ||
512 | remote_display_on = false; | ||
513 | screen_update = 1; | ||
514 | screens[1].clear_display(); | ||
515 | snprintf(buf, 32, str(LANG_REMOTE_LCD_ON)); | ||
516 | screens[1].puts((screens[1].width/w - strlen(buf))/2, | ||
517 | screens[1].height/(h*2) + 1, buf); | ||
518 | screens[1].update(); | ||
519 | gui_syncsplash(0, true, str(LANG_REMOTE_LCD_OFF)); | ||
520 | } | ||
521 | else | ||
522 | { | ||
523 | remote_display_on = true; | ||
524 | screen_update = NB_SCREENS; | ||
525 | } | ||
526 | break; | ||
527 | #endif | ||
495 | case REC_STOPEXIT: | 528 | case REC_STOPEXIT: |
496 | case REC_SHUTDOWN: | 529 | case REC_SHUTDOWN: |
497 | #ifdef REC_RC_STOPEXIT | 530 | #ifdef REC_RC_STOPEXIT |
@@ -1065,10 +1098,9 @@ bool recording_screen(void) | |||
1065 | FOR_NB_SCREENS(i) | 1098 | FOR_NB_SCREENS(i) |
1066 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 5, buf); | 1099 | screens[i].puts(0, filename_offset[i] + PM_HEIGHT + 5, buf); |
1067 | 1100 | ||
1068 | gui_syncstatusbar_draw(&statusbars, true); | 1101 | for(i = 0; i < screen_update; i++) |
1069 | |||
1070 | FOR_NB_SCREENS(i) | ||
1071 | { | 1102 | { |
1103 | gui_statusbar_draw(&(statusbars.statusbars[i]), true); | ||
1072 | peak_meter_screen(&screens[i], 0, pm_y[i], h*PM_HEIGHT); | 1104 | peak_meter_screen(&screens[i], 0, pm_y[i], h*PM_HEIGHT); |
1073 | screens[i].update(); | 1105 | screens[i].update(); |
1074 | } | 1106 | } |
@@ -1077,7 +1109,7 @@ bool recording_screen(void) | |||
1077 | if (peak_meter_trigger_status() != TRIG_OFF) | 1109 | if (peak_meter_trigger_status() != TRIG_OFF) |
1078 | { | 1110 | { |
1079 | peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h); | 1111 | peak_meter_draw_trig(LCD_WIDTH - TRIG_WIDTH, 4 * h); |
1080 | FOR_NB_SCREENS(i){ | 1112 | for(i = 0; i < screen_update; i++){ |
1081 | screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h, | 1113 | screens[i].update_rect(LCD_WIDTH - (TRIG_WIDTH + 2), 4 * h, |
1082 | TRIG_WIDTH + 2, TRIG_HEIGHT); | 1114 | TRIG_WIDTH + 2, TRIG_HEIGHT); |
1083 | } | 1115 | } |