From 03a92bcda4c56a118c79ab4ef4b4c2ea92ebedd2 Mon Sep 17 00:00:00 2001 From: demik Date: Sat, 30 Oct 2021 15:38:34 +0200 Subject: [PATCH] fixed BT LED state in case some mouse is reconnecting while the quack is scanning --- ChangeLog.md | 3 ++- main/blue.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5bca86c..1c8ada3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,6 @@ -## v1.4.2 (unreleased) +## v1.4.2 - added support for MicroSpeed MacTRAC 2.0 +- fixed a BT led state when a device reconnect while scanning ## v1.4.1 - update to ESP-IDF v4.2.2: diff --git a/main/blue.c b/main/blue.c index abcdf78..acc1cbf 100644 --- a/main/blue.c +++ b/main/blue.c @@ -513,7 +513,10 @@ void blue_scan(void *pvParameters) { ESP_LOGI(TAG, "starting scan on core %d…", xPortGetCoreID()); esp_hid_scan(BLUE_SCAN_DURATION, &len, &results); ESP_LOGI(TAG, "scan returned %u result(s)", len); - xTaskNotify(t_blue, LED_SLOW, eSetValueWithOverwrite); + + /* don't put the slow blink is a device reconnected while scanning */ + if (blue_pointers == 0) + xTaskNotify(t_blue, LED_SLOW, eSetValueWithOverwrite); if (len) { esp_hid_scan_result_t *r = results;