Skip to content

Commit 0930b13

Browse files
committed
samples: bluetooth: mesh: adapt light control to new emds
Commit adapts light control sample to the new emds API statuses. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
1 parent d43d1be commit 0930b13

File tree

1 file changed

+5
-1
lines changed
  • samples/bluetooth/mesh/light_ctrl/src

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,13 @@ static void bt_ready(int err)
112112

113113
#ifdef CONFIG_EMDS
114114
err = emds_load();
115-
if (err) {
115+
if (err && err != -ENOENT) {
116116
printk("Restore of emds data failed (err %d)\n", err);
117117
return;
118+
} else if (err == -ENOENT) {
119+
printk("No valid emds data found, starting fresh\n");
120+
} else {
121+
printk("Restored emds data successfully\n");
118122
}
119123

120124
err = emds_prepare();

0 commit comments

Comments
 (0)