1 Reply Latest reply on Jun 3, 2014 2:29 PM by SeyhanA_31

    zero in config_mode snip

      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? 


        • 1. Re: zero in config_mode snip



          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)