From ee8a91ebd4f7e919db0fc79df25fa164e4d43eb6 Mon Sep 17 00:00:00 2001 From: yylyyl Date: Tue, 23 Sep 2014 21:48:07 +0800 Subject: lcd2usb doesn't need Device to be specified, also fix traffic display --- config/lcdproc-dev/lcdproc.inc | 5 +++-- config/lcdproc-dev/lcdproc_client.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 00768cd7..5664461d 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -308,7 +308,8 @@ $config_text .= "[{$lcdproc_config['driver']}]\n"; $config_text .= "driverpath=/usr/local/lib/lcdproc/\n"; $config_text .= "ConnectionType={$lcdproc_config['connection_type']}\n"; - $config_text .= "Device={$realport}\n"; + if($realport != "none") + $config_text .= "Device={$realport}\n"; $config_text .= "Port=0x378\n"; $config_text .= "Speed=0\n"; $config_text .= "Keypad=yes\n"; @@ -502,7 +503,7 @@ EOD; restart_service(LCDPROC_SERVICE_NAME); } } - if((! $lcdproc_config['driver']) || ($lcdproc_config['comport'] == "none")) { + if((! $lcdproc_config['driver']) || (! $lcdproc_config['comport'])) { /* no parameters user does not want lcdproc running */ /* lets stop the service and remove the rc file */ if(file_exists(LCDPROC_RCFILE)) { diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php index 5306c903..922ed14e 100644 --- a/config/lcdproc-dev/lcdproc_client.php +++ b/config/lcdproc-dev/lcdproc_client.php @@ -554,11 +554,11 @@ /* format speed in bits/sec, input: bytes/sec Code from: graph.php ported to PHP*/ if ($speed < 125000) - {return sprintf("%3d.1 Kbps", $speed / 125);} + {return sprintf("%5.1f Kbps", $speed / 125);} if ($speed < 125000000) - {return sprintf("%3d.1 Mbps", $speed / 125000);} + {return sprintf("%5.1f Mbps", $speed / 125000);} // else - return sprintf("%3d.1 Gbps", $speed / 125000000); + return sprintf("%5.1f Gbps", $speed / 125000000); } function add_summary_declaration(&$lcd_cmds, $name) { -- cgit v1.2.3 From b4fc0e917211d634d5ead3859f767c5c0d49f2b5 Mon Sep 17 00:00:00 2001 From: yylyyl Date: Tue, 23 Sep 2014 22:40:26 +0800 Subject: it's $lcdproc_config['comport'] that can be "none" but $realport --- config/lcdproc-dev/lcdproc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index 5664461d..73827721 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -308,7 +308,7 @@ $config_text .= "[{$lcdproc_config['driver']}]\n"; $config_text .= "driverpath=/usr/local/lib/lcdproc/\n"; $config_text .= "ConnectionType={$lcdproc_config['connection_type']}\n"; - if($realport != "none") + if($lcdproc_config['comport'] != "none") $config_text .= "Device={$realport}\n"; $config_text .= "Port=0x378\n"; $config_text .= "Speed=0\n"; -- cgit v1.2.3 From c84b249f0065959601e02b2717745b91c5b59728 Mon Sep 17 00:00:00 2001 From: yylyyl Date: Tue, 23 Sep 2014 22:52:35 +0800 Subject: version bump --- pkg_config.10.xml | 2 +- pkg_config.8.xml | 2 +- pkg_config.8.xml.amd64 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg_config.10.xml b/pkg_config.10.xml index bb594d46..bb6680b8 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1004,7 +1004,7 @@ LCD display driver - Development version http://www.lcdproc.org/ Utility - lcdproc-0.5.6 pkg v. 0.9.9 + lcdproc-0.5.6 pkg v. 0.9.10 BETA 2.2 michele@nt2.it diff --git a/pkg_config.8.xml b/pkg_config.8.xml index b1cbf799..6cb45fb6 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1278,7 +1278,7 @@ LCD display driver - Development version http://www.lcdproc.org/ Utility - lcdproc-0.5.6 pkg v. 0.9.9 + lcdproc-0.5.6 pkg v. 0.9.10 BETA 2.0 michele@nt2.it diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 085493c2..c9b192e2 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1265,7 +1265,7 @@ LCD display driver - Development version http://www.lcdproc.org/ Utility - lcdproc-0.5.6 pkg v. 0.9.9 + lcdproc-0.5.6 pkg v. 0.9.10 BETA 2.0 michele@nt2.it -- cgit v1.2.3