mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix quarq power and cadence glitches when coasting
ANT+ telemetry data processing in ANTChannel now checks for previous message period values. Fixes #607. [Tested by author on Quarq cranks, error not recreated on SRM or Powertap devices, but may be Quarq specific]
This commit is contained in:
committed by
Mark Liversedge
parent
43b1c61d6b
commit
cc0bd29ef7
@@ -442,7 +442,7 @@ void ANTChannel::broadcastEvent(unsigned char *ant_message)
|
||||
//
|
||||
case ANT_STANDARD_POWER: // 0x10 - standard power
|
||||
{
|
||||
if (lastStdPwrMessage.type != 0) {
|
||||
if (lastStdPwrMessage.type != 0 && antMessage.period) {
|
||||
is_alt ? parent->setAltWatts(antMessage.instantPower) : parent->setWatts(antMessage.instantPower);
|
||||
value2 = value = antMessage.instantPower;
|
||||
parent->setCadence(antMessage.instantCadence); // cadence
|
||||
@@ -462,7 +462,7 @@ void ANTChannel::broadcastEvent(unsigned char *ant_message)
|
||||
uint16_t period = antMessage.period - lastMessage.period;
|
||||
uint16_t torque = antMessage.torque - lastMessage.torque;
|
||||
|
||||
if (events && period) {
|
||||
if (events && period && lastMessage.period) {
|
||||
nullCount = 0;
|
||||
|
||||
float nm_torque = torque / (32.0 * events);
|
||||
|
||||
Reference in New Issue
Block a user