From aa70fbca81b86fcc03f8ee8106ddfb8a86769508 Mon Sep 17 00:00:00 2001 From: Jon Escombe Date: Tue, 16 Feb 2016 10:15:52 +0000 Subject: [PATCH] Fix speed & power spikes from Powertap G3 G3 hubs intermittently broadcast battery status messages, which were being treated as telemetry and saved into lastMessage. This was then corrupting the ANT_WHEELTORQUE_POWER calculations for speed & power after each battery message. Note: don't have a G3 to verify this agaist, but this fix makes sense given the supplied log files! --- src/ANTChannel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ANTChannel.cpp b/src/ANTChannel.cpp index 356a2bd4c..040f7f839 100644 --- a/src/ANTChannel.cpp +++ b/src/ANTChannel.cpp @@ -343,6 +343,8 @@ void ANTChannel::broadcastEvent(unsigned char *ant_message) product_id=MANUFACTURER_MODEL_NUMBER_ID(message); checkCinqo(); + } else if (MESSAGE_IS_BATTERY_VOLTAGE(message)) { + // todo: push battery status up to train view when we have a means to display notifications } else { telemetry = true;