@@ -15,7 +15,7 @@ extern bool scheduled2ndJob;
1515extern unsigned long microsStarted;
1616extern unsigned long microsExecuted;
1717extern unsigned long microsExecuted2ndJob;
18- extern int count ;
18+ extern int count1 ;
1919extern int count2;
2020extern uint8_t pinNo;
2121
@@ -48,7 +48,7 @@ class TimingHelpFixture : public SimpleTest::UnitTestExecutor {
4848 scheduled = scheduled2ndJob = false ;
4949 microsExecuted = microsExecuted2ndJob = 0 ;
5050 microsStarted = micros ();
51- count = count2 = 0 ;
51+ count1 = count2 = 0 ;
5252 }
5353
5454 void assertThatTaskRunsOnTime (uint32_t minExpected, uint32_t allowanceOver) {
@@ -63,11 +63,9 @@ class TimingHelpFixture : public SimpleTest::UnitTestExecutor {
6363 assertTrue (scheduled);
6464
6565 // print information to help with diagnostics.
66- Serial.print (" Scheduled: " ); Serial.print (microsStarted);
67- Serial.print (" ExecAt: " ); Serial.print (microsExecuted);
66+ serdebugF4 (" Scheduled: " , microsStarted, " exec:" , microsExecuted);
6867 unsigned long howLong = microsExecuted - microsStarted;
69- Serial.print (" difference " ); Serial.print (howLong);
70- Serial.print (" - expected " ); Serial.println (minExpected);
68+ serdebugF4 (" difference " , howLong, " expected:" , minExpected);
7169
7270 // check that it has been executed within the allowable window.
7371 unsigned long minRange = (minExpected < allowanceOver) ? 0 : (minExpected - allowanceOver);
@@ -81,11 +79,9 @@ class TimingHelpFixture : public SimpleTest::UnitTestExecutor {
8179 // have been run first (ie the shorter task)
8280
8381 // print information to help with diagnostics.
84- Serial.print (" Scheduled: " ); Serial.print (microsStarted);
85- Serial.print (" ExecAt: " ); Serial.print (microsExecuted2ndJob);
82+ serdebugF4 (" Scheduled: " , microsStarted, " ExecAt: " , microsExecuted2ndJob);
8683 long howLong = microsExecuted2ndJob - microsStarted;
87- Serial.print (" difference " ); Serial.print (howLong);
88- Serial.print (" - expected " ); Serial.println (minExpected);
84+ serdebugF4 (" difference " , howLong, " - expected " , minExpected);
8985
9086 assertTrue (scheduled2ndJob);
9187 unsigned long minRange = (minExpected < allowanceOver) ? 0 : (minExpected - allowanceOver);
@@ -96,14 +92,14 @@ class TimingHelpFixture : public SimpleTest::UnitTestExecutor {
9692
9793 void assertTasksSpacesTaken (int taken) {
9894 char sz[32 ];
99- int count = 0 ;
95+ int cnt = 0 ;
10096 char * taskData = taskManager.checkAvailableSlots (sz, sizeof sz);
10197 while (*taskData) {
102- if (*taskData != ' F' ) count ++;
98+ if (*taskData != ' F' ) cnt ++;
10399 ++taskData;
104100 }
105- Serial. print (" Tasks free " ); Serial. println (count );
106- assertEquals (taken, count );
101+ serdebugF2 (" Tasks free " , cnt );
102+ assertEquals (taken, cnt );
107103 }
108104};
109105
0 commit comments