ESPHome 2025.5.0
Loading...
Searching...
No Matches
esphome::nextion::NextionCommandPacer Class Reference

#include <nextion.h>

Public Member Functions

 NextionCommandPacer (uint8_t initial_spacing=0)
 Creates command pacer with initial spacing.
 
void set_spacing (uint8_t spacing_ms)
 Set the minimum time between commands.
 
uint8_t get_spacing () const
 Get current command spacing.
 
bool can_send () const
 Check if enough time has passed to send next command.
 
void mark_sent ()
 Mark a command as sent, updating the timing.
 

Detailed Description

Definition at line 39 of file nextion.h.

Constructor & Destructor Documentation

◆ NextionCommandPacer()

esphome::nextion::NextionCommandPacer::NextionCommandPacer ( uint8_t initial_spacing = 0)
inlineexplicit

Creates command pacer with initial spacing.

Parameters
initial_spacingInitial time between commands in milliseconds

Definition at line 45 of file nextion.h.

Member Function Documentation

◆ can_send()

bool esphome::nextion::NextionCommandPacer::can_send ( ) const
inline

Check if enough time has passed to send next command.

Returns
true if enough time has passed since last command

Definition at line 63 of file nextion.h.

◆ get_spacing()

uint8_t esphome::nextion::NextionCommandPacer::get_spacing ( ) const
inline

Get current command spacing.

Returns
Current spacing in milliseconds

Definition at line 57 of file nextion.h.

◆ mark_sent()

void esphome::nextion::NextionCommandPacer::mark_sent ( )
inline

Mark a command as sent, updating the timing.

Definition at line 68 of file nextion.h.

◆ set_spacing()

void esphome::nextion::NextionCommandPacer::set_spacing ( uint8_t spacing_ms)
inline

Set the minimum time between commands.

Parameters
spacing_msSpacing in milliseconds

Definition at line 51 of file nextion.h.


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