Skip to content

Commit b8e3ae8

Browse files
akredalennordicjm
authored andcommitted
samples: bluetooth: mesh: Remove deprecated configs from model handlers
Fixed an issue in some mesh samples where deprecated configs remained in model handlers but were not enabled in prj.conf. Updated samples: - light_ctrl - light_dimmer - sensor_client - sensor_server Signed-off-by: Stine Åkredalen <[email protected]>
1 parent be9690c commit b8e3ae8

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

samples/bluetooth/mesh/light_ctrl/src/model_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct lightness_ctx {
2121
uint32_t rem_time;
2222
};
2323

24-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
24+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
2525
static const uint8_t cmp2_elem_offset1[2] = { 0, 1 };
2626
static const uint8_t cmp2_elem_offset2[1] = { 0 };
2727

@@ -272,7 +272,7 @@ void model_handler_start(void)
272272
{
273273
int err;
274274

275-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
275+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
276276
if (bt_mesh_comp2_register(&comp_p2)) {
277277
printk("Failed to register comp2\n");
278278
}

samples/bluetooth/mesh/light_dimmer/src/model_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct scene_btn_ctx {
5151
int64_t press_start_time;
5252
};
5353

54-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
54+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
5555
static const uint8_t cmp2_elem_offset[1] = { 0 };
5656

5757
static const struct bt_mesh_comp2_record comp_rec[2] = {
@@ -306,7 +306,7 @@ static const struct bt_mesh_comp comp = {
306306

307307
const struct bt_mesh_comp *model_handler_init(void)
308308
{
309-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
309+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
310310
if (bt_mesh_comp2_register(&comp_p2)) {
311311
printf("Failed to register comp2\n");
312312
}

samples/bluetooth/mesh/sensor_client/src/model_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static const struct bt_mesh_sensor_cli_handlers bt_mesh_sensor_cli_handlers = {
142142
static struct bt_mesh_sensor_cli sensor_cli =
143143
BT_MESH_SENSOR_CLI_INIT(&bt_mesh_sensor_cli_handlers);
144144

145-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
145+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
146146
/* HVAC Integration NLC Profile composition data page 2 */
147147
static const uint8_t cmp2_elem_offset_hvac[1]; /* Profile uses element 0 */
148148

@@ -380,7 +380,7 @@ static const struct bt_mesh_comp comp = {
380380

381381
const struct bt_mesh_comp *model_handler_init(void)
382382
{
383-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
383+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
384384
if (bt_mesh_comp2_register(&comp_p2)) {
385385
printk("Failed to register comp2\n");
386386
}

samples/bluetooth/mesh/sensor_server/src/model_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static uint32_t prev_pres_detect;
8989

9090
static uint32_t prev_mot_sensed;
9191

92-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
92+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
9393
static const uint8_t cmp2_elem_offset_ambient_light[1] = { 0 };
9494
static const uint8_t cmp2_elem_offset_presence[1] = { 1 };
9595
static const uint8_t cmp2_elem_offset_motion[1] = { 2 };
@@ -1085,7 +1085,7 @@ static const struct bt_mesh_comp comp = {
10851085

10861086
const struct bt_mesh_comp *model_handler_init(void)
10871087
{
1088-
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_CONF)
1088+
#if IS_ENABLED(CONFIG_BT_MESH_NLC_PERF_BASELINE)
10891089
if (bt_mesh_comp2_register(&comp_p2)) {
10901090
printf("Failed to register comp2\n");
10911091
}

0 commit comments

Comments
 (0)