Skip to content

Commit

Permalink
Remove unnecessary ulTaskNotifyTake
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmclean committed Sep 29, 2024
1 parent 1d4c7f3 commit f380435
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions garden-controller/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ void waterZoneTask(void* parameters) {
WaterEvent we;
while (true) {
if (xQueueReceive(waterQueue, &we, 0)) {
// First clear the notifications to prevent a bug that would cause
// watering to be skipped if I run xTaskNotify when not waiting
ulTaskNotifyTake(NULL, 0);

unsigned long start = millis();
zoneOn(we.position);
// Delay for specified watering time with option to interrupt
Expand Down Expand Up @@ -153,8 +149,6 @@ void rebootTask(void* parameters) {
unsigned long delay;
while (true) {
if (xQueueReceive(rebootQueue, &delay, 0)) {
ulTaskNotifyTake(NULL, 0);

xTaskNotifyWait(0x00, ULONG_MAX, NULL, delay / portTICK_PERIOD_MS);
ESP.restart();
}
Expand Down

0 comments on commit f380435

Please sign in to comment.