mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	Merge branch 'api_reduce_millis' into integration
This commit is contained in:
		| @@ -106,7 +106,7 @@ void APIServer::setup() { | |||||||
|   } |   } | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   this->last_connected_ = millis(); |   this->last_connected_ = App.get_loop_component_start_time(); | ||||||
|  |  | ||||||
| #ifdef USE_ESP32_CAMERA | #ifdef USE_ESP32_CAMERA | ||||||
|   if (esp32_camera::global_esp32_camera != nullptr && !esp32_camera::global_esp32_camera->is_internal()) { |   if (esp32_camera::global_esp32_camera != nullptr && !esp32_camera::global_esp32_camera->is_internal()) { | ||||||
| @@ -164,7 +164,7 @@ void APIServer::loop() { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   if (this->reboot_timeout_ != 0) { |   if (this->reboot_timeout_ != 0) { | ||||||
|     const uint32_t now = millis(); |     const uint32_t now = App.get_loop_component_start_time(); | ||||||
|     if (!this->is_connected()) { |     if (!this->is_connected()) { | ||||||
|       if (now - this->last_connected_ > this->reboot_timeout_) { |       if (now - this->last_connected_ > this->reboot_timeout_) { | ||||||
|         ESP_LOGE(TAG, "No client connected; rebooting"); |         ESP_LOGE(TAG, "No client connected; rebooting"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user