From 16e92cf6652e4dbe56ba4f18f6ca6cec510b147c Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Thu, 18 Apr 2024 06:38:46 +0000 Subject: [PATCH] fix(behaviors): Add multiple soft-off instances properly. * Properly pass the node id for the unique soft-off behavior instance when defining it. --- app/src/behaviors/behavior_soft_off.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/behaviors/behavior_soft_off.c b/app/src/behaviors/behavior_soft_off.c index 3a4ae42486d..8c6ba4225f7 100644 --- a/app/src/behaviors/behavior_soft_off.c +++ b/app/src/behaviors/behavior_soft_off.c @@ -80,7 +80,7 @@ static const struct behavior_driver_api behavior_soft_off_driver_api = { DT_INST_PROP_OR(n, split_peripheral_off_on_press, false), \ }; \ static struct behavior_soft_off_data bso_data_##n = {}; \ - BEHAVIOR_DT_INST_DEFINE(0, behavior_soft_off_init, NULL, &bso_data_##n, &bso_config_##n, \ + BEHAVIOR_DT_INST_DEFINE(n, behavior_soft_off_init, NULL, &bso_data_##n, &bso_config_##n, \ POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \ &behavior_soft_off_driver_api);