]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2006-08-13 18:45:25 by harbaum]
authorharbaum <harbaum@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 13 Aug 2006 18:45:25 +0000 (18:45 +0000)
committerharbaum <harbaum@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Sun, 13 Aug 2006 18:45:25 +0000 (18:45 +0000)
Little cleanup ...

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@693 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

drv_LEDMatrix.c
plugin_kvv.c

index f6fdee390bf5389d15b5bb7cece34a016574261a..2df74fdf1b697ee6c2f9c7088639e6b47b2bf69b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: drv_LEDMatrix.c,v 1.6 2006/08/13 18:14:03 harbaum Exp $
+/* $Id: drv_LEDMatrix.c,v 1.7 2006/08/13 18:45:25 harbaum Exp $
  *
  * LED matrix driver for LCD4Linux 
  * (see http://www.harbaum.org/till/ledmatrix for hardware)
@@ -23,6 +23,9 @@
  *
  *
  * $Log: drv_LEDMatrix.c,v $
+ * Revision 1.7  2006/08/13 18:45:25  harbaum
+ * Little cleanup ...
+ *
  * Revision 1.6  2006/08/13 18:14:03  harbaum
  * Added KVV plugin
  *
@@ -151,7 +154,7 @@ static void drv_LEDMatrix_blit(const int row, const int col, const int height, c
 
        // wait 1 sec for ack
        if ((i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) < 0) {
-           perror("select");
+           info("%s: Select error: %s", Name, strerror(errno));
        }
 
        if (FD_ISSET(sock, &rfds)) {
@@ -159,14 +162,14 @@ static void drv_LEDMatrix_blit(const int row, const int col, const int height, c
            fromlen = sizeof(dsp_addr);
            i = recvfrom(sock, reply, sizeof(reply), 0, (struct sockaddr *) &cli_addr, &fromlen);
            if (i < 0) {
-               perror("recvfrom");
+               info("%s: Receive error: %s", Name, strerror(errno));
            } else {
                if ((i == 2) && (reply[0] == DSP_CMD_ACK) && (reply[1] == DSP_CMD_IMAGE)) {
                    ack = 1;
 //      } else if((i > 1) && (reply[0] == DSP_CMD_IR)) {
 //        ir_receive(reply+1, i-1);
                } else {
-                   fprintf(stderr, "Unexpected reply message\n");
+                   info("%s: Unexpected reply message", Name);
                }
            }
        }
index 9db66749e2d506fb3d64cd018a65f706b14cb837..ec068daa1bc7ace1d6174b062e2c9767b62ebf6d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: plugin_kvv.c,v 1.1 2006/08/13 18:14:03 harbaum Exp $
+/* $Id: plugin_kvv.c,v 1.2 2006/08/13 18:45:25 harbaum Exp $
  *
  * plugin kvv (karlsruher verkehrsverbund)
  *
@@ -23,6 +23,9 @@
  *
  *
  * $Log: plugin_kvv.c,v $
+ * Revision 1.2  2006/08/13 18:45:25  harbaum
+ * Little cleanup ...
+ *
  * Revision 1.1  2006/08/13 18:14:03  harbaum
  * Added KVV plugin
  *
@@ -576,7 +579,7 @@ static void kvv_line(RESULT * result, RESULT * arg1)
     if (index < shm->entries) {
        SetResult(&result, R_STRING, shm->entry[index].line);
     } else
-       SetResult(&result, R_STRING, "---");
+       SetResult(&result, R_STRING, "");
 
     mutex_unlock(mutex);
 }
@@ -590,7 +593,7 @@ static void kvv_station(RESULT * result, RESULT * arg1)
     if (index < shm->entries)
        SetResult(&result, R_STRING, shm->entry[index].station);
     else
-       SetResult(&result, R_STRING, "---");
+       SetResult(&result, R_STRING, "");
 
     mutex_unlock(mutex);
 }
@@ -621,7 +624,7 @@ static void kvv_time_str(RESULT * result, RESULT * arg1)
        sprintf(str, "%d", shm->entry[index].time);
        SetResult(&result, R_STRING, str);
     } else
-       SetResult(&result, R_STRING, "---");
+       SetResult(&result, R_STRING, "");
 
     mutex_unlock(mutex);
 }