diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp | bin | 0 -> 10294 bytes | |||
-rw-r--r-- | apps/plugins/pitch_detector.c | 18 |
4 files changed, 14 insertions, 8 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index a74b8be537..88ddff5e29 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -39,7 +39,7 @@ crypt_firmware.c | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \ | 41 | #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && \ |
42 | (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN)) && defined(HAVE_LCD_COLOR) | 42 | (defined(HAVE_LINE_IN) || defined(HAVE_MIC_IN)) |
43 | pitch_detector.c | 43 | pitch_detector.c |
44 | #endif | 44 | #endif |
45 | 45 | ||
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index f5d61b85f0..a064e16589 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES | |||
@@ -863,6 +863,8 @@ pitch_notes.160x128x2.bmp | |||
863 | pitch_notes.132x80x16.bmp | 863 | pitch_notes.132x80x16.bmp |
864 | #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 2) | 864 | #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 2) |
865 | pitch_notes.128x96x2.bmp | 865 | pitch_notes.128x96x2.bmp |
866 | #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 64) | ||
867 | pitch_notes.128x64x1.bmp | ||
866 | #else | 868 | #else |
867 | #error Pitch Detector: unsupported LCD | 869 | #error Pitch Detector: unsupported LCD |
868 | #endif | 870 | #endif |
diff --git a/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp b/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp new file mode 100644 index 0000000000..b97bbb100a --- /dev/null +++ b/apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c index 5f375d1007..10125c1302 100644 --- a/apps/plugins/pitch_detector.c +++ b/apps/plugins/pitch_detector.c | |||
@@ -289,7 +289,9 @@ static const struct note_entry notes[] = | |||
289 | }; | 289 | }; |
290 | 290 | ||
291 | /* GUI */ | 291 | /* GUI */ |
292 | static unsigned back_color, front_color; | 292 | #if LCD_DEPTH > 1 |
293 | static unsigned front_color; | ||
294 | #endif | ||
293 | static int font_w,font_h; | 295 | static int font_w,font_h; |
294 | static int bar_x_0; | 296 | static int bar_x_0; |
295 | static int lbl_x_minus_50, lbl_x_minus_20, lbl_x_0, lbl_x_20, lbl_x_50; | 297 | static int lbl_x_minus_50, lbl_x_minus_20, lbl_x_0, lbl_x_20, lbl_x_50; |
@@ -610,8 +612,9 @@ fixed log(fixed inp) | |||
610 | void print_int_xy(int x, int y, int v) | 612 | void print_int_xy(int x, int y, int v) |
611 | { | 613 | { |
612 | char temp[20]; | 614 | char temp[20]; |
613 | 615 | #if LCD_DEPTH > 1 | |
614 | rb->lcd_set_foreground(front_color); | 616 | rb->lcd_set_foreground(front_color); |
617 | #endif | ||
615 | rb->snprintf(temp,20,"%d",v); | 618 | rb->snprintf(temp,20,"%d",v); |
616 | rb->lcd_putsxy(x,y,temp); | 619 | rb->lcd_putsxy(x,y,temp); |
617 | } | 620 | } |
@@ -619,7 +622,9 @@ void print_int_xy(int x, int y, int v) | |||
619 | /* Print out the frequency etc */ | 622 | /* Print out the frequency etc */ |
620 | void print_str(char* s) | 623 | void print_str(char* s) |
621 | { | 624 | { |
625 | #if LCD_DEPTH > 1 | ||
622 | rb->lcd_set_foreground(front_color); | 626 | rb->lcd_set_foreground(front_color); |
627 | #endif | ||
623 | rb->lcd_putsxy(0, HZ_Y, s); | 628 | rb->lcd_putsxy(0, HZ_Y, s); |
624 | } | 629 | } |
625 | 630 | ||
@@ -630,7 +635,9 @@ void print_char_xy(int x, int y, char c) | |||
630 | 635 | ||
631 | temp[0]=c; | 636 | temp[0]=c; |
632 | temp[1]=0; | 637 | temp[1]=0; |
638 | #if LCD_DEPTH > 1 | ||
633 | rb->lcd_set_foreground(front_color); | 639 | rb->lcd_set_foreground(front_color); |
640 | #endif | ||
634 | 641 | ||
635 | rb->lcd_putsxy(x, y, temp); | 642 | rb->lcd_putsxy(x, y, temp); |
636 | } | 643 | } |
@@ -674,8 +681,6 @@ void draw_bar(fixed wrong_by_cents) | |||
674 | rb->lcd_set_foreground(LCD_RGBPACK(255,255,255)); /* Color screens */ | 681 | rb->lcd_set_foreground(LCD_RGBPACK(255,255,255)); /* Color screens */ |
675 | #elif LCD_DEPTH > 1 | 682 | #elif LCD_DEPTH > 1 |
676 | rb->lcd_set_foreground(LCD_BLACK); /* Greyscale screens */ | 683 | rb->lcd_set_foreground(LCD_BLACK); /* Greyscale screens */ |
677 | #else | ||
678 | rb->lcd_set_foreground(LCD_BLACK); /* Black and white screens */ | ||
679 | #endif | 684 | #endif |
680 | 685 | ||
681 | rb->lcd_hline(0,LCD_WIDTH-1, BAR_HLINE_Y); | 686 | rb->lcd_hline(0,LCD_WIDTH-1, BAR_HLINE_Y); |
@@ -700,8 +705,6 @@ void draw_bar(fixed wrong_by_cents) | |||
700 | rb->lcd_set_foreground(LCD_RGBPACK(255,0,0)); /* Color screens */ | 705 | rb->lcd_set_foreground(LCD_RGBPACK(255,0,0)); /* Color screens */ |
701 | #elif LCD_DEPTH > 1 | 706 | #elif LCD_DEPTH > 1 |
702 | rb->lcd_set_foreground(LCD_DARKGRAY); /* Greyscale screens */ | 707 | rb->lcd_set_foreground(LCD_DARKGRAY); /* Greyscale screens */ |
703 | #else | ||
704 | rb->lcd_set_foreground(LCD_BLACK); /* Black and white screens */ | ||
705 | #endif | 708 | #endif |
706 | 709 | ||
707 | if (fp_gt(wrong_by_cents, FP_ZERO)) | 710 | if (fp_gt(wrong_by_cents, FP_ZERO)) |
@@ -1109,8 +1112,9 @@ void init_everything(void) | |||
1109 | rb->pcm_init_recording(); | 1112 | rb->pcm_init_recording(); |
1110 | 1113 | ||
1111 | /* GUI */ | 1114 | /* GUI */ |
1112 | back_color = rb->lcd_get_background(); | 1115 | #if LCD_DEPTH > 1 |
1113 | front_color = rb->lcd_get_foreground(); | 1116 | front_color = rb->lcd_get_foreground(); |
1117 | #endif | ||
1114 | rb->lcd_getstringsize("X", &font_w, &font_h); | 1118 | rb->lcd_getstringsize("X", &font_w, &font_h); |
1115 | 1119 | ||
1116 | bar_x_0 = LCD_WIDTH / 2; | 1120 | bar_x_0 = LCD_WIDTH / 2; |