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.
Dependents: YATTT sd_map_test cPong SnowDemo ... more
PokittoLib
Library for programming Pokitto hardware
How to Use
- Import this library to online compiler (see button "import" on the right hand side
- DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
- Change My_settings.h according to your project
- Start coding!
Revision 53:ee5e28819ebb, committed 2018-07-21
- Comitter:
- Pokitto
- Date:
- Sat Jul 21 11:39:21 2018 +0000
- Parent:
- 52:c04087025cab
- Child:
- 54:7082c373d764
- Commit message:
- fixed countdown bug
Changed in this revision
| POKITTO_CORE/PokittoCore.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/POKITTO_CORE/PokittoCore.cpp Sun Jul 01 06:32:37 2018 +0000
+++ b/POKITTO_CORE/PokittoCore.cpp Sat Jul 21 11:39:21 2018 +0000
@@ -473,6 +473,7 @@
float vol = sound.getVolume(); float tvol;
#ifndef POK_SIM
vol=eeprom_read_byte((uint16_t*)EESETTINGS_VOL);
+ if (vol<0) vol=0;
Pokitto::Sound::globalVolume=vol;
#endif
if (vol>VOLUME_HEADPHONE_MAX) sound.setMaxVol(VOLUME_SPEAKER_MAX);
@@ -490,7 +491,7 @@
//read countdown time from settings
countd = eeprom_read_byte((uint16_t*)EESETTINGS_VOLWAIT);
#endif
- if (countd==0 || countd > 10) countd=0xFFFF;
+ if (countd<=0 || countd > 10) countd=0xFFFF;
#ifdef PRODUCTIONTESTING
countd=2;
#endif