• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java MissionItemType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.o3dr.services.android.lib.drone.mission.MissionItemType的典型用法代码示例。如果您正苦于以下问题:Java MissionItemType类的具体用法?Java MissionItemType怎么用?Java MissionItemType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MissionItemType类属于com.o3dr.services.android.lib.drone.mission包,在下文中一共展示了MissionItemType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: selectMissionDetailType

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
private MissionDetailFragment selectMissionDetailType(List<MissionItemProxy> proxies) {
    if (proxies == null || proxies.isEmpty())
        return null;

    MissionItemType referenceType = null;
    for (MissionItemProxy proxy : proxies) {
        final MissionItemType proxyType = proxy.getMissionItem().getType();
        if (referenceType == null) {
            referenceType = proxyType;
        } else if (referenceType != proxyType
                || MissionDetailFragment.typeWithNoMultiEditSupport.contains(referenceType)) {
            //Return a generic mission detail.
            return new MissionDetailFragment();
        }
    }

    return MissionDetailFragment.newInstance(referenceType);
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:19,代码来源:EditorActivity.java


示例2: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CHANGE_SPEED));

    final SpeedUnitProvider speedUnitProvider = getSpeedUnitProvider();
    final SpeedWheelAdapter adapter = new SpeedWheelAdapter(getContext(), R.layout.wheel_text_centered,
            speedUnitProvider.boxBaseValueToTarget(0), speedUnitProvider.boxBaseValueToTarget(20));
    CardWheelHorizontalView<SpeedUnit> cardAltitudePicker = (CardWheelHorizontalView<SpeedUnit>) view.findViewById
            (R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addScrollListener(this);

    ChangeSpeed item = (ChangeSpeed) getMissionItems().get(0);
    cardAltitudePicker.setCurrentValue(speedUnitProvider.boxBaseValueToTarget(item.getSpeed()));
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:19,代码来源:MissionChangeSpeedFragment.java


示例3: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.SET_SERVO));

    final SetServo item = (SetServo) getMissionItems().get(0);
    final Context context = getContext();

    final NumericWheelAdapter adapter = new NumericWheelAdapter(context, R.layout.wheel_text_centered, 1, 8, "%d");
    final CardWheelHorizontalView<Integer> cardChannelPicker = (CardWheelHorizontalView) view.findViewById(R.id
            .picker1);
    cardChannelPicker.setViewAdapter(adapter);
    cardChannelPicker.addScrollListener(this);
    cardChannelPicker.setCurrentValue(item.getChannel());

    final NumericWheelAdapter pwmAdapter = new NumericWheelAdapter(context, R.layout.wheel_text_centered, 0,
            2000, "%d");
    final CardWheelHorizontalView<Integer> pwmPicker = (CardWheelHorizontalView) view.findViewById(R.id.pwmPicker);
    pwmPicker.setViewAdapter(pwmAdapter);
    pwmPicker.addScrollListener(this);
    pwmPicker.setCurrentValue(item.getPwm());
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:25,代码来源:SetServoFragment.java


示例4: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.YAW_CONDITION));

    YawCondition item = (YawCondition) getMissionItems().get(0);

    final NumericWheelAdapter adapter = new NumericWheelAdapter(getContext(),
            R.layout.wheel_text_centered, 0, 359, "%d°");
    final CardWheelHorizontalView<Integer> cardAltitudePicker = (CardWheelHorizontalView<Integer>) view
            .findViewById(R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addScrollListener(this);
    cardAltitudePicker.setCurrentValue((int) item.getAngle());

    CheckBox checkBoxRelative = (CheckBox) view.findViewById(R.id.checkBox1);
    checkBoxRelative.setOnCheckedChangeListener(this);
    checkBoxRelative.setChecked(item.isRelative());
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:22,代码来源:MissionConditionYawFragment.java


示例5: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.REGION_OF_INTEREST));

    final LengthUnitProvider lengthUP = getLengthUnitProvider();
    final LengthWheelAdapter altitudeAdapter = new LengthWheelAdapter(getContext(), R.layout.wheel_text_centered,
            lengthUP.boxBaseValueToTarget(MIN_ALTITUDE), lengthUP.boxBaseValueToTarget(MAX_ALTITUDE));
    CardWheelHorizontalView<LengthUnit> altitudePicker = (CardWheelHorizontalView<LengthUnit>) view
            .findViewById(R.id.altitudePicker);
    altitudePicker.setViewAdapter(altitudeAdapter);
    altitudePicker.addScrollListener(this);

    altitudePicker.setCurrentValue(lengthUP.boxBaseValueToTarget(((RegionOfInterest) getMissionItems().get(0))
            .getCoordinate().getAltitude()));
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:19,代码来源:MissionRegionOfInterestFragment.java


示例6: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    final Context context = getContext();

    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.TAKEOFF));

    final LengthUnitProvider lengthUP = getLengthUnitProvider();
    final LengthWheelAdapter altitudeAdapter = new LengthWheelAdapter(context, R.layout.wheel_text_centered,
            lengthUP.boxBaseValueToTarget(MIN_ALTITUDE), lengthUP.boxBaseValueToTarget(MAX_ALTITUDE));
    CardWheelHorizontalView<LengthUnit> cardAltitudePicker = (CardWheelHorizontalView) view
            .findViewById(R.id.altitudePicker);
    cardAltitudePicker.setViewAdapter(altitudeAdapter);
    cardAltitudePicker.addScrollListener(this);

    final NumericWheelAdapter pitchAdapter = new NumericWheelAdapter(context, R.layout.wheel_text_centered, 0, 90, "%d°");
    final CardWheelHorizontalView<Integer> pitchPicker = (CardWheelHorizontalView) view.findViewById(R.id.pitchPicker);
    pitchPicker.setViewAdapter(pitchAdapter);
    pitchPicker.addScrollListener(this);

    Takeoff item = (Takeoff) getMissionItems().get(0);
    cardAltitudePicker.setCurrentValue(lengthUP.boxBaseValueToTarget(item.getTakeoffAltitude()));
    pitchPicker.setCurrentValue((int) item.getTakeoffPitch());
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:27,代码来源:MissionTakeoffFragment.java


示例7: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CAMERA_TRIGGER));

    CameraTrigger item = (CameraTrigger) getMissionItems().get(0);

    final LengthUnitProvider lengthUnitProvider = getLengthUnitProvider();
    final LengthWheelAdapter adapter = new LengthWheelAdapter(getContext(), R.layout.wheel_text_centered,
            lengthUnitProvider.boxBaseValueToTarget(Utils.MIN_DISTANCE),
            lengthUnitProvider.boxBaseValueToTarget(Utils.MAX_DISTANCE));
    final CardWheelHorizontalView<LengthUnit> cardAltitudePicker = (CardWheelHorizontalView<LengthUnit>) view
            .findViewById(R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addScrollListener(this);
    cardAltitudePicker.setCurrentValue(lengthUnitProvider.boxBaseValueToTarget(item.getTriggerDistance()));
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:20,代码来源:MissionCameraTriggerFragment.java


示例8: selectMissionDetailType

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
private MissionDetailFragment selectMissionDetailType(List<MissionItemProxy> proxies){
    if(proxies == null || proxies.isEmpty())
        return null;

    MissionItemType referenceType = null;
    for(MissionItemProxy proxy: proxies){
        final MissionItemType proxyType = proxy.getMissionItem().getType();
        if(referenceType == null){
            referenceType = proxyType;
        }
        else if (referenceType != proxyType || MissionDetailFragment
                .typeWithNoMultiEditSupport.contains(referenceType)) {
                //Return a generic mission detail.
                return new MissionDetailFragment();
            }
    }

    return MissionDetailFragment.newInstance(referenceType);
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:20,代码来源:EditorActivity.java


示例9: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected(){
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CHANGE_SPEED));

    final NumericWheelAdapter adapter = new NumericWheelAdapter(getActivity()
            .getApplicationContext(), R.layout.wheel_text_centered, 1,
            20, "%d m/s");
    CardWheelHorizontalView cardAltitudePicker = (CardWheelHorizontalView) view.findViewById
            (R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addChangingListener(this);

    ChangeSpeed item = (ChangeSpeed) getMissionItems().get(0);
    cardAltitudePicker.setCurrentValue((int) item.getSpeed());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:19,代码来源:MissionChangeSpeedFragment.java


示例10: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
	super.onApiConnected();

       final View view = getView();
	typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.SET_SERVO));

	SetServo item = (SetServo) getMissionItems().get(0);

	final NumericWheelAdapter adapter = new NumericWheelAdapter(
			getActivity().getApplicationContext(),	R.layout.wheel_text_centered, 1, 8, "%d");
	final CardWheelHorizontalView cardChannelPicker = (CardWheelHorizontalView) view
			.findViewById(R.id.picker1);
	final EditText pwmEditText = (EditText) view.findViewById(R.id.PwmEditText);

	cardChannelPicker.setViewAdapter(adapter);
	cardChannelPicker.addChangingListener(this);
	cardChannelPicker.setCurrentValue(item.getChannel());

	pwmEditText.setText(Integer.toString(item.getPwm()));
	pwmEditText.addTextChangedListener(this);

}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:24,代码来源:SetServoFragment.java


示例11: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
	super.onApiConnected();

       final View  view = getView();
	typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.YAW_CONDITION));

	YawCondition item = (YawCondition) getMissionItems().get(0);

	final NumericWheelAdapter adapter = new NumericWheelAdapter(
			getActivity().getApplicationContext(),
			R.layout.wheel_text_centered, 0, 359, "%d deg");
	final CardWheelHorizontalView cardAltitudePicker = (CardWheelHorizontalView) view
			.findViewById(R.id.picker1);
	cardAltitudePicker.setViewAdapter(adapter);
	cardAltitudePicker.addChangingListener(this);
	cardAltitudePicker.setCurrentValue((int) item.getAngle());

	CheckBox checkBoxRelative = (CheckBox) view.findViewById(R.id.checkBox1);
	checkBoxRelative.setOnCheckedChangeListener(this);
	checkBoxRelative.setChecked(item.isRelative());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:23,代码来源:MissionConditionYawFragment.java


示例12: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
	super.onApiConnected();

	final View view = getView();
	typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.REGION_OF_INTEREST));

	final NumericWheelAdapter altitudeAdapter = new NumericWheelAdapter(getActivity()
			.getApplicationContext(), R.layout.wheel_text_centered, MIN_ALTITUDE, MAX_ALTITUDE,
			"%d m");
	CardWheelHorizontalView altitudePicker = (CardWheelHorizontalView) view
			.findViewById(R.id.altitudePicker);
	altitudePicker.setViewAdapter(altitudeAdapter);
	altitudePicker.addChangingListener(this);

	altitudePicker.setCurrentValue((int) ((RegionOfInterest) getMissionItems().get(0))
			.getCoordinate().getAltitude());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:19,代码来源:MissionRegionOfInterestFragment.java


示例13: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
	super.onApiConnected();

	typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.TAKEOFF));

	final NumericWheelAdapter altitudeAdapter = new NumericWheelAdapter(getActivity()
			.getApplicationContext(), R.layout.wheel_text_centered, 0, MAX_ALTITUDE, "%d m");
	CardWheelHorizontalView cardAltitudePicker = (CardWheelHorizontalView) getView()
			.findViewById(R.id.altitudePicker);
	cardAltitudePicker.setViewAdapter(altitudeAdapter);
	cardAltitudePicker.addChangingListener(this);

	Takeoff item = (Takeoff) getMissionItems().get(0);
	cardAltitudePicker.setCurrentValue((int) item.getTakeoffAltitude());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:17,代码来源:MissionTakeoffFragment.java


示例14: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
	super.onApiConnected();

       final View view = getView();
	typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CAMERA_TRIGGER));

	CameraTrigger item = (CameraTrigger) getMissionItems().get(0);
	
	final NumericWheelAdapter adapter = new NumericWheelAdapter(getActivity()
			.getApplicationContext(), R.layout.wheel_text_centered, 0,
               100, "%d m");
	final CardWheelHorizontalView cardAltitudePicker = (CardWheelHorizontalView) view
			.findViewById(R.id.picker1);
	cardAltitudePicker.setViewAdapter(adapter);
       cardAltitudePicker.addChangingListener(this);
	cardAltitudePicker.setCurrentValue((int) item.getTriggerDistance());
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:19,代码来源:MissionCameraTriggerFragment.java


示例15: buildComplexMissionItem

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void buildComplexMissionItem(Bundle itemBundle) throws RemoteException{
    MissionItem missionItem = MissionItemType.restoreMissionItemFromBundle(itemBundle);
    if(missionItem == null || !(missionItem instanceof MissionItem.ComplexItem))
        return;

    final MissionItemType itemType = missionItem.getType();
    switch(itemType){
        case SURVEY:
            Survey updatedSurvey = buildSurvey((Survey) missionItem);
            if(updatedSurvey != null)
                itemType.storeMissionItem(updatedSurvey, itemBundle);
            break;

        case STRUCTURE_SCANNER:
            StructureScanner updatedScanner = buildStructureScanner((StructureScanner)
                    missionItem);
            if(updatedScanner != null)
                itemType.storeMissionItem(updatedScanner, itemBundle);
            break;

        default:
            Log.w(TAG, "Unrecognized complex mission item.");
            break;
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:27,代码来源:DroneApi.java


示例16: buildComplexMissionItem

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
public <T extends MissionItem> void buildComplexMissionItem(MissionItem.ComplexItem<T>
                                                                    complexItem) {
    if (isStarted()) {
        try {
            T missionItem = (T) complexItem;
            Bundle payload = missionItem.getType().storeMissionItem(missionItem);
            if (payload == null)
                return;

            droneApi.buildComplexMissionItem(payload);
            T updatedItem = MissionItemType.restoreMissionItemFromBundle(payload);
            complexItem.copy(updatedItem);
        } catch (RemoteException e) {
            handleRemoteException(e);
        }
    }
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:18,代码来源:Drone.java


示例17: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CHANGE_SPEED));

    final SpeedUnitProvider speedUnitProvider = getSpeedUnitProvider();
    final SpeedWheelAdapter adapter = new SpeedWheelAdapter(getContext(), R.layout.wheel_text_centered,
            speedUnitProvider.boxBaseValueToTarget(1), speedUnitProvider.boxBaseValueToTarget(20));
    CardWheelHorizontalView<SpeedUnit> cardAltitudePicker = (CardWheelHorizontalView<SpeedUnit>) view.findViewById
            (R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addScrollListener(this);

    ChangeSpeed item = (ChangeSpeed) getMissionItems().get(0);
    cardAltitudePicker.setCurrentValue(speedUnitProvider.boxBaseValueToTarget(item.getSpeed()));
}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:19,代码来源:MissionChangeSpeedFragment.java


示例18: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.TAKEOFF));

    final LengthUnitProvider lengthUP = getLengthUnitProvider();
    final LengthWheelAdapter altitudeAdapter = new LengthWheelAdapter(getContext(), R.layout.wheel_text_centered,
            lengthUP.boxBaseValueToTarget(0), lengthUP.boxBaseValueToTarget(MAX_ALTITUDE));
    CardWheelHorizontalView<LengthUnit> cardAltitudePicker = (CardWheelHorizontalView) getView()
            .findViewById(R.id.altitudePicker);
    cardAltitudePicker.setViewAdapter(altitudeAdapter);
    cardAltitudePicker.addScrollListener(this);

    Takeoff item = (Takeoff) getMissionItems().get(0);
    cardAltitudePicker.setCurrentValue(lengthUP.boxBaseValueToTarget(item.getTakeoffAltitude()));
}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:18,代码来源:MissionTakeoffFragment.java


示例19: onApiConnected

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void onApiConnected() {
    super.onApiConnected();

    final View view = getView();
    typeSpinner.setSelection(commandAdapter.getPosition(MissionItemType.CAMERA_TRIGGER));

    CameraTrigger item = (CameraTrigger) getMissionItems().get(0);

    final LengthUnitProvider lengthUnitProvider = getLengthUnitProvider();
    final LengthWheelAdapter adapter = new LengthWheelAdapter(getContext(), R.layout.wheel_text_centered,
            lengthUnitProvider.boxBaseValueToTarget(0), lengthUnitProvider.boxBaseValueToTarget(100));
    final CardWheelHorizontalView<LengthUnit> cardAltitudePicker = (CardWheelHorizontalView<LengthUnit>) view
            .findViewById(R.id.picker1);
    cardAltitudePicker.setViewAdapter(adapter);
    cardAltitudePicker.addScrollListener(this);
    cardAltitudePicker.setCurrentValue(lengthUnitProvider.boxBaseValueToTarget(item.getTriggerDistance()));
}
 
开发者ID:sommishra,项目名称:DroidPlanner-Tower,代码行数:19,代码来源:MissionCameraTriggerFragment.java


示例20: setup

import com.o3dr.services.android.lib.drone.mission.MissionItemType; //导入依赖的package包/类
@Override
public void setup() {
    EditorToolsFragment.EditorToolListener listener = editorToolsFragment.listener;
    if (listener != null) {
        listener.enableGestureDetection(true);
    }

    if (missionProxy != null)
        missionProxy.selection.clearSelection();

    if (selectedType == MissionItemType.SURVEY) {
        Toast.makeText(editorToolsFragment.getContext(), R.string.draw_the_survey_region, Toast.LENGTH_SHORT).show();
    }
}
 
开发者ID:mxiao6,项目名称:Tower-develop,代码行数:15,代码来源:DrawToolsImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DropDown类代码示例发布时间:2022-05-22
下一篇:
Java LogEnabled类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap