@@ -2253,11 +2253,11 @@ void paintKeyProvisionFail(uint16_t displayTime)
2253
2253
{
2254
2254
oled.erase ();
2255
2255
2256
- oled.setFont (QW_FONT_8X16 );
2256
+ oled.setFont (QW_FONT_5X7 );
2257
2257
2258
2258
int x = (oled.getWidth () / 2 ); // Center point for x coord
2259
2259
int y = 0 ;
2260
- int fontHeight = 13 ;
2260
+ int fontHeight = 8 ;
2261
2261
int textX;
2262
2262
2263
2263
textX = x - (oled.getStringWidth (" ZTP" ) / 2 ); // Starting point of text
@@ -2274,13 +2274,20 @@ void paintKeyProvisionFail(uint16_t displayTime)
2274
2274
oled.setCursor (textX, y);
2275
2275
oled.print (" ID:" );
2276
2276
2277
- char hardwareID[ 11 ];
2278
- sprintf (hardwareID, " %02X%02X%02X%02X%02X " , unitMACAddress[ 0 ], unitMACAddress[ 1 ], unitMACAddress[ 2 ], unitMACAddress[ 3 ], unitMACAddress[ 4 ]); // Get ready for JSON
2279
- Serial. printf ( " Device ID: %s \n\r " , hardwareID );
2277
+ // The MAC address is characters long so we have to split it onto two lines
2278
+ char hardwareID[ 13 ];
2279
+ sprintf (hardwareID, " %02X%02X%02X " , unitMACAddress[ 0 ], unitMACAddress[ 1 ], unitMACAddress[ 2 ] );
2280
2280
String macAddress = String (hardwareID);
2281
2281
2282
- oled.setFont (QW_FONT_5X7);
2283
- y += fontHeight + 1 ;
2282
+ y += fontHeight;
2283
+ textX = x - (oled.getStringWidth (macAddress) / 2 );
2284
+ oled.setCursor (textX, y);
2285
+ oled.print (hardwareID);
2286
+
2287
+ sprintf (hardwareID, " %02X%02X%02X" , unitMACAddress[3 ], unitMACAddress[4 ], unitMACAddress[5 ]);
2288
+ macAddress = String (hardwareID);
2289
+
2290
+ y += fontHeight;
2284
2291
textX = x - (oled.getStringWidth (macAddress) / 2 );
2285
2292
oled.setCursor (textX, y);
2286
2293
oled.print (hardwareID);
0 commit comments