refactor(ups-hid): clean abstraction layers, strategy pattern for protocol selection and proper data structure

Signed-off-by: bullshit <coding@ow-software.pl>
This commit is contained in:
bullshit committed 2025-08-23 14:22:02 +02:00
1 parent 0c1e540bb9
commit 7015fd2239
41 files changed
+4768 -3013

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ void UpsHidButton::press_action() {
// Get the current protocol from the parent component
UpsData ups_data = parent_->get_ups_data();
if (ups_data.detected_protocol == PROTOCOL_UNKNOWN) {
if (ups_data.device.detected_protocol == DeviceInfo::PROTOCOL_UNKNOWN) {
ESP_LOGW(BUTTON_TAG, "UPS protocol not detected, cannot execute button action");
return;
}