/* $Id$ * $URL$ * * LED matrix driver for LCD4Linux * (see http://www.harbaum.org/till/ledmatrix for hardware) * * Copyright (C) 2006 Till Harbaum * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: drv_LEDMatrix.c,v $ * Revision 1.10 2006/09/07 09:06:25 reinelt * lots of wrong printf formats corrected (thanks to Ernst Bachmann) * * Revision 1.9 2006/08/14 19:24:22 harbaum * Umlaut support, added KVV HTTP-User-Agent * * Revision 1.8 2006/08/14 05:54:04 reinelt * minor warnings fixed, CFLAGS changed (no-strict-aliasing) * * 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 * * Revision 1.5 2006/08/13 09:53:10 reinelt * dynamic properties added (used by 'style' of text widget) * * Revision 1.4 2006/08/13 06:46:51 reinelt * T6963 soft-timing & enhancements; indent * * Revision 1.3 2006/08/09 17:25:34 harbaum * Better bar color support and new bold font * * Revision 1.2 2006/08/08 20:16:28 harbaum * Added "extracolor" (used for e.g. bar border) and RGB support for LEDMATRIX * * Revision 1.1 2006/08/05 21:08:01 harbaum * New LEDMATRIX driver (see http://www.harbaum.org/till/ledmatrix) * * */ /* * * exported fuctions: * * struct DRIVER drv_LEDMatrix * */ /* * Options: * IPAddress */ #include "config.h" #include #include #include #include #include #include #include #include /* include network specific headers */ #include #include #include #include #include #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "plugin.h" #include "widget.h" #include "widget_text.h" #include "widget_icon.h" #include "widget_bar.h" #include "drv.h" #include "drv_generic_graphic.h" // display command bytes #define DSP_CMD_ECHO 0 #define DSP_CMD_NOP 1 #define DSP_CMD_IMAGE 2 #define DSP_CMD_ACK 3 #define DSP_CMD_IR 4 #define DSP_CMD_BEEP 5 #define DSP_DEFAULT_PORT 4711 #define DSP_MEM (80 * 32 * 2 / 8) #define DEFAULT_X_OFFSET 1 // with a font width of 6 static char Name[] = "LEDMatrix"; static char *IPAddress = NULL; static int sock = -1; static struct sockaddr_in dsp_addr; static unsigned char tx_buffer[DSP_MEM + 1]; static int port = DSP_DEFAULT_PORT; static void drv_LEDMatrix_blit(const int row, const int col, const int height, const int width) { int r, c, i; fd_set rfds; struct timeval tv; unsigned char reply[256]; struct sockaddr_in cli_addr; socklen_t fromlen; int ack = 0; int timeout = 10; for (r = row; r < row + height; r++) { for (c = col; c < col + width; c++) { /* LEDMATRIX supports three colors: 10b =
#!/bin/sh

for f in $@
do /usr/X11R6/bin/convert  -geomtry 702x576 $f test.mpg
test_video test.mpg
rm test.mpg
done