Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

faulty method: requestAccess SpeedDistance and Cadence

Rank

Total Posts: 23

Joined 2013-02-06

PM

The method requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
boolean isSpdCadCombinedSensor,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeCadencePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)

apparently ignores isSpdCadCombinedSensor.

When trying to use this method for seperate speed and cadence sensors (by specifying isSpdCadCombinedSensor = false), the method returns the same deviceNumber for a speed sensor if a cadence sensor is already connected. Likewise trying to connect a cadence sensor when a speed sensor is already connected the same device number is returned.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Are you using 0 as the device number? The javadoc states in a wildcard search this parameter is ignored. This is by design, since in a wildcard search we assume someone searching for 'any' device is more important than having to specify whether or not it is a combined sensor. The wildcard search is only limited usefulness anyway; we suggest using the async scan controller method [requestAsyncScanController()] if you want any control over which device to connect to.      

Signature

Dynastream Developer

Rank

Total Posts: 23

Joined 2013-02-06

PM

Okay, I now only use this method with a valid device number. Thanks