aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drv_Cwlinux.c32
-rw-r--r--drv_USBLCD.c19
-rw-r--r--plugin_i2c_sensors.c10
3 files changed, 37 insertions, 24 deletions
diff --git a/drv_Cwlinux.c b/drv_Cwlinux.c
index 20b1175..8b6987d 100644
--- a/drv_Cwlinux.c
+++ b/drv_Cwlinux.c
@@ -1,4 +1,4 @@
-/* $Id: drv_Cwlinux.c,v 1.14 2004/06/05 06:41:39 reinelt Exp $
+/* $Id: drv_Cwlinux.c,v 1.15 2004/06/05 14:56:48 reinelt Exp $
*
* new style driver for Cwlinux display modules
*
@@ -23,6 +23,12 @@
*
*
* $Log: drv_Cwlinux.c,v $
+ * Revision 1.15 2004/06/05 14:56:48 reinelt
+ *
+ * Cwlinux splash screen fixed
+ * USBLCD splash screen fixed
+ * plugin_i2c qprintf("%f") replaced with snprintf()
+ *
* Revision 1.14 2004/06/05 06:41:39 reinelt
*
* chancged splash screen again
@@ -140,7 +146,7 @@ typedef struct {
static MODEL Models[] = {
{ 0x01, "CW1602", 2, 16, 5, 0, 1 },
- { 0x02, "CW12232", 4, 40, 6, 0, 2 },
+ { 0x02, "CW12232", 4, 20, 6, 0, 2 },
{ 0xff, "Unknown", -1, -1, -1, -1, -1 }
};
@@ -246,7 +252,7 @@ static int drv_CW_brightness (int brightness)
}
-static int drv_CW_start (char *section, int quiet)
+static int drv_CW_start (char *section)
{
int i;
char *model;
@@ -304,15 +310,6 @@ static int drv_CW_start (char *section, int quiet)
drv_CW_brightness(i);
}
- if (!quiet) {
- char buffer[40];
- qprintf(buffer, sizeof(buffer), "%s %s", Name, Models[Model].name);
- if (drv_generic_text_greet (buffer, "www.cwlinux.com")) {
- sleep (3);
- drv_CW_clear();
- }
- }
-
return 0;
}
@@ -382,7 +379,7 @@ int drv_CW_init (char *section, int quiet)
GOTO_COST = 3; // number of bytes a goto command requires
// start display
- if ((ret=drv_CW_start (section, quiet))!=0)
+ if ((ret=drv_CW_start (section))!=0)
return ret;
// real worker functions
@@ -397,6 +394,15 @@ int drv_CW_init (char *section, int quiet)
break;
}
+ if (!quiet) {
+ char buffer[40];
+ qprintf(buffer, sizeof(buffer), "%s %s", Name, Models[Model].name);
+ if (drv_generic_text_greet (buffer, "www.cwlinux.com")) {
+ sleep (3);
+ drv_CW_clear();
+ }
+ }
+
// initialize generic text driver
if ((ret=drv_generic_text_init(section, Name))!=0)
return ret;
diff --git a/drv_USBLCD.c b/drv_USBLCD.c
index 28d7d00..d7d05c5 100644
--- a/drv_USBLCD.c
+++ b/drv_USBLCD.c
@@ -1,4 +1,4 @@
-/* $Id: drv_USBLCD.c,v 1.8 2004/06/05 06:41:40 reinelt Exp $
+/* $Id: drv_USBLCD.c,v 1.9 2004/06/05 14:56:48 reinelt Exp $
*
* new style driver for USBLCD displays
*
@@ -26,6 +26,12 @@
*
*
* $Log: drv_USBLCD.c,v $
+ * Revision 1.9 2004/06/05 14:56:48 reinelt
+ *
+ * Cwlinux splash screen fixed
+ * USBLCD splash screen fixed
+ * plugin_i2c qprintf("%f") replaced with snprintf()
+ *
* Revision 1.8 2004/06/05 06:41:40 reinelt
*
* chancged splash screen again
@@ -143,6 +149,8 @@ static void drv_UL_command (unsigned char cmd)
static void drv_UL_clear (void)
{
drv_UL_command (0x01); // clear display
+ drv_UL_command (0x03); // return home
+ drv_UL_send(); // flush buffer
}
@@ -267,11 +275,8 @@ static int drv_UL_start (char *section, int quiet)
drv_UL_command (0x08); // Display off, cursor off, blink off
drv_UL_command (0x0c); // Display on, cursor off, blink off
drv_UL_command (0x06); // curser moves to right, no shift
- drv_UL_clear(); // clear display
- drv_UL_command (0x03); // return home
- // flush buffer
- drv_UL_send();
+ drv_UL_clear(); // clear display
if (!quiet) {
char buffer[40];
@@ -279,7 +284,6 @@ static int drv_UL_start (char *section, int quiet)
if (drv_generic_text_greet (buffer, "http://www.usblcd.de")) {
sleep (3);
drv_UL_clear();
- drv_UL_send();
}
}
@@ -400,9 +404,6 @@ int drv_UL_quit (void)
// say goodbye...
drv_generic_text_greet ("goodbye!", NULL);
-
- // flush buffer
- drv_UL_send();
debug ("closing port %s", Port);
close(usblcd_file);
diff --git a/plugin_i2c_sensors.c b/plugin_i2c_sensors.c
index 2dcea77..4f1e569 100644
--- a/plugin_i2c_sensors.c
+++ b/plugin_i2c_sensors.c
@@ -1,4 +1,4 @@
-/* $Id: plugin_i2c_sensors.c,v 1.16 2004/06/01 06:45:30 reinelt Exp $
+/* $Id: plugin_i2c_sensors.c,v 1.17 2004/06/05 14:56:48 reinelt Exp $
*
* I2C sensors plugin
*
@@ -23,6 +23,12 @@
*
*
* $Log: plugin_i2c_sensors.c,v $
+ * Revision 1.17 2004/06/05 14:56:48 reinelt
+ *
+ * Cwlinux splash screen fixed
+ * USBLCD splash screen fixed
+ * plugin_i2c qprintf("%f") replaced with snprintf()
+ *
* Revision 1.16 2004/06/01 06:45:30 reinelt
*
* some Fixme's processed
@@ -194,7 +200,7 @@ static int parse_i2c_sensors_sysfs(char *key)
!strncmp(key, "curr", 4) ||
!strncmp(key, "in", 2) ||
!strncmp(key, "vid", 3)) {
- qprintf(val, sizeof(val), "%f", strtod(buffer, NULL) / 1000.0);
+ snprintf(val, sizeof(val), "%f", strtod(buffer, NULL) / 1000.0);
} else {
qprintf(val, sizeof(val), "%s", buffer);
// we supress this nasty \n at the end