From 37ce571b9c414332846bf4b9b2fc7a8d2244994f Mon Sep 17 00:00:00 2001 From: Christian Riggenbach Date: Sun, 3 Mar 2019 21:46:38 +0100 Subject: [PATCH] added ESPUI::updateLabel (works like ESPUI::print) --- src/ESPUI.cpp | 8 ++++++++ src/ESPUI.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index ba63717..6d02460 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -533,6 +533,14 @@ void ESPUIClass::print( String label, String value ) { updateControl( label, value ); } +void ESPUIClass::updateLabel( int id, String value ) { + updateControl( id, value ); +} + +void ESPUIClass::updateLabel( String label, String value ) { + updateControl( label, value ); +} + void ESPUIClass::updateSlider( int id, int nValue, int clientId ) { updateControl( id, String( nValue ), clientId ); } diff --git a/src/ESPUI.h b/src/ESPUI.h index a2c90ed..4c6e693 100644 --- a/src/ESPUI.h +++ b/src/ESPUI.h @@ -212,6 +212,9 @@ class ESPUIClass { void print( int id, String value ); void print( String label, String value ); + void updateLabel( int id, String value ); + void updateLabel( String label, String value ); + void updateSwitcher( int id, bool nValue, int clientId = -1 ); void updateSwitcher( String label, bool nValue, int clientId = -1 );