static void DrawConnectionScreen() { unsigned char const* pSwash; unsigned char row; unsigned char col; /* this is part of the idle update * timing is controlled by the idle update timer * buffer was already cleared when drawing the time */ etConnectionState cs = QueryConnectionState(); switch (cs) { case RadioOn: if (QueryValidPairingInfo()) { pSwash = pBootPageConnectionSwash; } else { pSwash = pBootPagePairingSwash; } break; case Paired: pSwash = pBootPageConnectionSwash; break; case Connected: //pSwash = pBootPageConnectionSwash; //break; // Think we should do something here? pSwash = pBootPageUnknownSwash; break; case Initializing: case ServerFailure: case RadioOff: case RadioOffLowBattery: case ShippingMode: default: pSwash = pBootPageBluetoothOffSwash; break; } CopyRowsIntoMyBuffer(pSwash ,WATCH_DRAWN_IDLE_BUFFER_ROWS+1, 32); /* characters are 10h then add space of 2 lines */ row = 65; col = 0; col = WriteString(GetLocalBluetoothAddressString(),row,col,DONT_ADD_SPACE_AT_END); /* add the firmware version */ row = 75; col = 0; col = WriteString("App", row, col, ADD_SPACE_AT_END); col = WriteString("0.0.1", row, col, ADD_SPACE_AT_END); /* and the stack version */ row = 85; col = 0; col = WriteString("Stack", row, col, ADD_SPACE_AT_END); col = WriteString("n/a", row, col, ADD_SPACE_AT_END); }
static void DrawConnectionScreen() { unsigned char const* pSwash; /* this is part of the idle update * timing is controlled by the idle update timer * buffer was already cleared when drawing the time */ etConnectionState cs = QueryConnectionState(); switch (cs) { case RadioOn: if (QueryValidPairingInfo()) { pSwash = pBootPageConnectionSwash; } else { pSwash = pBootPagePairingSwash; } break; case Paired: pSwash = pBootPageConnectionSwash; break; case Connected: //pSwash = pBootPageConnectionSwash; //break; // Think we should do something here? pSwash = pBootPageUnknownSwash; break; case Initializing: case ServerFailure: case RadioOff: case RadioOffLowBattery: case ShippingMode: default: pSwash = pBootPageBluetoothOffSwash; break; } CopyRowsIntoMyBuffer(pSwash,WATCH_DRAWN_IDLE_BUFFER_ROWS+1,32); #ifdef XXFONT_TESTING gRow = 65; gColumn = 0; gBitColumnMask = BIT0; SetFont(MetaWatch5); WriteFontString("Peanut Butter"); gRow = 72; gColumn = 0; gBitColumnMask = BIT0; SetFont(MetaWatch7); //WriteFontString("ABCDEFGHIJKLMNOP"); WriteFontString("Peanut Butter W"); gRow = 80; gColumn = 0; gBitColumnMask = BIT0; SetFont(MetaWatch16); WriteFontString("ABC pqr StuVw"); #else unsigned char row; unsigned char col; /* characters are 10h then add space of 2 lines */ row = 65; col = 0; col = WriteString(GetLocalBluetoothAddressString(),row,col,DONT_ADD_SPACE_AT_END); /* add the firmware version */ row = 75; col = 0; col = WriteString("App",row,col,ADD_SPACE_AT_END); col = WriteString(VERSION_STRING,row,col,ADD_SPACE_AT_END); /* and the stack version */ row = 85; col = 0; col = WriteString("Stack",row,col,ADD_SPACE_AT_END); col = WriteString(GetStackVersion(),row,col,ADD_SPACE_AT_END); #endif }