From 761804b17a5021c7cb67e07a3e89f0a0c15f72e0 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 24 Oct 2022 11:03:54 -0500 Subject: [PATCH] Send network ping on triple-click (#1852) * Send network ping on multi-press * Refresh myNodeInfo before sending * Cleanup and screen print * Update ButtonThread.h --- src/ButtonThread.h | 9 +++------ src/nimble/NimbleBluetooth.cpp | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ButtonThread.h b/src/ButtonThread.h index 4114679ad..c1fd770bc 100644 --- a/src/ButtonThread.h +++ b/src/ButtonThread.h @@ -166,12 +166,9 @@ class ButtonThread : public concurrency::OSThread static void userButtonMultiPressed() { -#ifdef ARCH_ESP32 - clearNVS(); -#endif -#ifdef ARCH_NRF52 - clearBonds(); -#endif + screen->print("Sent ad-hoc ping\n"); + service.refreshMyNodeInfo(); + service.sendNetworkPing(NODENUM_BROADCAST, true); } static void userButtonPressedLongStart() diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 6dabbc36f..c74c73316 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -12,7 +12,6 @@ NimBLECharacteristic *fromNumCharacteristic; NimBLEServer *bleServer; static bool passkeyShowing; -static uint32_t doublepressed; class BluetoothPhoneAPI : public PhoneAPI {