Automaton icon indicating copy to clipboard operation
Automaton copied to clipboard

Yhfudev master

Open yhfudev opened this issue 9 years ago • 2 comments

Hi,

I updated the source to be used in one of my project. It includes fixing compile error, adding keywords, automatically button status detecting, and a enhanced fade control.

yhfudev avatar Jul 19 '16 19:07 yhfudev

Hi Yunhui Fu,

Thanks for your pull request. I made the changes to ATm_controller.cpp and keywords.txt.

Could you explain a bit further what the chnages to Atm_button and Atm_fade do?

Rgdz, Tinkerspy

tinkerspy avatar Jul 25 '16 09:07 tinkerspy

Hi, In file src/Atm_button.cpp, the lib will detect the original status of a button, and use the reverse value as the status of pressed button, so the user won't need to specify the on/off status explicitly.

For the first patch of the file src/Atm_fade.cpp, the fade class is enhanced by a new API in which the user can specify the min/max value of the LED PWM, instead of using the fix 32 steps in the origin source code.

The second patch of the file src/Atm_fade.cpp is to solve the problem caused by that the lib only supports 1ms steps. The fade class would unable to change the LED value from 0 to 255 in a short time (i.e in 10ms). The patch will use millis() to check the time and set the correct value.

yhfudev avatar Aug 03 '16 18:08 yhfudev