From: Benjamin K. <bk...@em...> - 2006-07-17 19:26:43
|
On Monday 17 July 2006 11:54, Michael Reinelt wrote: > Hi Benjamin, > > > I have an icon to indicate whether my PPP connection is up or not. I'd > > also like to regulate the speed of the icon. In my lcd4linux.conf, I > > have: > > > > Widget PPPSpeed { > > class 'Timer' > > expression pppspeed = (1/((netdev('ppp0', 'Rx_bytes', 1000) + > > netdev('ppp0', 'Rx_bytes', 1000))/99999)) > > update 100 > > } > > > > > > Widget Arrow { > > class 'Icon' > > speed pppspeed > > visible exec('/sbin/ifconfig | grep ppp | wc -l', 1000) > > Bitmap { > > Row1 '...' > > } > > } > > > > ...But this doesn't work. How should I be doing this? Is it even > > possible? > > Hmmm... Took me some time to understand what you're doing, but I think I > got it now: pppspeed is a variable... > > I just checked the code: the 'speed' attribute of the icon widget is > evaluated on every call. So it *should* work... > > You could try to use the variable in another test widget, formatted as a > number, just to check if it's evaluated correctly. I tried doing that...and got a segfault. :) It seems I'm always pushing lcd4linux to the limit. I've attached the output of a strace, please let me know if there's anything else I could provide. -Ben |