Page 1 of 1

Values not showing more than 3 significant figures !?

Posted: Wed Apr 05, 2023 10:05 am
by hasan_
Hi, I am using a custom device and an INT READ parameter to read CO2 (ppm) sensor values from ESP32 Dev Board, it works fine but in the Android app, the primary value (main UI) shows only the first three digits. E.g. a value of 1428 would appear as 142, despite having the full value when I click the device. (see screenshots).

If it helps, I even tried float, and interestingly it showed also a 'decimal' point and nothing after it (for example: 843.) as if the app has a limited character or width space of text field? (that's just my guess).

I really need it to get it working soon for a client. Relevant code snippets below. Please help!

Thanks,
Hasan

Code: Select all

static Device CO2("CO2 (ppm)", "custom.device.co2");
my_node.addDevice(CO2);

void setup() {
 Param co2_param("CO2 (ppm)", "custom.param.value", value((int)DEFAULT_CO2), PROP_FLAG_READ);
 CO2.addParam(co2_param);
 CO2.assignPrimaryParam(CO2.getParamByName("CO2 (ppm)")); }

//To update:
int h = int(mySensor.getCO2());
CO2.updateAndReportParam("CO2 (ppm)", h); 

Re: Values not showing more than 3 significant figures !?

Posted: Sat Apr 08, 2023 8:45 am
by ESP_Piyush
We have fixed the issue and updated the app on the Play Store. Please check if it meets your requirement.

Re: Values not showing more than 3 significant figures !?

Posted: Mon Apr 10, 2023 12:56 am
by hasan_
Awesome! Just checked, yes! Now I can see full primary data.

Thank you so much for resolving this so swiftly!