[all] Custom functions reworked

[all] Expo function rewritten and many other flash savings (thanks Andreas)
[stock] LONG key press duration is longer
[stock] Rotary Encoder bugs fixed
[stock/gruvin9x] Play Both function added
!!! TRANSLATIONS ALL NEED TO BE UPDATED BEFORE NEXT RELEASE
This commit is contained in:
bsongis
2013-02-15 20:11:12 +00:00
parent 5cda44ac0b
commit d64a71f5ab
22 changed files with 456 additions and 388 deletions
+6 -5
View File
@@ -64,11 +64,7 @@ uint8_t getEvent()
}
#endif
#if defined(CPUARM)
#define KEY_LONG_DELAY 32
#else
#define KEY_LONG_DELAY 24
#endif
Key keys[NUM_KEYS];
void Key::input(bool val, EnumKeys enuk)
@@ -161,11 +157,16 @@ void clearKeyEvents()
CoTickDelay(100); // 200ms
#endif
// loop until all keys are up
#if defined(SIMU)
while (keyDown() && main_thread_running) sleep(1/*ms*/);
#elif defined(PCBSTD) && defined(ROTARY_ENCODER_NAVIGATION) && !defined(TELEMETREZ)
while (keyDown()) { wdt_reset(); rotencPoll(); }
#else
while (keyDown()) wdt_reset(); // loop until all keys are up
while (keyDown()) wdt_reset();
#endif
memclear(keys, sizeof(keys));
putEvent(0);
}