From 7232c2e56053c95a9c54b8f24f241df40adfead6 Mon Sep 17 00:00:00 2001 From: Jonathan Massot Date: Tue, 4 Jul 2023 11:10:36 +0800 Subject: [PATCH] lcd graph fix --- lcd/lcd_graph.tbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcd/lcd_graph.tbs b/lcd/lcd_graph.tbs index 99a689f..7e6f51e 100644 --- a/lcd/lcd_graph.tbs +++ b/lcd/lcd_graph.tbs @@ -56,9 +56,9 @@ sub lcd_draw_graph() if max > 0 then for i=0 to max x1 = (i * lcd_graph_step) / 100 + LCD_GRAPH_X - y1 = lcd_graph_zero - lcd_graph_points(i) * lcd_graph_ratio + LCD_GRAPH_Y + y1 = lcd_graph_zero - lcd_graph_points(i) * lcd_graph_ratio x2 = ((i + 1) * lcd_graph_step) / 100 + LCD_GRAPH_X - y2 = lcd_graph_zero - lcd_graph_points(i + 1) * lcd_graph_ratio + LCD_GRAPH_Y + y2 = lcd_graph_zero - lcd_graph_points(i + 1) * lcd_graph_ratio if y1 <= lcd_graph_draw_min_y AND y2 <= lcd_graph_draw_min_y AND y1 >= lcd_graph_draw_max_y AND y2 >= lcd_graph_draw_max_y then lcd.forecolor=LCD_GRAPH_FORECOLOR lcd.line(x1, y1, x2, y2)