From: Jan Michel Date: Fri, 12 Jul 2019 09:37:51 +0000 (+0200) Subject: fix display bug below 0° X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=85b59eac525be21de66fbf7ca4039af5048bad23;p=avr.git fix display bug below 0° --- 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 +