aboutsummaryrefslogtreecommitdiffstats
path: root/config/lcdproc-dev/lcdproc_client.php
diff options
context:
space:
mode:
authortopper727 <topper727@yahoo.com>2013-10-31 17:29:41 -0400
committertopper727 <topper727@yahoo.com>2013-10-31 17:29:41 -0400
commitb5dad381f8dbfc3e0df5d3f4ac4dc907065927c2 (patch)
tree7729bfcbbe8d230a4e45a468d71055bb9c271487 /config/lcdproc-dev/lcdproc_client.php
parent5e20654577393326d9a7b87fff9f76ba3677a32b (diff)
downloadpfsense-packages-b5dad381f8dbfc3e0df5d3f4ac4dc907065927c2.tar.gz
pfsense-packages-b5dad381f8dbfc3e0df5d3f4ac4dc907065927c2.tar.bz2
pfsense-packages-b5dad381f8dbfc3e0df5d3f4ac4dc907065927c2.zip
CrystalFontz packet driver 4 status LED fix
Fixed 4 status LED's on left side of CrystalFontz 735 display (635 compat) To show correct. Only the Gateway seems to not function for me.
Diffstat (limited to 'config/lcdproc-dev/lcdproc_client.php')
-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
+?>