summaryrefslogtreecommitdiffhomepage
path: root/UI.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-03 18:36:05 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-03 18:36:05 +0100
commit1f1e71e0d9e1a60eac38040ea5e6a49c14d81b71 (patch)
treebb924a1605e66974de6fe8bfc890b0cda312aef3 /UI.cpp
parent7d98b5d410233fd9608ed5682f5a98b283f83d12 (diff)
Added log
Diffstat (limited to 'UI.cpp')
-rw-r--r--UI.cpp8
1 files changed, 7 insertions, 1 deletions
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 <algorithm>
#include <iostream>
@@ -33,6 +34,8 @@ void UI::draw()
std::vector<int> 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;
}