Skip to content

100 % brightness give 99 % duty on output #15

@dufi2profor

Description

@dufi2profor

Hello,
i am using this library on Teensy 4.0.
All work, but there is not real 100 % duty, but 99 % only.

I found that changing line 174 from

if (ShiftPWM.m_counter<ShiftPWM.m_maxBrightness) { ShiftPWM.m_counter++; // Increase the counter } else { ShiftPWM.m_counter=0; // Reset counter if it maximum brightness has been reached }
to
if (ShiftPWM.m_counter<(ShiftPWM.m_maxBrightness-1)) { ShiftPWM.m_counter++; // Increase the counter } else { ShiftPWM.m_counter=0; // Reset counter if it maximum brightness has been reached }

gives true 100 % duty on max brightness being set to 100.

Other i have not tested:)
So not an serious error, just suggestion.
Thanks Dusan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions