/*! Display the startup image or Splash Screen */ void DrawSplashScreen(void) { // ClearLcd(); // clear LCD buffer FillMyBuffer(0, LCD_ROW_NUM, 0x00); #if COUNTDOWN_TIMER DrawWwzSplashScreen(); #else /* draw metawatch logo */ CopyColumnsIntoMyBuffer(pIconSplashLogo, 21, 13, 3, 6); CopyRowsIntoMyBuffer(pIconSplashMetaWatch, SPLASH_START_ROW, 12); CopyColumnsIntoMyBuffer(pIconSplashHandsFree, 58, 5, 2, 8); // SendMyBufferToLcd(21, 42); // 58 + 5 - 21 #endif SendMyBufferToLcd(0, LCD_ROW_NUM); }
void DrawBootloaderScreen(void) { #if BOOTLOADER FillMyBuffer(STARTING_ROW, LCD_ROW_NUM, 0x00); CopyRowsIntoMyBuffer(pBootloader, BOOTLOADER_START_ROW, BOOTLOADER_ROWS); // Draw version SetFont(MetaWatch5); gRow = 61; gColumn = 4; gBitColumnMask = BIT3; DrawString("V ", DRAW_OPT_BITWISE_OR); DrawString((char const *)VERSION, DRAW_OPT_BITWISE_OR); unsigned char i = 0; char const *pBootVer = BootVersion; PrintF("BL_VER addr:%04X", pBootVer); for (; i < 8; ++i) {PrintH(pBootVer[i]); PrintC(SPACE);} i = 0; while (*pBootVer && i++ < 8) { if ((*pBootVer < ZERO || *pBootVer > '9') && *pBootVer != '.') break; pBootVer ++; } if (i > 4) // at least x.x.x { gRow += 7; gColumn = 4; gBitColumnMask = BIT3; DrawString("B ", DRAW_OPT_BITWISE_OR); DrawString(BootVersion, DRAW_OPT_BITWISE_OR); } DrawLocalAddress(1, 80); SendMyBufferToLcd(STARTING_ROW, LCD_ROW_NUM); #endif }
void DrawConnectionScreen(void) { const unsigned char *pSwash; if (!RadioOn()) pSwash = pBootPageBluetoothOffSwash; else if (ValidAuthInfo()) pSwash = pBootPagePairedSwash; else pSwash = pBootPageNoPairSwash; FillMyBuffer(WATCH_DRAW_SCREEN_ROW_NUM, PHONE_DRAW_SCREEN_ROW_NUM, 0x00); CopyRowsIntoMyBuffer(pSwash, WATCH_DRAW_SCREEN_ROW_NUM + 1, 32); /* add the firmware version */ gRow = 68; gColumn = 4; gBitColumnMask = BIT0; SetFont(MetaWatch5); DrawString("V ", DRAW_OPT_BITWISE_OR); DrawString((char *)VERSION, DRAW_OPT_BITWISE_OR); DrawLocalAddress(1, 80); SendMyBufferToLcd(WATCH_DRAW_SCREEN_ROW_NUM, PHONE_DRAW_SCREEN_ROW_NUM); }
void DrawDateTime(void) { // clean date&time area FillMyBuffer(STARTING_ROW, WATCH_DRAW_SCREEN_ROW_NUM, 0x00); SetFont(DEFAULT_HOURS_FONT); gRow = DEFAULT_HOURS_ROW; gColumn = DEFAULT_HOURS_COL; gBitColumnMask = DEFAULT_HOURS_COL_BIT; DrawHours(DRAW_OPT_BITWISE_OR); gRow = DEFAULT_MINS_ROW; gColumn = DEFAULT_MINS_COL; gBitColumnMask = DEFAULT_MINS_COL_BIT; DrawMins(DRAW_OPT_BITWISE_OR); if (GetProperty(PROP_TIME_SECOND)) DrawSecs(); else if (Charging()) DrawBatteryOnIdleScreen(3, 9, MetaWatch5); else { if (!GetProperty(PROP_24H_TIME_FORMAT)) { gRow = DEFAULT_AM_PM_ROW; gColumn = DEFAULT_AM_PM_COL; gBitColumnMask = DEFAULT_AM_PM_COL_BIT; SetFont(DEFAULT_AM_PM_FONT); DrawString((RTCHOUR > 11) ? "PM" : "AM", DRAW_OPT_BITWISE_OR); } gRow = GetProperty(PROP_24H_TIME_FORMAT) ? DEFAULT_DOW_24HR_ROW : DEFAULT_DOW_12HR_ROW; gColumn = DEFAULT_DOW_COL; gBitColumnMask = DEFAULT_DOW_COL_BIT; SetFont(DEFAULT_DOW_FONT); DrawString((tString *)DaysOfTheWeek[LANG_EN][RTCDOW], DRAW_OPT_BITWISE_OR); //add year when time is in 24 hour mode if (GetProperty(PROP_24H_TIME_FORMAT)) { gRow = DEFAULT_DATE_YEAR_ROW; gColumn = DEFAULT_DATE_YEAR_COL; gBitColumnMask = DEFAULT_DATE_YEAR_COL_BIT; SetFont(DEFAULT_DATE_YEAR_FONT); unsigned char Year = RTCYEARH; DrawChar(BCD_H(Year) + ZERO, DRAW_OPT_BITWISE_OR); DrawChar(BCD_L(Year) + ZERO, DRAW_OPT_BITWISE_OR); Year = RTCYEARL; DrawChar(BCD_H(Year) + ZERO, DRAW_OPT_BITWISE_OR); DrawChar(BCD_L(Year) + ZERO, DRAW_OPT_BITWISE_OR); } //Display month and day //Watch controls time - use default date position unsigned char DayFirst = GetProperty(PROP_DDMM_DATE_FORMAT); char Rtc[2]; Rtc[DayFirst ? 0 : 1] = RTCDAY; Rtc[DayFirst ? 1 : 0] = RTCMON; gRow = DEFAULT_DATE_FIRST_ROW; gColumn = DEFAULT_DATE_FIRST_COL; gBitColumnMask = DEFAULT_DATE_FIRST_COL_BIT; SetFont(DEFAULT_DATE_MONTH_FONT); DrawChar(BCD_H(Rtc[0]) + ZERO, DRAW_OPT_BITWISE_OR); DrawChar(BCD_L(Rtc[0]) + ZERO, DRAW_OPT_BITWISE_OR); //Display separator SetFont(DEFAULT_DATE_SEPARATOR_FONT); DrawChar(DayFirst ? '.' : '/', DRAW_OPT_BITWISE_OR); //Display day second gRow = DEFAULT_DATE_SECOND_ROW; gColumn = DEFAULT_DATE_SECOND_COL; gBitColumnMask = DEFAULT_DATE_SECOND_COL_BIT; SetFont(DEFAULT_DATE_DAY_FONT); DrawChar(BCD_H(Rtc[1]) + ZERO, DRAW_OPT_BITWISE_OR); DrawChar(BCD_L(Rtc[1]) + ZERO, DRAW_OPT_BITWISE_OR); } SendMyBufferToLcd(STARTING_ROW, WATCH_DRAW_SCREEN_ROW_NUM); }
void DrawWatchStatusScreen(void) { FillMyBuffer(0, LCD_ROW_NUM, 0); CopyColumnsIntoMyBuffer(RadioOn() ? pRadioOnIcon : pRadioOffIcon, 3, STATUS_ICON_SIZE_IN_ROWS, LEFT_STATUS_ICON_COLUMN, STATUS_ICON_SIZE_IN_COLUMNS); // Connection status CopyColumnsIntoMyBuffer(Connected(CONN_TYPE_MAIN) ? pConnectedIcon : pDisconnectedIcon, 3, STATUS_ICON_SIZE_IN_ROWS, CENTER_STATUS_ICON_COLUMN, STATUS_ICON_SIZE_IN_COLUMNS); gRow = 31; gColumn = 5; gBitColumnMask = BIT4; SetFont(MetaWatch5); // if (PairedDeviceType() == DEVICE_TYPE_BLE) // { // if (Connected(CONN_TYPE_HFP) && Connected(CONN_TYPE_MAP)) DrawString("DUO", DRAW_OPT_BITWISE_OR); // else DrawString("BLE", DRAW_OPT_BITWISE_OR); // } // else if (PairedDeviceType() == DEVICE_TYPE_SPP) DrawString("BR", DRAW_OPT_BITWISE_OR); if (PairedDeviceType() == DEVICE_TYPE_SPP) { DrawString(Connected(CONN_TYPE_SPP) && QuerySniffState() == Active ? "ACT" : "BR", DRAW_OPT_BITWISE_OR); } #if SUPPORT_BLE else if (PairedDeviceType() == DEVICE_TYPE_BLE) { DrawString(Connected(CONN_TYPE_BLE) && CurrentInterval(INTERVAL_STATE) == SHORT ? "ACT" : (Connected(CONN_TYPE_HFP) && Connected(CONN_TYPE_MAP) ? "DUO" : "BLE"), DRAW_OPT_BITWISE_OR); } #endif DrawBatteryOnIdleScreen(6, 9, MetaWatch7); // Add Wavy line gRow += 12; CopyRowsIntoMyBuffer(pWavyLine, gRow, NUMBER_OF_ROWS_IN_WAVY_LINE); CopyColumnsIntoMyBuffer(pIconWatch, 54, 21, 0, 2); //54, 21, 2, 2); /* add the firmware version */ gColumn = 2; gRow = 56; gBitColumnMask = BIT2; DrawString("SW: ", DRAW_OPT_BITWISE_OR); DrawString((char *)VERSION, DRAW_OPT_BITWISE_OR); DrawString(" (", DRAW_OPT_BITWISE_OR); DrawChar(BUILD[0], DRAW_OPT_BITWISE_OR); DrawChar(BUILD[1], DRAW_OPT_BITWISE_OR); DrawChar(BUILD[2], DRAW_OPT_BITWISE_OR); DrawChar(')', DRAW_OPT_BITWISE_OR); gColumn = 2; gRow = 65; gBitColumnMask = BIT2; DrawString("HW: REV ", DRAW_OPT_BITWISE_OR); DrawChar(GetMsp430HardwareRevision(), DRAW_OPT_BITWISE_OR); DrawLocalAddress(1, 80); SendMyBufferToLcd(STARTING_ROW, LCD_ROW_NUM); }