zero in config_mode snip

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

When I run the "config_mode" snip and enter a 0 for in the zip code field in the application data webpage, it doesn't show up the next time the page is loaded.  The zip field just shows up empty after a refresh.  The value is getting saved into the dct.  But displaying a zero seems to break whatever code is supplying the dynamic content.


I don't think it's a browser or js bug because the source comes from the http server that way.  What can I change to allow a zero to show up in a number field linked to the dct? 



 

0 Likes
1 Reply
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

Please update the ...Wiced/internal/wiced_lib.c.

Below are the changes:

--- a/Wiced/internal/wiced_lib.c

+++ b/Wiced/internal/wiced_lib.c

@@ -54,2 +54,5 @@ uint32_t utoa(uint32_t value, char* output, uint8_t min_length, uint8_t max_leng

     int8_t digits_left = max_length;

+    if (value == 0)

+        --digits_left;

+    else

         while (value != 0 && digits_left != 0)

Thanks,

Seyhan

0 Likes