From 30e538e5ed360df9509b3a33c209bbf45a796097 Mon Sep 17 00:00:00 2001 From: Marlon Spangenberg <25596663+aHVzY2g@users.noreply.github.com> Date: Wed, 24 Jun 2020 01:08:23 +0200 Subject: [PATCH] added Bluetooth Name to paring screen & changed the order --- src/screen.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/screen.cpp b/src/screen.cpp index 707d52c1..1733fac4 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -81,14 +81,20 @@ static void drawFrameBluetooth(OLEDDisplay *display, OLEDDisplayUiState *state, { display->setTextAlignment(TEXT_ALIGN_CENTER); display->setFont(ArialMT_Plain_16); - display->drawString(64 + x, 2 + y, "Bluetooth"); + display->drawString(64 + x, y, "Bluetooth"); display->setFont(ArialMT_Plain_10); - display->drawString(64 + x, SCREEN_HEIGHT - FONT_HEIGHT + y, "Enter this code"); + display->drawString(64 + x, FONT_HEIGHT + y + 2, "Enter this code"); - display->setTextAlignment(TEXT_ALIGN_CENTER); display->setFont(ArialMT_Plain_24); - display->drawString(64 + x, 22 + y, btPIN); + display->drawString(64 + x, 26 + y, btPIN); + + display->setFont(ArialMT_Plain_10); + char buf[30]; + const char *name = "Name: "; + strcpy(buf,name); + strcat(buf,getDeviceName()); + display->drawString(64 + x, 48 + y, buf); } /// Draw the last text message we received