Skip to content

Commit

Permalink
fix 3s always not paired issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dentra committed Oct 12, 2022
1 parent 1be2b7d commit 990a52c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/tion_ble_3s/tion_ble_3s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 990a52c

Please sign in to comment.