Skip to content

Commit 10ce26c

Browse files
committed
Handle return value for led_set_brightness function.
1 parent b850c1a commit 10ce26c

File tree

1 file changed

+5
-0
lines changed
  • zephyr/samples/profiles/b-ld/src

1 file changed

+5
-0
lines changed

zephyr/samples/profiles/b-ld/src/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ void BACnet_Lighting_Output_Tracking_Value_Handler(
9090
led = object_instance - 1U;
9191
}
9292
err = led_set_brightness(led_pwm, led, steps);
93+
if (err < 0) {
94+
LOG_ERR(
95+
"Failed to set brightness of LED %u to %u: %d", (unsigned)led,
96+
(unsigned)steps, err);
97+
}
9398
}
9499

95100
/**

0 commit comments

Comments
 (0)