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


Java AttributeEvent.MISSION_RECEIVED属性代码示例

本文整理汇总了Java中com.o3dr.services.android.lib.drone.attribute.AttributeEvent.MISSION_RECEIVED属性的典型用法代码示例。如果您正苦于以下问题:Java AttributeEvent.MISSION_RECEIVED属性的具体用法?Java AttributeEvent.MISSION_RECEIVED怎么用?Java AttributeEvent.MISSION_RECEIVED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.o3dr.services.android.lib.drone.attribute.AttributeEvent的用法示例。


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

示例1: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    final String action = intent.getAction();
    switch (action){
        case AttributeEvent.MISSION_RECEIVED:
        case AttributeEvent.MISSION_UPDATED:
            final MissionProxy missionProxy = getMissionProxy();
            if(missionProxy != null) {
                mission = drone.getAttribute(AttributeType.MISSION);
                waypointSelectorAdapter = new NumericWheelAdapter(context, R.layout.wheel_text_centered,
                        missionProxy.getFirstWaypoint(), missionProxy.getLastWaypoint(), "%3d");
                waypointSelector.setViewAdapter(waypointSelectorAdapter);
            }
            break;

        case AttributeEvent.MISSION_ITEM_UPDATED:
            mission = drone.getAttribute(AttributeType.MISSION);
            nextWaypoint = intent.getIntExtra(AttributeEventExtra.EXTRA_MISSION_CURRENT_WAYPOINT, 0);
            waypointSelector.setCurrentValue(nextWaypoint);
            break;
        case AttributeEvent.GPS_POSITION:
            updateMission();
            break;
    }
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:25,代码来源:ModeAutoFragment.java

示例2: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    final String action = intent.getAction();
    switch (action) {
        case MissionProxy.ACTION_MISSION_PROXY_UPDATE:
            if (mAppPrefs.isZoomToFitEnable()) gestureMapFragment.getMapFragment().zoomToFit();
            // FALL THROUGH
        case AttributeEvent.PARAMETERS_REFRESH_COMPLETED:
        case DroidPlannerPrefs.PREF_VEHICLE_DEFAULT_SPEED:
        case AttributeEvent.STATE_CONNECTED:
        case AttributeEvent.HEARTBEAT_RESTORED:
            updateMissionLength();
            break;

        case AttributeEvent.MISSION_RECEIVED:
            final EditorMapFragment planningMapFragment = gestureMapFragment.getMapFragment();
            if (planningMapFragment != null) {
                planningMapFragment.zoomToFit();
            }
            break;
    }
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:22,代码来源:EditorActivity.java

示例3: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    final String action = intent.getAction();
    switch (action) {
        case AttributeEvent.PARAMETERS_REFRESH_ENDED:
        case MissionProxy.ACTION_MISSION_PROXY_UPDATE:
            updateMissionLength();
            break;

        case AttributeEvent.MISSION_RECEIVED:
            final EditorMapFragment planningMapFragment = gestureMapFragment.getMapFragment();
            if (planningMapFragment != null) {
                planningMapFragment.zoomToFit();
            }
            break;
    }
}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:17,代码来源:EditorActivity.java

示例4: onReceive

@Override
public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    switch (action) {
        case AttributeEvent.MISSION_DRONIE_CREATED:
        case AttributeEvent.MISSION_UPDATED:
        case AttributeEvent.MISSION_RECEIVED:
            Mission droneMission = drone.getAttribute(AttributeType.MISSION);
            load(droneMission);
            break;
    }
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:12,代码来源:MissionProxy.java


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