From fe3120dbeedd9d4d2886a638b87e6fcfb78b713f Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Sat, 1 Apr 2023 04:26:11 +0200 Subject: [PATCH] Little bit of clean up --- software/main/include/volume.h | 1 - software/main/src/avrcp.cpp | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/software/main/include/volume.h b/software/main/include/volume.h index ef25094..193c7db 100644 --- a/software/main/include/volume.h +++ b/software/main/include/volume.h @@ -1,7 +1,6 @@ #pragma once #include -#include namespace volume_controller { void init(); diff --git a/software/main/src/avrcp.cpp b/software/main/src/avrcp.cpp index b7c1d32..dbb8df5 100644 --- a/software/main/src/avrcp.cpp +++ b/software/main/src/avrcp.cpp @@ -81,14 +81,11 @@ static void rc_tg_callback(esp_avrc_tg_cb_event_t event, esp_avrc_tg_cb_param_t* if (param->reg_ntf.event_id == ESP_AVRC_RN_VOLUME_CHANGE) { ESP_LOGI(AVRCP_TAG, "AVRC Volume Changes Supported"); - // Notify the phone of the current volume - // @TODO This does not appear to set the volume correctly on my OnePlus 7T Pro - // However for now it is not really relevant as the volume control is doen by the car - // In the future however it might be nice to sync the value on the phone, the esp and the car - // This will require some sort of CAN bus access + // Device supports volume notifcations volume_notify = true; esp_avrc_rn_param_t rn_param; rn_param.volume = volume_controller::current(); + // Notify the phone of the current volume esp_avrc_tg_send_rn_rsp(ESP_AVRC_RN_VOLUME_CHANGE, ESP_AVRC_RN_RSP_INTERIM, &rn_param); } else if (param->reg_ntf.event_id == ESP_AVRC_RN_PLAY_POS_CHANGED) { ESP_LOGI(AVRCP_TAG, "We can change the play position?");