From 990a52c835af57cf2d4fcc3ddbd732889fc53b6c Mon Sep 17 00:00:00 2001 From: dentra Date: Wed, 12 Oct 2022 17:06:20 +0000 Subject: [PATCH] fix 3s always not paired issue --- components/tion_ble_3s/tion_ble_3s.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/tion_ble_3s/tion_ble_3s.cpp b/components/tion_ble_3s/tion_ble_3s.cpp index bc1798a..40c82da 100644 --- a/components/tion_ble_3s/tion_ble_3s.cpp +++ b/components/tion_ble_3s/tion_ble_3s.cpp @@ -21,10 +21,11 @@ void Tion3sBLEVPortBase::setup() { } void Tion3sBLEVPortBase::update() { - if (this->is_connected() && this->pair_state_ > 0) { + if (!this->is_connected() || this->pair_state_ > 0) { TionBLEVPortBase::update(); } else { - ESP_LOGW(TAG, "Pairing required"); + ESP_LOGW(TAG, "Pairing required. [pair_state: %d, is_connected: %s", this->pair_state_, + YESNO(this->is_connected())); this->disconnect(); } }