aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/lcdproc-dev/lcdproc.xml2
-rw-r--r--config/lcdproc-dev/lcdproc_client.php40
-rw-r--r--config/lcdproc-dev/lcdproc_screens.xml5
-rw-r--r--pkg_config.8.xml3
-rw-r--r--pkg_config.8.xml.amd643
5 files changed, 36 insertions, 17 deletions
diff --git a/config/lcdproc-dev/lcdproc.xml b/config/lcdproc-dev/lcdproc.xml
index c5040451..da97b2bf 100644
--- a/config/lcdproc-dev/lcdproc.xml
+++ b/config/lcdproc-dev/lcdproc.xml
@@ -224,7 +224,7 @@
</option>
<option>
<value>nexcom</value>
- <name>nexcom</name>
+ <name>nexcom (x86 only)</name>
</option>
<option>
<value>NoritakeVFD</value>
diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php
index 526aee00..5c0edb77 100644
--- a/config/lcdproc-dev/lcdproc_client.php
+++ b/config/lcdproc-dev/lcdproc_client.php
@@ -138,6 +138,13 @@
return($status);
}
+ function get_version() {
+ global $g;
+ $version = @file_get_contents("/etc/version");
+ $version = trim($version);
+ return("{$g['product_name']} {$version}");
+ }
+
function get_cpufrequency(){
$cpufreqs = "";
exec("/sbin/sysctl -n dev.cpu.0.freq_levels", $cpufreqs);
@@ -473,19 +480,20 @@
$lcd_cmds = array();
$lcd_cmds[] = "hello";
$lcd_cmds[] = "client_set name pfSense";
- $lcd_cmds[] = "screen_add welcome_scr";
- $lcd_cmds[] = "screen_set welcome_scr heartbeat off";
- $lcd_cmds[] = "screen_set welcome_scr name welcome";
- $lcd_cmds[] = "screen_set welcome_scr duration $refresh_frequency";
- $lcd_cmds[] = "widget_add welcome_scr title_wdgt title";
- $lcd_cmds[] = "widget_add welcome_scr text_wdgt scroller";
- add_summary_declaration($lcd_cmds, "welcome_scr");
-
+
/* process screens to display */
if(is_array($lcdproc_screens_config)) {
foreach($lcdproc_screens_config as $name => $screen) {
if($screen == "on") {
switch($name) {
+ case "scr_version":
+ $lcd_cmds[] = "screen_add $name";
+ $lcd_cmds[] = "screen_set $name heartbeat off";
+ $lcd_cmds[] = "screen_set $name name $name";
+ $lcd_cmds[] = "screen_set $name duration $refresh_frequency";
+ $lcd_cmds[] = "widget_add $name title_wdgt string";
+ $lcd_cmds[] = "widget_add $name text_wdgt scroller";
+ break;
case "scr_time":
$lcd_cmds[] = "screen_add $name";
$lcd_cmds[] = "screen_set $name heartbeat off";
@@ -607,8 +615,6 @@
if(empty($g['product_name'])) {
$g['product_name'] = "pfSense";
}
- $version = @file_get_contents("/etc/version");
- $version = trim($version);
$refresh_frequency = get_lcdpanel_refresh_frequency();
/* keep a counter to see how many times we can loop */
$i = 1;
@@ -622,9 +628,9 @@
$lcd_summary_data = "";}
$lcd_cmds = array();
- $lcd_cmds[] = "widget_set welcome_scr title_wdgt \"Welcome to\"";
- $lcd_cmds[] = "widget_set welcome_scr text_wdgt 1 2 $lcdpanel_width 2 h 2 \"{$g['product_name']} {$version}\"";
- add_summary_values($lcd_cmds, "welcome_scr", $lcd_summary_data, $lcdpanel_width);
+
+ /* initializes the widget counter */
+ $widget_counter = 0;
/* process screens to display */
foreach((array) $lcdproc_screens_config as $name => $screen) {
@@ -632,6 +638,11 @@
continue;
}
switch($name) {
+ case "scr_version":
+ $version = get_version();
+ $lcd_cmds[] = "widget_set $name title_wdgt 1 1 \"Welcome to\"";
+ $lcd_cmds[] = "widget_set $name text_wdgt 1 2 $lcdpanel_width 2 h 2 \"{$version}\"";
+ break;
case "scr_time":
$time = date("n/j/Y H:i");
$lcd_cmds[] = "widget_set $name title_wdgt 1 1 \"+ System Time\"";
@@ -701,9 +712,10 @@
break;
}
add_summary_values($lcd_cmds, $name, $lcd_summary_data, $lcdpanel_width);
+ $widget_counter++;
}
send_lcd_commands($lcd, $lcd_cmds);
- sleep($refresh_frequency);
+ sleep($refresh_frequency * $widget_counter);
$i++;
}
}
diff --git a/config/lcdproc-dev/lcdproc_screens.xml b/config/lcdproc-dev/lcdproc_screens.xml
index b807d9f0..e0597d58 100644
--- a/config/lcdproc-dev/lcdproc_screens.xml
+++ b/config/lcdproc-dev/lcdproc_screens.xml
@@ -24,6 +24,11 @@
</menu>
<fields>
<field>
+ <fielddescr>Enable Version</fielddescr>
+ <fieldname>scr_version</fieldname>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Enable Time</fielddescr>
<fieldname>scr_time</fieldname>
<type>checkbox</type>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 2e0eba97..fd904fb0 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -972,10 +972,11 @@
<descr>LCD display driver - Development version</descr>
<website>http://www.lcdproc.org/</website>
<category>Utility</category>
- <version>lcdproc-0.5.4 pkg v. 0.1</version>
+ <version>lcdproc-0.5.4 pkg v. 0.2</version>
<status>BETA</status>
<required_version>2.0</required_version>
<maintainer>michele@nt2.it</maintainer>
+ <pkginfolink>http://forum.pfsense.org/index.php/topic,44034.0.html</pkginfolink>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
<depends_on_package>lcdproc-0.5.4.tbz</depends_on_package>
<depends_on_package_pbi>lcdproc-0.5.4-i386.pbi</depends_on_package_pbi>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index e067d0b9..a094215a 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -944,10 +944,11 @@
<descr>LCD display driver - Development version</descr>
<website>http://www.lcdproc.org/</website>
<category>Utility</category>
- <version>lcdproc-0.5.4 pkg v. 0.1</version>
+ <version>lcdproc-0.5.4 pkg v. 0.2</version>
<status>BETA</status>
<required_version>2.0</required_version>
<maintainer>michele@nt2.it</maintainer>
+ <pkginfolink>http://forum.pfsense.org/index.php/topic,44034.0.html</pkginfolink>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
<depends_on_package>lcdproc-0.5.4.tbz</depends_on_package>
<depends_on_package_pbi>lcdproc-0.5.4-amd64.pbi</depends_on_package_pbi>