diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-04-27 19:28:49 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-04-27 19:28:49 +0200 |
commit | 4cd9f4d9071a672debd83b4cc1c5d57dc63b8549 (patch) | |
tree | 095c755ba2cc77198dfc85b45afd129b1e638d56 /contrib/picoLCD/lcd4linux.conf.mrtg | |
parent | 18590c85ce8d68b155828a4aa400105812aeb75d (diff) | |
parent | 181cec4348da40331b3e8ab365732c025ec149b2 (diff) | |
download | lcd4linux-4cd9f4d9071a672debd83b4cc1c5d57dc63b8549.tar.gz |
New upstream snapshot
Diffstat (limited to 'contrib/picoLCD/lcd4linux.conf.mrtg')
-rw-r--r-- | contrib/picoLCD/lcd4linux.conf.mrtg | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/contrib/picoLCD/lcd4linux.conf.mrtg b/contrib/picoLCD/lcd4linux.conf.mrtg new file mode 100644 index 0000000..b74506b --- /dev/null +++ b/contrib/picoLCD/lcd4linux.conf.mrtg @@ -0,0 +1,92 @@ +Display picoLCD { + Driver 'picoLCDGraphic' + Size '256x64' + Update 200 + Contrast 230 + Backlight 1 + Inverted 1 + Icons 1 +} + + +Variables { + n 0 + nkey 0 + currentImage 'http://192.168.12.113/mrtg/127.0.0.1_2-month.png' + mrtgDayImageURL 'http://192.168.12.113/mrtg/127.0.0.1_2-day.png' + mrtgWeekImageURL 'http://192.168.12.113/mrtg/127.0.0.1_2-week.png' + #currentFile '/tmp/127.0.0.1_2-day.png' + currentFile ' ' + tick 500 + tack 100 + minute 60000 +} + +Widget TimerW { + class 'Timer' + expression n=LCD::GPI(1);nkey=n!=0?n:nkey + active 1 + update 100 +} + + +# export PYTHONPATH which should point to the scripts usually /etc/picoLCDGraphic/Scripts +Widget MRTGMinute { + class 'Text' + expression currentFile=python::exec('mrtg', 'saveimage', currentImage) + width 42 + #update minute + update 100 +} + +Widget test { + class 'Text' + expression currentFile + width 42 + #update minute + update 100 +} + +# Python script will save the filename as taken from the URL above in the /etc/picoLCDGraphic/Images path +# Modify mrtg.py to save in another path and also change file tag below +Widget BandwidthImage { + class 'Image' + file currentFile + visible 1 + inverted 0 + reload 1 + #update minute + update 100 + #update tick +} + +Widget GPO_kup { + class 'GPO' + expression currentImage=nkey==5?mrtgDayImageURL:currentImage;nkey==5?1:0 + update 300 +} + + Widget GPO_kdown { + class 'GPO' + expression currentImage=nkey==7?mrtgWeekImageURL:currentImage;nkey==7?1:0 + update 300 +} + + +Layout picoLCD { + Row1 { + Col1 'MRTGMinute' + } + + Layer 1 { + X0.Y0 'BandwidthImage' + } + + Timer1 'TimerW' + GPO2 'GPO_kup' + GPO3 'GPO_kdown' + +} + +Display 'picoLCD' +Layout 'picoLCD' |