From 9a809ed1806227c80b598233313ff7e6657d983e Mon Sep 17 00:00:00 2001 From: spm81 Date: Wed, 10 Jan 2024 00:22:32 +0000 Subject: [PATCH] ADD ENABLE_MESSENGER_MORE_ONE_LINE --- app/messenger.c | 12 ++++++------ app/messenger.h | 2 +- ui/messenger.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/messenger.c b/app/messenger.c index 9fc4158..e342b2c 100644 --- a/app/messenger.c +++ b/app/messenger.c @@ -36,7 +36,7 @@ char cMessage[TX_MSG_LENGTH]; char msgFreqInfo[30]; #endif char lastcMessage[TX_MSG_LENGTH]; -#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE) +#ifdef ENABLE_MESSENGER_MORE_ONE_LINE char rxMessage[5][TX_MSG_LENGTH + 3]; #else char rxMessage[4][TX_MSG_LENGTH + 3]; @@ -544,12 +544,12 @@ void moveUP(char (*rxMessages)[TX_MSG_LENGTH + 3]) strcpy(rxMessages[0], rxMessages[1]); strcpy(rxMessages[1], rxMessages[2]); strcpy(rxMessages[2], rxMessages[3]); -#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE) +#ifdef ENABLE_MESSENGER_MORE_ONE_LINE strcpy(rxMessages[3], rxMessages[4]); #endif // Insert the new line at the last position -#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE) +#ifdef ENABLE_MESSENGER_MORE_ONE_LINE memset(rxMessages[4], 0, sizeof(rxMessages[4])); #else memset(rxMessages[3], 0, sizeof(rxMessages[3])); @@ -594,7 +594,7 @@ void MSG_Send(const char txMessage[TX_MSG_LENGTH], bool bServiceMessage) if (!bServiceMessage) { moveUP(rxMessage); -#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE) +#ifdef ENABLE_MESSENGER_MORE_ONE_LINE sprintf(rxMessage[4], "> %s", txMessage); #else sprintf(rxMessage[3], "> %s", txMessage); @@ -668,7 +668,7 @@ void MSG_StorePacket(const uint16_t interrupt_bits) if (msgFSKBuffer[5] == 'R' && msgFSKBuffer[6] == 'C' && msgFSKBuffer[7] == 'V' && msgFSKBuffer[8] == 'D') { UART_printf("SVC