Skip to content

Commit fc4930c

Browse files
committed
Update examples to no longer use operator overloading (use push/pop instead).
1 parent 515ee24 commit fc4930c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

examples/Threading_Basics/Shared_Counter/Consumer.inot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ void loop()
1212
* available, then this thread is suspended until new data
1313
* is available for reading.
1414
*/
15-
Serial.println(counter);
15+
Serial.println(counter.pop());
1616
}

examples/Threading_Basics/Shared_Counter/Producer.inot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void loop()
1010
* 'counter'. Internally this is stored within a queue in a FIFO
1111
* (First-In/First-Out) manner.
1212
*/
13-
counter = i;
13+
counter.push(i);
1414
i++;
1515
delay(100);
1616
}

examples/Threading_Basics/Source_Sink_Counter/Consumer.inot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ void setup()
99

1010
void loop()
1111
{
12-
Serial.println(counter);
12+
Serial.println(counter.pop());
1313
}

examples/Threading_Basics/Source_Sink_Counter/Producer.inot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ void setup()
99
void loop()
1010
{
1111
static int i = 0;
12-
counter = i;
12+
counter.push(i);
1313
i++;
1414
}

examples/Threading_Basics/Source_Sink_LED/Sink_Thread.inot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ void loop()
1212
* this call will block until new data is inserted from the connected SOURCE. This means
1313
* that the pace is dictated by the SOURCE that sends data every 100 ms.
1414
*/
15-
digitalWrite(LED_BUILTIN, led);
15+
digitalWrite(LED_BUILTIN, led.pop());
1616
}

examples/Threading_Basics/Source_Sink_LED/Source_Thread.inot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ void setup()
88

99
void loop()
1010
{
11-
led = true;
11+
led.push(true);
1212
delay(100);
13-
led = false;
13+
led.push(false);
1414
delay(100);
1515
}

0 commit comments

Comments
 (0)