Page 1 of 1

Custom variable temp

Posted: Sun Aug 23, 2015 7:57 pm
by jsclownfish
I recently added more temp probes and they are working fine displayed on the LCD, but since they aren't bytes they don't display as the temp in ascii. Can you and if so, how do you code to display the temperature? Maybe only the rounded to the whole number if it won't handle the decimal?

Thanks,
-Jon

Re: Custom variable temp

Posted: Sun Aug 23, 2015 8:44 pm
by rimai
Not sure I follow.
Temperature should be decimal just like the other ones.

Re: Custom variable temp

Posted: Sun Aug 23, 2015 9:40 pm
by jsclownfish
Yes, it looks fine on the LCD, but I want to track them as a custom variable. It looks like the custom variable is a byte.

-Jon

Re: Custom variable temp

Posted: Mon Aug 24, 2015 3:51 am
by lnevo
Those custom variables being bytes are a pain! When can we turn that into ints Roberto (or better yet floats!)

Jon, try dividing the number by 10 and it should fit in the byte, you just won't have the precision but you'll be inside a degree which should work ok, no?

Re: Custom variable temp

Posted: Wed Aug 26, 2015 4:28 am
by cosmith71
I wonder if we could use two variables, one to represent the whole number part and another to represent the decimal part?

Like custom variable 1 would equal 78 and custom variable 2 would equal 10 to represent 78.1.

--Colin

Re: Custom variable temp

Posted: Wed Aug 26, 2015 5:43 am
by lnevo
Yes i just can't think of the math this early. Seems a big waste to me though on variable usage. Would still like to see this change to int. too easy to wrap with only a byte. Have hit that too many times.

Re: Custom variable temp

Posted: Fri Aug 28, 2015 8:50 am
by jsclownfish
In my case, I just put my 'less important' temperature probes in the custom variables where the whole number temp is sufficient. I can't afford to use other custom variable slots for the decimal as I have them all tied up with other measurable (flow meters, lights, etc). Maybe more custom variables are in future plans??? ;)

-Jon