raffaello-camoriano / RBDemo

Reactive Behaviors Demo
1 stars 0 forks source link

threshold passed as a pointer #14

Closed alecive closed 10 years ago

alecive commented 10 years ago

Why this variable is a pointer?

alecive commented 10 years ago

you can simply keep it as a double. If you want to change its value at runtime, simply create a setThreshold() method! With some checks btw. What happens if I put -1 or 20000000 ? Your code messes up because you're not doing any verification on the value you're getting from the rpc port.

GiuliaP commented 10 years ago

Now I pass the threshold as a double, and I have created a setThreshold() function that checks that the user treshold value is inside [0, 255] before setting it (if it isn't, it sets the threshold to the default value, that is 15).

alecive commented 10 years ago

Good! Remember to close issues when you address them :)