Comment #3 on issue 188 by robhamerling: PWM parameter setting improvement
http://code.google.com/p/jallib/issues/detail?id=188
While starting to work on this issue I came - more or less - to the same
conclusion! With the current procedures it is almost impossible to prevent
a user to violate PWM boundaries at compile time.
There are possibilities for runtime, for example change procedures into
functions returning a result. In Jal this forces a user to collect the
result, but speaking for myself: I would probably always ignore it and feel
it as burden.
So I started to improve the comments with the procedures!
I have my doubts about the usefulness of some of the current procedures.
For example I do not see why a user would need pwm_max_resolution(). I
seems more obvious to me that the procedures for duty cycle always
implicitly use the highest possible precision within the limits of Fosc and
PWM frequency.
We could eliminate the procedures with absolute values for the resolution
and only allow a percentage (and then of course improve the procedure for
percentage by allowing a more precize value like promillage, or even
better).
Thanks for the feedback! It is always better to discuss first and fix later!
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.