Enhance Bluetooth functionality and GUI integration
- Add Bluetooth device list management with discovery and pairing support - Implement volume control with AVRC integration - Add system event handling for GUI-to-Bluetooth communication - Enhance menu system with device selection and volume control pages - Improve memory management by making menu creation lazy - Add proper event subscription between GUI and Bluetooth modules - Update filter coefficient for improved audio clicking behavior 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -166,4 +166,36 @@ void system_notifyAll(uint32_t eventBits) {
|
||||
}
|
||||
xSemaphoreGive(em->mutex);
|
||||
}
|
||||
}
|
||||
|
||||
void system_requestBtRefresh(void) {
|
||||
ESP_LOGI("system", "BT Refresh requested");
|
||||
system_notifyAll(EM_EVENT_BT_REFRESH);
|
||||
}
|
||||
|
||||
void system_requestBtConnect(int device_index) {
|
||||
xSemaphoreTake(_eventManager.mutex, portMAX_DELAY);
|
||||
_systemState.btDeviceIndex = device_index;
|
||||
xSemaphoreGive(_eventManager.mutex);
|
||||
|
||||
ESP_LOGI("system", "BT Connect requested for device %d", device_index);
|
||||
system_notifyAll(EM_EVENT_BT_CONNECT);
|
||||
}
|
||||
|
||||
int system_getBtDeviceIndex(void) {
|
||||
int index;
|
||||
xSemaphoreTake(_eventManager.mutex, portMAX_DELAY);
|
||||
index = _systemState.btDeviceIndex;
|
||||
xSemaphoreGive(_eventManager.mutex);
|
||||
return index;
|
||||
}
|
||||
|
||||
void system_requestVolumeUp(void) {
|
||||
ESP_LOGI("system", "Volume Up requested");
|
||||
system_notifyAll(EM_EVENT_VOLUME_UP);
|
||||
}
|
||||
|
||||
void system_requestVolumeDown(void) {
|
||||
ESP_LOGI("system", "Volume Down requested");
|
||||
system_notifyAll(EM_EVENT_VOLUME_DOWN);
|
||||
}
|
||||
Reference in New Issue
Block a user