Audio system on ersky9x ... another rewrite

Some flash saved on stock
GPS calculations flash saving (around 100bytes, needs to be tested)
This commit is contained in:
bsongis
2012-07-06 13:09:29 +00:00
parent e94db55b27
commit cb073fa549
10 changed files with 177 additions and 116 deletions
+11 -6
View File
@@ -36,9 +36,9 @@ extern "C" {
#include <CoOS.h>
}
#define MIXER_STACK_SIZE 300
#define MENUS_STACK_SIZE 300
#define AUDIO_STACK_SIZE 300
#define MIXER_STACK_SIZE 500
#define MENUS_STACK_SIZE 1000
#define AUDIO_STACK_SIZE 500
#define BT_STACK_SIZE 100
OS_TID mixerTaskId;
@@ -2398,7 +2398,7 @@ void perMain()
// TODO port lightOnStickMove from er9x + flash saving, call checkBacklight()
if(g_LightOffCounter) g_LightOffCounter--;
if(evt) g_LightOffCounter = g_eeGeneral.lightAutoOff*500; // on keypress turn the light on 5*100
if(evt) backlightOn(); // on keypress turn the light on
if (getSwitch(g_eeGeneral.lightSw,0) || g_LightOffCounter)
BACKLIGHT_ON;
@@ -2901,7 +2901,7 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
clearKeyEvents(); //make sure no keys are down before proceeding
lcdSetRefVolt(g_eeGeneral.contrast);
g_LightOffCounter = g_eeGeneral.lightAutoOff*500; //turn on light for x seconds - no need to press key Issue 152
backlightOn();
#if defined(PCBARM)
@@ -2916,6 +2916,11 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
}
}
void backlightOn()
{
g_LightOffCounter = ((uint16_t)g_eeGeneral.lightAutoOff*250) << 1;
}
#if defined(PCBARM)
void mixerTask(void * pdata)
{
@@ -2930,7 +2935,7 @@ void mixerTask(void * pdata)
lastTMR = tmr10ms;
if (s_current_protocol < PROTO_NONE) {
checkTrims();
if (tick10ms) checkTrims();
doMixerCalculations(tmr10ms, tick10ms);
}