samples: net: lwm2m_client: send temp value back to engine

By sending the temp value back to the LwM2M engine, it allows all of
the min/max values to be updated over time.

Fixes an issue where min/max values were not being updated.

Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
Michael Scott 2019-07-29 10:04:00 -07:00 committed by Jukka Rissanen
commit 3217129f5d

View file

@ -203,6 +203,8 @@ static void *temperature_get_buf(u16_t obj_inst_id, size_t *data_len)
LOG_DBG("LWM2M temperature set to %d.%d", v.val1, v.val2); LOG_DBG("LWM2M temperature set to %d.%d", v.val1, v.val2);
} }
/* echo the value back through the engine to update min/max values */
lwm2m_engine_set_float32("3303/0/5700", &v);
*data_len = sizeof(v); *data_len = sizeof(v);
return &v; return &v;
} }