Skip to content

Commit ad3a4be

Browse files
committed
Fixed setLed return which fixes ranging tutorial
1 parent 5c5fae9 commit ad3a4be

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Pozyx_lib.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,10 @@ int PozyxClass::setLed(int led_num, boolean state, uint16_t remote_id)
710710
assert(led_num <= 4);
711711
assert( (state == true) || (state == false) );
712712

713-
int status;
714713
// the 4 MSB indicate which led we wish to control, the 4 LSB indicate the state of the leds
715714
uint8_t params = (0x1 << (led_num-1+4)) | (((uint8_t)state) << (led_num-1));
716715

717-
useFunction(POZYX_LED_CTRL, &params, 1, NULL, 0, remote_id);
716+
return useFunction(POZYX_LED_CTRL, &params, 1, NULL, 0, remote_id);
718717
}
719718

720719
int PozyxClass::doRanging(uint16_t destination, device_range_t *range)

0 commit comments

Comments
 (0)