David Möschwitzer / button

Files at this revision

API Documentation at this revision

Comitter:
x1dmoesc
Date:
Thu Feb 21 08:19:49 2019 +0000
Parent:
5:6eefa28ac3fd
Child:
7:09fb38cf8526
Commit message:
renew Button.cpp; add callback(*obj) to timer.attach

Changed in this revision

Button.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Button.cpp	Thu Jan 24 12:27:33 2019 +0000
+++ b/Button.cpp	Thu Feb 21 08:19:49 2019 +0000
@@ -78,7 +78,7 @@
                         (*iNumBtn)++;
                     
                     if(fTime > 0)                                                // if btn has a timer, 
-                        timer->attach(this, &Button::setLongPressFlag, fTime);
+                        timer->attach(callback(this, &Button::setLongPressFlag), fTime);
                         
 
                 } else if(bNewState == NOT_PRESSED) {                           // if btn is not pressed, then