Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: button.cpp
- Revision:
- 9:a018d7c05dc7
- Parent:
- 8:ad8e2dd314a2
- Child:
- 10:8a6ecbf764fa
diff -r ad8e2dd314a2 -r a018d7c05dc7 button.cpp
--- a/button.cpp Tue Nov 10 12:46:47 2015 +0000
+++ b/button.cpp Tue Nov 10 13:06:51 2015 +0000
@@ -11,15 +11,16 @@
return *pin;
}
-float getPulse(){
- while(button.isPressed()== false{
+float Button::getPulse()
+{
+ while(this->ifPressed()== false){
//DO NADA
}
Timer timer;
timer.start();
- while(button.isPressed()== true{
+ while(this->ifPressed()== true){
wait(0.01f);
}
timer.stop();