Skip to content

Commit

Permalink
Remove messenger title for 5th line
Browse files Browse the repository at this point in the history
  • Loading branch information
LolloDev5123 committed Jan 9, 2024
1 parent ff43977 commit ba14538
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
13 changes: 7 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];
char rxMessage[4][TX_MSG_LENGTH + 3];
char rxMessage[5][TX_MSG_LENGTH + 3];
unsigned char cIndex = 0;
unsigned char prevKey = 0, prevLetter = 0;
KeyboardType keyboardType = UPPERCASE;
Expand Down Expand Up @@ -540,9 +540,10 @@ void moveUP(char (*rxMessages)[TX_MSG_LENGTH + 3])
strcpy(rxMessages[0], rxMessages[1]);
strcpy(rxMessages[1], rxMessages[2]);
strcpy(rxMessages[2], rxMessages[3]);
strcpy(rxMessages[3], rxMessages[4]);

// Insert the new line at the last position
memset(rxMessages[3], 0, sizeof(rxMessages[3]));
memset(rxMessages[4], 0, sizeof(rxMessages[4]));
}

void MSG_Send(const char txMessage[TX_MSG_LENGTH], bool bServiceMessage)
Expand Down Expand Up @@ -583,7 +584,7 @@ void MSG_Send(const char txMessage[TX_MSG_LENGTH], bool bServiceMessage)
if (!bServiceMessage)
{
moveUP(rxMessage);
sprintf(rxMessage[3], "> %s", txMessage);
sprintf(rxMessage[4], "> %s", txMessage);
memset(lastcMessage, 0, sizeof(lastcMessage));
memcpy(lastcMessage, txMessage, TX_MSG_LENGTH);
cIndex = 0;
Expand Down Expand Up @@ -653,7 +654,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");
rxMessage[3][0] = '+';
rxMessage[4][0] = '+';
gUpdateStatus = true;
gUpdateDisplay = true;
}
Expand All @@ -664,11 +665,11 @@ void MSG_StorePacket(const uint16_t interrupt_bits)
moveUP(rxMessage);
if (msgFSKBuffer[0] != 'M' || msgFSKBuffer[1] != 'S')
{
snprintf(rxMessage[3], TX_MSG_LENGTH + 2, "? unknown msg format!");
snprintf(rxMessage[4], TX_MSG_LENGTH + 2, "? unknown msg format!");
}
else
{
snprintf(rxMessage[3], TX_MSG_LENGTH + 2, "< %s", &msgFSKBuffer[2]);
snprintf(rxMessage[4], TX_MSG_LENGTH + 2, "< %s", &msgFSKBuffer[2]);
}

#ifdef ENABLE_MESSENGER_UART
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];
extern char rxMessage[4][TX_MSG_LENGTH + 3];
extern char rxMessage[5][TX_MSG_LENGTH + 3];
#if defined(ENABLE_MESSENGER_SHOW_RX_FREQ) || defined(ENABLE_MESSENGER_SHOW_RX_TX_FREQ)
extern char msgFreqInfo[30];
#endif
Expand Down
10 changes: 5 additions & 5 deletions ui/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ void UI_DisplayMSG(void) {
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
memset(String, 0, sizeof(String));

UI_PrintStringSmallBold("MESSENGER", 0, 127, 0);
//UI_PrintStringSmallBold("MESSENGER", 0, 127, 0);
//UI_PrintStringSmall("Messenger", 1, 127, 0);

UI_DrawDottedLineBuffer(gFrameBuffer, 2, 3, 26, 3, true, 2);
UI_DrawDottedLineBuffer(gFrameBuffer, 100, 3, 126, 3, true, 2);
//UI_DrawDottedLineBuffer(gFrameBuffer, 2, 3, 26, 3, true, 2);
//UI_DrawDottedLineBuffer(gFrameBuffer, 100, 3, 126, 3, true, 2);

/*if ( msgStatus == SENDING ) {
GUI_DisplaySmallest("SENDING", 100, 6, false, true);
Expand All @@ -41,9 +41,9 @@ void UI_DisplayMSG(void) {

memset(String, 0, sizeof(String));

uint8_t mPos = 8;
uint8_t mPos = 1;//8;
const uint8_t mLine = 7;
for (int i = 0; i < 4; ++i) {
for (int i = 0; i < 5; ++i) {
sprintf(String, "%s", rxMessage[i]);
GUI_DisplaySmallest(String, 2, mPos, false, true);
mPos += mLine;
Expand Down

0 comments on commit ba14538

Please sign in to comment.