BT40Device - Fix Ignoring the CSC service for device xxx message

The "Ignoring the CSC service for device..." was intended to notify when power
sensor is present the CSC service is ignored since it is redundant and may
cause problems, but it is misleading when there is no CSC or Power service.
Reported in #3471
This commit is contained in:
Ale Martinez
2020-06-03 13:47:46 -03:00
parent bc13092cd2
commit 5194d09ec3

View File

@@ -170,16 +170,18 @@ BT40Device::serviceScanDone()
}
}
if (csc_service && has_csc && !has_power) {
if (csc_service && has_csc) {
if (!has_power) {
// Only connect to CSC service if the same device doesn't provide a power service
// since the power service also provides the same readings.
qDebug() << "Connecting to the CSC service for device" << m_currentDevice.name() << " " << m_currentDevice.deviceUuid();
csc_service->discoverDetails();
// Only connect to CSC service if the same device doesn't provide a power service
// since the power service also provides the same readings.
qDebug() << "Connecting to the CSC service for device" << m_currentDevice.name() << " " << m_currentDevice.deviceUuid();
csc_service->discoverDetails();
} else {
} else {
qDebug() << "Ignoring the CSC service for device" << m_currentDevice.name() << " " << m_currentDevice.deviceUuid();
qDebug() << "Ignoring the CSC service for device" << m_currentDevice.name() << " " << m_currentDevice.deviceUuid();
}
}
}