diff options
author | Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com> | 2014-10-29 23:31:43 -0400 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-11-02 20:05:28 +0100 |
commit | 9658c7100a62499cce1939193c8be80bb300d0f8 (patch) | |
tree | 526ee630e4e2a201f8f95fc556ea7251e014f742 /srd.c | |
parent | 8a110ab1ea46d89d36a610e4249fe1eabed27757 (diff) | |
download | libsigrokdecode-9658c7100a62499cce1939193c8be80bb300d0f8.tar.gz libsigrokdecode-9658c7100a62499cce1939193c8be80bb300d0f8.zip |
pwm: Fix and rework
Reworked in the algorithm:
- Fixed the polarity setting
- Taken in consideration the first transition
- Using the 'None' state instead of -1 and 0 value
- Simplify the algorithm and remove useless branches and variables
- Avoid re-calculating the same thing more than once
- Renamed a few variables for a better understanding
- Duty cycle precision changed to floating value
Otherwise:
- Added a meta OUTPUT for the duty cycle average
- Renamed the polarity option:
'polarity', 'active low/high' are well-understood terms.
- Added comments
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
Diffstat (limited to 'srd.c')
0 files changed, 0 insertions, 0 deletions