Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Warnif modification/adaptation. Limbo?

Place your requests for plugins here

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
justonewren
Posts: 4
Joined: July 17th, 2007, 10:31 pm
Location: Atlanta, GA

Warnif modification/adaptation. Limbo?

Post by justonewren »

Currently, the warnif plugin takes in a value, AAA, compares it with value BBB. If the comparison is true, returns warning WWW, and if it is false, it returns the input value AAA.

Limbo, or anyone else, could you make a plugin, ie warnif2, that has the same function as warnif, but instead of returning the input value on a false comparison, return a second warning value XXX?

Example: $dll(warnif2.dll,1,5/1,Greater Than/Less Than) would return "Greater Than"

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Heck thats easy :D
Be patient I 'll alter source file and release a new version...

caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Post by caesar »

Why not change the comparison?

AAA >= BBB true then return XXX
AAA < BBB false then return XXX
these two statements are the same, it all depends how you express it.

Or am I missing something?

limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Actually the problem is that warnif returns the first parameter passed when the comparision is false (when I coded I have in mind a server on the computer room with a remote LCD). This is helpful when you need to display the checked value in normal condition and an alert signal when the value exceeds a limit. :shock:

Let's say that you want to check the temprature of the system and display a message when the value exceeds the 70 degrees:

Code: Select all

$dll(warnif.dll,1,$Temp1/70,CPU BURNING)
The above statement will display the actual temprature until it reaches 71 degrees then the CPU BURNING message will appear.

There is no way, at least a simple one, to display two messages one for normal and one for alarm state. The only way is to try nested calls of the same plugin.

Post Reply