From 2a397db360b74b24bd8672d79bc453f2afcc9483 Mon Sep 17 00:00:00 2001 From: lash21 Date: Wed, 28 Oct 2026 08:20:02 +0100 Subject: [PATCH] migrate --- inos/Smart-Watch/Smart-Watch.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inos/Smart-Watch/Smart-Watch.ino b/inos/Smart-Watch/Smart-Watch.ino index 09619d6..9e2bdc3 100644 --- a/inos/Smart-Watch/Smart-Watch.ino +++ b/inos/Smart-Watch/Smart-Watch.ino @@ -61,6 +61,7 @@ class CharacteristicCallbacks: public BLECharacteristicCallbacks { } } }; + class MyServerCallbacks: public BLEServerCallbacks { void onConnect(BLEServer* pServer) { Serial.println("Conecction with client"); @@ -109,6 +110,7 @@ void loop() { updateClock(); } + void initDevice(){ BLEDevice::init(deviceName); BLEServer *pServer = BLEDevice::createServer(); @@ -152,6 +154,7 @@ void initDevice(){ BLEDevice::startAdvertising(); Serial.println("Characteristic defined! Now you can read it in your phone!"); } + void updateClock(){ unsigned long curMil = millis(); @@ -164,6 +167,7 @@ void updateClock(){ if (MIN >= 60) {MIN = 0; HOUR++; timeChanged = true;} if (HOUR >= 24) {HOUR = 0; DAY++; timeChanged = true;} } + void drawText(int width, int hight,int size, const char* text) { gfx->setCursor(width, hight); gfx->setTextSize(size);