Skip to content

Commit

Permalink
Fixed setLed return which fixes ranging tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentva committed May 18, 2018
1 parent 222ae41 commit 8229215
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Pozyx_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,10 @@ int PozyxClass::setLed(int led_num, boolean state, uint16_t remote_id)
assert(led_num <= 4);
assert( (state == true) || (state == false) );

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

useFunction(POZYX_LED_CTRL, &params, 1, NULL, 0, remote_id);
return useFunction(POZYX_LED_CTRL, &params, 1, NULL, 0, remote_id);
}

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

0 comments on commit 8229215

Please sign in to comment.