From c83c0e0e7dc6c7d091d7e0e5f38d33c5d8ddb015 Mon Sep 17 00:00:00 2001 From: Robert Hargreaves <3618663+rhargreaves@users.noreply.github.com> Date: Sun, 10 Oct 2021 22:49:41 +0100 Subject: [PATCH] Log AppleMIDI session invites only in debug mode Also align MW messages better in the UI --- src/applemidi.c | 6 +++++- src/ui.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/applemidi.c b/src/applemidi.c index 57ea6d8..9f68dc9 100644 --- a/src/applemidi.c +++ b/src/applemidi.c @@ -5,6 +5,7 @@ #include #include "comm_megawifi.h" #include "memory.h" +#include "settings.h" static mw_err unpackInvitation( char* buffer, u16 length, AppleMidiExchangePacket* invite); @@ -17,7 +18,10 @@ static mw_err processInvitation(u8 ch, char* buffer, u16 length) if (err != MW_ERR_NONE) { return err; } - log_info("AM: Session invite on UDP ch %d", ch); + + if (settings_debug_megawifi_init()) { + log_info("AM: Session invite on UDP ch %d", ch); + } sendInviteResponse(ch, &packet); return MW_ERR_NONE; } diff --git a/src/ui.c b/src/ui.c index d2268e6..2841aba 100644 --- a/src/ui.c +++ b/src/ui.c @@ -313,7 +313,7 @@ static void print_megawifi_info(void) index2 = 5; break; } - drawText(MW_TEXT[index2], 8, MAX_EFFECTIVE_Y - 1); + drawText(MW_TEXT[index2], 16, MAX_EFFECTIVE_Y); } static void printCommMode(void)