akipta / freedomotic

Automatically exported from code.google.com/p/freedomotic
Other
0 stars 0 forks source link

Add a scale parameter to the rangedIngbehavior #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the aim of the proposed feature?
The framework only uses integers to represent the intbehaviors
However, there are some data that should be represented as decimal values. For 
example the temperature, that normaly is represented by 25.5
The rangeintbehavior should allow to add the information of the scale on which 
the value is stored, so the interfaces could represent it correctly.
On the previous example the value=255 and the scale=10

Describe how you would implement this feature

I would add a properties to the rangedintbehavior that are configured the same 
way than the "min" and "max" properties.

scale -> Integer number GREATER THAN 0 (if a number <= 0 is used it should be 
leveled to 1. This value could be used by the guis to know how to represent 
correctly the behavior.

List external resources that can be useful

How much you feel this feature will be useful for the project?

[ ] Optional
[ ] Usefull
[ ] Can make the difference
[X] Necessary

Original issue reported on code.google.com by gabriel....@gmail.com on 27 Sep 2012 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by gabriel....@gmail.com on 7 Oct 2012 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by gabriel....@gmail.com on 8 Oct 2012 at 9:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 1545e1236fc5.

Original comment by gabriel....@gmail.com on 13 Oct 2012 at 11:44

GoogleCodeExporter commented 9 years ago
A question: in the triggers is used only the integer value?
For example: "if value GREATER_THAN 255" (where 255 represents the temperature 
of 25.5 C) 

Original comment by virtualc...@gmail.com on 19 Oct 2012 at 4:31

GoogleCodeExporter commented 9 years ago
For the moment yes. Because the "value" parameter that is using to compare is 
the value that is stored with the behavior, in this case 255.

Original comment by gabriel....@gmail.com on 19 Oct 2012 at 4:36

GoogleCodeExporter commented 9 years ago

Original comment by virtualc...@gmail.com on 20 Oct 2012 at 7:58