HI All,
I've developed a DF that grabs the connection status and power state of ANT+ connected devices, specifically SRAM eTAP, Favero Assioma Pedal, Bontrager Lights, this being what I have more than what the DF is limited to.
What I've found is the Light's report power state fine but when I enable the code to get the connection state and Power status from the pedals or eTAP those metrics don't get passed to the DF. I'm not seeing any errors in CIQ_LOG file, but I am seeing is the same ANT+ errors in the err_log file approx every 1 second.
NOTE. the code works fine in Eclipse/Simulator using the Garmin ANT+ USB connecting to the same devices.
I don't know enough to know if this error is Firmware related (note this is a new addition to my DF so have not tested on previous builds), or if it's my code related.
3113 (Forerunner 945) SW ver: 509
Build Type: RELEASE
Commit:a96fed84109c763fb36531cf9264e50a2f5b2818
ESN: 3313497283
10/09/20 09:16:06
Assert
\ANT\utl\tx_queue\ant_tx_queue.c line 264
Stack frame PC, SP: 0x0000453b, 0x2002f6b0
Call Stack - SP at 0x2002f6b0:
0x000038bb
0x042693b7
0x0424c055
0x0424c85f
0x0424c055
0x0424c7f1
0x00008505
0x0015ae21
0x0015b49d
0x00005cb1
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
Uptime: 774429325
**I tried to paste my code using Insert>Code> but I get a "you are have been blocked"**
Below is the code in question
//Power State and Battery
if (AntPlus has :BikePower && ShowPowerBatt == true){
ePowerlistener = new AntPlus.BikePowerListener();
ePower = new AntPlus.BikePower(ePowerlistener);
ePowerState = ePower.getDeviceState();
if (ePowerState.state == 3) {
ePowerBatt = ePower.getBatteryStatus(null);
var ePowerManu = ePower.getManufacturerInfo(null);
var ePowerProd = ePower.getProductInfo(null);
if (ePowerBatt != null) {
eLeftPowerBatt = ePowerBatt.batteryStatus;
// Sys.println("POWER: State:"+ePowerState.state+" Man#:"+ePowerManu.manufacturerId+" Model:"+ePowerManu.modelNumber+" HW Rev:"+ePowerManu.hwRevision+" Serial:"+ePowerProd.serial+" Batt:"+ePowerBatt.batteryStatus);
// Sys.println("PowerLeft:"+eLeftPowerBatt);
}
}
}
//Light Network and Battery Bar
if (AntPlus has :LightNetwork && ShowLightBatt == true){
eLightlistener = new AntPlus.LightNetworkListener();
eLight = new AntPlus.LightNetwork(eLightlistener);
eLightList = eLight.getBikeLights();
eLightState = eLight.getNetworkState();
if (eLightState == 2 && eLightList != null) {
for (var i=0;i<eLightList.size();i++){
var eLightId = eLightList[i].identifier;
var eLightManu = eLight.getManufacturerInfo(eLightId);
var eLightProd = eLight.getProductInfo(eLightId);
var eLightBatt = eLight.getBatteryStatus(eLightId);
if (eLightBatt != null){
// Sys.println("Light_ " + "State:"+ eLightState +" Man#:"+ eLightManu.manufacturerId +" Model:"+ eLightManu.modelNumber +" HW Rev:"+eLightManu.hwRevision+" Serial:"+eLightProd.serial+" Batt:"+eLightBatt.batteryStatus); //Use to identify Model# that referes to Front or Rear Light
if (eLightManu.modelNumber == 1){
eTailLightBatt = eLightBatt.batteryStatus;
// Sys.println("TailLight:"+eTailLightBatt);
}
else if (eLightManu.modelNumber == 4){
var eFrontLightBatt = eLightBatt.batteryStatus;
// Sys.println("FrontLight:"+eFrontLightBatt);
}
}
}
}
}
}