aboutsummaryrefslogtreecommitdiffstats
path: root/config/lcdproc-dev
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-01-07 20:22:00 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-01-07 20:22:00 -0500
commita8b5c4c392069ab4c06c19d53d4dccf8c423a9ef (patch)
tree7fdb7130a804f0191c22bababa62c44e2b88fb50 /config/lcdproc-dev
parent7234111aaac38d620a4e5356d212fa51e2591d8b (diff)
parentb1962cf93379b0f9f3dfbfa69cd67f19af7c1539 (diff)
downloadpfsense-packages-a8b5c4c392069ab4c06c19d53d4dccf8c423a9ef.tar.gz
pfsense-packages-a8b5c4c392069ab4c06c19d53d4dccf8c423a9ef.tar.bz2
pfsense-packages-a8b5c4c392069ab4c06c19d53d4dccf8c423a9ef.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'config/lcdproc-dev')
-rw-r--r--config/lcdproc-dev/lcdproc_client.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/config/lcdproc-dev/lcdproc_client.php b/config/lcdproc-dev/lcdproc_client.php
index 22713b98..3337052c 100644
--- a/config/lcdproc-dev/lcdproc_client.php
+++ b/config/lcdproc-dev/lcdproc_client.php
@@ -468,6 +468,8 @@
{
if ($value && $lcdproc_config['driver'] == "CFontz633")
{return true;}
+ else if ($value && $lcdproc_config['driver'] == "CFontzPacket")
+ {return true;}
else
{return false;}
}
@@ -773,31 +775,35 @@
$led_output_value = 0;
/* LED 1: Interface status */
if (substr_count(get_interfaces_stats(), "Down") > 0 )
- {$led_output_value = $led_output_value + pow(2, 0);}
- else
{$led_output_value = $led_output_value + pow(2, 4);}
+ else
+ {$led_output_value = $led_output_value + pow(2, 0);}
/* LED 2: CARP status */
switch (outputled_carp())
{
case -1:/* CARP disabled */
+ break;
case 0: /* CARP on Backup */
- {$led_output_value = $led_output_value + pow(2, 1);}
+ $led_output_value = $led_output_value + pow(2, 1);
+ break;
case 1: /* CARP on Master */
- {$led_output_value = $led_output_value + pow(2, 5);}
+ $led_output_value = $led_output_value + pow(2, 5);
}
/* LED 3: CPU Usage */
if (cpu_usage() > 50)
- {$led_output_value = $led_output_value + pow(2, 2);}
- else
{$led_output_value = $led_output_value + pow(2, 6);}
+ else
+ {$led_output_value = $led_output_value + pow(2, 2);}
/* LED 4: Gateway status */
switch (outputled_gateway())
{
case -1:/* Gateways not configured */
+ break;
case 0: /* Gateway down or with issues */
- {$led_output_value = $led_output_value + 2 ^ 3;}
+ $led_output_value = $led_output_value + pow(2, 7);
+ break;
case 1: /* All Gateways up */
- {$led_output_value = $led_output_value + 2 ^ 7;}
+ $led_output_value = $led_output_value + pow(2, 3);
}
/* Sends the command to the panel */
$lcd_cmds[] = "output {$led_output_value}";
@@ -922,4 +928,4 @@
{
lcdproc_warn("Too many errors, the client ends.");
}
-?> \ No newline at end of file
+?>