mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 05:24:14 +00:00
Merge remote-tracking branch 'origin/libretiny-wifi-queue-abstraction' into integration
This commit is contained in:
@@ -717,6 +717,10 @@ const char *get_disconnect_reason_str(uint8_t reason) {
|
||||
}
|
||||
|
||||
void WiFiComponent::wifi_loop_() {
|
||||
// Fast path: skip dropped count check and pop loop when queue is empty
|
||||
if (this->event_queue_.empty())
|
||||
return;
|
||||
|
||||
uint16_t dropped = this->event_queue_.get_and_reset_dropped_count();
|
||||
if (dropped > 0) {
|
||||
ESP_LOGW(TAG, "Dropped %u WiFi events due to buffer overflow", dropped);
|
||||
|
||||
@@ -778,7 +778,10 @@ network::IPAddress WiFiComponent::wifi_subnet_mask_() { return {WiFi.subnetMask(
|
||||
network::IPAddress WiFiComponent::wifi_gateway_ip_() { return {WiFi.gatewayIP()}; }
|
||||
network::IPAddress WiFiComponent::wifi_dns_ip_(int num) { return {WiFi.dnsIP(num)}; }
|
||||
void WiFiComponent::wifi_loop_() {
|
||||
// Check for dropped events due to queue overflow
|
||||
// Fast path: skip dropped count check and pop loop when queue is empty
|
||||
if (this->event_queue_.empty())
|
||||
return;
|
||||
|
||||
uint16_t dropped = this->event_queue_.get_and_reset_dropped_count();
|
||||
if (dropped > 0) {
|
||||
ESP_LOGW(TAG, "Dropped %" PRIu16 " WiFi events due to buffer overflow", dropped);
|
||||
|
||||
Reference in New Issue
Block a user