Conversation
|
Hi sakura-he, I love seeing you modifying really getting into the library. Out of interest why is a large number of callbacks a problem? Cheers |
Multiple callbacks in my program need to read the same static variable, but I don't want to write local static variables to global variables. Because it causes too many global variables to be detrimental to the maintainability of your program, So I changed your Shared library. Make callback functions for multiple button events share the same callback function so they can access common static variables in the function |
|
Thank you very much for the button library you wrote, he helped me a lot, but I found a problem in using it. There are too many callback functions added for button events, so I modified the library and added a new method to it. After this method is called, it will return the type of key trigger, so, we can add the same function for all key events, and then determine the type of event in the function to react, so that there is no need to write different event functions for different event types. Off,
Sorry my English is not very good :) From google translation
befor:befor1.png befor2.png
after:after1.png after2.png