aboutsummaryrefslogtreecommitdiffstats
path: root/config/lcdproc-dev
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2014-01-05 03:21:35 -0800
committerErmal Luçi <eri@pfsense.org>2014-01-05 03:21:35 -0800
commitb1962cf93379b0f9f3dfbfa69cd67f19af7c1539 (patch)
treea2fb505c7c0d5d914084c66cd4792d6e6021b1b5 /config/lcdproc-dev
parenta2073ee9c35e1a82412852ff78d0b3a37eea2d5c (diff)
parent736c7763fbdab29c8727003704dfbd0c51aa0a99 (diff)
downloadpfsense-packages-b1962cf93379b0f9f3dfbfa69cd67f19af7c1539.tar.gz
pfsense-packages-b1962cf93379b0f9f3dfbfa69cd67f19af7c1539.tar.bz2
pfsense-packages-b1962cf93379b0f9f3dfbfa69cd67f19af7c1539.zip
Merge pull request #532 from topper727/patch-1
CrystalFontz packet driver 4 status LED fix
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
+?>