Center Beep was too long (Issue 4)
Inactivity Beep was too long Vibrations now possible on key press
This commit is contained in:
+3
-3
@@ -179,15 +179,15 @@ void audioQueue::event(uint8_t e, uint8_t f)
|
||||
break;
|
||||
// keypad up (seems to be used when going left/right through system menu options. 0-100 scales etc)
|
||||
case AU_KEYPAD_UP:
|
||||
playNow(BEEP_KEY_UP_FREQ, 10, 1);
|
||||
playNow(BEEP_KEY_UP_FREQ, 10, 1, 0, 1);
|
||||
break;
|
||||
// keypad down (seems to be used when going left/right through system menu options. 0-100 scales etc)
|
||||
case AU_KEYPAD_DOWN:
|
||||
playNow(BEEP_KEY_DOWN_FREQ, 10, 1);
|
||||
playNow(BEEP_KEY_DOWN_FREQ, 10, 1, 0, 1);
|
||||
break;
|
||||
// menu display (also used by a few generic beeps)
|
||||
case AU_MENUS:
|
||||
playNow(BEEP_DEFAULT_FREQ, 10, 2, 0, 0);
|
||||
playNow(BEEP_DEFAULT_FREQ, 10, 2, 0, 1);
|
||||
break;
|
||||
// trim move
|
||||
case AU_TRIM_MOVE:
|
||||
|
||||
@@ -214,6 +214,7 @@ void audioDefevent(uint8_t e);
|
||||
#define AUDIO_MIX_WARNING_1() audioDefevent(AU_MIX_WARNING_1)
|
||||
#define AUDIO_MIX_WARNING_2() audioDefevent(AU_MIX_WARNING_2)
|
||||
#define AUDIO_MIX_WARNING_3() audioDefevent(AU_MIX_WARNING_3)
|
||||
#define AUDIO_POT_STICK_MIDDLE() audioDefevent(AU_POT_STICK_MIDDLE)
|
||||
|
||||
#if defined(PCBSTD)
|
||||
#define AUDIO_DRIVER() audio.driver()
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ static const pm_uint8_t beepTab[] PROGMEM = {
|
||||
|
||||
void beep(uint8_t val)
|
||||
{
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && val!=0) || (g_eeGeneral.beeperMode==-1 && val==4)) {
|
||||
_beep(pgm_read_byte(beepTab+(5*2)+(5*g_eeGeneral.beeperLength)+val));
|
||||
if (g_eeGeneral.beeperMode>0 || (g_eeGeneral.beeperMode==0 && val!=0) || (g_eeGeneral.beeperMode==-1 && val>=3)) {
|
||||
_beep(pgm_read_byte(beepTab+5*(2+g_eeGeneral.beeperLength)+val));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -58,10 +58,11 @@ extern void beep(uint8_t val);
|
||||
#define AUDIO_TIMER_10() beep(2)
|
||||
#define AUDIO_TIMER_LT3() beep(2)
|
||||
#define AUDIO_MINUTE_BEEP() beep(2)
|
||||
#define AUDIO_INACTIVITY() AUDIO_ERROR()
|
||||
#define AUDIO_INACTIVITY() beep(3)
|
||||
#define AUDIO_MIX_WARNING_1() beep(1)
|
||||
#define AUDIO_MIX_WARNING_2() beep(1)
|
||||
#define AUDIO_MIX_WARNING_3() beep(1)
|
||||
#define AUDIO_POT_STICK_MIDDLE() beep(2)
|
||||
|
||||
#define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn)
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ void writeLogs()
|
||||
{
|
||||
g_logState = -result;
|
||||
// TODO beepAgain = result - 1;
|
||||
AUDIO_WARNING1();
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+7
-7
@@ -279,7 +279,7 @@ void menuProcModelSelect(uint8_t event)
|
||||
chainMenu(_event == EVT_KEY_FIRST(KEY_RIGHT) ? menuProcModel : menuTabModel[DIM(menuTabModel)-1]);
|
||||
return;
|
||||
}
|
||||
AUDIO_WARNING1();
|
||||
AUDIO_WARNING2();
|
||||
break;
|
||||
case EVT_KEY_FIRST(KEY_UP):
|
||||
case EVT_KEY_FIRST(KEY_DOWN):
|
||||
@@ -442,7 +442,7 @@ void menuProcModel(uint8_t event)
|
||||
uint16_t timer_val = timer->val;
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW));
|
||||
CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS+2*(MAX_PSWITCH+NUM_CSW));
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
@@ -506,8 +506,9 @@ void menuProcModel(uint8_t event)
|
||||
|
||||
if(s_pgOfs<subN) {
|
||||
lcd_putsLeft( y, STR_BEEPCTR);
|
||||
for(uint8_t i=0;i<7;i++) lcd_putsiAtt(PARAM_OFS+i*FW, y, STR_RETA123, i, ((m_posHorz==i) && (sub==subN)) ? BLINK : ((g_model.beepANACenter & (1<<i)) ? INVERS : 0 ) );
|
||||
if(sub==subN){
|
||||
for (uint8_t i=0;i<NUM_STICKS+NUM_POTS;i++)
|
||||
lcd_putsiAtt(PARAM_OFS+i*FW, y, STR_RETA123, i, ((m_posHorz==i) && (sub==subN)) ? BLINK : ((g_model.beepANACenter & (1<<i)) ? INVERS : 0 ) );
|
||||
if (sub==subN){
|
||||
if((event==EVT_KEY_FIRST(KEY_MENU)) || p1valdiff) {
|
||||
killEvents(event);
|
||||
s_editMode = 0;
|
||||
@@ -602,7 +603,6 @@ void menuProcModel(uint8_t event)
|
||||
if (event==EVT_KEY_LONG(KEY_MENU)) {
|
||||
// send reset code
|
||||
pxxFlag = PXX_SEND_RXNUM;
|
||||
// TODO audioDefevent(AUDIO_WARNING1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1762,7 +1762,7 @@ void menuProcFunctionSwitches(uint8_t event)
|
||||
case 0:
|
||||
putsSwitches(1*FW, y, sd->swtch, attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH);
|
||||
CHECK_INCDEC_MODELVAR( event, sd->swtch, -MAX_SWITCH, MAX_SWITCH+1);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@@ -2039,7 +2039,7 @@ void menuProcTemplates(uint8_t event)
|
||||
applyTemplate(sub);
|
||||
if (sub==NUM_TEMPLATES)
|
||||
clearMixes();
|
||||
AUDIO_WARNING1();
|
||||
AUDIO_WARNING2();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -1043,7 +1043,8 @@ uint8_t evalSticks(uint8_t phase)
|
||||
v = -v;
|
||||
|
||||
calibratedStick[ch] = v; //for show in expo
|
||||
if(!(v/16)) anaCenter |= 1<<ch;
|
||||
uint8_t tmp = (uint16_t)abs(v) / 16;
|
||||
if (tmp <= 1) anaCenter |= (tmp==0 ? 1<<ch : bpanaCenter & (1<<ch));
|
||||
|
||||
if (ch < NUM_STICKS) { //only do this for sticks
|
||||
if (!s_noStickInputs && (isFunctionActive(FUNC_TRAINER) || isFunctionActive(FUNC_TRAINER_RUD+ch))) {
|
||||
@@ -1123,7 +1124,7 @@ void perOut(int16_t *chanOut, uint8_t phase)
|
||||
|
||||
//===========BEEP CENTER================
|
||||
anaCenter &= g_model.beepANACenter;
|
||||
if(((bpanaCenter ^ anaCenter) & anaCenter)) AUDIO_WARNING1();
|
||||
if(((bpanaCenter ^ anaCenter) & anaCenter)) AUDIO_POT_STICK_MIDDLE();
|
||||
bpanaCenter = anaCenter;
|
||||
|
||||
anas[MIX_MAX-1] = RESX; // MAX
|
||||
@@ -2033,7 +2034,7 @@ void instantTrim()
|
||||
}
|
||||
|
||||
STORE_MODELVARS;
|
||||
AUDIO_WARNING1();
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
|
||||
#if defined (PCBV4)
|
||||
|
||||
Reference in New Issue
Block a user