Skip to content

Commit ccd25d6

Browse files
committed
Gate idle time calculations
1 parent d3f94bf commit ccd25d6

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -789,20 +789,23 @@ void beginLBand()
789789

790790
void beginIdleTasks()
791791
{
792-
char taskName[32];
793-
794-
for (int index = 0; index < MAX_CPU_CORES; index++)
795-
{
796-
sprintf(taskName, "IdleTask%d", index);
797-
if (idleTaskHandle[index] == NULL)
798-
xTaskCreatePinnedToCore(
799-
idleTask,
800-
taskName, //Just for humans
801-
2000, //Stack Size
802-
NULL, //Task input parameter
803-
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
804-
&idleTaskHandle[index], //Task handle
805-
index); //Core where task should run, 0=core, 1=Arduino
792+
if (settings.enablePrintIdleTime == true)
793+
{
794+
char taskName[32];
795+
796+
for (int index = 0; index < MAX_CPU_CORES; index++)
797+
{
798+
sprintf(taskName, "IdleTask%d", index);
799+
if (idleTaskHandle[index] == NULL)
800+
xTaskCreatePinnedToCore(
801+
idleTask,
802+
taskName, //Just for humans
803+
2000, //Stack Size
804+
NULL, //Task input parameter
805+
0, // Priority, with 3 (configMAX_PRIORITIES - 1) being the highest, and 0 being the lowest
806+
&idleTaskHandle[index], //Task handle
807+
index); //Core where task should run, 0=core, 1=Arduino
808+
}
806809
}
807810
}
808811

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ void setup()
534534
{
535535
Serial.begin(115200); //UART0 for programming and debugging
536536

537-
beginIdleTasks();
537+
beginIdleTasks(); //Enable processor load calculations
538538

539539
beginI2C();
540540

0 commit comments

Comments
 (0)