Skip to content

Commit

Permalink
Change prescale from double to uint16_t
Browse files Browse the repository at this point in the history
Prescale values are integers 3 to 255 with a maximum of 255+1 for the calculations.
  • Loading branch information
photodude committed Oct 29, 2019
1 parent 942f457 commit 33ec0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Adafruit_PWMServoDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void Adafruit_PWMServoDriver::writeMicroseconds(uint8_t num, uint16_t Microsecon
pulselength = 1000000; // 1,000,000 us per second

// Read prescale
double prescale = Adafruit_PWMServoDriver::readPrescale();
uint16_t prescale = Adafruit_PWMServoDriver::readPrescale();

#ifdef ENABLE_DEBUG_OUTPUT
Serial.print(prescale); Serial.println(" PCA9685 chip prescale");
Expand Down

0 comments on commit 33ec0da

Please sign in to comment.