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.
Revision 1:b2d57993ce40, committed 2016-07-08
- Comitter:
- tbjazic
- Date:
- Fri Jul 08 10:33:50 2016 +0000
- Parent:
- 0:5d42120ee981
- Commit message:
- initial
Changed in this revision
Kuhalo.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5d42120ee981 -r b2d57993ce40 Kuhalo.cpp --- a/Kuhalo.cpp Mon Jun 27 06:26:42 2016 +0000 +++ b/Kuhalo.cpp Fri Jul 08 10:33:50 2016 +0000 @@ -10,7 +10,7 @@ tipka4.rise(this, &Kuhalo::odabirPloce4); snaga.rise(this, &Kuhalo::izborSnage); debounce.start(); - odabranaPloca = 0; + odabranaPloca = odabranaSnaga = 0; } void Kuhalo::odabirPloce1() { @@ -47,8 +47,9 @@ void Kuhalo::izborSnage() { if (debounce.read_ms() > 20) { - vrijemeZaIzborSnage.detach(); debounce.reset(); + //vrijemeZaIzborSnage.detach(); + vrijemeZaIzborSnage.attach(this, &Kuhalo::ponistiOdabirPloce, 5); odabranaSnaga = ++odabranaSnaga % 5; float snaga = (float) odabranaSnaga / 4; switch(odabranaPloca) { @@ -70,4 +71,5 @@ void Kuhalo::ponistiOdabirPloce() { odabranaPloca = 0; + odabranaSnaga = 0; } \ No newline at end of file