aboutsummaryrefslogtreecommitdiffstats
path: root/display.c
diff options
context:
space:
mode:
authorreinelt <>2000-03-13 15:58:24 +0000
committerreinelt <>2000-03-13 15:58:24 +0000
commitc97b6d95897c59e2098e45ee58aab61ec3703d22 (patch)
treec72c000f26428a310cd2778e7c301ca24e026e09 /display.c
parent4bb6b0d869fe0685a38ea33a5b0cd6e914aee1fe (diff)
downloadlcd4linux-c97b6d95897c59e2098e45ee58aab61ec3703d22.tar.gz
[lcd4linux @ 2000-03-13 15:58:24 by reinelt]
release 0.9 moved row parsing to parser.c all basic work finished
Diffstat (limited to 'display.c')
-rw-r--r--display.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/display.c b/display.c
index e3f6aee..e00f791 100644
--- a/display.c
+++ b/display.c
@@ -1,4 +1,4 @@
-/* $Id: display.c,v 1.4 2000/03/10 17:36:02 reinelt Exp $
+/* $Id: display.c,v 1.5 2000/03/13 15:58:24 reinelt Exp $
*
* framework for device drivers
*
@@ -20,6 +20,12 @@
*
*
* $Log: display.c,v $
+ * Revision 1.5 2000/03/13 15:58:24 reinelt
+ *
+ * release 0.9
+ * moved row parsing to parser.c
+ * all basic work finished
+ *
* Revision 1.4 2000/03/10 17:36:02 reinelt
*
* first unstable but running release
@@ -59,6 +65,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <math.h>
#include "cfg.h"
#include "display.h"
@@ -118,6 +125,12 @@ int lcd_bar (int type, int row, int col, int max, int len1, int len2)
{
if (row<1 || row>Display->rows) return -1;
if (col<1 || col>Display->cols) return -1;
+ if (!(type & (BAR_H2 | BAR_V2))) len2=len1;
+ if (type & BAR_LOG) {
+ type &= ~BAR_LOG;
+ len1=(double)max*log(len1+1)/log(max);
+ len2=(double)max*log(len2+1)/log(max);
+ }
return Display->bar(type, row-1, col-1, max, len1, len2);
}