mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
[stock] Volume mod: volume was not set at Tx startup
This commit is contained in:
parent
956d034fdc
commit
1e69cfa94a
5 changed files with 11 additions and 7 deletions
|
@ -241,12 +241,9 @@ void menuProcSetup(uint8_t event)
|
|||
lcd_outdezAtt(GENERAL_PARAM_OFS, y, b, attr|LEFT);
|
||||
if (attr) {
|
||||
CHECK_INCDEC_GENVAR(event, b, 0, 7);
|
||||
if (g_eeGeneral.speakerVolume != (int8_t)b-7) {
|
||||
if (checkIncDec_Ret) {
|
||||
g_eeGeneral.speakerVolume = (int8_t)b-7;
|
||||
#if defined(PCBSTD)
|
||||
// TODO do the same on V4 Board with SOMO-14D ... with a #define ...
|
||||
pushCustomPrompt(b | 0xF0);
|
||||
#endif
|
||||
SET_VOLUME(b);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -254,7 +251,7 @@ void menuProcSetup(uint8_t event)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAPTIC
|
||||
#if defined(HAPTIC)
|
||||
case ITEM_SETUP_HAPTIC_MODE:
|
||||
g_eeGeneral.hapticMode = selectMenuItem(GENERAL_PARAM_OFS, y, STR_HAPTICMODE, STR_VBEEPMODE, g_eeGeneral.hapticMode, -2, 1, attr, event);
|
||||
break;
|
||||
|
|
|
@ -44,3 +44,5 @@ extern bool isPlaying(uint8_t id);
|
|||
#define PLAY_DURATION(d) playDuration((d), id)
|
||||
#define IS_PLAYING(id) isPlaying((id))
|
||||
#define PLAY_VALUE(v, id) playValue((v), (id))
|
||||
|
||||
#define SET_VOLUME(v)
|
||||
|
|
|
@ -3208,6 +3208,8 @@ inline void open9xInit(OPEN9X_INIT_ARGS)
|
|||
#if defined(PCBARM)
|
||||
setVolume(g_eeGeneral.speakerVolume);
|
||||
PWM->PWM_CH_NUM[0].PWM_CDTYUPD = g_eeGeneral.backlightBright;
|
||||
#elif defined(VOICE)
|
||||
SET_VOLUME(g_eeGeneral.speakerVolume+7);
|
||||
#endif
|
||||
|
||||
#if defined(PCBARM) && defined(BLUETOOTH)
|
||||
|
|
|
@ -119,7 +119,8 @@ void t_voice::voice_process(void)
|
|||
// delay to allow input to settle
|
||||
asm(" nop");
|
||||
asm(" nop");
|
||||
asm(" nop") ;
|
||||
asm(" nop");
|
||||
asm(" nop");
|
||||
#endif
|
||||
busy = PINB & 0x80;
|
||||
DDRB |= (1 << OUT_B_LIGHT); // Change to output
|
||||
|
|
|
@ -73,6 +73,8 @@ extern void pushPrompt( uint8_t value );
|
|||
extern struct t_voice *voiceaddress( void ) ;
|
||||
extern struct t_voice Voice ;
|
||||
|
||||
#define SET_VOLUME(v) pushCustomPrompt((v) | 0xF0)
|
||||
|
||||
inline bool isPlaying()
|
||||
{
|
||||
#if defined(SIMU)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue