This commit is contained in:
J. Nick Koston
2026-03-29 15:43:54 -10:00
parent cf7b92b275
commit e97cc8cc3e
3 changed files with 8 additions and 29 deletions
-1
View File
@@ -177,7 +177,6 @@ class USBClient : public Component {
// Lock-free pool management using atomic bitmask (no dynamic allocation)
// Bit i = 1: requests_[i] is in use, Bit i = 0: requests_[i] is available
// Supports multiple concurrent consumers and producers (both threads can allocate/deallocate)
// 2-byte members packed together; trq_in_use_ is uint16_t when MAX_REQUESTS <= 16
std::atomic<trq_bitmask_t> trq_in_use_;
uint16_t vid_{};
uint16_t pid_{};
@@ -233,11 +233,7 @@ void USBClient::setup() {
if (this->usb_task_handle_ == nullptr) {
ESP_LOGE(TAG, "Failed to create USB task");
this->mark_failed();
return;
}
// Start with loop disabled - it will be enabled by client_event_cb when events arrive
this->disable_loop();
}
void USBClient::usb_task_fn(void *arg) {
+8 -24
View File
@@ -1,4 +1,3 @@
// Trigger CI memory impact (uses updated ESPAsyncWebServer from web_server_base)
#include "web_server.h"
#ifdef USE_WEBSERVER
#include "esphome/components/json/json_util.h"
@@ -1588,32 +1587,17 @@ json::SerializationBuffer<> WebServer::climate_json_(climate::Climate *obj, Json
root[ESPHOME_F("state")] = root[ESPHOME_F("action")];
has_state = true;
}
if (traits.get_supports_fan_modes()) {
if (obj->fan_mode.has_value()) {
root[ESPHOME_F("fan_mode")] = PSTR_LOCAL(climate_fan_mode_to_string(obj->fan_mode.value()));
} else if (!obj->has_custom_fan_mode()) {
root[ESPHOME_F("fan_mode")] = PSTR_LOCAL(climate_fan_mode_to_string(climate::CLIMATE_FAN_AUTO));
} else {
root[ESPHOME_F("fan_mode")] = "";
}
if (traits.get_supports_fan_modes() && obj->fan_mode.has_value()) {
root[ESPHOME_F("fan_mode")] = PSTR_LOCAL(climate_fan_mode_to_string(obj->fan_mode.value()));
}
if (!traits.get_supported_custom_fan_modes().empty()) {
if (obj->has_custom_fan_mode()) {
root[ESPHOME_F("custom_fan_mode")] = obj->get_custom_fan_mode();
} else {
root[ESPHOME_F("custom_fan_mode")] = "";
}
if (!traits.get_supported_custom_fan_modes().empty() && obj->has_custom_fan_mode()) {
root[ESPHOME_F("custom_fan_mode")] = obj->get_custom_fan_mode();
}
if (traits.get_supports_presets()) {
root[ESPHOME_F("preset")] =
obj->preset.has_value() ? PSTR_LOCAL(climate_preset_to_string(obj->preset.value())) : "";
if (traits.get_supports_presets() && obj->preset.has_value()) {
root[ESPHOME_F("preset")] = PSTR_LOCAL(climate_preset_to_string(obj->preset.value()));
}
if (!traits.get_supported_custom_presets().empty()) {
if (obj->has_custom_preset()) {
root[ESPHOME_F("custom_preset")] = obj->get_custom_preset();
} else {
root[ESPHOME_F("custom_preset")] = "";
}
if (!traits.get_supported_custom_presets().empty() && obj->has_custom_preset()) {
root[ESPHOME_F("custom_preset")] = obj->get_custom_preset();
}
if (traits.get_supports_swing_modes()) {
root[ESPHOME_F("swing_mode")] = PSTR_LOCAL(climate_swing_mode_to_string(obj->swing_mode));