larryllix Posted July 1, 2015 Posted July 1, 2015 I use integer variables as constants and it would be nice to keep variables sorted and out of the way of everyday life for writing programs to keep lists shorter. They make program reading much more human. $cTRUE = 1 $cFALSE = 0 $cMODE.TV = 1 $cMODE.READING = 2 $cMODE.FULLON = 6 $cHUE.RED = 22000 $cHUE.BLUE = 48000 $cHUE.VIOLET = 65000 $cROOM.MUD = 20 $cROOM.MBR = 21 $cROOM.RECRM = 13 User definable variable tabs may be the best method so that users can style their system they want by function, location, etc...
Michel Kohanim Posted July 2, 2015 Posted July 2, 2015 Hi larryllix, Thanks so very much for the feedback. Alas, I am a little confused: all ISY variables are user defined. Can you please elaborate on what you mean? Is this a UI only feature? How's it different than what we already have? With kind regards, Michel
fryfrog Posted July 2, 2015 Posted July 2, 2015 I *think* he just means variables that don't show up the same way in drop down lists for variables... but to use them, they'd have to show up. So I'm not sure how it'd work. As a do it yourself workaround, you *could* just start all those variable names with z.
larryllix Posted September 17, 2015 Author Posted September 17, 2015 Hi larryllix, Thanks so very much for the feedback. Alas, I am a little confused: all ISY variables are user defined. Can you please elaborate on what you mean? Is this a UI only feature? How's it different than what we already have? With kind regards, Michel This would be mostly, if not all, a UI handled feature. Currently I have about 150 integer variables and they get hard to find and sift through sometimes to find the "active" variables. - a separate tab for them and no left side of assignment availability on the variable pulldowns. - I use them with a prefix "c" to denote they are constants as well as ALL CAP names, following other language standards. This is the same style as "I" for ineteger and "s" for state variables. - should not be assignable as their values should never need to be changed. Other types are for that. values are assigned manually in the variable type tab - this is handled via string substitution in assemblers and some high-level languages. This would be easier to implement using ISY's current toolchest of variables under different tabs. examples set $iVar1 to $cCONSTANT_VALUE ---------- If $iVar1 is $cTRUE --------------- Zone.Util - [iD 0072][Parent 0082] If 'Utility Room / Motion.Util' is switched On Then $sZone.Violated = $cROOM.UTILITY <----using ISY engine , this is a passed parameter and trigger for handler $sAlarm.level = $cFLASHandNOTIFY <---using ISY engine, this is a passed parameter and trigger for handler Else ---- ------------ Stat Holidays - [iD 00CB][Parent 0020] If $sISY.MMDD is 101 Or ( $sISY.MMDD >= 215 And $sISY.MMDD <= 221 And $sISY.DayOfWeek is $cDAY.MON <-------easy remember days of week defined ) Or ( $sISY.MMDD >= 518 And $sISY.MMDD <= 524 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 701 Or ( $sISY.MMDD >= 801 And $sISY.MMDD <= 807 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 901 And $sISY.MMDD <= 907 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 1008 And $sISY.MMDD <= 1014 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 1225 Or $sISY.MMDD is 1226 Then scene 'Get to stay home today'
Michel Kohanim Posted September 18, 2015 Posted September 18, 2015 Hi larryllix, Thank you. Is this only for constants? i.e. a separate tab for constants that never change and thus should not be available in left side of assignments? With kind regards, Michel
larryllix Posted September 18, 2015 Author Posted September 18, 2015 Hi larryllix, Thank you. Is this only for constants? i.e. a separate tab for constants that never change and thus should not be available in left side of assignments? With kind regards, Michel In the true sense of the definition and to keep the implementation simple. Constants should not be changeable in programs so could be eliminated from selections on left sides of assignment program lines. On a broader spectrum if f more ">" groupings were added, the new ">" button could isolate and reduce the list lengths by dividing selections into state, integer, constants, number, system , and devices adding a few to what it currently selects in v5.xx' A small bug? clicking on the ">" the first time does not select another type, it does nothing on the first click.
Michel Kohanim Posted September 20, 2015 Posted September 20, 2015 Hi larryllix, Thanks for the detail. #175 - low priority. We'll check into the > button. With kind regards, Michel
Recommended Posts
Archived
This topic is now archived and is closed to further replies.