Page 1 of 1

Send Float to Interface Problem

Posted: Thu Nov 20, 2014 6:14 pm
by mr4681
I notice that when I send floating value from Arduino to interface with SetNumber command. Value will be changed to integer and I lost the floating point.
I try to fix this problem by add new function in InterfacePanel.cpp by overload function. It work fine.

Please comment or suggest.
SVP


void InterfacePanel::SetNumber(const char * ControlName, float fValue, int decimal) // Added by SVP
{
SendControlHeader(ControlName, F("Value"));
Serial.print(fValue,decimal);
SendDataTail();

}

Re: Send Float to Interface Problem

Posted: Sat Nov 22, 2014 10:05 am
by raescuin
How do I set this up? I'm getting an error.. thanks

Re: Send Float to Interface Problem

Posted: Tue Dec 02, 2014 5:06 pm
by philr
Nice find! I'll make sure I update the library with your added function.

Phil