From cf183930015670072b78a7e549e4607f0223c969 Mon Sep 17 00:00:00 2001 From: Carsten Keller Date: Sun, 9 Jun 2024 17:58:21 +0200 Subject: [PATCH] =?UTF-8?q?Funktion=20zum=20pr=C3=BCfen=20ob=20neue=20Date?= =?UTF-8?q?n=20gesendet=20werden=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Display.cpp | 5 +++++ Source/Display.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/Source/Display.cpp b/Source/Display.cpp index 216c263..531e40c 100644 --- a/Source/Display.cpp +++ b/Source/Display.cpp @@ -154,6 +154,11 @@ namespace ElektronischeLast this->new_data = true; } + bool Display::ready_for_data(void) + { + return (this->current_state == StateIdle); + } + bool Display::timer_elapsed(void) { return (this->timer < systick); diff --git a/Source/Display.hpp b/Source/Display.hpp index e6cff51..dccefe8 100644 --- a/Source/Display.hpp +++ b/Source/Display.hpp @@ -93,6 +93,7 @@ namespace ElektronischeLast void set_backlight(bool on); void set_cursor(Line_t line, std::uint32_t position); void print(const char* const string); + bool ready_for_data(void); private: State_t current_state; State_t next_state;