I have a Photon uint32_t variable which is a date represented as an integer in format mm0dd0yyyyy. The console handles it fine, but the app returns 1. I can fix it by changing the format, but wanted to send feedback.
Console obviously goes beyond the documented behaviour.
The reference docs do only state
int (signed 32 bit),
char* as valid datatypes so the app behaves as expected.
However, console.particle.io even accepts
bool and renders them as
BTW, why do you have a five-digit year?
Sure you can opt for any format you desire, but for further processing the more common formatting for
yyyymmdd which makes splitting up and sorting much more straight forward (and a human reader should be able to comprehend that without the zeros between parts too )
Like I say, I can change the format. But, a signed 32 bit int should go from -2,147,483,648 to 2,147,483,647. The date in my format would be something like 1,002,002,019. It seems to me that the number should fit, unless the app only accomodates short integers.
I have tested this now with the most recent Android App and I can confirm that something is amiss, but it’s not dependent on the datatype but the length of the display field.
While 9999999 can be displayed 10000000 cannot but only the first digit would be shown.
If you had 23456789 you would get 2 in the app.
I guess this is something @jensck_particle may want to chime in on.
Meanwhile I filed this issue
I’ve trimed the year to two digits and removed the extra zeros and the app displays ok now. Thanks for the help.
@ScruffR thanks for filing the bug report! I’m going to continue the conversation there.