当前位置: 首页>>代码示例>>Java>>正文


Java AntPlusHeartRatePcc类代码示例

本文整理汇总了Java中com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc的典型用法代码示例。如果您正苦于以下问题:Java AntPlusHeartRatePcc类的具体用法?Java AntPlusHeartRatePcc怎么用?Java AntPlusHeartRatePcc使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AntPlusHeartRatePcc类属于com.dsi.ant.plugins.antplus.pcc包,在下文中一共展示了AntPlusHeartRatePcc类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onResultReceived

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void onResultReceived(AntPlusHeartRatePcc antPlusHeartRatePcc, RequestAccessResult requestAccessResult, DeviceState deviceState) {

    switch(requestAccessResult) {
        case SUCCESS:
            wgtplc = antPlusHeartRatePcc;
            notifyDeviceStatusChanged(HRVDeviceStatus.CONNECTED);
            break;
        case USER_CANCELLED:
        case SEARCH_TIMEOUT:
        case OTHER_FAILURE:
            notifyDeviceStatusChanged(HRVDeviceStatus.DISCONNECTED);
            break;
        default:
            notifyDeviceStatusChanged(HRVDeviceStatus.DISCONNECTED);
    }
}
 
开发者ID:HRVBand,项目名称:hrv-band,代码行数:18,代码来源:AntPlusRRDataDevice.java

示例2: connect

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void connect() {
    notifyDeviceStatusChanged(HRVDeviceStatus.CONNECTING);

    //Release the old access
    if(wgtplc != null) {
        wgtplc.releaseAccess();
        wgtplc = null;
    }

    final AntPlusRRDataDevice helper = this;

    //Make access request
    activity.runOnUiThread(new Runnable() {
        @Override
        public void run() {
            AntPlusHeartRatePcc.requestAccess(activity, activity.getApplicationContext(), helper, helper);
        }
    });
}
 
开发者ID:HRVBand,项目名称:hrv-band,代码行数:21,代码来源:AntPlusRRDataDevice.java

示例3: onDeviceStateChange

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
public void onDeviceStateChange(final int newDeviceState) {
	// this method is called back by the ANT+ plugin to notify of device state changes
	myact.runOnUiThread(new Runnable() {
        @Override
        public void run() {
            Log.i(this.toString(), "DEV STATE CHANGED: " + AntPlusHeartRatePcc.statusCodeToPrintableString(newDeviceState));
            if ( (newDeviceState == AntPluginMsgDefines.DeviceStateCodes.TRACKING) && !isConnected() ) setConnected();
            if (newDeviceState == AntPluginMsgDefines.DeviceStateCodes.DEAD) stop();
        }
    });
}
 
开发者ID:szabolcszijarto,项目名称:SleepGuard,代码行数:12,代码来源:ANTPlusHeartRateWatcher.java

示例4: onNewCalculatedRrInterval

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
public void onNewCalculatedRrInterval(long l, EnumSet<EventFlag> enumSet, BigDecimal bigDecimal, AntPlusHeartRatePcc.RrFlag rrFlag) {
    double rr = bigDecimal.longValue() / 1000.0;
    this.rrMeasurements.add(rr);
    notifyRRIntervalListeners(rr);
}
 
开发者ID:HRVBand,项目名称:hrv-band,代码行数:7,代码来源:AntPlusRRDataDevice.java

示例5: requestAsyncScanController

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
@Override
protected AsyncScanController<AntPlusHeartRatePcc> requestAsyncScanController( int proximity) {
  return AntPlusHeartRatePcc.requestAsyncScanController(this, proximity, this);
}
 
开发者ID:NEUROINFORMATICS-GROUP-FAV-KIV-ZCU,项目名称:elfyz-data-mobile-logger,代码行数:5,代码来源:HeartRateDevicePickerActivity.java

示例6: connect

import com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc; //导入依赖的package包/类
public void connect() {
       myact.setConnStatus("Connecting...");
       AntPlusHeartRatePcc.requestAccess(myact, myact, this, this);    // register with the ANT+ plugin
}
 
开发者ID:szabolcszijarto,项目名称:SleepGuard,代码行数:5,代码来源:ANTPlusHeartRateWatcher.java


注:本文中的com.dsi.ant.plugins.antplus.pcc.AntPlusHeartRatePcc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。