From 3147508a19c12e956fe7aeedc2d768eca0412fbb Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Mon, 16 Sep 2024 00:32:24 +0300 Subject: [PATCH] sch: display calendar events in terminal --- code/espurna/scheduler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/espurna/scheduler.cpp b/code/espurna/scheduler.cpp index 1688913b..ad130999 100644 --- a/code/espurna/scheduler.cpp +++ b/code/espurna/scheduler.cpp @@ -1014,6 +1014,15 @@ void event(::terminal::CommandContext&& ctx) { return; } + if (!last_actions.empty()) { + ctx.output.print(PSTR("Calendar events:\n")); + for (auto& entry : last_actions) { + ctx.output.printf_P(PSTR("- cal#%zu at %s\n"), + entry.index, + format_last_action(entry).c_str()); + } + } + #if SCHEDULER_SUN_SUPPORT ctx.output.print(PSTR("Sun events:\n")); internal::dump_sunrise_sunset(ctx);