LCDproc development and user support list

Text archives Help


[Lcdproc] improved imon hbars


Chronological Thread 
  • From: aeriksson2 at fastmail.fm (aeriksson2 at fastmail.fm)
  • Subject: [Lcdproc] improved imon hbars
  • Date: Sun, 11 Jan 2009 15:24:55 +0100


I've created this patch to the imon driver.
Effectively, it uses the vbar characters to paint the non-full cell.
Apart from a different look, it actually gets more info onto the display.

Any interest in integrating it?

--- lcdproc-0.5.2/server/drivers/imon.c 2007-04-14 16:38:14.000000000 +0200
+++ lcdproc-0.5.2_new/server/drivers/imon.c 2009-01-11 15:11:48.000000000
+0100
@@ -393,18 +393,13 @@
if (x + pos > p->width)
return;

- if (pixels >= p->cellwidth * 3/4) {
+ if (pixels >= p->cellwidth ) {
/* write a "full" block to the screen... */
imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED);
}
- else if (pixels >= p->cellwidth * 2/4) {
- /* write a partial block... */
- imon_chr(drvthis, x+pos, y, IMON_CHAR_PLAY);
- break;
- }
- else if (pixels >= p->cellwidth * 1/4) {
- /* write a partial block... */
- imon_chr(drvthis, x+pos, y, '>');
+ else if (pixels >= 1) {
+ /* write a partial block, albeit vertically... */
+ imon_chr(drvthis, x+pos, y, pixels * p->cellheight /
p->cellwidth);
break;
}
else {







  • [Lcdproc] improved imon hbars, aeriksson2 at fastmail.fm, 01/11/2009

Archive powered by MHonArc 2.6.18.

Top of page