zephyr/subsys/net/lib
Robert Chou 6fbd86113d net: lwm2m: fix reporting attributes with negative fraction
Fraction could be stored with negative value.
The implementation was only considering the positive value case.
Therefore, we have to modify the code to take care of the case.

To test it
======================================================================
1. launch eclipse/wakaama lwm2m server
2. launch zephyr lwm2m client and wait for registration completed
3. Issue commands from server
   * attr 0 /1/0/1 -0.1 0.1
   * disc 0 /1/0

Current output
----------------------------------------------------------------------
Client #0 /1/0 : 2.05 (COAP_205_CONTENT)
105 bytes received of type application/link-format:
</1/0>,</1/0/0>,</1/0/1>;gt=0.1;lt=0/00000,</1/0/2>,</1/0/3>,</1/0/4>,
</1/0/5>,</1/0/6>,</1/0/7>,</1/0/8>

Expected output
----------------------------------------------------------------------
Client #0 /1/0 : 2.05 (COAP_205_CONTENT)
102 bytes received of type application/link-format:
</1/0>,</1/0/0>,</1/0/1>;gt=0.1;lt=-0.1,</1/0/2>,</1/0/3>,</1/0/4>,
</1/0/5>,</1/0/6>,</1/0/7>,</1/0/8>

Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
2018-01-29 23:30:44 -05:00
..
app net: if: Handle new address type of NET_ADDR_OVERRIDABLE 2018-01-23 09:25:51 +02:00
coap crypto: config: config-coap: add CONFIG for setting max content length 2017-12-15 17:52:13 -05:00
dns net: dns: Allow to initialize DNS servers from struct sockaddr[] 2018-01-18 17:30:40 +02:00
http net: http: Remove the old legacy API 2018-01-29 22:44:45 -05:00
lwm2m net: lwm2m: fix reporting attributes with negative fraction 2018-01-29 23:30:44 -05:00
mqtt kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
openthread subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00
sntp kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
sockets kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
CMakeLists.txt subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00
Kconfig net: remove zoap library 2018-01-02 09:41:24 -05:00