Skip to content

Commit d13672c

Browse files
author
dave
committed
very small nodemcu fix.
1 parent c4de988 commit d13672c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/TaskManagerIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void TaskManager::cancelTask(taskid_t taskId) {
169169
void TaskManager::yieldForMicros(uint32_t microsToWait) {
170170
yield();
171171

172-
auto* prevTask = runningTask;
172+
auto& prevTask = runningTask;
173173
unsigned long microsStart = micros();
174174
do {
175175
runLoop();

src/TaskManagerIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class TaskManager {
287287
* store this pointer.
288288
* @return a temporary pointer to the running task that lasts as long as it is running.
289289
*/
290-
tm_internal::TimerTaskAtomicPtr getRunningTask() { return runningTask; }
290+
const tm_internal::TimerTaskAtomicPtr& getRunningTask() { return runningTask; }
291291

292292
private:
293293
/**

tests/taskMgrTests/taskMgrTests.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <Arduino.h>
33
#include <AUnit.h>
4+
#include <Wire.h>
45

56
using namespace aunit;
67

0 commit comments

Comments
 (0)