aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drv_Crystalfontz.c61
-rw-r--r--drv_HD44780.c53
-rw-r--r--drv_MatrixOrbital.c51
-rw-r--r--drv_generic_text.c76
-rw-r--r--drv_generic_text.h39
-rw-r--r--lcd4linux.conf.sample99
-rw-r--r--widget_icon.c10
-rw-r--r--widget_icon.h6
8 files changed, 270 insertions, 125 deletions
diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c
index 112119d..c4a856f 100644
--- a/drv_Crystalfontz.c
+++ b/drv_Crystalfontz.c
@@ -1,4 +1,4 @@
-/* $Id: drv_Crystalfontz.c,v 1.3 2004/01/23 04:53:34 reinelt Exp $
+/* $Id: drv_Crystalfontz.c,v 1.4 2004/01/23 07:04:03 reinelt Exp $
*
* new style driver for Crystalfontz display modules
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_Crystalfontz.c,v $
+ * Revision 1.4 2004/01/23 07:04:03 reinelt
+ * icons finished!
+ *
* Revision 1.3 2004/01/23 04:53:34 reinelt
* icon widget added (not finished yet!)
*
@@ -53,8 +56,8 @@
#include "plugin.h"
#include "widget.h"
#include "widget_text.h"
-#include "widget_bar.h"
#include "widget_icon.h"
+#include "widget_bar.h"
#include "drv.h"
#include "drv_generic_text.h"
#include "drv_generic_serial.h"
@@ -110,7 +113,7 @@ static void drv_CF_goto (int row, int col)
}
-static void drv_CF_define_char (int ascii, char *buffer)
+static void drv_CF_defchar (int ascii, char *buffer)
{
char cmd[2]="\031n"; // set custom char bitmap
@@ -206,23 +209,9 @@ static void plugin_backlight (RESULT *result, RESULT *arg1)
// *** widget callbacks ***
// ****************************************
-
-int drv_CF_draw_text (WIDGET *W)
-{
- return drv_generic_text_draw_text(W, 4, drv_CF_goto, drv_generic_serial_write);
-}
-
-
-int drv_CF_draw_icon (WIDGET *W)
-{
- return drv_generic_text_draw_icon(W, drv_CF_define_char, drv_CF_goto, drv_generic_serial_write);
-}
-
-
-int drv_CF_draw_bar (WIDGET *W)
-{
- return drv_generic_text_draw_bar(W, 4, drv_CF_define_char, drv_CF_goto, drv_generic_serial_write);
-}
+// using drv_generic_text_draw(W)
+// using drv_generic_text_icon_draw(W)
+// using drv_generic_text_bar_draw(W)
// ****************************************
@@ -248,11 +237,19 @@ int drv_CF_init (char *section)
WIDGET_CLASS wc;
int ret;
- XRES=6; // pixel width of one char
- YRES=8; // pixel height of one char
- CHARS=8; // number of user-defineable chars
- CHAR0=128; // ascii of first user-defineable chars
-
+ // display preferences
+ XRES = 6; // pixel width of one char
+ YRES = 8; // pixel height of one char
+ CHARS = 8; // number of user-defineable characters
+ CHAR0 = 128; // ASCII of first user-defineable char
+ GOTO_COST = 3; // number of bytes a goto command requires
+
+ // real worker functions
+ drv_generic_text_real_write = drv_generic_serial_write;
+ drv_generic_text_real_goto = drv_CF_goto;
+ drv_generic_text_real_defchar = drv_CF_defchar;
+
+
// start display
if ((ret=drv_CF_start (section))!=0)
return ret;
@@ -274,17 +271,17 @@ int drv_CF_init (char *section)
// register text widget
wc=Widget_Text;
- wc.draw=drv_CF_draw_text;
- widget_register(&wc);
-
- // register bar widget
- wc=Widget_Bar;
- wc.draw=drv_CF_draw_bar;
+ wc.draw=drv_generic_text_draw;
widget_register(&wc);
// register icon widget
wc=Widget_Icon;
- wc.draw=drv_CF_draw_icon;
+ wc.draw=drv_generic_text_icon_draw;
+ widget_register(&wc);
+
+ // register bar widget
+ wc=Widget_Bar;
+ wc.draw=drv_generic_text_bar_draw;
widget_register(&wc);
// register plugins
diff --git a/drv_HD44780.c b/drv_HD44780.c
index 8fffb5b..60092f9 100644
--- a/drv_HD44780.c
+++ b/drv_HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: drv_HD44780.c,v 1.4 2004/01/23 04:53:48 reinelt Exp $
+/* $Id: drv_HD44780.c,v 1.5 2004/01/23 07:04:17 reinelt Exp $
*
* new style driver for HD44780-based displays
*
@@ -29,6 +29,9 @@
*
*
* $Log: drv_HD44780.c,v $
+ * Revision 1.5 2004/01/23 07:04:17 reinelt
+ * icons finished!
+ *
* Revision 1.4 2004/01/23 04:53:48 reinelt
* icon widget added (not finished yet!)
*
@@ -69,6 +72,7 @@
#include "plugin.h"
#include "widget.h"
#include "widget_text.h"
+#include "widget_icon.h"
#include "widget_bar.h"
#include "drv.h"
#include "drv_generic_text.h"
@@ -101,7 +105,6 @@ static char Name[]="HD44780";
static int Bits=0;
-static int GPO=0;
static int Controllers = 0;
static int Controller = 0;
@@ -113,6 +116,8 @@ static unsigned char SIGNAL_GPO;
// Fixme
static int GPOS;
+// static int GPO=0;
+
// ****************************************
// *** hardware dependant functions ***
@@ -371,7 +376,7 @@ static void drv_HD_write (char *string, int len)
}
-static void drv_HD_define_char (int ascii, char *buffer)
+static void drv_HD_defchar (int ascii, char *buffer)
{
// define chars on *both* controllers!
drv_HD_command (0x03, 0x40|8*ascii, T_EXEC);
@@ -408,16 +413,9 @@ static void drv_HD_setGPO (int bits)
// ****************************************
-int drv_HD_draw_text (WIDGET *W)
-{
- return drv_generic_text_draw_text(W, 2, drv_HD_goto, drv_HD_write);
-}
-
-
-int drv_HD_draw_bar (WIDGET *W)
-{
- return drv_generic_text_draw_bar(W, 2, drv_HD_define_char, drv_HD_goto, drv_HD_write);
-}
+// using drv_generic_text_draw(W)
+// using drv_generic_text_icon_draw(W)
+// using drv_generic_text_bar_draw(W)
// ****************************************
@@ -440,11 +438,19 @@ int drv_HD_init (char *section)
int asc255bug;
int ret;
- XRES=5; // pixel width of one char
- YRES=8; // pixel height of one char
- CHARS=8; // number of user-defineable chars
- CHAR0=0; // ascii of first user-defineable chars
+ // display preferences
+ XRES = 5; // pixel width of one char
+ YRES = 8; // pixel height of one char
+ CHARS = 8; // number of user-defineable characters
+ CHAR0 = 0; // ASCII of first user-defineable char
+ GOTO_COST = 2; // number of bytes a goto command requires
+ // real worker functions
+ drv_generic_text_real_write = drv_HD_write;
+ drv_generic_text_real_goto = drv_HD_goto;
+ drv_generic_text_real_defchar = drv_HD_defchar;
+
+
// start display
if ((ret=drv_HD_start (section))!=0)
return ret;
@@ -453,6 +459,10 @@ int drv_HD_init (char *section)
if ((ret=drv_generic_text_init(section, Name))!=0)
return ret;
+ // initialize generic icon driver
+ if ((ret=drv_generic_text_icon_init())!=0)
+ return ret;
+
// initialize generic bar driver
if ((ret=drv_generic_text_bar_init())!=0)
return ret;
@@ -468,12 +478,17 @@ int drv_HD_init (char *section)
// register text widget
wc=Widget_Text;
- wc.draw=drv_HD_draw_text;
+ wc.draw=drv_generic_text_draw;
+ widget_register(&wc);
+
+ // register icon widget
+ wc=Widget_Icon;
+ wc.draw=drv_generic_text_icon_draw;
widget_register(&wc);
// register bar widget
wc=Widget_Bar;
- wc.draw=drv_HD_draw_bar;
+ wc.draw=drv_generic_text_bar_draw;
widget_register(&wc);
// register plugins
diff --git a/drv_MatrixOrbital.c b/drv_MatrixOrbital.c
index 7549502..dfa2ee2 100644
--- a/drv_MatrixOrbital.c
+++ b/drv_MatrixOrbital.c
@@ -1,4 +1,4 @@
-/* $Id: drv_MatrixOrbital.c,v 1.17 2004/01/23 04:53:50 reinelt Exp $
+/* $Id: drv_MatrixOrbital.c,v 1.18 2004/01/23 07:04:22 reinelt Exp $
*
* new style driver for Matrix Orbital serial display modules
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_MatrixOrbital.c,v $
+ * Revision 1.18 2004/01/23 07:04:22 reinelt
+ * icons finished!
+ *
* Revision 1.17 2004/01/23 04:53:50 reinelt
* icon widget added (not finished yet!)
*
@@ -112,6 +115,7 @@
#include "plugin.h"
#include "widget.h"
#include "widget_text.h"
+#include "widget_icon.h"
#include "widget_bar.h"
#include "drv.h"
#include "drv_generic_text.h"
@@ -183,7 +187,7 @@ static void drv_MO_goto (int row, int col)
}
-static void drv_MO_define_char (int ascii, char *buffer)
+static void drv_MO_defchar (int ascii, char *buffer)
{
char cmd[3]="\376N";
@@ -419,17 +423,9 @@ static void plugin_rpm (RESULT *result, RESULT *arg1)
// *** widget callbacks ***
// ****************************************
-
-int drv_MO_draw_text (WIDGET *W)
-{
- return drv_generic_text_draw_text(W, 5, drv_MO_goto, drv_generic_serial_write);
-}
-
-
-int drv_MO_draw_bar (WIDGET *W)
-{
- return drv_generic_text_draw_bar(W, 5, drv_MO_define_char, drv_MO_goto, drv_generic_serial_write);
-}
+// using drv_generic_text_draw(W)
+// using drv_generic_text_icon_draw(W)
+// using drv_generic_text_bar_draw(W)
// ****************************************
@@ -455,11 +451,19 @@ int drv_MO_init (char *section)
WIDGET_CLASS wc;
int ret;
- XRES=5; // pixel width of one char
- YRES=8; // pixel height of one char
- CHARS=8; // number of user-defineable chars
- CHAR0=0; // ascii of first user-defineable chars
+ // display preferences
+ XRES=5; // pixel width of one char
+ YRES=8; // pixel height of one char
+ CHARS=8; // number of user-defineable characters
+ CHAR0=0; // ASCII of first user-defineable char
+ GOTO_COST=4; // number of bytes a goto command requires
+ // real worker functions
+ drv_generic_text_real_write = drv_generic_serial_write;
+ drv_generic_text_real_goto = drv_MO_goto;
+ drv_generic_text_real_defchar = drv_MO_defchar;
+
+
// start display
if ((ret=drv_MO_start (section))!=0)
return ret;
@@ -468,6 +472,10 @@ int drv_MO_init (char *section)
if ((ret=drv_generic_text_init(section, Name))!=0)
return ret;
+ // initialize generic icon driver
+ if ((ret=drv_generic_text_icon_init())!=0)
+ return ret;
+
// initialize generic bar driver
if ((ret=drv_generic_text_bar_init())!=0)
return ret;
@@ -478,12 +486,17 @@ int drv_MO_init (char *section)
// register text widget
wc=Widget_Text;
- wc.draw=drv_MO_draw_text;
+ wc.draw=drv_generic_text_draw;
+ widget_register(&wc);
+
+ // register icon widget
+ wc=Widget_Icon;
+ wc.draw=drv_generic_text_icon_draw;
widget_register(&wc);
// register bar widget
wc=Widget_Bar;
- wc.draw=drv_MO_draw_bar;
+ wc.draw=drv_generic_text_bar_draw;
widget_register(&wc);
// register plugins
diff --git a/drv_generic_text.c b/drv_generic_text.c
index ebc8559..9609373 100644
--- a/drv_generic_text.c
+++ b/drv_generic_text.c
@@ -1,4 +1,4 @@
-/* $Id: drv_generic_text.c,v 1.5 2004/01/23 04:53:54 reinelt Exp $
+/* $Id: drv_generic_text.c,v 1.6 2004/01/23 07:04:23 reinelt Exp $
*
* generic driver helper for text-based displays
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_text.c,v $
+ * Revision 1.6 2004/01/23 07:04:23 reinelt
+ * icons finished!
+ *
* Revision 1.5 2004/01/23 04:53:54 reinelt
* icon widget added (not finished yet!)
*
@@ -93,16 +96,18 @@ static char *Driver=NULL;
int DROWS, DCOLS; // display size
int LROWS, LCOLS; // layout size
int XRES, YRES; // pixels of one char cell
+int GOTO_COST; // number of bytes a goto command requires
int CHARS, CHAR0; // number of user-defineable characters, ASCII of first char
int ICONS; // number of user-defineable characters reserved for icons
-char *LayoutFB = NULL;
-char *DisplayFB = NULL;
-static BAR *BarFB = NULL;
+
+static char *LayoutFB = NULL;
+static char *DisplayFB = NULL;
static int nSegment=0;
static int fSegment=0;
static SEGMENT Segment[128];
+static BAR *BarFB = NULL;
@@ -169,9 +174,7 @@ void drv_generic_text_resizeFB (int rows, int cols)
-int drv_generic_text_draw_text (WIDGET *W, int goto_len,
- void (*drv_goto)(int row, int col),
- void (*drv_write)(char *buffer, int len))
+int drv_generic_text_draw (WIDGET *W)
{
WIDGET_TEXT *Text=W->data;
char *txt, *fb1, *fb2;
@@ -196,19 +199,19 @@ int drv_generic_text_draw_text (WIDGET *W, int goto_len,
for (; col<=end && col<DCOLS; col++) {
int pos1, pos2, equal;
if (fb1[col]==fb2[col]) continue;
- drv_goto (row, col);
+ drv_generic_text_real_goto (row, col);
for (pos1=col, pos2=pos1, col++, equal=0; col<=end && col<DCOLS; col++) {
if (fb1[col]==fb2[col]) {
// If we find just one equal byte, we don't break, because this
// would require a goto, which takes several bytes, too.
- if (++equal>goto_len) break;
+ if (++equal>GOTO_COST) break;
} else {
pos2=col;
equal=0;
}
}
- memcpy (fb2+pos1, fb1+pos1, pos2-pos1+1);
- drv_write (fb2+pos1, pos2-pos1+1);
+ memcpy (fb2+pos1, fb1+pos1, pos2-pos1+1);
+ drv_generic_text_real_write (fb2+pos1, pos2-pos1+1);
}
}
@@ -220,11 +223,9 @@ int drv_generic_text_draw_text (WIDGET *W, int goto_len,
// *** generic icon handling ***
// ****************************************
-int drv_generic_text_draw_icon (WIDGET *W,
- void (*drv_defchar)(int ascii, char *buffer),
- void (*drv_goto)(int row, int col),
- void (*drv_write)(char *buffer, int len))
+int drv_generic_text_icon_draw (WIDGET *W)
{
+ static int icon_counter=0;
WIDGET_ICON *Icon = W->data;
int row, col;
@@ -234,11 +235,35 @@ int drv_generic_text_draw_icon (WIDGET *W,
// maybe grow layout framebuffer
drv_generic_text_resizeFB (row+1, col+1);
+ // icon deactivated?
+ if (Icon->ascii==-2) return 0;
+
+ // ASCII already assigned?
+ if (Icon->ascii==-1) {
+ if (icon_counter>=ICONS) {
+ error ("cannot process icon '%s': out of icons", W->name);
+ Icon->ascii=-2;
+ return -1;
+ }
+ icon_counter++;
+ Icon->ascii=CHAR0+CHARS-icon_counter;
+ }
+
// maybe redefine icon
if (Icon->curmap!=Icon->prvmap) {
- debug ("Michi: I'm redefining me...");
+ drv_generic_text_real_defchar(Icon->ascii, Icon->bitmap+YRES*Icon->curmap);
}
+
+ // transfer icon into layout buffer
+ LayoutFB[row*LCOLS+col]=Icon->ascii;
+ // maybe send icon to the display
+ if (DisplayFB[row*DCOLS+col]!=Icon->ascii) {
+ DisplayFB[row*DCOLS+col]=Icon->ascii;
+ drv_generic_text_real_goto (row, col);
+ drv_generic_text_real_write (DisplayFB+row*DCOLS+col, 1);
+ }
+
return 0;
}
@@ -462,7 +487,7 @@ static void drv_generic_text_bar_pack_segments (void)
}
-static void drv_generic_text_bar_define_chars (void(*defchar)(int ascii, char *matrix))
+static void drv_generic_text_bar_define_chars(void)
{
int c, i, j;
char buffer[8];
@@ -507,15 +532,12 @@ static void drv_generic_text_bar_define_chars (void(*defchar)(int ascii, char *m
}
break;
}
- defchar(CHAR0+c, buffer);
+ drv_generic_text_real_defchar(CHAR0+c, buffer);
}
}
-int drv_generic_text_draw_bar (WIDGET *W, int goto_len,
- void (*drv_defchar)(int ascii, char *buffer),
- void (*drv_goto)(int row, int col),
- void (*drv_write)(char *buffer, int len))
+int drv_generic_text_bar_draw (WIDGET *W)
{
WIDGET_BAR *Bar = W->data;
int row, col, len, res, max, val1, val2;
@@ -552,7 +574,7 @@ int drv_generic_text_draw_bar (WIDGET *W, int goto_len,
// process all bars
drv_generic_text_bar_create_segments ();
drv_generic_text_bar_pack_segments ();
- drv_generic_text_bar_define_chars(drv_defchar);
+ drv_generic_text_bar_define_chars();
// reset usage flags
for (s=0; s<nSegment; s++) {
@@ -580,19 +602,19 @@ int drv_generic_text_draw_bar (WIDGET *W, int goto_len,
for (col=0; col<DCOLS; col++) {
int pos1, pos2, equal;
if (LayoutFB[row*LCOLS+col]==DisplayFB[row*DCOLS+col]) continue;
- drv_goto (row, col);
+ drv_generic_text_real_goto (row, col);
for (pos1=col, pos2=pos1, col++, equal=0; col<DCOLS; col++) {
if (LayoutFB[row*LCOLS+col]==DisplayFB[row*DCOLS+col]) {
// If we find just one equal byte, we don't break, because this
// would require a goto, which takes several bytes, too.
- if (++equal>goto_len) break;
+ if (++equal>GOTO_COST) break;
} else {
pos2=col;
equal=0;
}
}
- memcpy (DisplayFB+row*DCOLS+pos1, LayoutFB+row*LCOLS+pos1, pos2-pos1+1);
- drv_write (DisplayFB+row*DCOLS+pos1, pos2-pos1+1);
+ memcpy (DisplayFB+row*DCOLS+pos1, LayoutFB+row*LCOLS+pos1, pos2-pos1+1);
+ drv_generic_text_real_write (DisplayFB+row*DCOLS+pos1, pos2-pos1+1);
}
}
diff --git a/drv_generic_text.h b/drv_generic_text.h
index 46e93d6..dbdd9ba 100644
--- a/drv_generic_text.h
+++ b/drv_generic_text.h
@@ -1,4 +1,4 @@
-/* $Id: drv_generic_text.h,v 1.3 2004/01/23 04:53:55 reinelt Exp $
+/* $Id: drv_generic_text.h,v 1.4 2004/01/23 07:04:24 reinelt Exp $
*
* generic driver helper for text-based displays
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_generic_text.h,v $
+ * Revision 1.4 2004/01/23 07:04:24 reinelt
+ * icons finished!
+ *
* Revision 1.3 2004/01/23 04:53:55 reinelt
* icon widget added (not finished yet!)
*
@@ -54,32 +57,26 @@
extern int DROWS, DCOLS; // display size
extern int LROWS, LCOLS; // layout size
-extern int XRES, YRES; // pixels of one char cell
+extern int XRES, YRES; // pixel width/height of one char
+extern int GOTO_COST; // number of bytes a goto command requires
extern int CHARS, CHAR0; // number of user-defineable characters, ASCII of first char
extern int ICONS; // number of user-defineable characters reserved for icons
-extern char *LayoutFB;
-extern char *DisplayFB;
-
-
-int drv_generic_text_init (char *section, char *driver);
+// these functions must be implemented by the real driver
+void (*drv_generic_text_real_goto)(int row, int col);
+void (*drv_generic_text_real_write)(char *buffer, int len);
+void (*drv_generic_text_real_defchar)(int ascii, char *buffer);
-void drv_generic_text_resizeFB (int rows, int cols);
-int drv_generic_text_draw_text (WIDGET *W, int goto_len,
- void (*drv_goto)(int row, int col),
- void (*drv_write)(char *buffer, int len));
-
-int drv_generic_text_icon_init (void);
-
-int drv_generic_text_bar_init (void);
+int drv_generic_text_init (char *section, char *driver);
+void drv_generic_text_resizeFB (int rows, int cols);
+int drv_generic_text_draw (WIDGET *W);
+int drv_generic_text_icon_init (void);
+int drv_generic_text_icon_draw (WIDGET *W);
+int drv_generic_text_bar_init (void);
void drv_generic_text_bar_add_segment (int val1, int val2, DIRECTION dir, int ascii);
-int drv_generic_text_draw_bar (WIDGET *W, int goto_len,
- void (*drv_defchar)(int ascii, char *buffer),
- void (*drv_goto)(int row, int col),
- void (*drv_write)(char *buffer, int len));
-
-int drv_generic_text_quit (void);
+int drv_generic_text_bar_draw (WIDGET *W);
+int drv_generic_text_quit (void);
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index fda6b67..76a55d1 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -9,7 +9,7 @@ Display LK204 {
Display CF632 {
- Icons 2
+ Icons 7
Driver 'Crystalfontz'
Model '632'
Port '/dev/tts/0'
@@ -104,7 +104,7 @@ Widget LoadBar {
Widget Heartbeat {
class 'Icon'
- speed 100
+ speed 800
Bitmap {
Row1 '.....|.....'
Row2 '.*.*.|.*.*.'
@@ -117,6 +117,91 @@ Widget Heartbeat {
}
}
+Widget EKG {
+ class 'Icon'
+ speed 50
+ Bitmap {
+ Row1 '.....|.....|.....|.....|.....|.....|.....|.....'
+ Row2 '.....|....*|...*.|..*..|.*...|*....|.....|.....'
+ Row3 '.....|....*|...*.|..*..|.*...|*....|.....|.....'
+ Row4 '.....|....*|...**|..**.|.**..|**...|*....|.....'
+ Row5 '.....|....*|...**|..**.|.**..|**...|*....|.....'
+ Row6 '.....|....*|...*.|..*.*|.*.*.|*.*..|.*...|*....'
+ Row7 '*****|*****|****.|***..|**..*|*..**|..***|.****'
+ Row8 '.....|.....|.....|.....|.....|.....|.....|.....'
+ }
+}
+Widget Karo {
+ class 'Icon'
+ speed 200
+ Bitmap {
+ Row1 '.....|.....|.....|.....|..*..|.....|.....|.....'
+ Row2 '.....|.....|.....|..*..|.*.*.|..*..|.....|.....'
+ Row3 '.....|.....|..*..|.*.*.|*...*|.*.*.|..*..|.....'
+ Row4 '.....|..*..|.*.*.|*...*|.....|*...*|.*.*.|..*..'
+ Row5 '.....|.....|..*..|.*.*.|*...*|.*.*.|..*..|.....'
+ Row6 '.....|.....|.....|..*..|.*.*.|..*..|.....|.....'
+ Row7 '.....|.....|.....|.....|..*..|.....|.....|.....'
+ Row8 '.....|.....|.....|.....|.....|.....|.....|.....'
+ }
+}
+Widget Heart {
+ class 'Icon'
+ speed 250
+ Bitmap {
+ Row1 '.....|.....|.....|.....|.....|.....'
+ Row2 '.*.*.|.....|.*.*.|.....|.....|.....'
+ Row3 '*****|.*.*.|*****|.*.*.|.*.*.|.*.*.'
+ Row4 '*****|.***.|*****|.***.|.***.|.***.'
+ Row5 '.***.|.***.|.***.|.***.|.***.|.***.'
+ Row6 '.***.|..*..|.***.|..*..|..*..|..*..'
+ Row7 '..*..|.....|..*..|.....|.....|.....'
+ Row8 '.....|.....|.....|.....|.....|.....'
+ }
+}
+Widget Blob {
+ class 'Icon'
+ speed 250
+ Bitmap {
+ Row1 '.....|.....|.....'
+ Row2 '.....|.....|.***.'
+ Row3 '.....|.***.|*...*'
+ Row4 '..*..|.*.*.|*...*'
+ Row5 '.....|.***.|*...*'
+ Row6 '.....|.....|.***.'
+ Row7 '.....|.....|.....'
+ Row8 '.....|.....|.....'
+ }
+}
+Widget Wave {
+ class 'Icon'
+ speed 100
+ Bitmap {
+ Row1 '..**.|.**..|**...|*....|.....|.....|.....|.....|....*|...**'
+ Row2 '.*..*|*..*.|..*..|.*...|*....|.....|.....|....*|...*.|..*..'
+ Row3 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...'
+ Row4 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...'
+ Row5 '*....|....*|...*.|..*..|.*...|*....|....*|...*.|..*..|.*...'
+ Row6 '.....|.....|....*|...*.|..*..|.*..*|*..*.|..*..|.*...|*....'
+ Row7 '.....|.....|.....|....*|...**|..**.|.**..|**...|*....|.....'
+ Row8 '.....|.....|.....|.....|.....|.....|.....|.....|.....|.....'
+ }
+}
+Widget Squirrel {
+ class 'Icon'
+ speed 100
+ Bitmap {
+ Row1 '.....|.....|.....|.....|.....|.....'
+ Row2 '.....|.....|.....|.....|.....|.....'
+ Row3 '.....|.....|.....|.....|.....|.....'
+ Row4 '**...|.**..|..**.|...**|....*|.....'
+ Row5 '*****|*****|*****|*****|*****|*****'
+ Row6 '...**|..**.|.**..|**...|*....|.....'
+ Row7 '.....|.....|.....|.....|.....|.....'
+ Row8 '.....|.....|.....|.....|.....|.....'
+ }
+}
+
Layout Default {
Row1 {
@@ -139,12 +224,16 @@ Layout Default {
Layout L16x2 {
Row1 {
Col1 'Busy'
- Col10 'Heartbeat'
Col11 'BusyBar'
}
Row2 {
- Col1 'Load'
- Col11 'LoadBar'
+ Col1 'Heartbeat'
+ Col2 'EKG'
+ Col3 'Karo'
+ Col4 'Heart'
+ Col5 'Blob'
+ Col6 'Wave'
+ Col7 'Squirrel'
}
}
diff --git a/widget_icon.c b/widget_icon.c
index e30fbfe..4cae01a 100644
--- a/widget_icon.c
+++ b/widget_icon.c
@@ -1,4 +1,4 @@
-/* $Id: widget_icon.c,v 1.1 2004/01/23 04:54:03 reinelt Exp $
+/* $Id: widget_icon.c,v 1.2 2004/01/23 07:04:39 reinelt Exp $
*
* icon widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_icon.c,v $
+ * Revision 1.2 2004/01/23 07:04:39 reinelt
+ * icons finished!
+ *
* Revision 1.1 2004/01/23 04:54:03 reinelt
* icon widget added (not finished yet!)
*
@@ -153,6 +156,11 @@ int widget_icon_init (WIDGET *Self)
// The timer will be reactivated on every call to widget_icon_update().
// We do the initial call here...
Icon->prvmap=-1;
+
+ // reset ascii
+ Icon->ascii=-1;
+
+ // just do it!
widget_icon_update(Self);
return 0;
diff --git a/widget_icon.h b/widget_icon.h
index 88bad6c..7bae55a 100644
--- a/widget_icon.h
+++ b/widget_icon.h
@@ -1,4 +1,4 @@
-/* $Id: widget_icon.h,v 1.1 2004/01/23 04:54:04 reinelt Exp $
+/* $Id: widget_icon.h,v 1.2 2004/01/23 07:04:39 reinelt Exp $
*
* icon widget handling
*
@@ -23,6 +23,9 @@
*
*
* $Log: widget_icon.h,v $
+ * Revision 1.2 2004/01/23 07:04:39 reinelt
+ * icons finished!
+ *
* Revision 1.1 2004/01/23 04:54:04 reinelt
* icon widget added (not finished yet!)
*
@@ -35,6 +38,7 @@
typedef struct WIDGET_ICON {
char *speed_expr; // expression for update interval
int speed; // update interval (msec)
+ int ascii; // ascii code of icon (depends on the driver)
int curmap; // current bitmap sequence
int prvmap; // previous bitmap sequence
int maxmap; // number of bitmap sequences