mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core/BLE: debug output for characteristics we read/write
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ac533a6433
commit
86c78d21ad
1 changed files with 13 additions and 0 deletions
|
|
@ -410,6 +410,19 @@ dc_status_t BLEObject::select_preferred_service(void)
|
|||
return DC_STATUS_IO;
|
||||
}
|
||||
|
||||
bool hasread = false;
|
||||
bool haswrite = false;
|
||||
foreach (const QLowEnergyCharacteristic &c, preferred->characteristics()) {
|
||||
if (is_read_characteristic(c) && !hasread) {
|
||||
qDebug() << " Reading from " << c.uuid();
|
||||
hasread = true;
|
||||
}
|
||||
if (is_write_characteristic(c) && !haswrite) {
|
||||
qDebug() << " Writing to " << c.uuid();
|
||||
haswrite = true;
|
||||
}
|
||||
}
|
||||
|
||||
connect(preferred, &QLowEnergyService::stateChanged, this, &BLEObject::serviceStateChanged);
|
||||
connect(preferred, &QLowEnergyService::characteristicChanged, this, &BLEObject::characteristcStateChanged);
|
||||
connect(preferred, &QLowEnergyService::characteristicWritten, this, &BLEObject::characteristicWritten);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue