diff --git a/src/gruvin9x/somo14d.cpp b/src/gruvin9x/somo14d.cpp index f9957d204..e8ef77ab7 100644 --- a/src/gruvin9x/somo14d.cpp +++ b/src/gruvin9x/somo14d.cpp @@ -172,7 +172,7 @@ ISR(TIMER4_COMPA_vect) //Every 0.5ms normally, every 2ms during startup reset } #endif -void pushPrompt(uint16_t prompt, uint8_t id) +void pushPrompt(uint16_t prompt) { /* TODO id */ somo14playlist[somo14WIdx] = prompt; @@ -182,7 +182,7 @@ void pushPrompt(uint16_t prompt, uint8_t id) sei(); } -bool isPlaying(uint8_t id) +bool isPlaying() { /* TODO id */ #if defined(SIMU) diff --git a/src/gruvin9x/somo14d.h b/src/gruvin9x/somo14d.h index 49809eaff..0130fb48a 100644 --- a/src/gruvin9x/somo14d.h +++ b/src/gruvin9x/somo14d.h @@ -37,16 +37,16 @@ #define PROMPT_SYSTEM_BASE 230 #define PROMPT_CUSTOM_BASE 256 -extern void pushPrompt(uint16_t prompt, uint8_t id=0); -extern bool isPlaying(uint8_t id); +extern void pushPrompt(uint16_t prompt); +extern bool isPlaying(); -#define PLAY_FUNCTION(x, ...) void x(__VA_ARGS__, uint8_t id) -#define PUSH_PROMPT(p) pushPrompt((p), id) -#define PUSH_CUSTOM_PROMPT(p, id) pushPrompt(PROMPT_CUSTOM_BASE+(p), (id)) -#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a), id) -#define PLAY_DURATION(d) playDuration((d), id) -#define IS_PLAYING(id) isPlaying((id)) -#define PLAY_VALUE(v, id) playValue((v), (id)) +#define PLAY_FUNCTION(x, ...) void x(__VA_ARGS__) +#define PUSH_PROMPT(p) pushPrompt((p)) +#define PUSH_CUSTOM_PROMPT(p, id) pushPrompt(PROMPT_CUSTOM_BASE+(p)) +#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a)) +#define PLAY_DURATION(d) playDuration((d)) +#define IS_PLAYING(id) isPlaying() +#define PLAY_VALUE(v, id) playValue((v)) #define VOLUME_LEVEL_MAX 7 #define VOLUME_LEVEL_DEF 7 diff --git a/src/translations.h b/src/translations.h index 64a605657..c2e8ed302 100644 --- a/src/translations.h +++ b/src/translations.h @@ -492,20 +492,20 @@ extern const pm_char STR_DATE[]; extern const pm_char STR_CHANNELS_MONITOR[]; #if defined(VOICE) -PLAY_FUNCTION(playNumber, int16_t number, uint8_t unit, uint8_t att); -PLAY_FUNCTION(playDuration, int16_t seconds); + PLAY_FUNCTION(playNumber, int16_t number, uint8_t unit, uint8_t att); + PLAY_FUNCTION(playDuration, int16_t seconds); #endif #if LCD_W >= 212 -extern const pm_char STR_MODELNAME[]; -extern const pm_char STR_PHASENAME[]; -extern const pm_char STR_MIXNAME[]; -extern const pm_char STR_EXPONAME[]; + extern const pm_char STR_MODELNAME[]; + extern const pm_char STR_PHASENAME[]; + extern const pm_char STR_MIXNAME[]; + extern const pm_char STR_EXPONAME[]; #else -#define STR_MODELNAME STR_NAME -#define STR_PHASENAME STR_NAME -#define STR_MIXNAME STR_NAME -#define STR_EXPONAME STR_NAME + #define STR_MODELNAME STR_NAME + #define STR_PHASENAME STR_NAME + #define STR_MIXNAME STR_NAME + #define STR_EXPONAME STR_NAME #endif #endif diff --git a/src/translations/tts_cz.cpp b/src/translations/tts_cz.cpp index 91bc60d79..eda3f7dd8 100644 --- a/src/translations/tts_cz.cpp +++ b/src/translations/tts_cz.cpp @@ -88,10 +88,10 @@ enum CzechPrompts { #if defined(VOICE) -#if defined(PCBSTD) -#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#else +#if defined(CPUARM) #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u), id) +#else +#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif #define MUZSKY 0x80 diff --git a/src/translations/tts_en.cpp b/src/translations/tts_en.cpp index ebd27a036..5b10129c2 100644 --- a/src/translations/tts_en.cpp +++ b/src/translations/tts_en.cpp @@ -72,10 +72,10 @@ enum EnglishPrompts { #if defined(VOICE) -#if defined(PCBSTD) -#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#else +#if defined(CPUARM) #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u), id) +#else +#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif PLAY_FUNCTION(pushUnitPrompt, int16_t number, uint8_t unitprompt) diff --git a/src/translations/tts_sk.cpp b/src/translations/tts_sk.cpp index 62b506229..3e5eef6ce 100644 --- a/src/translations/tts_sk.cpp +++ b/src/translations/tts_sk.cpp @@ -103,10 +103,10 @@ enum SlovakPrompts { #if defined(VOICE) -#if defined(PCBSTD) -#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) -#else +#if defined(CPUARM) #define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u), id) +#else +#define PUSH_UNIT_PROMPT(p, u) pushUnitPrompt((p), (u)) #endif #define MUZSKY 0x80 diff --git a/src/x9d/pulses_driver.cpp b/src/x9d/pulses_driver.cpp index b36babdc3..02fdf270e 100644 --- a/src/x9d/pulses_driver.cpp +++ b/src/x9d/pulses_driver.cpp @@ -145,17 +145,7 @@ extern "C" void TIM1_CC_IRQHandler() setupPulses() ; - if (s_current_protocol == PROTO_PPM) - { - ppmStreamPtr = ppmStream ; - - TIM1->DIER |= TIM_DIER_UDE ; - - TIM1->SR &= ~TIM_SR_UIF ; // Clear this flag - TIM1->DIER |= TIM_DIER_UIE ; // Enable this interrupt - } - else if (s_current_protocol == PROTO_PXX) - { + if (s_current_protocol == PROTO_PXX) { DMA2_Stream1->CR &= ~DMA_SxCR_EN ; // Disable DMA DMA2->LIFCR = DMA_LIFCR_CTCIF1 | DMA_LIFCR_CHTIF1 | DMA_LIFCR_CTEIF1 | DMA_LIFCR_CDMEIF1 | DMA_LIFCR_CFEIF1 ; // Write ones to clear bits DMA2_Stream1->M0AR = CONVERT_PTR(&pxxStream[1]); @@ -163,6 +153,14 @@ extern "C" void TIM1_CC_IRQHandler() TIM1->CCR1 = pxxStream[0] ; TIM1->DIER |= TIM_DIER_CC2IE ; // Enable this interrupt } + else { + ppmStreamPtr = ppmStream ; + + TIM1->DIER |= TIM_DIER_UDE ; + + TIM1->SR &= ~TIM_SR_UIF ; // Clear this flag + TIM1->DIER |= TIM_DIER_UIE ; // Enable this interrupt + } } extern "C" void TIM1_UP_TIM10_IRQHandler()