zephyr/subsys/net/lib
Michael Scott cdcb33b75f net: lwm2m: plain text: fix float formatting
Formatting a float32/64 value for plain text is broken.
Example for 32bit: val1=0 and val2=500000 is equivalent to 0.5

Current formatter was using %d.%d (%lld.%lld for 64bit) so
exported value was 0.500000 (or 0.5)

To fix this, for val2 use a zero-padded formatter for the maximum
length of each bit length (6 for 32bit and 9 for 64bit), and then
remove the zero characters at the end of the string.

Notes re: handling of val1/val2 signs:
- eliminate potential negative sign when converting val2 to avoid:
  a value like: 0.-5
- use negative val2 when val1 is 0 to fix small negative handling
  such as -0.5

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16154

Signed-off-by: Michael Scott <mike@foundries.io>
2019-08-28 10:58:11 +02:00
..
coap cleanup: include/: move misc/printk.h to sys/printk.h 2019-06-27 22:55:49 -04:00
config Bluetooth: Use BT_GATT_SERVICE_DEFINE whenever possible 2019-05-02 08:29:23 +03:00
conn_mgr net: mgmt: Fix IPv4 connection management 2019-08-14 12:31:30 +02:00
dns net: dns: dns_pack: Revamp FQDN parsing in answers 2019-08-20 13:39:23 +02:00
http docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
lwm2m net: lwm2m: plain text: fix float formatting 2019-08-28 10:58:11 +02:00
mqtt net: mqtt: Modify SOCKS5 based connections 2019-08-05 13:26:11 +03:00
openthread net: openthread: Use repository provided by west 2019-07-25 11:52:48 +02:00
sntp net: sntp: Ignore return value from close 2019-06-27 23:52:51 +03:00
sockets net: socket_mgmt: Fix for coverity CID 203397 2019-08-19 16:27:23 +02:00
socks net: socks: Make SOCKS5 implementation transparent 2019-08-05 13:26:11 +03:00
tls_credentials license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
utils docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
CMakeLists.txt net: Add a connection manager preliminary logic 2019-07-12 12:33:19 +03:00
Kconfig net: Add a connection manager preliminary logic 2019-07-12 12:33:19 +03:00