diff --git a/openrtx/include/core/voicePrompts.h b/openrtx/include/core/voicePrompts.h index 5c0c8cd9..2e7b3c98 100644 --- a/openrtx/include/core/voicePrompts.h +++ b/openrtx/include/core/voicePrompts.h @@ -181,7 +181,7 @@ typedef enum vpHigh } VoicePromptVerbosity_T; -extern bool voicePromptDataIsLoaded; +extern bool vpDataIsLoaded; extern const uint32_t VOICE_PROMPTS_FLASH_HEADER_ADDRESS; extern VoicePromptVerbosity_T vpLevel; // Loads just the TOC from Flash and stores in RAM for fast access. diff --git a/openrtx/src/core/voicePrompts.c b/openrtx/src/core/voicePrompts.c index 56959b19..b2d60ee1 100644 --- a/openrtx/src/core/voicePrompts.c +++ b/openrtx/src/core/voicePrompts.c @@ -48,7 +48,7 @@ static uint32_t vpFlashDataAddress;// = VOICE_PROMPTS_FLASH_HEADER_ADDRESS + siz // 76 x 27 byte Codec2 frames #define Codec2DataBufferSize 2052 -bool voicePromptDataIsLoaded = false; +bool vpDataIsLoaded = false; VoicePromptVerbosity_T vpLevel = vpHigh; static bool voicePromptIsActive = false; @@ -87,10 +87,11 @@ void vpCacheInit(void) if (vpCheckHeader((uint32_t *)&header)) {// ToDo see above - voicePromptDataIsLoaded = false; //SPI_Flash_read(VOICE_PROMPTS_FLASH_HEADER_ADDRESS + sizeof(voicePromptsDataHeader_t), (uint8_t *)&tableOfContents, sizeof(uint32_t) * VOICE_PROMPTS_TOC_SIZE); + vpDataIsLoaded = false; //SPI_Flash_read(VOICE_PROMPTS_FLASH_HEADER_ADDRESS + sizeof(voicePromptsDataHeader_t), (uint8_t *)&tableOfContents, sizeof(uint32_t) * VOICE_PROMPTS_TOC_SIZE); vpFlashDataAddress = VOICE_PROMPTS_FLASH_HEADER_ADDRESS + sizeof(voicePromptsDataHeader_t) + sizeof(uint32_t)*VOICE_PROMPTS_TOC_SIZE ; } - + if (!vpDataIsLoaded) + vpLevel = vpNone; } bool vpCheckHeader(uint32_t *bufferAddress)