From 23a56317c09b98e247d1d76fc190c77f0b79e158 Mon Sep 17 00:00:00 2001 From: Guo-Rong <5484552+gkoh@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:24:48 +1030 Subject: [PATCH] Actually record the private data. --- lib/M5ez/src/M5ez.cpp | 1 + src/furble.ino | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/M5ez/src/M5ez.cpp b/lib/M5ez/src/M5ez.cpp index 2428997..c0252d5 100644 --- a/lib/M5ez/src/M5ez.cpp +++ b/lib/M5ez/src/M5ez.cpp @@ -2255,6 +2255,7 @@ void M5ez::addEvent(uint16_t (*function)(void *private_data), uint32_t when /* = 1 */) { event_t n; n.function = function; + n.private_data = private_data; n.when = millis() + when - 1; _events.push_back(n); } diff --git a/src/furble.ino b/src/furble.ino index 12bc13b..5ac0f8e 100644 --- a/src/furble.ino +++ b/src/furble.ino @@ -315,11 +315,8 @@ uint16_t disconnectDetect(void *private_data) { if (device->isConnected()) return 500; - String buttons; - buttons = ez.buttons.get(); - - String header; - header = ez.header.title(); + String buttons = ez.buttons.get(); + String header = ez.header.title(); NimBLEClient *pClient = NimBLEDevice::createClient(); ezProgressBar progress_bar(FURBLE_STR, "Reconnecting ...", "");