Page 1 of 1

Sending Float number to arduino with SerialCommandHandler.AddVariable

Posted: Mon Dec 26, 2016 9:06 pm
by crossflow
Dear developers all,

here http://www.megunolink.com/documentation ... d-handler/
says that float type is supported in SerialCommandHandler.AddVariable, that's true,
unfortunately on the interface panel side, the decimal mark supported in NumericUpDown objects is the "comma", but it should be the "dot".

Please could you suggest a solution using SerialCommandHandler.AddVariable for float numbers and NumericUpDown objects?
thanks

Re: Sending Float number to arduino with SerialCommandHandler.AddVariable

Posted: Sun Jan 15, 2017 7:48 am
by Paul
Hi,

Thanks for reporting that; I've added it to our list of bugs.

This happens if your windows localization settings are set to a region that uses a comma as a decimal separator. Until I get it fixed, you can use this as a workaround in the interface panel:

Code: Select all

!SetPoint [num.Value.ToString().Replace(",",".")]\r\n
This code converts the value from the numeric up/down control into a string then replaces any commas with decimal points.

Have a great day,
Paul.