Browse Source

Audio-Hotfix

master
Torsten Stauder 4 years ago
parent
commit
756dd8a444
  1. 9
      src/AudioPlayer.cpp
  2. 2
      src/revision.h

9
src/AudioPlayer.cpp

@ -23,6 +23,7 @@
#define AUDIOPLAYER_VOLUME_INIT 3u #define AUDIOPLAYER_VOLUME_INIT 3u
playProps gPlayProperties; playProps gPlayProperties;
uint32_t cnt123 = 0;
// Volume // Volume
static uint8_t AudioPlayer_CurrentVolume = AUDIOPLAYER_VOLUME_INIT; static uint8_t AudioPlayer_CurrentVolume = AUDIOPLAYER_VOLUME_INIT;
@ -103,7 +104,7 @@ void AudioPlayer_Init(void) {
xTaskCreatePinnedToCore( xTaskCreatePinnedToCore(
AudioPlayer_Task, /* Function to implement the task */ AudioPlayer_Task, /* Function to implement the task */
"mp3play", /* Name of the task */ "mp3play", /* Name of the task */
5000, /* Stack size in words */
5500, /* Stack size in words */
NULL, /* Task input parameter */ NULL, /* Task input parameter */
2 | portPRIVILEGE_BIT, /* Priority of the task */ 2 | portPRIVILEGE_BIT, /* Priority of the task */
NULL, /* Task handle. */ NULL, /* Task handle. */
@ -274,6 +275,10 @@ void AudioPlayer_Task(void *parameter) {
bool audioReturnCode; bool audioReturnCode;
for (;;) { for (;;) {
if (cnt123++ % 100 == 0) {
snprintf(Log_Buffer, Log_BufferLength, "%u", uxTaskGetStackHighWaterMark(NULL));
Log_Println(Log_Buffer, LOGLEVEL_DEBUG);
}
if (xQueueReceive(gVolumeQueue, &currentVolume, 0) == pdPASS) { if (xQueueReceive(gVolumeQueue, &currentVolume, 0) == pdPASS) {
snprintf(Log_Buffer, Log_BufferLength, "%s: %d", (char *) FPSTR(newLoudnessReceivedQueue), currentVolume); snprintf(Log_Buffer, Log_BufferLength, "%s: %d", (char *) FPSTR(newLoudnessReceivedQueue), currentVolume);
Log_Println(Log_Buffer, LOGLEVEL_INFO); Log_Println(Log_Buffer, LOGLEVEL_INFO);
@ -687,7 +692,7 @@ void AudioPlayer_Task(void *parameter) {
} }
} }
vTaskDelay(portTICK_PERIOD_MS * 3);
vTaskDelay(portTICK_PERIOD_MS * 1);
//esp_task_wdt_reset(); // Don't forget to feed the dog! //esp_task_wdt_reset(); // Don't forget to feed the dog!
} }
vTaskDelete(NULL); vTaskDelete(NULL);

2
src/revision.h

@ -1,4 +1,4 @@
#ifndef __REVISION_H__ #ifndef __REVISION_H__
#define __REVISION_H__ #define __REVISION_H__
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20211002-1";
constexpr const char softwareRevision[] PROGMEM = "Software-revision: 20211004-1";
#endif #endif
Loading…
Cancel
Save