From 9502cdde6e83327e4620ee8d3ea269ab5f6c6ad8 Mon Sep 17 00:00:00 2001 From: mmdolze Date: Sat, 11 Apr 2009 18:48:13 +0000 Subject: [PATCH] Change hbars to make last char in-/decrease vertically --- ChangeLog | 1 + server/drivers/imon.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 805aa5a..2b784f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,6 +67,7 @@ v.0.5dev (ongoing development) + hd44780 driver: add lineaddress option to support ST7036 (Malte Poeggel) + lcdproc: Retrieve per CPU usage statistics on FreeBSD (M. Dolze) * Change drivers to start in background by default: bayrad, CFontz, ea65, glk + * imon driver: Change hbars to make last char in-/decrease vertically v.0.5.2 * fix switching on/off the Load screen in lcdproc client using the menu diff --git a/server/drivers/imon.c b/server/drivers/imon.c index 53bad97..fb21be6 100644 --- a/server/drivers/imon.c +++ b/server/drivers/imon.c @@ -399,6 +399,16 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil if (x + pos > p->width) return; +#ifndef IMON_HBARS_OLD + if (pixels >= p->cellwidth ) { + /* write a "full" block to the screen... */ + imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED); + } + else if (pixels >= 1) { + /* write a partial block, albeit vertically... */ + imon_chr(drvthis, x+pos, y, pixels * p->cellheight / p->cellwidth); + } +#else if (pixels >= p->cellwidth * 3/4) { /* write a "full" block to the screen... */ imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED); @@ -413,6 +423,7 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil imon_chr(drvthis, x+pos, y, '>'); break; } +#endif else { ; // write nothing (not even a space) }