Wallacoloo / printipi

3d printing directly through the Raspberry Pi's GPIO pins
MIT License
141 stars 43 forks source link

schedPwm should use EventClockT::duration for maxPeriod (and rename to idealPeriod) #67

Closed Wallacoloo closed 9 years ago

Wallacoloo commented 9 years ago

Currently, the desired PWM cycle period is specified as a float assumed to represent the length of each cycle in seconds. This would be more clear if it was specified with the std::chrono:: system (e.g. queuePwm(pin, duty, std::chrono::microseconds(500)).

Also, this value represents the ideal period, and definitely not the maximum! It should be renamed accordingly.