Skip to content

Commit 942f457

Browse files
authored
Wrap print statement in #ifdef ENABLE_DEBUG_OUTPUT
debug statements should be Wrapped in `#ifdef ENABLE_DEBUG_OUTPUT`
1 parent d7e0ec9 commit 942f457

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Adafruit_PWMServoDriver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ void Adafruit_PWMServoDriver::writeMicroseconds(uint8_t num, uint16_t Microsecon
298298

299299
// Read prescale
300300
double prescale = Adafruit_PWMServoDriver::readPrescale();
301+
302+
#ifdef ENABLE_DEBUG_OUTPUT
301303
Serial.print(prescale); Serial.println(" PCA9685 chip prescale");
304+
#endif
302305

303306
// Calculate the pulse for PWM based on Equation 1 from the datasheet section 7.3.5
304307
prescale += 1;

0 commit comments

Comments
 (0)