summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-29 23:50:07 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-29 23:50:07 +0000
commit4fd9038d35707104804a068af0ed1d35d467a1f2 (patch)
tree3cf81195173e1b6ac5d5e12bc308ae621d9c6621
parent0acc2c5955b2ae88ddeb318903135638256164fc (diff)
downloadrockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.tar.gz
rockbox-4fd9038d35707104804a068af0ed1d35d467a1f2.zip
pitch_detector: fix builds on monochrome targets, remove an unused variable
Add icons for Clip, copied from c200 icons git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25397 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/SOURCES2
-rw-r--r--apps/plugins/bitmaps/native/pitch_notes.128x64x1.bmpbin0 -> 10294 bytes
-rw-r--r--apps/plugins/pitch_detector.c18
-rw-r--r--manual/plugins/main.tex2
5 files changed, 15 insertions, 9 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))
43pitch_detector.c 43pitch_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
863pitch_notes.132x80x16.bmp 863pitch_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)
865pitch_notes.128x96x2.bmp 865pitch_notes.128x96x2.bmp
866#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 64)
867pitch_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 */
292static unsigned back_color, front_color; 292#if LCD_DEPTH > 1
293static unsigned front_color;
294#endif
293static int font_w,font_h; 295static int font_w,font_h;
294static int bar_x_0; 296static int bar_x_0;
295static int lbl_x_minus_50, lbl_x_minus_20, lbl_x_0, lbl_x_20, lbl_x_50; 297static 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)
610void print_int_xy(int x, int y, int v) 612void 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 */
620void print_str(char* s) 623void 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;
diff --git a/manual/plugins/main.tex b/manual/plugins/main.tex
index 4952f4e26d..01e676339d 100644
--- a/manual/plugins/main.tex
+++ b/manual/plugins/main.tex
@@ -228,7 +228,7 @@ option from the \setting{Context Menu} (see \reference{ref:Contextmenu}).}
228 228
229{\input{plugins/metronome.tex}} 229{\input{plugins/metronome.tex}}
230 230
231\opt{swcodec}{\opt{recording_mic}{\opt{lcd_color}{\input{plugins/pitch_detector.tex}}}} 231\opt{swcodec}{\opt{recording_mic}{\input{plugins/pitch_detector.tex}}}
232 232
233{\input{plugins/random_folder_advance_config.tex}} 233{\input{plugins/random_folder_advance_config.tex}}
234 234