Voice for custom board - sound volume 0x1F0-0x1F7
PROMPT_CUSTOM_BASE changed to 256 Sound volume menu shifted below SPEAKER_PITCH
This commit is contained in:
+19
-18
@@ -118,13 +118,13 @@ void displaySlider(uint8_t x, uint8_t y, uint8_t value, uint8_t attr)
|
||||
|
||||
enum menuProcSetupItems {
|
||||
ITEM_SETUP_BEEPER_MODE,
|
||||
#if defined(VOICE)
|
||||
ITEM_SETUP_SPEAKER_VOLUME,
|
||||
#endif
|
||||
ITEM_SETUP_BEEPER_LENGTH,
|
||||
#if defined(AUDIO)
|
||||
ITEM_SETUP_SPEAKER_PITCH,
|
||||
#endif
|
||||
#if defined(VOICE)
|
||||
ITEM_SETUP_SPEAKER_VOLUME,
|
||||
#endif
|
||||
#if defined(HAPTIC)
|
||||
ITEM_SETUP_HAPTIC_MODE,
|
||||
ITEM_SETUP_HAPTIC_LENGTH,
|
||||
@@ -212,6 +212,20 @@ void menuProcSetup(uint8_t event)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ITEM_SETUP_BEEPER_LENGTH:
|
||||
SLIDER(y, g_eeGeneral.beeperLength, -2, 2, STR_BEEPERLEN, STR_VBEEPLEN, event, attr);
|
||||
break;
|
||||
|
||||
#if defined(AUDIO)
|
||||
case ITEM_SETUP_SPEAKER_PITCH:
|
||||
lcd_putsLeft( y, STR_SPKRPITCH);
|
||||
lcd_outdezAtt(GENERAL_PARAM_OFS, y, g_eeGeneral.speakerPitch, attr|LEFT);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.speakerPitch, 0, 100);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
case ITEM_SETUP_SPEAKER_VOLUME:
|
||||
{
|
||||
@@ -229,7 +243,7 @@ void menuProcSetup(uint8_t event)
|
||||
CHECK_INCDEC_GENVAR(event, b, 0, 7);
|
||||
if (g_eeGeneral.speakerVolume != (int8_t)b-7) {
|
||||
g_eeGeneral.speakerVolume = (int8_t)b-7;
|
||||
pushPrompt(b | 0xF0);
|
||||
pushCustomPrompt(b | 0xF0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -237,20 +251,6 @@ void menuProcSetup(uint8_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
case ITEM_SETUP_BEEPER_LENGTH:
|
||||
SLIDER(y, g_eeGeneral.beeperLength, -2, 2, STR_BEEPERLEN, STR_VBEEPLEN, event, attr);
|
||||
break;
|
||||
|
||||
#if defined(AUDIO)
|
||||
case ITEM_SETUP_SPEAKER_PITCH:
|
||||
lcd_putsLeft( y, STR_SPKRPITCH);
|
||||
lcd_outdezAtt(GENERAL_PARAM_OFS, y, g_eeGeneral.speakerPitch, attr|LEFT);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_GENVAR(event, g_eeGeneral.speakerPitch, 0, 100);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef HAPTIC
|
||||
case ITEM_SETUP_HAPTIC_MODE:
|
||||
g_eeGeneral.hapticMode = selectMenuItem(y, STR_HAPTICMODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
@@ -501,6 +501,7 @@ void menuProcTime(uint8_t event)
|
||||
break;
|
||||
case 2:
|
||||
lcd_outdezNAtt(FW*16-2, y, at->tm_sec, attr|LEADING0, 2);
|
||||
|
||||
if(attr && (s_editMode>0 || p1valdiff)) at->tm_sec = checkIncDec( event, at->tm_sec, 0, 59, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#define PROMPT_SYSTEM_BASE 230
|
||||
#define PROMPT_CUSTOM_BASE 260
|
||||
#define PROMPT_CUSTOM_BASE 256
|
||||
|
||||
#define pushCustomPrompt(p) pushPrompt(PROMPT_CUSTOM_BASE+v)
|
||||
extern void pushPrompt(uint16_t prompt);
|
||||
|
||||
+5
-5
@@ -37,7 +37,7 @@ struct t_voice Voice ;
|
||||
/* TODO why? static uint8_t v_ctr ;
|
||||
uint8_t v_first[8] ; */
|
||||
|
||||
void putVoiceQueueUpper( uint8_t value )
|
||||
/*void putVoiceQueueUpper( uint8_t value )
|
||||
{
|
||||
struct t_voice *vptr;
|
||||
vptr = voiceaddress();
|
||||
@@ -46,7 +46,7 @@ void putVoiceQueueUpper( uint8_t value )
|
||||
pushPrompt(0xFF);
|
||||
pushPrompt(value);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void pushCustomPrompt(uint8_t value)
|
||||
{
|
||||
@@ -104,14 +104,14 @@ void t_voice::voice_process(void)
|
||||
VoiceQueueCount -= 1;
|
||||
if (VoiceShift) {
|
||||
VoiceShift = 0;
|
||||
VoiceSerial += 260;
|
||||
VoiceSerial += 256;
|
||||
}
|
||||
VoiceTimer = 16;
|
||||
if (VoiceSerial == 0xFF) { // Looking for FF
|
||||
if (VoiceSerial == 0xFF) { // Looking for Shift FF
|
||||
VoiceShift = 1;
|
||||
return;
|
||||
}
|
||||
if ((VoiceSerial & 0x01F8) == 0xF0) { // Looking for F0-F7
|
||||
if ((VoiceSerial & 0x1F8) == 0x1F0) { // Looking for sound volume 1F0-1F7
|
||||
VoiceSerial |= 0xFF00;
|
||||
VoiceTimer = 40;
|
||||
}
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
#define V_WAIT_BUSY_DELAY 5
|
||||
|
||||
#define PROMPT_SYSTEM_BASE 230
|
||||
#define PROMPT_CUSTOM_BASE 260
|
||||
#define PROMPT_CUSTOM_BASE 256
|
||||
|
||||
struct t_voice
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user