Skip to content

Commit 45a7872

Browse files
authored
Merge pull request #276 from LeeLeahy2/no-idle-tasks
Add define to RTK_Surveyor to enable/disable compiling of idle tasks
2 parents d530067 + b6d23e5 commit 45a7872

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,7 @@ bool beginExternalTriggers()
705705

706706
void beginIdleTasks()
707707
{
708+
#ifdef COMPILE_IDLE_TASKS
708709
if (settings.enablePrintIdleTime == true)
709710
{
710711
char taskName[32];
@@ -723,6 +724,7 @@ void beginIdleTasks()
723724
index); //Core where task should run, 0=core, 1=Arduino
724725
}
725726
}
727+
#endif //COMPILE_IDLE_TASKS
726728
}
727729

728730
void beginI2C()

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const int FIRMWARE_VERSION_MINOR = 4;
3030
#define COMPILE_AP //Comment out to remove Access Point functionality
3131
#define COMPILE_L_BAND //Comment out to remove L-Band functionality
3232
#define COMPILE_ESPNOW //Comment out to remove ESP-Now functionality
33+
#define COMPILE_IDLE_TASKS //Comment out to remove idle tasks
3334
#define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup)
3435

3536
//Define the RTK board identifier:

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ void ButtonCheckTask(void *e)
618618
}
619619
}
620620

621+
#ifdef COMPILE_IDLE_TASKS
621622
void idleTask(void *e)
622623
{
623624
int cpu = xPortGetCoreID();
@@ -667,3 +668,5 @@ void idleTask(void *e)
667668
taskYIELD();
668669
}
669670
}
671+
#endif //COMPILE_IDLE_TASKS
672+

0 commit comments

Comments
 (0)