pingo-io / pingo-py

Generic API for controlling boards with programmable IO pins
http://pingo.io
MIT License
257 stars 50 forks source link

New Pwm #67

Closed Vido closed 9 years ago

Vido commented 9 years ago

Changes discussed on the topic: PWM pins

1) The abstractmethod decorator from _get_pwm_duty_cycle will be dropped
So the _get_pwm_duty_cycle will have a implementation. It will hold the last set value.
If some Board can probe its hardware, then this Board should overwrite this method.

2) PwmPin will recive the "frequency||period" property;
This property can be read and write.
Each board should implement its own default values.

3) PwmOutputCapable recives a new abstractmethod _set_pwm_frequency and a _get_pwm_frequency
Each driver take care of his own _set_pwm_frequency. But _get_pwm_frequency has a default implementation (hold the last set value). If a Board has a better method, this should be overwritten.
coveralls commented 9 years ago

Coverage Status

Coverage increased (+1.33%) when pulling 72ed3e0115a009a7a87e0193bfe887ca856be79c on Vido:new_pwm into b448d5eecae17b82aafd708c2594dae6d4194d84 on garoa:master.

Vido commented 9 years ago

Now, we should do some onboard testing.

ramalho commented 9 years ago

Thanks, @Vido !

ramalho commented 9 years ago

I merged your pull request. Thanks, @vido!

Wrapping up my book in the next few weeks. Then we can have a sprint!

Cheers,

Luciano

On Fri, Jan 16, 2015 at 10:08 AM, Lucas Vido notifications@github.com wrote:

Now, we should make some onboard testing.

— Reply to this email directly or view it on GitHub https://github.com/garoa/pingo/pull/67#issuecomment-70245209.

Luciano Ramalho Twitter: @ramalhoorg

Professor em: http://python.pro.br Twitter: @pythonprobr