Skip to content

Commit

Permalink
Fixed bug in not waiting for semaphore
Browse files Browse the repository at this point in the history
  • Loading branch information
jondurrant committed Sep 8, 2022
1 parent cdee90d commit 78298f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 5-Semaphore/SharedLed/src/BlinkPairAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ void BlinkPairAgent::run(){
while (true) { // Loop forever
gpio_put(xLedPad, 1);
if (pSharedLed != NULL){
pSharedLed->blink(DELAY);
while (pSharedLed->blink(DELAY) == false){
//Keep checking
}
}
gpio_put(xLedPad, 0);
vTaskDelay(DELAY);
Expand Down

0 comments on commit 78298f6

Please sign in to comment.