///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void BatteryMnDsply(WND_LAYOUT_STRUCT *wnd_layout_ptr) { char spaceBuff[25]; uint8 batt_buff[20]; uint32 x = 0; float curr_batt_volts; float batt_rng; uint8 length; memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); // Add in a title for the menu length = sprintf((char*)g_spareBuffer, "-%s-", getLangText(BATTERY_VOLTAGE_TEXT)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; curr_batt_volts = GetExternalVoltageLevelAveraged(BATTERY_VOLTAGE); // ********** Print Battery text ********** sprintf((char*)g_spareBuffer, "%.2f %s", curr_batt_volts, getLangText(VOLTS_TEXT)); debug("Battery: %s\r\n", (char*)g_spareBuffer); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_TWO; WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // ********** Print the Low and Full text ********** memset(&spaceBuff[0], 0, sizeof(spaceBuff)); memset(&spaceBuff[0], ' ', sizeof(spaceBuff) - 1); length = (uint8)(strlen(getLangText(LOW_TEXT)) + strlen(getLangText(FULL_TEXT))); spaceBuff[(20 - length)] = '\0'; sprintf((char*)g_spareBuffer, "%s%s%s", getLangText(LOW_TEXT), (char*)&spaceBuff[0], getLangText(FULL_TEXT)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FOUR; WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // ********** E========F ********** memset(&batt_buff[0], 0, sizeof(batt_buff)); memset(&batt_buff[0], ' ', (sizeof(batt_buff) - 1)); batt_rng = (float).25; x = 0; if (curr_batt_volts > BATT_MIN_VOLTS) { curr_batt_volts = (float)(curr_batt_volts - BATT_MIN_VOLTS); } else { curr_batt_volts = 0; } // Creating a string to give the appearance of a battery metter. Using '=' as the bar for (x = 0; x < 10; x++) { if ((curr_batt_volts > batt_rng) && (x < 9)) { batt_buff[x] = '='; curr_batt_volts -= batt_rng; } else { batt_buff[x] = '|'; break; } } batt_buff[10] = 0; // Assign to null length = (uint8)sprintf((char*)g_spareBuffer, "[%s]", batt_buff); wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FIVE; WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // ********** Print other battery voltages ********** curr_batt_volts = GetExternalVoltageLevelAveraged(EXT_CHARGE_VOLTAGE); // Check if the external charge voltage is above 0.5 volts indicating that it's active if (curr_batt_volts < 3.5) { curr_batt_volts = 0; } length = (uint8)sprintf((char*)g_spareBuffer, "(%.2f %s)", curr_batt_volts, getLangText(VOLTS_TEXT)); wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_SEVEN; WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); }
///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void SummaryMenuDisplay(WND_LAYOUT_STRUCT *wnd_layout_ptr) { SUMMARY_MENU_EVENT_CACHE_STRUCT* eventInfo; char dateBuff[25]; char lineBuff[30]; char modeBuff[2]; uint16 itemsDisplayed = 1; uint16 length; uint16 tempSummaryIndex = 0; // Clear the LCD map memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); // Display the Title centered on the Top line sprintf(lineBuff, "-%s-", getLangText(LIST_OF_SUMMARIES_TEXT)); length = (uint8)strlen((char*)lineBuff); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString((uint8*)(&lineBuff[0]), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // Setup layout wnd_layout_ptr->curr_row = wnd_layout_ptr->start_row; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; // Check if s_topMenuSummaryIndex is valid if (s_topMenuSummaryIndex == s_totalRamSummaries) { debug("Summary List: No valid summary found for display\r\n"); sprintf(lineBuff, "<%s>", getLangText(EMPTY_TEXT)); WndMpWrtString((uint8*)(&lineBuff[0]), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // We're done } else // s_topMenuSummaryIndex is a valid index indicating valid events in storage { tempSummaryIndex = s_topMenuSummaryIndex; while ((itemsDisplayed <= SUMMARY_MENU_ACTIVE_ITEMS) && (tempSummaryIndex < s_totalRamSummaries)) { // Check if entry is cached to prevent long delay reading files eventInfo = GetSummaryEventInfo(tempSummaryIndex); // Clear and setup the time stamp string for the current event memset(&dateBuff[0], 0, sizeof(dateBuff)); ConvertTimeStampToString(dateBuff, &(eventInfo->eventTime), REC_DATE_TIME_DISPLAY); // Clear and setup the mode string for the curent event memset(&modeBuff[0], 0, sizeof(modeBuff)); switch (eventInfo->mode) { case WAVEFORM_MODE: strcpy(modeBuff, "W"); break; case BARGRAPH_MODE: strcpy(modeBuff, "B"); break; case COMBO_MODE: strcpy(modeBuff, "C"); break; case MANUAL_CAL_MODE: strcpy(modeBuff, "P"); break; case MANUAL_TRIGGER_MODE: strcpy(modeBuff, "M"); break; } // Clear and setup the event line string for the curent event memset(&lineBuff[0], 0, sizeof(lineBuff)); sprintf(lineBuff, "E%03d %s %s", (int)eventInfo->eventNumber, dateBuff, modeBuff); // Check if the current line is to be highlighted if (tempSummaryIndex == s_currentSummaryIndex) { WndMpWrtString((uint8*)(&lineBuff[0]), wnd_layout_ptr, SIX_BY_EIGHT_FONT, CURSOR_LN); } else // Print as a regular line { WndMpWrtString((uint8*)(&lineBuff[0]), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); } // Set the current row as the next row wnd_layout_ptr->curr_row = wnd_layout_ptr->next_row; // Increment the items displayed itemsDisplayed++; tempSummaryIndex = GetNextValidRamSummaryIndex(tempSummaryIndex); } // Check if the summary index is at the end of the list and still room on the LCD if ((itemsDisplayed <= SUMMARY_MENU_ACTIVE_ITEMS) && (tempSummaryIndex == s_totalRamSummaries)) { debug("Summary List: End of the list\r\n"); sprintf(lineBuff, "<%s>", getLangText(END_TEXT)); WndMpWrtString((uint8*)(&lineBuff[0]), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); } } }
///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void TimerModeDateMenuDisplay(REC_MN_STRUCT *rec_ptr, WND_LAYOUT_STRUCT *wnd_layout_ptr, MN_LAYOUT_STRUCT *mn_layout_ptr) { uint8 sbuff[50]; uint8 top; uint8 menu_ln; uint8 length = 0; memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); menu_ln = 0; top = (uint8)mn_layout_ptr->top_ln; // Add in a title for the menu memset(&sbuff[0], 0, sizeof(sbuff)); sprintf((char*)sbuff, "-%s-", getLangText(ACTIVE_DATE_PERIOD_TEXT)); length = (uint8)strlen((char*)sbuff); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // Add in a title for the menu memset(&sbuff[0], 0, sizeof(sbuff)); sprintf((char*)sbuff, "(%s)", getLangText(DAY_MONTH_YEAR_TEXT)); length = (uint8)strlen((char*)sbuff); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ONE; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); memset(&sbuff[0], 0, sizeof(sbuff)); wnd_layout_ptr->curr_row = wnd_layout_ptr->start_row; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; rec_ptr[TMD_START_DAY].numrec.nmax = GetDaysPerMonth((uint8)(rec_ptr[TMD_START_MONTH].numrec.tindex), (uint8)(rec_ptr[TMD_START_YEAR].numrec.tindex)); if (rec_ptr[TMD_START_DAY].numrec.tindex > rec_ptr[TMD_START_DAY].numrec.nmax) rec_ptr[TMD_START_DAY].numrec.tindex = rec_ptr[TMD_START_DAY].numrec.nmax; rec_ptr[TMD_STOP_DAY].numrec.nmax = GetDaysPerMonth((uint8)(rec_ptr[TMD_STOP_MONTH].numrec.tindex), (uint8)(rec_ptr[TMD_STOP_YEAR].numrec.tindex)); if (rec_ptr[TMD_STOP_DAY].numrec.tindex > rec_ptr[TMD_STOP_DAY].numrec.nmax) rec_ptr[TMD_STOP_DAY].numrec.tindex = rec_ptr[TMD_STOP_DAY].numrec.nmax; // --------------------------------------------------------------------------------- // Write out the start date line which includes the start date text, day, month, and year values // --------------------------------------------------------------------------------- wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_THREE; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; // Display the start date text sprintf((char*)sbuff, "%s: ", getLangText(START_DATE_TEXT)); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FOUR; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((9 * SIX_COL_SIZE)/2)); // Display the day sprintf((char*)sbuff, "%02d", (uint16)(uint16)rec_ptr[TMD_START_DAY].numrec.tindex); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_START_DAY) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)("-"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the month text sprintf((char*)sbuff, "%s", (char*)&(g_monthTable[(uint8)(rec_ptr[TMD_START_MONTH].numrec.tindex)].name[0])); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_START_MONTH) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)("-"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the year sprintf((char*)sbuff, "%02d", (uint16)(uint16)rec_ptr[TMD_START_YEAR].numrec.tindex); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_START_YEAR) ? CURSOR_LN : REG_LN); // --------------------------------------------------------------------------------- // Write out the stop date line which includes the stop date text, day, month, and year values // --------------------------------------------------------------------------------- wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FIVE; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; // Display the date text sprintf((char*)sbuff, "%s: ", getLangText(STOP_DATE_TEXT)); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_SIX; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((9 * SIX_COL_SIZE)/2)); // Display the day sprintf((char*)sbuff, "%02d", (uint16)(uint16)rec_ptr[TMD_STOP_DAY].numrec.tindex); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_STOP_DAY) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)("-"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the month text sprintf((char*)sbuff, "%s", (char*)&(g_monthTable[(uint8)(rec_ptr[TMD_STOP_MONTH].numrec.tindex)].name[0])); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_STOP_MONTH) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)("-"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the year sprintf((char*)sbuff, "%02d", (uint16)(uint16)rec_ptr[TMD_STOP_YEAR].numrec.tindex); WndMpWrtString(sbuff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMD_STOP_YEAR) ? CURSOR_LN : REG_LN); }
///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void DisplayUserMenu(WND_LAYOUT_STRUCT *wnd_layout_ptr, MN_LAYOUT_STRUCT *mn_layout_ptr, uint8 titlePosition) { uint8 buff[50]; /* made it bigger then NUM_CHAR_PER_LN just in case someone trys to make a big string.*/ uint16 top; uint8 menu_ln; uint32 length; // Clear out LCD map buffer memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); // Init var's menu_ln = 0; top = 0; // Copy Menu Title into buffer strcpy((char*)(&buff[0]), (g_userMenuCachePtr + top + menu_ln)->text); // Get length of title length = strlen((char*)(&buff[0])); // Set current row to the top row wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; // Check if title position is specified as left justified if (titlePosition == TITLE_LEFT_JUSTIFIED) { wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; } else // titlePosition is TITLE_CENTERED { wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); } // Write string to LCD map WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // Reset var's... purpose? menu_ln = 0; top = mn_layout_ptr->top_ln; // Reset menu display parameters wnd_layout_ptr->curr_row = wnd_layout_ptr->start_row; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; // Handle the rest of the menu table while (wnd_layout_ptr->curr_row <= wnd_layout_ptr->end_row) { // Copy the next menu text into the buffer strcpy((char*)(&buff[0]), (g_userMenuCachePtr + top + menu_ln)->text); // Check if we have reached the end of the menu text if (strcmp((char*)(&buff[0]), ".end.")) { // If the incrementing menu line matches the current line minus the top line if (menu_ln == (mn_layout_ptr->curr_ln - mn_layout_ptr->top_ln)) { if (mn_layout_ptr->sub_ln == 0) { // Write the text to the LCD map highlighted WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, CURSOR_LN); } else { // Write just one char highlighted wnd_layout_ptr->index = mn_layout_ptr->sub_ln; WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, CURSOR_CHAR); } } else // Write text as a regular line { WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); } } else // Reached end of menu text break; // Set current row to already advanced next row wnd_layout_ptr->curr_row = wnd_layout_ptr->next_row; // Advance menu line menu_ln++; } }
///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void DisplaySelectMenu(WND_LAYOUT_STRUCT *wnd_layout_ptr, MN_LAYOUT_STRUCT *mn_layout_ptr, uint8 titlePosition) { uint8 buff[50]; uint8 top; uint8 menu_ln; uint32 length; memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); menu_ln = 0; top = 0; strcpy((char*)buff, (char*)(g_menuPtr + top + menu_ln)->data); length = strlen((char*)buff); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; if (titlePosition == TITLE_LEFT_JUSTIFIED) { wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; } else // titlePosition is TITLE_CENTERED { wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); } WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); menu_ln = 0; top = (uint8)mn_layout_ptr->top_ln; wnd_layout_ptr->curr_row = wnd_layout_ptr->start_row; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; while (wnd_layout_ptr->curr_row <= wnd_layout_ptr->end_row) { strcpy((char*)buff, (char*)(g_menuPtr + top + menu_ln)->data); if (strcmp((char*)buff, ".end.")) { if (menu_ln == (mn_layout_ptr->curr_ln - mn_layout_ptr->top_ln)) { if (mn_layout_ptr->sub_ln == 0) { WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, CURSOR_LN); } else { wnd_layout_ptr->index = mn_layout_ptr->sub_ln; WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, CURSOR_CHAR); } } else { WndMpWrtString(buff, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); } } else break; wnd_layout_ptr->curr_row = wnd_layout_ptr->next_row; menu_ln++; }/* END OF WHILE LOOP */ }
///---------------------------------------------------------------------------- /// Function Break ///---------------------------------------------------------------------------- void TimerModeTimeMenuDisplay(REC_MN_STRUCT *rec_ptr, WND_LAYOUT_STRUCT *wnd_layout_ptr, MN_LAYOUT_STRUCT *mn_layout_ptr) { uint8 top; uint8 menu_ln; uint8 length = 0; memset(&(g_mmap[0][0]), 0, sizeof(g_mmap)); menu_ln = 0; top = (uint8)mn_layout_ptr->top_ln; // Add in a title for the menu length = sprintf((char*)g_spareBuffer, "-%s-", getLangText(ACTIVE_TIME_PERIOD_TEXT)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ZERO; wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); // Add in unit format for the menu length = sprintf((char*)g_spareBuffer, "(24 %s:%s)", getLangText(HOUR_TEXT), getLangText(MINUTE_TEXT)); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_ONE; wnd_layout_ptr->curr_col =(uint16)(((wnd_layout_ptr->end_col)/2) - ((length * SIX_COL_SIZE)/2)); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_row = wnd_layout_ptr->start_row; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; wnd_layout_ptr->next_row = wnd_layout_ptr->start_row; wnd_layout_ptr->next_col = wnd_layout_ptr->start_col; // --------------------------------------------------------------------------------- // Write out the start time line which includes the start time text, hour and min values // --------------------------------------------------------------------------------- wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_THREE; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; // Display the start time text sprintf((char*)g_spareBuffer, "%s: ", getLangText(START_TIME_TEXT)); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FOUR; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((5 * SIX_COL_SIZE)/2)); // Display the start hour sprintf((char*)g_spareBuffer, "%02d", (uint16)rec_ptr[TMT_START_HOUR].numrec.tindex); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMT_START_HOUR) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)(":"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the start min sprintf((char*)g_spareBuffer, "%02d", (uint16)rec_ptr[TMT_START_MIN].numrec.tindex); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMT_START_MIN) ? CURSOR_LN : REG_LN); // --------------------------------------------------------------------------------- // Write out the stop time line which includes the stop time text, hour and min values // --------------------------------------------------------------------------------- wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_FIVE; wnd_layout_ptr->curr_col = wnd_layout_ptr->start_col; // Display the stop time text sprintf((char*)g_spareBuffer, "%s: ", getLangText(STOP_TIME_TEXT)); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_row = DEFAULT_MENU_ROW_SIX; wnd_layout_ptr->curr_col = (uint16)(((wnd_layout_ptr->end_col)/2) - ((5 * SIX_COL_SIZE)/2)); // Display the stop hour sprintf((char*)g_spareBuffer, "%02d", (uint16)rec_ptr[TMT_STOP_HOUR].numrec.tindex); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMT_STOP_HOUR) ? CURSOR_LN : REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; WndMpWrtString((uint8*)(":"), wnd_layout_ptr, SIX_BY_EIGHT_FONT, REG_LN); wnd_layout_ptr->curr_col = wnd_layout_ptr->next_col; // Display the stop min sprintf((char*)g_spareBuffer, "%02d", (uint16)rec_ptr[TMT_STOP_MIN].numrec.tindex); WndMpWrtString(g_spareBuffer, wnd_layout_ptr, SIX_BY_EIGHT_FONT, (mn_layout_ptr->curr_ln == TMT_STOP_MIN) ? CURSOR_LN : REG_LN); }