From 37880ee9ec6225e8e6eea44782f4eeff708e1d17 Mon Sep 17 00:00:00 2001 From: "bsongis@gmail.com" Date: Mon, 6 May 2013 05:28:38 +0000 Subject: [PATCH] Issue 25 fixed --- src/menu_model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu_model.cpp b/src/menu_model.cpp index f1ae3d90b..2976537f2 100644 --- a/src/menu_model.cpp +++ b/src/menu_model.cpp @@ -2066,7 +2066,7 @@ void DrawFunction(FnFuncP fn, uint8_t offset=0) uint8_t prev_yv = 255; for (int8_t xv=-WCHART; xv<=WCHART; xv++) { - uint8_t yv = (LCD_H-1) - (((int16_t)RESX + fn(xv * (RESX/WCHART))) / 2 * (LCD_H-1) / RESX); + uint8_t yv = (LCD_H-1) - (((uint16_t)RESX + fn(xv * (RESX/WCHART))) / 2 * (LCD_H-1) / RESX); if (prev_yv != 255) { if (abs((int8_t)yv-prev_yv) <= 1) { lcd_plot(X0+xv-offset-1, prev_yv, FORCE);