diff options
Diffstat (limited to 'apps/recorder/peakmeter.c')
-rw-r--r-- | apps/recorder/peakmeter.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index 8fffc9500d..779200cb85 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -938,8 +938,7 @@ void peak_meter_draw(int x, int y, int width, int height) | |||
938 | /* draw left */ | 938 | /* draw left */ |
939 | lcd_fillrect (x, y, left, height / 2 - 2 ); | 939 | lcd_fillrect (x, y, left, height / 2 - 2 ); |
940 | if (peak_meter_max_l > 0) { | 940 | if (peak_meter_max_l > 0) { |
941 | lcd_drawline(x + peak_meter_max_l, y, | 941 | lcd_vline(x + peak_meter_max_l, y, y + height / 2 - 2 ); |
942 | x + peak_meter_max_l, y + height / 2 - 2 ); | ||
943 | } | 942 | } |
944 | if (peak_meter_l_clip) { | 943 | if (peak_meter_l_clip) { |
945 | lcd_fillrect(x + meterwidth, y, 3, height / 2 - 1); | 944 | lcd_fillrect(x + meterwidth, y, 3, height / 2 - 1); |
@@ -948,17 +947,15 @@ void peak_meter_draw(int x, int y, int width, int height) | |||
948 | /* draw right */ | 947 | /* draw right */ |
949 | lcd_fillrect(x, y + height / 2 + 1, right, height / 2 - 2); | 948 | lcd_fillrect(x, y + height / 2 + 1, right, height / 2 - 2); |
950 | if (peak_meter_max_r > 0) { | 949 | if (peak_meter_max_r > 0) { |
951 | lcd_drawline( x + peak_meter_max_r, y + height / 2, | 950 | lcd_vline( x + peak_meter_max_r, y + height / 2, y + height - 2); |
952 | x + peak_meter_max_r, y + height - 2); | ||
953 | } | 951 | } |
954 | if (peak_meter_r_clip) { | 952 | if (peak_meter_r_clip) { |
955 | lcd_fillrect(x + meterwidth, y + height / 2, 3, height / 2 - 1); | 953 | lcd_fillrect(x + meterwidth, y + height / 2, 3, height / 2 - 1); |
956 | } | 954 | } |
957 | 955 | ||
958 | /* draw scale end */ | 956 | /* draw scale end */ |
959 | lcd_drawline(x + meterwidth, y, | 957 | lcd_vline(x + meterwidth, y, y + height - 2); |
960 | x + meterwidth, y + height - 2); | 958 | |
961 | |||
962 | lcd_set_drawmode(DRMODE_COMPLEMENT); | 959 | lcd_set_drawmode(DRMODE_COMPLEMENT); |
963 | /* draw dots for scale marks */ | 960 | /* draw dots for scale marks */ |
964 | for (i = 0; i < db_scale_count; i++) { | 961 | for (i = 0; i < db_scale_count; i++) { |
@@ -976,12 +973,12 @@ void peak_meter_draw(int x, int y, int width, int height) | |||
976 | ycenter = y + height / 2; | 973 | ycenter = y + height / 2; |
977 | /* display threshold value */ | 974 | /* display threshold value */ |
978 | start_trigx = x+peak_meter_scale_value(trig_strt_threshold,meterwidth); | 975 | start_trigx = x+peak_meter_scale_value(trig_strt_threshold,meterwidth); |
979 | lcd_drawline(start_trigx, ycenter - 2, start_trigx, ycenter); | 976 | lcd_vline(start_trigx, ycenter - 2, ycenter); |
980 | start_trigx ++; | 977 | start_trigx ++; |
981 | if (start_trigx < LCD_WIDTH) lcd_drawpixel(start_trigx, ycenter - 1); | 978 | if (start_trigx < LCD_WIDTH) lcd_drawpixel(start_trigx, ycenter - 1); |
982 | 979 | ||
983 | stop_trigx = x + peak_meter_scale_value(trig_stp_threshold,meterwidth); | 980 | stop_trigx = x + peak_meter_scale_value(trig_stp_threshold,meterwidth); |
984 | lcd_drawline(stop_trigx, ycenter - 2, stop_trigx, ycenter); | 981 | lcd_vline(stop_trigx, ycenter - 2, ycenter); |
985 | if (stop_trigx > 0) lcd_drawpixel(stop_trigx - 1, ycenter - 1); | 982 | if (stop_trigx > 0) lcd_drawpixel(stop_trigx - 1, ycenter - 1); |
986 | } | 983 | } |
987 | #endif | 984 | #endif |
@@ -1196,7 +1193,7 @@ bool peak_meter_histogram(void) { | |||
1196 | 1193 | ||
1197 | for (i = 0; i < PEEKS_PER_DRAW_SIZE; i++) { | 1194 | for (i = 0; i < PEEKS_PER_DRAW_SIZE; i++) { |
1198 | x = peeks_per_redraw[i] * (LCD_WIDTH - 1)/ max; | 1195 | x = peeks_per_redraw[i] * (LCD_WIDTH - 1)/ max; |
1199 | lcd_drawline(0, y + i, x, y + i); | 1196 | lcd_hline(0, x, y + i); |
1200 | } | 1197 | } |
1201 | 1198 | ||
1202 | y = PEEKS_PER_DRAW_SIZE + 1; | 1199 | y = PEEKS_PER_DRAW_SIZE + 1; |
@@ -1208,7 +1205,7 @@ bool peak_meter_histogram(void) { | |||
1208 | 1205 | ||
1209 | for (i = 0; i < TICKS_PER_DRAW_SIZE; i++) { | 1206 | for (i = 0; i < TICKS_PER_DRAW_SIZE; i++) { |
1210 | x = ticks_per_redraw[i] * (LCD_WIDTH - 1)/ max; | 1207 | x = ticks_per_redraw[i] * (LCD_WIDTH - 1)/ max; |
1211 | lcd_drawline(0, y + i, x, y + i); | 1208 | lcd_hline(0, x, y + i); |
1212 | } | 1209 | } |
1213 | lcd_update(); | 1210 | lcd_update(); |
1214 | 1211 | ||