Beispiel #1
0
void print_date(uint8_t month, uint8_t day, uint8_t year, uint8_t mode) {
  displaySetAddress(MENU_INDENT, 3);
  displayPutStr("Date:", NORMAL);
  if (region == REGION_US) {
  	displayPutStr("     ",NORMAL);
    printnumber(month, (mode == SET_MONTH)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
    printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
  } else if (region == REGION_EU) {
  	displayPutStr("     ",NORMAL);
    printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
    printnumber(month, (mode == SET_MONTH)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
  } else if ( region == DOW_REGION_US) {
  	displayWriteChar(' ', NORMAL);
  	print_dow(NORMAL,month,day,year);
  	printnumber(month, (mode == SET_MONTH)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
    printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
  } else if ( region == DOW_REGION_EU) {
  	displayWriteChar(' ', NORMAL);
  	print_dow(NORMAL,month,day,year);
  	printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
    printnumber(month, (mode == SET_MONTH)?INVERTED:NORMAL);
    displayWriteChar('/', NORMAL);
  } else if ( region == DATELONG) {
  	displayPutStr("   ",NORMAL);
  	print_month((mode == SET_MONTH)?INVERTED:NORMAL,month);
  	displayWriteChar(' ', NORMAL);
  	printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	displayWriteChar(',', NORMAL);
  	displayWriteChar(' ', NORMAL);
  } else {
  	print_dow(NORMAL,month,day,year);
  	print_month((mode == SET_MONTH)?INVERTED:NORMAL,month);
  	displayWriteChar(' ', NORMAL);
  	printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	displayWriteChar(',', NORMAL);
  }
  printnumber(20,(mode == SET_YEAR)?INVERTED:NORMAL);
  printnumber(year, (mode == SET_YEAR)?INVERTED:NORMAL);
}
Beispiel #2
0
void print_date(uint8_t month, uint8_t day, uint8_t year, uint8_t mode) {
  glcdSetAddress(MENU_INDENT, 3);
  glcdPutStr("Date:", NORMAL);
  if (region == REGION_US) {
  	glcdPutStr("     ",NORMAL);
  	print_number_slash(month,(mode == SET_MONTH)?INVERTED:NORMAL);
  	print_number_slash(day, (mode == SET_DAY)?INVERTED:NORMAL);
  } else if (region == REGION_EU) {
  	glcdPutStr("     ",NORMAL);
  	print_number_slash(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	print_number_slash(month,(mode == SET_MONTH)?INVERTED:NORMAL);
  }
#ifdef OPTION_DOW_DATELONG 
  else if ( region == DOW_REGION_US) {
  	glcdWriteChar(' ', NORMAL);
  	print_dow(NORMAL,month,day,year);
  	print_number_slash(month,(mode == SET_MONTH)?INVERTED:NORMAL);
  	print_number_slash(day, (mode == SET_DAY)?INVERTED:NORMAL);
  } else if ( region == DOW_REGION_EU) {
  	glcdWriteChar(' ', NORMAL);
  	print_dow(NORMAL,month,day,year);
  	print_number_slash(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	print_number_slash(month,(mode == SET_MONTH)?INVERTED:NORMAL);
  } else if ( region == DATELONG) {
  	glcdPutStr("   ",NORMAL);
  	print_month((mode == SET_MONTH)?INVERTED:NORMAL,month);
  	glcdWriteChar(' ', NORMAL);
  	printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	glcdWriteChar(',', NORMAL);
  	glcdWriteChar(' ', NORMAL);
  } else {
  	print_dow(NORMAL,month,day,year);
  	print_month((mode == SET_MONTH)?INVERTED:NORMAL,month);
  	glcdWriteChar(' ', NORMAL);
  	printnumber(day, (mode == SET_DAY)?INVERTED:NORMAL);
  	glcdWriteChar(',', NORMAL);
  }
#endif
  printnumber(20,(mode == SET_YEAR)?INVERTED:NORMAL);
  printnumber(year, (mode == SET_YEAR)?INVERTED:NORMAL);
}