Aaah. Of course - no wonder it didn't work, I forgot a pair of parenthesis to do the float math before adding it onto the string.
I wouldn't expect it to work, now that I see what I did. I think a better error message, like what Gordon implemented above, is all that's needed. "jsvGetString overflow" is a very unfriendly error (also - shouldn't this raise an exception? as opposed to returning undefined and printing a warning to console) - had I seen "String too big to convert to float" i'd have figured it out pretty quickly.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Aaah. Of course - no wonder it didn't work, I forgot a pair of parenthesis to do the float math before adding it onto the string.
I wouldn't expect it to work, now that I see what I did. I think a better error message, like what Gordon implemented above, is all that's needed. "jsvGetString overflow" is a very unfriendly error (also - shouldn't this raise an exception? as opposed to returning undefined and printing a warning to console) - had I seen "String too big to convert to float" i'd have figured it out pretty quickly.