Skip to content

Commit

Permalink
ADD ENABLE_MESSENGER_MORE_ONE_LINE
Browse files Browse the repository at this point in the history
  • Loading branch information
spm81 committed Jan 10, 2024
1 parent 7c3706e commit 9a809ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions app/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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]));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<RCPT\r\n");
#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE)
#ifdef ENABLE_MESSENGER_MORE_ONE_LINE
rxMessage[4][0] = '+';
#else
rxMessage[3][0] = '+';
Expand All @@ -683,7 +683,7 @@ void MSG_StorePacket(const uint16_t interrupt_bits)
moveUP(rxMessage);
if (msgFSKBuffer[0] != 'M' || msgFSKBuffer[1] != 'S')
{
#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE)
#ifdef ENABLE_MESSENGER_MORE_ONE_LINE
snprintf(rxMessage[4], TX_MSG_LENGTH + 2, "? unknown msg format!");
}
else
Expand Down
2 changes: 1 addition & 1 deletion app/messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typedef enum MsgStatus

extern KeyboardType keyboardType;
extern char cMessage[TX_MSG_LENGTH];
#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE)
#ifdef ENABLE_MESSENGER_MORE_ONE_LINE
extern char rxMessage[5][TX_MSG_LENGTH + 3];
#else
extern char rxMessage[4][TX_MSG_LENGTH + 3];
Expand Down
4 changes: 2 additions & 2 deletions ui/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void UI_DisplayMSG(void) {

memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
memset(String, 0, sizeof(String));
#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE)
#ifdef ENABLE_MESSENGER_MORE_ONE_LINE
//UI_PrintStringSmallBold("MESSENGER", 0, 127, 0);
//UI_PrintStringSmall("Messenger", 1, 127, 0);

Expand All @@ -46,7 +46,7 @@ void UI_DisplayMSG(void) {
//GUI_DisplaySmallest("RX", 4, 34, false, true);

memset(String, 0, sizeof(String));
#ifdef defined(ENABLE_MESSENGER_MORE_ONE_LINE)
#ifdef ENABLE_MESSENGER_MORE_ONE_LINE
uint8_t mPos = 1;//8;
const uint8_t mLine = 7;
for (int i = 0; i < 5; ++i) {
Expand Down

0 comments on commit 9a809ed

Please sign in to comment.