@@ -77,10 +77,7 @@ void IRAM_ATTR ESP32_ISR_Servo::run()
7777 // Reset when reaching 20000us / 10us = 2000
7878 if (timerCount++ >= REFRESH_INTERVAL / TIMER_INTERVAL_MICRO)
7979 {
80- // #if (ISR_SERVO_DEBUG > 1)
81- // Serial.println("Reset count");
8280 ISR_SERVO_LOGDEBUG (" Reset count" );
83- // #endif
8481
8582 timerCount = 1 ;
8683 }
@@ -103,11 +100,7 @@ int ESP32_ISR_Servo::findFirstFreeSlot()
103100 {
104101 if (servo[servoIndex].enabled == false )
105102 {
106- // #if (ISR_SERVO_DEBUG > 1)
107- // Serial.print("Index = ");
108- // Serial.println(servoIndex);
109103 ISR_SERVO_LOGDEBUG1 (" Index =" , servoIndex);
110- // #endif
111104
112105 return servoIndex;
113106 }
@@ -143,12 +136,8 @@ int ESP32_ISR_Servo::setupServo(uint8_t pin, int min, int max)
143136
144137 numServos++;
145138
146- // #if (ISR_SERVO_DEBUG > 0)
147- // Serial.print("Index = " + String(servoIndex) + ", count = " + String(servo[servoIndex].count));
148139 ISR_SERVO_LOGDEBUG3 (" Index =" , servoIndex, " , count =" , servo[servoIndex].count );
149- // Serial.println(", min = " + String(servo[servoIndex].min) + ", max = " + String(servo[servoIndex].max));
150140 ISR_SERVO_LOGDEBUG3 (" min =" , servo[servoIndex].min , " , max =" , servo[servoIndex].max );
151- // #endif
152141
153142 return servoIndex;
154143}
@@ -172,11 +161,8 @@ bool ESP32_ISR_Servo::setPosition(unsigned servoIndex, int position)
172161 // It is mandatory to disable task switches during modifying shared vars
173162 portEXIT_CRITICAL (&timerMux);
174163
175- // #if (ISR_SERVO_DEBUG > 0)
176- // Serial.println("Idx = " + String(servoIndex) + ", cnt = " + String(servo[servoIndex].count) + ", pos = " + String(servo[servoIndex].position));
177164 ISR_SERVO_LOGERROR1 (" Idx =" , servoIndex);
178165 ISR_SERVO_LOGERROR3 (" cnt =" , servo[servoIndex].count , " , pos =" ,servo[servoIndex].position );
179- // #endif
180166
181167 return true ;
182168 }
@@ -194,11 +180,8 @@ int ESP32_ISR_Servo::getPosition(unsigned servoIndex)
194180 // Updates interval of existing specified servo
195181 if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= ESP32_MAX_PIN) )
196182 {
197- // #if (ISR_SERVO_DEBUG > 0)
198- // Serial.println("Idx = " + String(servoIndex) + ", cnt = " + String(servo[servoIndex].count) + ", pos = " + String(servo[servoIndex].position));
199183 ISR_SERVO_LOGERROR1 (" Idx =" , servoIndex);
200184 ISR_SERVO_LOGERROR3 (" cnt =" , servo[servoIndex].count , " , pos =" ,servo[servoIndex].position );
201- // #endif
202185
203186 return (servo[servoIndex].position );
204187 }
@@ -236,11 +219,8 @@ bool ESP32_ISR_Servo::setPulseWidth(unsigned servoIndex, unsigned int pulseWidth
236219 // It is mandatory to disable task switches during modifying shared vars
237220 portEXIT_CRITICAL (&timerMux);
238221
239- // #if (ISR_SERVO_DEBUG > 0)
240- // Serial.println("Idx = " + String(servoIndex) + ", cnt = " + String(servo[servoIndex].count) + ", pos = " + String(servo[servoIndex].position));
241222 ISR_SERVO_LOGERROR1 (" Idx =" , servoIndex);
242223 ISR_SERVO_LOGERROR3 (" cnt =" , servo[servoIndex].count , " , pos =" ,servo[servoIndex].position );
243- // #endif
244224
245225 return true ;
246226 }
@@ -258,11 +238,8 @@ unsigned int ESP32_ISR_Servo::getPulseWidth(unsigned servoIndex)
258238 // Updates interval of existing specified servo
259239 if ( servo[servoIndex].enabled && (servo[servoIndex].pin <= ESP32_MAX_PIN) )
260240 {
261- // #if (ISR_SERVO_DEBUG > 0)
262- // Serial.println("Idx = " + String(servoIndex) + ", cnt = " + String(servo[servoIndex].count) + ", pos = " + String(servo[servoIndex].position));
263241 ISR_SERVO_LOGERROR1 (" Idx =" , servoIndex);
264242 ISR_SERVO_LOGERROR3 (" cnt =" , servo[servoIndex].count , " , pos =" ,servo[servoIndex].position );
265- // #endif
266243
267244 return (servo[servoIndex].count * TIMER_INTERVAL_MICRO );
268245 }
0 commit comments