From 4e18f5d35077e6d1239b6f9407a98fd5f00b3ea9 Mon Sep 17 00:00:00 2001 From: Matti Airas Date: Sun, 29 Sep 2024 16:46:11 +0300 Subject: [PATCH] Add an event_loop() convenience function --- src/sensesp.cpp | 11 +++++++++++ src/sensesp.h | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 src/sensesp.cpp diff --git a/src/sensesp.cpp b/src/sensesp.cpp new file mode 100644 index 000000000..9686b4629 --- /dev/null +++ b/src/sensesp.cpp @@ -0,0 +1,11 @@ +#include "sensesp.h" + +#include "sensesp_base_app.h" + +namespace sensesp { + +reactesp::EventLoop* event_loop() { + return SensESPBaseApp::get_event_loop(); +} + +} // namespace sensesp diff --git a/src/sensesp.h b/src/sensesp.h index 868e72538..98934f6a1 100644 --- a/src/sensesp.h +++ b/src/sensesp.h @@ -19,6 +19,8 @@ namespace sensesp { typedef std::function void_cb_func; +reactesp::EventLoop* event_loop(); + } // namespace sensesp #endif