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:
parent
7ac1cbfe21
commit
3217129f5d
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/* echo the value back through the engine to update min/max values */
|
||||
lwm2m_engine_set_float32("3303/0/5700", &v);
|
||||
*data_len = sizeof(v);
|
||||
return &v;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue