supported_hardware:ping
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
supported_hardware:ping [2021/03/05 19:17] – added color change info James Sentman | supported_hardware:ping [2021/03/05 19:28] – [Displaying More Information:] James Sentman | ||
---|---|---|---|
Line 127: | Line 127: | ||
{{: | {{: | ||
- | **On Label:** UP (< | + | **On Label:** UP (< |
- | **Off Label:** DOWN (< | + | **Off Label:** DOWN (< |
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: | 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: | ||
Line 136: | Line 136: | ||
if theName = “Reliability” then | if theName = “Reliability” then | ||
if theValue = 100 then | if theValue = 100 then | ||
- | set xtOnColor of xtUnit | + | set xtOnColor of xUnit (thisUnit) to “33FF33" |
else | else | ||
- | set xtOnColor of xtUnit | + | set xtOnColor of xUnit (thisUnit) to “FFFF33" |
end if | end if | ||
end if | end if |
supported_hardware/ping.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1