Jonne Valola / PokittoLib Featured

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!

Files at this revision

API Documentation at this revision

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