EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.59k stars 338 forks source link

LUA function playNumber does not play large numbers with PREC1 #1846

Open ChrisOhara57 opened 2 years ago

ChrisOhara57 commented 2 years ago

tested on EdgeTX 2.6 (Companion only) and on OpenTX 2.3.11 (Taranis x9Lite-S and Companion) OpenTX Issue #8904

The call "playNumber(value, unit, PREC1)" does not work if the number is rather large ( example 1234). As a result the numbers are not played!!!

I do have to use an IF-clause for larger numbers. if my_actualValue < 100 then playNumber(my_actualValue*10, unit, PREC1 ); else playNumber(my_actualValue, unit, 0 ); end;

Cause this behavior is not documented it takes some time to find out. I would recommend to do the IF-clause as part of the function. Or it should be described in the documentation at least.

philmoz commented 2 months ago

Not reproducible in 2.10.