From 006c76a522ea64fe1e5095632963f5c21082e87b Mon Sep 17 00:00:00 2001 From: Felipe Martinez Date: Mon, 3 Jun 2024 18:56:08 +0000 Subject: [PATCH] Fix segger rtt --- src/pinetime.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pinetime.c b/src/pinetime.c index 26aceb4..c775a0e 100644 --- a/src/pinetime.c +++ b/src/pinetime.c @@ -62,12 +62,15 @@ void pinetime_step(pinetime_t *pt) nrf52832_step(pt->nrf); #ifdef ENABLE_SEGGER_RTT - if ((pt->rtt_found || pt->rtt_counter < 1000000) && pt->rtt_counter % 1000 == 0) + if (pt->rtt_found || pt->rtt_counter < 1000000) { - if (!pt->rtt_found) - pt->rtt_found = rtt_find_control(pt->rtt); + if (pt->rtt_counter % 1000 == 0) + { + if (!pt->rtt_found) + pt->rtt_found = rtt_find_control(pt->rtt); - rtt_flush_buffers(pt->rtt); + rtt_flush_buffers(pt->rtt); + } pt->rtt_counter++; }