samples: mesh: nrf52: corrected Range status response
As per PTS, IUT is expected to return success for the Range Get messages (Light Lightness Range Get for MMDL/SR/LLNS/BI-01-C, Light CTL Temperature Range Get for MMDL/SR/LCTLS/BI-01-C). This commit take care of this issue. Signed-off-by: Vikrant More <vikrant8051@gmail.com>
This commit is contained in:
parent
09e2cf3db0
commit
ccade20ccf
1 changed files with 4 additions and 4 deletions
|
@ -1110,6 +1110,8 @@ static void light_lightness_range_get(struct bt_mesh_model *model,
|
||||||
struct net_buf_simple *msg = NET_BUF_SIMPLE(2 + 5 + 4);
|
struct net_buf_simple *msg = NET_BUF_SIMPLE(2 + 5 + 4);
|
||||||
struct light_lightness_state *state = model->user_data;
|
struct light_lightness_state *state = model->user_data;
|
||||||
|
|
||||||
|
state->status_code = RANGE_SUCCESSFULLY_UPDATED;
|
||||||
|
|
||||||
bt_mesh_model_msg_init(msg, BT_MESH_MODEL_OP_2(0x82, 0x58));
|
bt_mesh_model_msg_init(msg, BT_MESH_MODEL_OP_2(0x82, 0x58));
|
||||||
net_buf_simple_add_u8(msg, state->status_code);
|
net_buf_simple_add_u8(msg, state->status_code);
|
||||||
net_buf_simple_add_le16(msg, state->light_range_min);
|
net_buf_simple_add_le16(msg, state->light_range_min);
|
||||||
|
@ -1118,8 +1120,6 @@ static void light_lightness_range_get(struct bt_mesh_model *model,
|
||||||
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
|
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
|
||||||
printk("Unable to send LightLightnessRange Status response\n");
|
printk("Unable to send LightLightnessRange Status response\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
state->status_code = RANGE_SUCCESSFULLY_UPDATED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Light Lightness Setup Server message handlers */
|
/* Light Lightness Setup Server message handlers */
|
||||||
|
@ -1427,6 +1427,8 @@ static void light_ctl_temp_range_get(struct bt_mesh_model *model,
|
||||||
struct net_buf_simple *msg = NET_BUF_SIMPLE(2 + 5 + 4);
|
struct net_buf_simple *msg = NET_BUF_SIMPLE(2 + 5 + 4);
|
||||||
struct light_ctl_state *state = model->user_data;
|
struct light_ctl_state *state = model->user_data;
|
||||||
|
|
||||||
|
state->status_code = RANGE_SUCCESSFULLY_UPDATED;
|
||||||
|
|
||||||
bt_mesh_model_msg_init(msg, BT_MESH_MODEL_OP_2(0x82, 0x63));
|
bt_mesh_model_msg_init(msg, BT_MESH_MODEL_OP_2(0x82, 0x63));
|
||||||
net_buf_simple_add_u8(msg, state->status_code);
|
net_buf_simple_add_u8(msg, state->status_code);
|
||||||
net_buf_simple_add_le16(msg, state->temp_range_min);
|
net_buf_simple_add_le16(msg, state->temp_range_min);
|
||||||
|
@ -1435,8 +1437,6 @@ static void light_ctl_temp_range_get(struct bt_mesh_model *model,
|
||||||
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
|
if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
|
||||||
printk("Unable to send LightCTL Temp Range Status response\n");
|
printk("Unable to send LightCTL Temp Range Status response\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
state->status_code = RANGE_SUCCESSFULLY_UPDATED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void light_ctl_default_get(struct bt_mesh_model *model,
|
static void light_ctl_default_get(struct bt_mesh_model *model,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue