From 85b59eac525be21de66fbf7ca4039af5048bad23 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 12 Jul 2019 11:37:51 +0200 Subject: [PATCH] =?utf8?q?=20fix=20display=20bug=20below=200=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- atmega32u4/cooler/cooler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/atmega32u4/cooler/cooler.c b/atmega32u4/cooler/cooler.c index ae8ff3c..d2163a7 100644 --- a/atmega32u4/cooler/cooler.c +++ b/atmega32u4/cooler/cooler.c @@ -57,9 +57,10 @@ void draw(void) { else lcd_use_foreground(colors[0]); uint16_t y = values[i][p]; + y = y + 20*16; //plus 20K to have positive values at minimum y = y*3; y >>= 5; - y = 190-y; + y = 220-y; //190 + 30 for correction if(yMINY-1) { lcd_set_pixel_col_xy(c+1,y,background); lcd_set_pixel_col_xy(c+1,y+1,background); @@ -530,4 +531,4 @@ __attribute__((naked)) int main(void) { } } } - \ No newline at end of file + -- 2.43.0