From 52fcc2d3864f001bf3820998e3451a62d251d160 Mon Sep 17 00:00:00 2001 From: Martin Date: Sat, 7 Dec 2024 18:23:03 +0100 Subject: [PATCH] First implementation --- platformio.ini | 1 + src/esPod.cpp | 31 +++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/platformio.ini b/platformio.ini index 1e7954d..db23989 100644 --- a/platformio.ini +++ b/platformio.ini @@ -18,6 +18,7 @@ build_flags = -D ENABLE_A2DP -D BUILD_BRANCH="\"main"\" -D PIOENV="\"$PIOENV"\" + -D REFRESH_INTERVAL=10 [env:audioKit] board = esp32dev diff --git a/src/esPod.cpp b/src/esPod.cpp index ffd2717..7b768c1 100644 --- a/src/esPod.cpp +++ b/src/esPod.cpp @@ -616,7 +616,11 @@ void esPod::processLingo0x00(const byte *byteArray, uint32_t len) { ESP_LOGI(IPOD_TAG,"CMD: 0x%02x IdentifyDeviceLingoes",cmdID); L0x00_0x02_iPodAck(iPodAck_OK,cmdID);//Acknowledge, start capabilities pingpong - L0x00_0x27_GetAccessoryInfo(0x00); //Immediately request general capabilities + if(!_accessoryCapabilitiesRequested) + { + L0x00_0x27_GetAccessoryInfo(0x00); //Immediately request general capabilities + } + } break; @@ -627,27 +631,42 @@ void esPod::processLingo0x00(const byte *byteArray, uint32_t len) { case 0x00: _accessoryCapabilitiesRequested = true; - L0x00_0x27_GetAccessoryInfo(0x01); //Request the name + if (!_accessoryNameRequested) + { + L0x00_0x27_GetAccessoryInfo(0x01); //Request the name + } break; case 0x01: _accessoryNameRequested = true; - L0x00_0x27_GetAccessoryInfo(0x04); //Request the firmware version + if (!_accessoryFirmwareRequested) + { + L0x00_0x27_GetAccessoryInfo(0x04); //Request the firmware version + } break; case 0x04: _accessoryFirmwareRequested = true; - L0x00_0x27_GetAccessoryInfo(0x05); //Request the hardware number + if (!_accessoryHardwareRequested) + { + L0x00_0x27_GetAccessoryInfo(0x05); //Request the hardware number + } break; case 0x05: _accessoryHardwareRequested = true; - L0x00_0x27_GetAccessoryInfo(0x06); //Request the manufacturer name + if (!_accessoryManufRequested) + { + L0x00_0x27_GetAccessoryInfo(0x06); //Request the manufacturer name + } break; case 0x06: _accessoryManufRequested = true; - L0x00_0x27_GetAccessoryInfo(0x07); //Request the model number + if (!_accessoryModelRequested) + { + L0x00_0x27_GetAccessoryInfo(0x07); //Request the model number + } break; case 0x07: