mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-04-13 22:47:27 +03:00
chore: checkpoint current IDF 5.5 remediation state
This commit is contained in:
@@ -60,7 +60,7 @@ static bool bt_app_send_msg(bt_app_msg_t *msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (xQueueSend(s_bt_app_task_queue, msg, 10 / portTICK_RATE_MS) != pdTRUE) {
|
||||
if (xQueueSend(s_bt_app_task_queue, msg, 10 / portTICK_PERIOD_MS) != pdTRUE) {
|
||||
ESP_LOGE(TAG,"%s xQueue send failed", __func__);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ static void bt_app_task_handler(void* arg);
|
||||
static bool bt_app_send_msg(bt_app_msg_t* msg);
|
||||
static void bt_app_work_dispatched(bt_app_msg_t* msg);
|
||||
|
||||
static xQueueHandle s_bt_app_task_queue;
|
||||
static QueueHandle_t s_bt_app_task_queue;
|
||||
static bool running;
|
||||
|
||||
bool bt_app_work_dispatch(bt_app_cb_t p_cback, uint16_t event, void* p_params, int param_len,
|
||||
@@ -59,7 +59,7 @@ static bool bt_app_send_msg(bt_app_msg_t* msg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (xQueueSend(s_bt_app_task_queue, msg, 10 / portTICK_RATE_MS) != pdTRUE) {
|
||||
if (xQueueSend(s_bt_app_task_queue, msg, 10 / portTICK_PERIOD_MS) != pdTRUE) {
|
||||
ESP_LOGE(TAG, "%s xQueue send failed", __func__);
|
||||
return false;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ static void bt_app_task_handler(void* arg) {
|
||||
running = true;
|
||||
|
||||
while (running) {
|
||||
if (pdTRUE == xQueueReceive(s_bt_app_task_queue, &msg, (portTickType)portMAX_DELAY)) {
|
||||
if (pdTRUE == xQueueReceive(s_bt_app_task_queue, &msg, portMAX_DELAY)) {
|
||||
ESP_LOGV(TAG, "%s, sig 0x%x, 0x%x", __func__, msg.sig, msg.event);
|
||||
|
||||
switch (msg.sig) {
|
||||
|
||||
@@ -745,7 +745,7 @@ static void bt_av_hdl_stack_evt(uint16_t event, void *p_param)
|
||||
|
||||
/* create and start heart beat timer */
|
||||
int tmr_id = 0;
|
||||
s_tmr = xTimerCreate("connTmr", ( prev_duration/ portTICK_RATE_MS),pdFALSE, (void *)tmr_id, a2d_app_heart_beat);
|
||||
s_tmr = xTimerCreate("connTmr", ( prev_duration/ portTICK_PERIOD_MS),pdFALSE, (void *)tmr_id, a2d_app_heart_beat);
|
||||
xTimerStart(s_tmr, portMAX_DELAY);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ static void bt_app_rc_ct_cb(esp_avrc_ct_cb_event_t event, esp_avrc_ct_cb_param_t
|
||||
static void bt_av_hdl_avrc_ct_evt(uint16_t event, void *p_param);
|
||||
|
||||
/// callback function for A2DP source audio data stream
|
||||
static void a2d_app_heart_beat(void *arg);
|
||||
static void a2d_app_heart_beat(TimerHandle_t timer);
|
||||
|
||||
/// A2DP application state machine
|
||||
static void bt_app_av_sm_hdlr(uint16_t event, void *param);
|
||||
@@ -365,12 +365,13 @@ int heart_beat_delay[] = {
|
||||
1000
|
||||
};
|
||||
|
||||
static void a2d_app_heart_beat(void *arg)
|
||||
static void a2d_app_heart_beat(TimerHandle_t timer)
|
||||
{
|
||||
(void)timer;
|
||||
bt_app_work_dispatch(bt_app_av_sm_hdlr, BT_APP_HEART_BEAT_EVT, NULL, 0, NULL);
|
||||
int tmrduration=heart_beat_delay[bt_app_source_a2d_state];
|
||||
if(prev_duration!=tmrduration){
|
||||
xTimerChangePeriod(s_tmr,tmrduration, portMAX_DELAY);
|
||||
xTimerChangePeriod(s_tmr, pdMS_TO_TICKS(tmrduration), portMAX_DELAY);
|
||||
ESP_LOGD(TAG,"New heartbeat is %u",tmrduration);
|
||||
prev_duration=tmrduration;
|
||||
}
|
||||
@@ -704,7 +705,7 @@ static void bt_av_hdl_stack_evt(uint16_t event, void *p_param)
|
||||
|
||||
/* create and start heart beat timer */
|
||||
int tmr_id = 0;
|
||||
s_tmr = xTimerCreate("connTmr", ( prev_duration/ portTICK_RATE_MS),pdFALSE, (void *)tmr_id, a2d_app_heart_beat);
|
||||
s_tmr = xTimerCreate("connTmr", pdMS_TO_TICKS(prev_duration), pdFALSE, (void *)tmr_id, a2d_app_heart_beat);
|
||||
xTimerStart(s_tmr, portMAX_DELAY);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user