From: andy b. <sku...@ho...> - 2004-06-10 12:26:29
|
thanks - I just checked it out again from cvs, and it's all working OK, except the test widgets in lcd4linux.conf.sample should look like this: Widget BarTest { class 'Bar' # test::bar(barno,maxval,startval,delta) - move a test value between 0 and max. # delta= step to change value by each time it's read. # barno - ten different test bar values can be set up, with barno=0..9 # if delta=0, just returns the value of bar n instead of changing it. expression test::bar(0,100,50,1) expression2 test::bar(1,100,0,1) length 10 max 100 direction 'E' update 200 } Widget BarTestVal { class 'Text' expression test::bar(0,100,50,0) prefix 'Test ' width 9 update 200 } Widget LightningTest { class 'icon' speed 500 visible test::onoff(0) bitmap { row1 '...***' row2 '..***.' row3 '.***..' row4 '.****.' row5 '..**..' row6 '.**...' row7 '**....' row8 '*.....' } } >From: Michael Reinelt <re...@eu...> >To: andy baxter <sku...@ho...> >CC: lcd4linux-devel <lcd...@li...> >Subject: Re: test plugin code. >Date: Mon, 07 Jun 2004 09:03:48 +0200 > >Hi Andy, Hi List, > > >andy baxter wrote: > >>I've included a file 'plugin_test.c'. An earlier version was >>working OK, but >>I've changed it since so you can have more than one test bar, and I >>can't >>work out how i got it working. I added lines to plugin.c, >>configure.in, and >>plugins.m4 and ran autoconf and automake, which compiled and linked >>plugin_test, but it's saying it can't find the functions. > >I did add the plugin_test to plugin.c and Makefile.am. I did not add >any with/without-handling, because I consider this to abe a 'basic' >plugin (just like string, cfg, time, ...) > >Anyhow, I just checked it in, but did rename the functions to >test::bartest() and test::onoff() > >>I've also included part of my lcd4linux.conf, with demos of how to >>use the >>test plugin, plus a 'rain' icon. >Hey, I really like this 'rainy' icon! I added it to the >lcd4linux.conf.sample, same for the debug widgets > > >Here's a short description of the two test functions for other >readers here: > >>static void my_bartest (RESULT *result, RESULT *rbar, RESULT *rmax, >> RESULT *rstart, RESULT *rdelta) >>// used for testing bars - keeps values for a series of 10 bars, >>// which are incremented and decremented between 0 and rmax by >>// amount rdelta every time they are read. Starting value is >>rstart. >>// rbar gives the number of the test bar. > >>static void my_onofftest (RESULT *result, RESULT *arg1) >>// like above, but just switches a value between 1 and -1. Can use >>to test >>// visibility of icons. > >Funny, I needed such things since ever for testing bars. Why did >such a plugin never come to my mind? > > >bye, Michael > >-- >Michael Reinelt Tel: +43 676 >3079941 >Geisslergasse 4 Fax: +43 316 >692343 >A-8045 Graz, Austria e-mail: >re...@eu... _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger |