From bb0a8bb4b77bdbb5857df2d7228e861bc50cd77c Mon Sep 17 00:00:00 2001 From: pigeatgarlic <64737125+pigeatgarlic@users.noreply.github.com> Date: Fri, 14 Feb 2025 18:51:35 +0000 Subject: [PATCH] increase packet size --- smemory.h | 2 +- src/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/smemory.h b/smemory.h index 09c05f47..15afd971 100644 --- a/smemory.h +++ b/smemory.h @@ -1,5 +1,5 @@ #define QUEUE_SIZE 64 -#define PACKET_SIZE 512 * 1024 +#define PACKET_SIZE 5 * 1024 * 1024 typedef struct { int active; diff --git a/src/main.cpp b/src/main.cpp index 16c542ec..818d4583 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -309,7 +309,9 @@ main(int argc, char *argv[]) { auto touch_port = mail->event(mail::touch_port); while (!process_shutdown_event->peek() && !local_shutdown->peek()) { - if(touch_port->peek()) { + if(!touch_port->peek()) { + std::this_thread::sleep_for(100ms); + } else { auto touch = touch_port->pop(); if (touch.has_value()) { auto value = touch.value();