I have the following 3 sections of code that put some text on the Info screen. I'm wondering why the contents of TankIDBuf appear 3 times, but the text "TANK ID: " does not appear 3 times.
char *SoftwareRev[] =
{
"SOFTWARE REV 2.16",
"DATE: MAR/11/2024",
};
//-The 5th panel- Command Panel = (SYSTEM_INFO_SCREEN)
//-----------------------------------------------
tCanvasWidget g_SystemInfo[] =
{
CanvasStruct(g_psPanels + 4, g_SystemInfo + 1, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 5), 280, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT , ClrBlack, ClrWhite, ClrWhite,g_psFontCmss20b, "", 0, 0),
CanvasStruct(g_psPanels + 4, g_SystemInfo + 2, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 25), 280, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b,"", 0, 0),
CanvasStruct(g_psPanels + 4, g_SystemInfo + 3, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 50), 280, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b, "", 0, 0),
CanvasStruct(g_psPanels + 4, g_SystemInfo + 4, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 75), 280, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrYellow, g_psFontCmss20b, "", 0, 0),
CanvasStruct(g_psPanels + 4, g_SystemInfo + 5, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 100), 100, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b, "TANK ID: ", 0, 0), // This was the last populated line before v2.16.
CanvasStruct(g_psPanels + 4, g_SystemInfo + 6, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 125), 100, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b, "TANK ID: ", 0, 0),
CanvasStruct(g_psPanels + 4, g_SystemInfo + 7, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 5), (BG_MIN_Y + 150), 100, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b, "TANK ID: ", 0, 0),
CanvasStruct(g_psPanels + 4, 0, 0, &g_sKentec320x240x16_SSD2119, (BG_MIN_X + 100), (BG_MIN_Y + 100) , 200, 25, CANVAS_STYLE_TEXT | CANVAS_STYLE_TEXT_LEFT, ClrBlack, ClrWhite, ClrWhite, g_psFontCmss20b, "", 0, 0),
};
//========================================================================================
// Main Menu Button Handler
//========================================================================================
void OnSystemInfoBtnPress(tWidget *psWidget)
{
// User_Command = TEST_MENU;
// Display_Password_Screen();
g_ui32Panel = SYSTEM_INFO_SCREEN;
CanvasTextSet(g_SystemInfo + 0, SoftwareRev[0]);
CanvasTextSet(g_SystemInfo + 1, SoftwareRev[1]);
CanvasTextSet(g_SystemInfo + 2, SoftwareRev[2]);
CanvasTextSet(g_SystemInfo + 3, SoftwareRev[3]);
CanvasTextSet(g_SystemInfo + 5, TankIDBuf); // This was the last line before v2.16.
CanvasTextSet(g_SystemInfo + 6, TankIDBuf);
CanvasTextSet(g_SystemInfo + 7, TankIDBuf);
DrawBaseMenu();
PlayClick(); // Play the key click sound