mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Reduce number of calls to fetch time in the main loop (#8804)
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| #include "feedback_cover.h" | ||||
| #include "esphome/core/hal.h" | ||||
| #include "esphome/core/log.h" | ||||
| #include "esphome/core/application.h" | ||||
|  | ||||
| namespace esphome { | ||||
| namespace feedback { | ||||
| @@ -220,7 +221,7 @@ void FeedbackCover::set_open_obstacle_sensor(binary_sensor::BinarySensor *open_o | ||||
| void FeedbackCover::loop() { | ||||
|   if (this->current_operation == COVER_OPERATION_IDLE) | ||||
|     return; | ||||
|   const uint32_t now = millis(); | ||||
|   const uint32_t now = App.get_loop_component_start_time(); | ||||
|  | ||||
|   // Recompute position every loop cycle | ||||
|   this->recompute_position_(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user