From: Leszek100tka <ha...@10...> - 2006-10-13 11:30:04
|
Hello, I have a 20x4 lcd display (of course hd44780), my config looks like something here below (I know that it should be written in a different way, but now i really dont know how:): Widget Load1 { class 'Text' expression loadavg(1) prefix 'Load: ' # postfix loadavg(1)>1.0?'!':' ' width 10 precision 2 align 'L' update tick } Widget Load2 { class 'Text' expression loadavg(2) prefix ' ' width 5 precision 2 align 'L' update tick } Widget Load3 { class 'Text' expression loadavg(3) # postfix loadavg(1)>1.0?'!':' ' width 5 prefix ' ' precision 2 align 'L' update tick } Widget Eth0r { class 'Text' expression (netdev('eth0', 'Rx_bytes', 500)/1024 prefix 'Rx: ' postfix ' ' width 10 precision 0 align 'R' update tick } Widget Eth0t { class 'Text' expression (netdev('eth0', 'Tx_bytes', 500)/1024 prefix 'Tx: ' postfix ' ' width 10 precision 0 align 'R' update tick } Widget Uptime { class 'Text' expression uptime('%d days %H:%M:%S') width 20 align 'R' prefix 'Up ' update 1000 } Layout L20x4 { Row1 { Col1 'Uptime' } Row2 { Col1 'Load1' Col11 'Load2' Col16 'Load3' } Row3 { # Col5 exec('cat /home/hardtmuth/my_files/temp_temp/lala, 1000) } Row4 { Col1 'Eth0r' Col11 'Eth0t' } } Display 'HD44780-generic' Layout 'L20x4' Variables { tick 500 tack 100 minute 60000 } and the problem is that there is something wrong with the first line on LCD. Now I have on the first line 12:07 some spaces and at the end of the line 6:03:15 (counting up - its uptime). I see that its really messed up, because there should be up days 0 6:03:15. When i`ve uncommented Row3 / Col5 with that exec formula, the uptime line is displayed correctly. Why there is some connections between I and III line? sometime i`ve noticed that when i start lcd4linux, the display looks good, then i restart lcd4linux and first line is messed up. Next i`ve problem with reading data from file, i`ve temperature in one file. I`m trying do read it with exec and cat, no results only some garbage: sh: -c: line 1: syntax error near unexpected token `)' sh: -c: line 1: `cat /home/hardtmuth/my_files/temp_temp/temp_raw.txt, 1000)' exec error: could not read from pipe 'cat /home/hardtmuth/my_files/temp_temp/temp_raw.txt, 1000)': Success and doing this in a different way, by file::readline, i get: Evaluator: unknown function 'file::readline' in <file::readline('/home/hardtmuth/my_files/temp_temp/temp_raw.txt', 1000)> what am i doing wrong? Should I pass when i was compiling lcd4linux arguments with plugins to include or by default all plugins are compiled in? Sorry for huge post, but i think that posting in one huge post is better that few smaller :). Thanks for help. |