bluetooth FTMS fix: if condition was always false, so no speed was reported... (#4440)

!FTMS_MORE_DATA == 0
flags & 0  == 0
-> if statement is always false
This commit is contained in:
Odald
2024-01-29 13:17:16 +00:00
committed by GitHub
parent bd751988e3
commit 50c305b7f2

View File

@@ -786,7 +786,7 @@ BT40Device::updateValue(const QLowEnergyCharacteristic &c, const QByteArray &val
dynamic_cast<BT40Controller*>(parent)->setCadence(bd.inst_cadence/2.0f);
}
if (bd.flags & !FtmsIndoorBikeFlags::FTMS_MORE_DATA)
if ( !(bd.flags & FtmsIndoorBikeFlags::FTMS_MORE_DATA) )
{
// If "more data" is false, inst speed is present. Convert to km/h by dividing with 100.
dynamic_cast<BT40Controller*>(parent)->setSpeed(bd.inst_speed/100.0f);