From 1f1e71e0d9e1a60eac38040ea5e6a49c14d81b71 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 3 Jan 2025 18:36:05 +0100 Subject: Added log --- UI.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'UI.cpp') diff --git a/UI.cpp b/UI.cpp index f9b2512..57c79ec 100644 --- a/UI.cpp +++ b/UI.cpp @@ -1,6 +1,7 @@ #include "UI.h" #include "cpuload.h" +#include "log.h" #include #include @@ -33,6 +34,8 @@ void UI::draw() std::vector cpuloads = get_cpu_loads(); int main_loops_per_second = get_main_loops_per_second(); + // clear screen + std::cout << "\x1B[2J\x1B[H"; std::cout << std::endl; std::cout << "- -- BPM +" << std::endl; std::cout << "Mode: Click __/__ (Clock Internal)" << std::endl; @@ -54,11 +57,14 @@ void UI::draw() std::cout << " Click: ____ BPM" << std::endl; std::cout << fmt::format(" Main loops/s: {}", main_loops_per_second) << std::endl; + + std::cout << "Log:" << std::endl; + std::cout << log_cout.get_log() << std::endl; } void UI::count_main_loops() { ++m_main_loops; - //std::cout << "DEBUG:" << m_main_loops << std::endl; + debug_cout << "DEBUG:" << m_main_loops << std::endl; } -- cgit v1.2.3