mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
[serial_proxy] Make set_mode acknowledgements report the real outcome
- Refuse PROTOCOL with NOT_SUPPORTED when the port has no tap, so a client cannot mistake a plain pipe for an active tap - Skip tap_pump() when neither the tap nor a subscriber would receive the bytes, instead of draining the FIFO into the void - Rename the client-facing overload to set_mode_from_client, matching write_from_client - Document that PORT_IN_USE also covers callers that never subscribed, and that the YAML mode applies only until the first session ends
This commit is contained in:
@@ -40,7 +40,7 @@ class SerialProxy {
|
||||
return SerialProxyResult::SERIAL_PROXY_RESULT_OK;
|
||||
}
|
||||
void write_from_client(api::APIConnection *api_connection, const uint8_t *data, size_t len) {}
|
||||
SerialProxyResult set_mode(api::APIConnection *api_connection, api::enums::SerialProxyMode mode) {
|
||||
SerialProxyResult set_mode_from_client(api::APIConnection *api_connection, api::enums::SerialProxyMode mode) {
|
||||
return SerialProxyResult::SERIAL_PROXY_RESULT_OK;
|
||||
}
|
||||
SerialProxyResult set_modem_pins(api::APIConnection *api_connection, uint32_t line_states) {
|
||||
|
||||
Reference in New Issue
Block a user