ESPHome 2025.8.0b1
Loading...
Searching...
No Matches
esphome::HighFrequencyLoopRequester Class Reference

Helper class to request loop() to be called as fast as possible. More...

#include <helpers.h>

Public Member Functions

void start ()
 Start running the loop continuously.
 
void stop ()
 Stop running the loop continuously.
 

Static Public Member Functions

static bool is_high_frequency ()
 Check whether the loop is running continuously.
 

Protected Attributes

bool started_ {false}
 

Static Protected Attributes

static uint8_t num_requests = 0
 

Detailed Description

Helper class to request loop() to be called as fast as possible.

Usually the ESPHome main loop runs at 60 Hz, sleeping in between invocations of loop() if necessary. When a higher execution frequency is necessary, you can use this class to make the loop run continuously without waiting.

Definition at line 765 of file helpers.h.

Member Function Documentation

◆ is_high_frequency()

bool esphome::HighFrequencyLoopRequester::is_high_frequency ( )
static

Check whether the loop is running continuously.

Definition at line 576 of file helpers.cpp.

◆ start()

void esphome::HighFrequencyLoopRequester::start ( )

Start running the loop continuously.

Definition at line 564 of file helpers.cpp.

◆ stop()

void esphome::HighFrequencyLoopRequester::stop ( )

Stop running the loop continuously.

Definition at line 570 of file helpers.cpp.

Field Documentation

◆ num_requests

uint8_t esphome::HighFrequencyLoopRequester::num_requests = 0
staticprotected

Definition at line 777 of file helpers.h.

◆ started_

bool esphome::HighFrequencyLoopRequester::started_ {false}
protected

Definition at line 776 of file helpers.h.


The documentation for this class was generated from the following files: