mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
[serial_proxy] Guard leaving_protocol_mode with the tap define
Its only reader is tap-gated, so non-tap builds warned about an unused variable.
This commit is contained in:
@@ -258,8 +258,10 @@ SerialProxyResult SerialProxy::set_mode_from_client(api::APIConnection *api_conn
|
||||
}
|
||||
ESP_LOGD(TAG, "Serial proxy [%" PRIu32 "] mode set to %s", this->instance_index_,
|
||||
mode == api::enums::SERIAL_PROXY_MODE_PROTOCOL ? LOG_STR_LITERAL("PROTOCOL") : LOG_STR_LITERAL("RAW"));
|
||||
#ifdef USE_SERIAL_PROXY_TAP
|
||||
const bool leaving_protocol_mode =
|
||||
this->mode_ != api::enums::SERIAL_PROXY_MODE_RAW && mode == api::enums::SERIAL_PROXY_MODE_RAW;
|
||||
#endif
|
||||
this->mode_ = mode;
|
||||
|
||||
#ifdef USE_SERIAL_PROXY_TAP
|
||||
|
||||
Reference in New Issue
Block a user