Import Upstream version 1.9.5.2
This commit is contained in:
1 parent
9602397440
commit
18176a4efe
51 files changed
+46043
-361
No files matched your search
@@ -15,9 +15,9 @@
|
||||
along with g15daemon; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
(c) 2006 Mike Lampard, Philip Lawatsch, and others
|
||||
(c) 2006-2008 Mike Lampard, Philip Lawatsch, and others
|
||||
|
||||
$Revision: 290 $ - $Date: 2007-09-08 08:50:33 +0200 (Sat, 08 Sep 2007) $ $Author: mlampard $
|
||||
$Revision: 391 $ - $Date: 2008-01-02 17:02:46 +1030 (Wed, 02 Jan 2008) $ $Author: mlampard $
|
||||
|
||||
simple Clock plugin, replace the various functions with your own, and change the g15plugin_info struct below to suit,
|
||||
edit Makefile.am and compile. Add salt and pepper to taste. For a more advanced plugin that creates it's own lcd screens on-the-fly,
|
||||
@@ -61,7 +61,7 @@ g15canvas *static_canvas = NULL;
|
||||
//----------------------------------------------------------------------------
|
||||
// calc x,y for given minute/hour/sec (pos), cut_off is for radius variations
|
||||
// ( ie. shorter/longer clock-hands, line parts....)
|
||||
void get_clock_pos(int pos, int *x, int *y, int cut_off)
|
||||
static void get_clock_pos(int pos, int *x, int *y, int cut_off)
|
||||
{
|
||||
// pos = [0-60]
|
||||
|
||||
@@ -86,7 +86,7 @@ void get_clock_pos(int pos, int *x, int *y, int cut_off)
|
||||
//----------------------------------------------------------------------------
|
||||
// draw clock frame (only once, as it is stored in static_canvas)
|
||||
// NOTE - coords here are hardcoded !
|
||||
void draw_static_canvas(void)
|
||||
static void draw_static_canvas(void)
|
||||
{
|
||||
g15canvas *c = static_canvas;
|
||||
int i;
|
||||
@@ -282,7 +282,7 @@ static int lcdclock(lcd_t *lcd)
|
||||
ret = draw_analog(canvas);
|
||||
|
||||
memcpy (lcd->buf, canvas->buffer, G15_BUFFER_LEN);
|
||||
lcd->ident = random();
|
||||
g15daemon_send_refresh(lcd);
|
||||
free(canvas);
|
||||
return G15_PLUGIN_OK;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user