User Tools

Site Tools


supported_hardware:ping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision Both sides next revision
supported_hardware:ping [2021/03/05 15:08]
James Sentman created
supported_hardware:ping [2021/03/05 19:17]
James Sentman added color change info
Line 130: Line 130:
 **Off Label:** DOWN (<​property name=“Reliability”>​) **Off Label:** DOWN (<​property name=“Reliability”>​)
  
-You may also wish to setup custom colors for the unit in question so that the displays appear green when the unit is on and red when it is off which is the opposite of the default display colors. For the Red color I use “33FF33” and for the green color I use “FB0106”+You may also wish to setup custom colors for the unit in question so that the displays appear green when the unit is on and red when it is off which is the opposite of the default display colors. For the Red color I use “33FF33” and for the green color I use “FB0106” ​If you wish you can make the display be yellow if the value is anything less than 100%. In the screen shot of unit properties the Reliability is a text value with the % at the end. In the release version that has been changed to a number so that easier comparisons can be made. In order to make this work you need another block of code inside the on propertyChanged handler something like this: 
 + 
 +<​code>​ 
 +on propertyChanged( theName, theValue) 
 +   if theName = “Reliability” then 
 +     if theValue = 100 then 
 +       set xtOnColor of xtUnit (thisUnit) to “33FF33"​ 
 +     ​else 
 +       set xtOnColor of xtUnit (thisUnit) to “FFFF33"​ 
 +     end if 
 +   end if 
 +end propertyChanged 
 +</​code>​
  
 All of these values can be set on the Display tab of the Edit Unit Dialog. The [[xtension_manual:​advancedlabel|Advanced Label Syntax]] is detailed on that page. Many values can be pulled into the display. All of these values can be set on the Display tab of the Edit Unit Dialog. The [[xtension_manual:​advancedlabel|Advanced Label Syntax]] is detailed on that page. Many values can be pulled into the display.
supported_hardware/ping.txt · Last modified: 2021/03/05 19:28 by James Sentman