From d6e90f838465e3f15463c8252631757331ab637c Mon Sep 17 00:00:00 2001 From: cuijingzhou <1150427534@qq.com> Date: Tue, 14 Oct 2025 13:47:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=AA=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Login/Activity/LoginActivity.java | 4 - .../Main/Activity/MainActivity.java | 501 ++++++++---- .../Main/Adapter/AllLinkAdapter.java | 28 +- .../Main/Adapter/CreateLinkAdapter.java | 261 +++++- .../Main/Adapter/TypeAdapter.java | 2 +- .../Main/Base/CreateLink.java | 74 +- .../Main/Service/MyBoundService.java | 6 + .../Setting/Activity/SettingActivity.java | 18 +- .../Setting/Adapter/MultiSelectAdapter.java | 3 +- .../Setting/Adapter/ParamGridAdapter.java | 4 +- .../Main/Setting/Base/ModeItem.java | 26 + .../Setting/Fragment/FoundationFragment.java | 254 ++++-- .../Main/Setting/Fragment/LoadFragment.java | 2 +- .../Main/View/PointFlyDialog.java | 115 +++ .../Main/View/SaveLinkNameDialog.java | 113 +++ .../Main/View/SlideToUnlockView.java | 65 +- .../Main/View/StartExecuteDialog.java | 128 ++- .../Main/Void/AllView.java | 52 +- .../Main/Void/FlyVoid.java | 67 +- .../Main/Void/MapVoid.java | 111 +++ .../Main/Void/MyReceiver.java | 33 +- .../Main/Void/SQLClass.java | 42 +- .../Util/BroadcastUtil.java | 12 + .../longyi_groundstation/Util/Url.java | 18 + .../res/drawable/custom_seekbar_progress.xml | 16 + .../res/drawable/custom_seekbar_thumb.xml | 6 + ..._bg.xml => ff029a45_2round_1stroke_bg.xml} | 4 +- ..._bg.xml => ff029a45_4round_1stroke_bg.xml} | 4 +- .../res/drawable/ff33b138_1round_1stroke.xml | 7 + ..._bg.xml => ffdf4b40_4round_1stroke_bg.xml} | 2 +- .../drawable/ffffffff_4round_1stroke_bg.xml | 8 + .../main/res/drawable/ffffffff_4round_bg.xml | 2 +- app/src/main/res/drawable/icon_fly.png | Bin 8510 -> 0 bytes .../drawable/x80000000_4round_1stroke_bg.xml | 8 + app/src/main/res/layout/activity_login.xml | 30 +- app/src/main/res/layout/activity_main.xml | 751 ++++++++++-------- .../main/res/layout/activity_play_back.xml | 2 +- app/src/main/res/layout/activity_setting.xml | 12 +- .../main/res/layout/adapter_all_link_item.xml | 117 +-- .../res/layout/adapter_control_data_item.xml | 2 +- .../res/layout/adapter_create_link_item.xml | 449 +++++++++-- .../main/res/layout/adapter_secure_item.xml | 12 +- .../main/res/layout/custom_marker_layout.xml | 20 +- app/src/main/res/layout/dialog_link_name.xml | 87 ++ app/src/main/res/layout/dialog_point_fly.xml | 154 ++++ .../main/res/layout/dialog_start_execute.xml | 38 +- app/src/main/res/layout/fragment_control.xml | 6 +- app/src/main/res/layout/fragment_fly.xml | 40 +- .../main/res/layout/fragment_foundation.xml | 232 +++++- app/src/main/res/layout/fragment_load.xml | 88 +- app/src/main/res/layout/fragment_motor.xml | 12 +- app/src/main/res/layout/fragment_payload.xml | 6 +- app/src/main/res/layout/fragment_secure.xml | 24 +- app/src/main/res/layout/fragment_sensor.xml | 2 +- app/src/main/res/mipmap-xhdpi/icon_expand.png | Bin 0 -> 1104 bytes app/src/main/res/mipmap-xhdpi/icon_fly.png | Bin 8510 -> 4731 bytes app/src/main/res/mipmap-xhdpi/icon_marker.png | Bin 1416 -> 1125 bytes .../res/mipmap-xhdpi/icon_select_link_no.png | Bin 0 -> 360 bytes .../res/mipmap-xhdpi/icon_select_link_yes.png | Bin 0 -> 607 bytes 59 files changed, 3083 insertions(+), 997 deletions(-) create mode 100644 app/src/main/java/com/example/longyi_groundstation/Main/Setting/Base/ModeItem.java create mode 100644 app/src/main/java/com/example/longyi_groundstation/Main/View/PointFlyDialog.java create mode 100644 app/src/main/java/com/example/longyi_groundstation/Main/View/SaveLinkNameDialog.java create mode 100644 app/src/main/java/com/example/longyi_groundstation/Util/Url.java create mode 100644 app/src/main/res/drawable/custom_seekbar_progress.xml create mode 100644 app/src/main/res/drawable/custom_seekbar_thumb.xml rename app/src/main/res/drawable/{ff60b964_4round_1stroke_bg.xml => ff029a45_2round_1stroke_bg.xml} (86%) rename app/src/main/res/drawable/{ff62a7f0_2round_1stroke_bg.xml => ff029a45_4round_1stroke_bg.xml} (86%) create mode 100644 app/src/main/res/drawable/ff33b138_1round_1stroke.xml rename app/src/main/res/drawable/{ffdd635a_4round_1stroke_bg.xml => ffdf4b40_4round_1stroke_bg.xml} (86%) create mode 100644 app/src/main/res/drawable/ffffffff_4round_1stroke_bg.xml delete mode 100644 app/src/main/res/drawable/icon_fly.png create mode 100644 app/src/main/res/drawable/x80000000_4round_1stroke_bg.xml create mode 100644 app/src/main/res/layout/dialog_link_name.xml create mode 100644 app/src/main/res/layout/dialog_point_fly.xml create mode 100644 app/src/main/res/mipmap-xhdpi/icon_expand.png create mode 100644 app/src/main/res/mipmap-xhdpi/icon_select_link_no.png create mode 100644 app/src/main/res/mipmap-xhdpi/icon_select_link_yes.png diff --git a/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java b/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java index b7edad5..1b2ae02 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java +++ b/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java @@ -41,7 +41,6 @@ public class LoginActivity extends AppCompatActivity { // Log.d("myReceiver_HEARTBEAT", Tool.getDecToFirstBin("128")); // Log.d("myReceiver_HEARTBEAT", Tool.getDecToBinFull("128")); - initData(); initView(); initOnClick(); @@ -64,9 +63,6 @@ public class LoginActivity extends AppCompatActivity { private void initView() { //所有组件 allView = new AllView(this); - - - } /** diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java b/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java index d3ea43f..26b8022 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java @@ -25,6 +25,8 @@ import android.graphics.Outline; import android.os.Build; import android.os.Bundle; import android.os.IBinder; +import android.text.Editable; +import android.text.TextWatcher; import android.util.Log; import android.view.MotionEvent; import android.view.View; @@ -74,6 +76,8 @@ import com.example.longyi_groundstation.Main.View.DpadView; import com.example.longyi_groundstation.Main.View.ErrorLogDialog; import com.example.longyi_groundstation.Main.View.FPV_Void; import com.example.longyi_groundstation.Main.View.LandDialog; +import com.example.longyi_groundstation.Main.View.PointFlyDialog; +import com.example.longyi_groundstation.Main.View.SaveLinkNameDialog; import com.example.longyi_groundstation.Main.View.SlideToUnlockView; import com.example.longyi_groundstation.Main.View.StartExecuteDialog; import com.example.longyi_groundstation.Main.View.TakeOffDialog; @@ -129,7 +133,8 @@ public class MainActivity extends AppCompatActivity { //广播接收器 private MyReceiver myReceiver_ATTITUDE, myReceiver_GPS_RAW_INT, myReceiver_GLOBAL_POSITION_INT, myReceiver_POWER_STATUS, myReceiver_SYS_STATUS, myReceiver_STATUSTEXT, - myReceiver_HEARTBEAT, myReceiver_VFR_HUD,myReceiver_MISSION_REQUEST,myReceiver_MISSION_ACK; + myReceiver_HEARTBEAT, myReceiver_VFR_HUD, myReceiver_MISSION_REQUEST, myReceiver_MISSION_ACK, + myReceiver_MISSION_CURRENT; //所有组件 private AllView allView; private ArrayList typeList = new ArrayList<>(); @@ -138,15 +143,15 @@ public class MainActivity extends AppCompatActivity { private TurnBackDialog turnBackDialog;//返航弹窗 private LandDialog landDialog;//降落弹窗 private BombingDialog bombingDialog;//投弹弹窗 + private PointFlyDialog pointFlyDialog;//指点飞行弹窗 public static StartExecuteDialog startExecuteDialog;//开始执行弹窗 - + private SaveLinkNameDialog saveLinkNameDialog;//二次确认路线名称弹窗 private ArrayList LogItemList = new ArrayList<>(); private LogAdapter adapter; private FPV_Void fpvVoid = new FPV_Void(); private int mainDisplay = 1;//1:Map 2:FPV private Intent intent; private Marker mainMarker; - private Marker flyMarker; private FlyVoid flyVoid = new FlyVoid(); private boolean islocation = true;//是否第一次定位 private LatLng homeLatLng = null; @@ -161,8 +166,14 @@ public class MainActivity extends AppCompatActivity { // 在成员变量部分添加 private CreateLinkAdapter createLinkAdapter; private List createLinkList = new ArrayList<>(); - private ArrayList selectedLinkList = null;//当前选择的航线 - public boolean isUnlock = false;//是否解锁 + private ArrayList selectedLinkList = new ArrayList<>();//当前选择的航线 + private ArrayList uploadLinkList = new ArrayList<>();//当前上传的航线 + public static boolean isUnlock = false;//是否解锁 + public boolean isAdviseFly = true;//是否可以使用指点飞行 + // 创建航线列表适配器 + private AllLinkAdapter allLinkAdapter; + private SQLClass sqlClass; + private List linkListInfoList; @Override @@ -180,6 +191,8 @@ public class MainActivity extends AppCompatActivity { initView(); initReceiver(); initOnClick(); + mapVoid.startFlightTracking(); + } /** @@ -290,6 +303,16 @@ public class MainActivity extends AppCompatActivity { registerReceiver(myReceiver_MISSION_ACK, filter10); } + //目标航点 + myReceiver_MISSION_CURRENT = new MyReceiver(); + IntentFilter filter11 = new IntentFilter("Broadcast_MISSION_CURRENT"); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + registerReceiver(myReceiver_MISSION_CURRENT, filter11, Context.RECEIVER_EXPORTED); + } else { + registerReceiver(myReceiver_MISSION_CURRENT, filter11); + } + + // 初始化数据源 typeList = new ArrayList<>(); typeList.add(new Msg("relative_alt", "0", true)); @@ -320,16 +343,10 @@ public class MainActivity extends AppCompatActivity { allView = new AllView(this); //地图全局方法类 mapVoid = new MapVoid(MainActivity.this); - mainMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f) // 设置锚点为图片中心 - .title("飞机").snippet("型号")); - // 更换 Marker 图标 - mainMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_fly)); + mainMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f)); // 设置锚点为图片中心 - - flyMarker = mapVoid.aMap.addMarker(new MarkerOptions().anchor(0.5f, 0.5f) // 设置锚点为图片中心 - .title("飞机").snippet("型号")); // 更换 Marker 图标 - flyMarker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.icon_fly)); + mainMarker.setIcon(BitmapDescriptorFactory.fromResource(R.mipmap.icon_fly)); Intent intents = new Intent(this, MyBoundService.class); intents.putExtra("type", intent.getIntExtra("type", 0)); @@ -361,13 +378,18 @@ public class MainActivity extends AppCompatActivity { bombingDialog = new BombingDialog(MainActivity.this); //开始执行弹窗 startExecuteDialog = new StartExecuteDialog(this, "10"); + //指点飞行弹窗 + pointFlyDialog = new PointFlyDialog(this); + //保存航线弹窗 + saveLinkNameDialog = new SaveLinkNameDialog(this); + allView.rv_error_list.setLayoutManager(new LinearLayoutManager(this)); adapter = new LogAdapter(); allView.rv_error_list.setAdapter(adapter); - // 初始化路线适配器 - createLinkAdapter = new CreateLinkAdapter(); + // 初始化航线适配器 + createLinkAdapter = new CreateLinkAdapter(this); allView.rv_create_link_list.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); allView.rv_create_link_list.setAdapter(createLinkAdapter); @@ -390,14 +412,6 @@ public class MainActivity extends AppCompatActivity { //拿到数据库里所有的航线 setupAllLinkList(); - //设置滑动解锁的view属性 - allView.unlockView.setText("滑动解锁"); - // 设置背景圆角弧度为10dp - allView.unlockView.setCornerRadius(4); - // 设置滑块圆角弧度为5dp - allView.unlockView.setThumbCornerRadius(4); - // 设置组件半透明(50%透明度) - allView.unlockView.setComponentAlpha(128); } /** @@ -411,17 +425,17 @@ public class MainActivity extends AppCompatActivity { //广播接收-ATTITUDE myReceiver_ATTITUDE.setATTITUDEListener(data -> { // 这里可以更新 UI 或刷新数据 -// Log.d(TAG, "收到新数据ATTITUDE:" + data.toString()); + Log.d(TAG, "收到新数据ATTITUDE:" +MyReceiver.ATTITUDE_json.optDouble("yaw")); // allView.tv_connect.setText("已连接"); // 示例:更新 typeList 数据并刷新 RecyclerView if (data != null) { - flyVoid.setAttitude(getApplicationContext(), allView, MyReceiver.ATTITUDE_json.optDouble("roll"), MyReceiver.ATTITUDE_json.optDouble("pitch"), MyReceiver.ATTITUDE_json.optDouble("yaw")); + flyVoid.setAttitude(getApplicationContext(), allView, MyReceiver.ATTITUDE_json.optDouble("roll"), MyReceiver.ATTITUDE_json.optDouble("pitch"),(int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 57.3)); } //地图上飞机的朝向 - mainMarker.setRotateAngle((int) Math.toDegrees(MyReceiver.ATTITUDE_json.optDouble("yaw"))); + mainMarker.setRotateAngle( (int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw")* 57.3) * -1); - allView.tv_yaw.setText((int) Math.toDegrees(MyReceiver.ATTITUDE_json.optDouble("yaw")) + "°"); + allView.tv_yaw.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 57.3) + "°"); mainMarker.setVisible(true); }); @@ -445,6 +459,7 @@ public class MainActivity extends AppCompatActivity { (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000), (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000)); + if (doubles[1] != 0) { //获取到位置后移动视角到当前位置 if (islocation) { @@ -475,6 +490,7 @@ public class MainActivity extends AppCompatActivity { typeAdapter.notifyDataSetChanged(); if (FlyVoid.parseSerialData != null) { // allView.tv_height.setText(Math.round((MyReceiver.GLOBAL_POSITION_INT_json.optDouble("relative_alt") / 100) / 10.0) + "m"); +// Toast.makeText(this, flyVoid.parseSerialData[0]+"", Toast.LENGTH_SHORT).show(); allView.tv_height.setText(flyVoid.parseSerialData[0] + "m"); } } @@ -534,20 +550,20 @@ public class MainActivity extends AppCompatActivity { isUnlock = Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1"); - if (allView.ll_link_start.getVisibility() == VISIBLE){ + if (allView.ll_link_start.getVisibility() == VISIBLE) { Log.d(TAG, "myReceiver_HEARTBEAT: " + data.toString()); //判断飞控是否解锁 - if (Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1")){ + if (Tool.getDecToFirstBin(MyReceiver.HEARTBEAT_json.optString("base_mode")).equals("1")) { //已解锁 - allView.rl_unlock.setVisibility(View.GONE); - allView.ll_link_start_fun2.setVisibility(VISIBLE); - }else { - if (allView.rl_unlock.getVisibility() == View.GONE){ - //未解锁 - allView.rl_unlock.setVisibility(View.VISIBLE); - allView.unlockView.resetToInitialState("滑动解锁"); - allView.ll_link_start_fun2.setVisibility(GONE); - } +// allView.rl_unlock.setVisibility(View.GONE); +// allView.ll_link_start_fun2.setVisibility(VISIBLE); + } else { + //未解锁 +// if (allView.rl_unlock.getVisibility() == View.GONE){ +// allView.rl_unlock.setVisibility(View.VISIBLE); +// allView.unlockView.resetToInitialState("滑动解锁"); +// allView.ll_link_start_fun2.setVisibility(GONE); +// } } } @@ -607,16 +623,16 @@ public class MainActivity extends AppCompatActivity { // data.optDouble("throttle")/100, // 1 // ))); - if (data.optDouble("throttle") > 0){ - typeList.set(2, new Msg("throttle", String.format("%.1f", MyTool.getThrottle( + if (data.optDouble("throttle") > 0) { + typeList.set(2, new Msg("throttle", String.format("%.1f", MyTool.getThrottle( Double.parseDouble(FlyVoid.paramList.get("MOT_SPIN_MIN").getParam_value()), Double.parseDouble(FlyVoid.paramList.get("MOT_SPIN_MAX").getParam_value()), Double.parseDouble(FlyVoid.paramList.get("MOT_THST_EXPO").getParam_value()), - data.optDouble("throttle")/100, + data.optDouble("throttle") / 100, 1 - )*100) + "%", true)); - }else { - typeList.set(2, new Msg("throttle","0%", true)); + ) * 100) + "%", true)); + } else { + typeList.set(2, new Msg("throttle", "0%", true)); } }); @@ -627,9 +643,16 @@ public class MainActivity extends AppCompatActivity { //广播接收-setMissionAcklistener myReceiver_MISSION_ACK.setMissionAcklistener(data -> { - Log.d(TAG, "myReceiver_MISSION_ACK: "+data.toString()); + Log.d(TAG, "myReceiver_MISSION_ACK: " + data.toString()); }); + //广播接收-setMissionAcklistener + myReceiver_MISSION_CURRENT.setMissionCurrentlistener(data -> { + Log.d(TAG, "myReceiver_MISSION_CURRENT: " + data.toString()); + allView.tv_test1.setText(data.optInt("seq") + ""); + }); + + } /** @@ -680,7 +703,6 @@ public class MainActivity extends AppCompatActivity { } }); - //点击异常窗口 allView.iv_error.setOnClickListener(v -> { @@ -692,7 +714,7 @@ public class MainActivity extends AppCompatActivity { }); //点击定位到当前位置按钮 - allView.iv_location_me.setOnClickListener(v -> { + allView.ll_location_me.setOnClickListener(v -> { if (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000 != 0) { // 移动视图到Marker点 mapVoid.aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000, MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000), 15)); // 15是缩放级别 @@ -722,37 +744,27 @@ public class MainActivity extends AppCompatActivity { startActivity(intent); }); - //路线执行 - allView.ll_line_fly_layout.setOnClickListener(v -> { - - //清空所有线路,并且退出执行页面 - refreshLinkList(); - allView.v_mainDisplay.setVisibility(GONE); - allView.ll_open_layout.setVisibility(GONE); - allView.ll_text.setVisibility(GONE); - allView.ll_link_start.setVisibility(VISIBLE); - allView.ll_all_link_layout.setVisibility(VISIBLE); - allView.fpvWidget.setVisibility(GONE); - }); - - //路线执行-上传航线 + //航线执行-上传航线 allView.ll_link_start_fun1.setOnClickListener(v -> { // 添加航线发送功能 - if (selectedLinkList != null) { + if (selectedLinkList.size() > 0) { // 调用FlyVoid中的方法发送航线到飞控 flyVoid.sendMissionToFlightController(this, selectedLinkList, allView.et_start_execute_height.getText().toString()); - + // 清除当前地图上的所有航点和航线 +// clearWaypoints(); + allView.v_mainDisplay.setVisibility(VISIBLE); + allView.ll_open_layout.setVisibility(VISIBLE); + allView.ll_text.setVisibility(VISIBLE); + allView.ll_link_start.setVisibility(GONE); + allView.ll_all_link_layout.setVisibility(GONE); + allView.fpvWidget.setVisibility(VISIBLE); + uploadLinkList.addAll(selectedLinkList); + allView.ll_assistance_layout.setVisibility(VISIBLE); + } else { + Toast.makeText(this, "请选择航线", Toast.LENGTH_SHORT).show(); } -// // 清除当前地图上的所有航点和航线 -// clearWaypoints(); -// allView.v_mainDisplay.setVisibility(VISIBLE); -// allView.ll_open_layout.setVisibility(VISIBLE); -// allView.ll_text.setVisibility(VISIBLE); -// allView.ll_link_start.setVisibility(GONE); -// allView.ll_all_link_layout.setVisibility(GONE); -// allView.fpvWidget.setVisibility(VISIBLE); }); //开始执行 allView.ll_link_start_fun2.setOnClickListener(v -> { @@ -760,29 +772,35 @@ public class MainActivity extends AppCompatActivity { if (selectedLinkList != null) { // 调用FlyVoid中的方法发送航线到飞控 //flyVoid.requestMissionStart(0,0); - if (isUnlock){ + if (isUnlock) { startExecuteDialog.show(); - }else { + } else { Toast.makeText(this, "请先解锁", Toast.LENGTH_SHORT).show(); } - }else { + } else { Toast.makeText(this, "请先选择航线", Toast.LENGTH_SHORT).show(); } }); - //路线执行-退出 + //航线执行-退出 allView.ll_link_start_back.setOnClickListener(v -> { - // 清除当前地图上的所有航点和航线 - clearWaypoints(); + //判断是否选择了航线 + if (uploadLinkList != null) { + // 清除当前地图上的所有航点和航线 + clearWaypoints(); + // 在地图上显示航线-之前上传的航线 + displayRouteOnMap(uploadLinkList); + } allView.v_mainDisplay.setVisibility(VISIBLE); allView.ll_open_layout.setVisibility(VISIBLE); allView.ll_text.setVisibility(VISIBLE); allView.ll_link_start.setVisibility(GONE); allView.ll_all_link_layout.setVisibility(GONE); allView.fpvWidget.setVisibility(VISIBLE); - allView.rl_unlock.setVisibility(View.GONE); + allView.ll_assistance_layout.setVisibility(VISIBLE); + isAdviseFly = true; }); allView.ll_left_open.setOnClickListener(v -> { @@ -793,16 +811,23 @@ public class MainActivity extends AppCompatActivity { } }); + //清除所有航线的方法 allView.ll_clear.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); + uploadLinkList.clear(); + // 清除所有航点和航线 + clearWaypoints(); + // 在地图上显示航线-清除选中点在更新地图 + displayRouteOnMap(uploadLinkList); + Toast.makeText(this, "已清除", Toast.LENGTH_SHORT).show(); }); - allView.ll_antenna.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); - //路线规划 - allView.ll_map.setOnClickListener(v -> { -// Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); + + //添加航线跳转 + allView.tv_add_link.setOnClickListener(v -> { + // 清除所有航点和航线 + clearWaypoints(); isSetLink = true; + allView.ll_all_link_layout.setVisibility(GONE); + allView.ll_link_start.setVisibility(GONE); allView.v_mainDisplay.setVisibility(GONE); allView.ll_open_layout.setVisibility(GONE); allView.ll_text.setVisibility(GONE); @@ -810,34 +835,33 @@ public class MainActivity extends AppCompatActivity { allView.ll_create_link_layout.setVisibility(VISIBLE); allView.fpvWidget.setVisibility(GONE); }); - //路线规划功能-保存 - allView.ll_link_save.setOnClickListener(v -> { - // 初始化数据库 - SQLClass sqlClass = new SQLClass(this); - // 添加一个CreateLink列表 - ArrayList createLinkLists = new ArrayList<>(); - createLinkLists.addAll(createLinkList); - // 添加CreateLink对象到列表中 - boolean success = sqlClass.addCreateLinkList("路线-"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()), createLinkLists); - if (success){ - // 清除所有航点和航线 - clearWaypoints(); - isSetLink = false; - allView.v_mainDisplay.setVisibility(VISIBLE); - allView.ll_open_layout.setVisibility(VISIBLE); - allView.ll_text.setVisibility(VISIBLE); - allView.ll_link.setVisibility(GONE); - allView.ll_create_link_layout.setVisibility(GONE); - allView.fpvWidget.setVisibility(VISIBLE); - // 获取列表数量 - int count = sqlClass.getLinkListCount(); - Toast.makeText(this, "保存成功-"+count, Toast.LENGTH_SHORT).show(); + //航线规划 + allView.ll_map.setOnClickListener(v -> { + // 清除所有航点和航线 + clearWaypoints(); + isAdviseFly = false; + allView.ll_all_link_layout.setVisibility(VISIBLE); + allView.ll_link_start.setVisibility(VISIBLE); + allView.v_mainDisplay.setVisibility(GONE); + allView.ll_open_layout.setVisibility(GONE); + allView.ll_text.setVisibility(GONE); + allView.ll_link.setVisibility(GONE); + allView.ll_create_link_layout.setVisibility(GONE); + allView.fpvWidget.setVisibility(GONE); + allView.ll_assistance_layout.setVisibility(GONE); + }); + //航线规划功能-保存 + allView.ll_link_save.setOnClickListener(v -> { + if (allView.et_link_name.getText().toString().length() != 0){ + saveLink(null); + }else { + saveLinkNameDialog.show(); } }); - // 路线规划功能-1:反转航点顺序 - allView.ll_link_fun1.setOnClickListener(v -> { + // 航线规划功能-1:反转航点顺序 + allView.tv_link_fun1.setOnClickListener(v -> { // 创建确认对话框 AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("反转航点顺序"); @@ -850,6 +874,9 @@ public class MainActivity extends AppCompatActivity { // 反转航点标记列表 java.util.Collections.reverse(waypointMarkers); + // 反转createLinkList列表 + java.util.Collections.reverse(createLinkList); + // 重新编号航点标记 renumberWaypoints(); @@ -866,8 +893,8 @@ public class MainActivity extends AppCompatActivity { AlertDialog dialog = builder.create(); dialog.show(); }); - // 路线规划功能-2:清除所有线路 - allView.ll_link_fun2.setOnClickListener(v -> { + // 航线规划功能-2:清除所有线航 + allView.tv_link_fun2.setOnClickListener(v -> { // 创建确认对话框 AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("清除所有航点"); @@ -886,46 +913,56 @@ public class MainActivity extends AppCompatActivity { AlertDialog dialog = builder.create(); dialog.show(); }); - //路线规划功能-退出 + //航线规划功能-退出 allView.ll_link_back.setOnClickListener(v -> { - // 创建确认对话框 - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("退出"); - builder.setMessage("确定要退出嘛?退出前的航线不会保存"); + if (createLinkList.size() > 0) { + // 创建确认对话框 + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle("退出"); + builder.setMessage("确定要退出嘛?退出前的航线不会保存"); - builder.setPositiveButton("确定", (dialog, which) -> { + builder.setPositiveButton("确定", (dialog, which) -> { + // 清除所有航点和航线 + clearWaypoints(); + isSetLink = false; + allView.ll_all_link_layout.setVisibility(VISIBLE); + allView.ll_link_start.setVisibility(VISIBLE); + allView.v_mainDisplay.setVisibility(GONE); + allView.ll_open_layout.setVisibility(GONE); + allView.ll_text.setVisibility(GONE); + allView.ll_link.setVisibility(GONE); + allView.ll_create_link_layout.setVisibility(GONE); + allView.fpvWidget.setVisibility(GONE); + displayRouteOnMap(selectedLinkList); + dialog.dismiss(); + // 在地图上显示航线-之前上传的航线 + displayRouteOnMap(selectedLinkList); + + }); + + builder.setNegativeButton("取消", (dialog, which) -> { + dialog.dismiss(); + }); + + AlertDialog dialog = builder.create(); + dialog.show(); + } else { // 清除所有航点和航线 clearWaypoints(); isSetLink = false; - allView.v_mainDisplay.setVisibility(VISIBLE); - allView.ll_open_layout.setVisibility(VISIBLE); - allView.ll_text.setVisibility(VISIBLE); + allView.ll_all_link_layout.setVisibility(VISIBLE); + allView.ll_link_start.setVisibility(VISIBLE); + allView.v_mainDisplay.setVisibility(GONE); + allView.ll_open_layout.setVisibility(GONE); + allView.ll_text.setVisibility(GONE); allView.ll_link.setVisibility(GONE); allView.ll_create_link_layout.setVisibility(GONE); - allView.fpvWidget.setVisibility(VISIBLE); - dialog.dismiss(); - }); - - builder.setNegativeButton("取消", (dialog, which) -> { - dialog.dismiss(); - }); - - AlertDialog dialog = builder.create(); - dialog.show(); - + allView.fpvWidget.setVisibility(GONE); + } }); - allView.ll_one_word.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); allView.ll_execute_line.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); - allView.ll_joystick.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); - allView.ll_fire.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); + startExecuteDialog.show(); }); allView.ll_bombing.setOnClickListener(v -> { bombingDialog.show(); @@ -934,18 +971,12 @@ public class MainActivity extends AppCompatActivity { allView.ll_shout.setOnClickListener(v -> { Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); }); - allView.ll_thoroughfare.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); allView.ll_hook.setOnClickListener(v -> { Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); }); allView.ll_searchlight.setOnClickListener(v -> { Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); }); - allView.ll_mode_select.setOnClickListener(v -> { - Toast.makeText(this, "正在研发..", Toast.LENGTH_SHORT).show(); - }); //初始化FPV手势处理 fpvGestureHandler = new FpvGestureHandler(allView.fpvWidget); fpvGestureHandler.setOnFpvGestureListener(new FpvGestureHandler.OnFpvGestureListener() { @@ -1257,6 +1288,7 @@ public class MainActivity extends AppCompatActivity { byte[] testData = new byte[]{(byte) 0xFF, 0x01, 0x13, 0x03, 0x00, 0x00, 0x17}; tcpClient.sendBytes(testData); }); + //一键向下 allView.ll_PTZ_one_bottom.setOnClickListener(v -> { // 发送左转数据 @@ -1327,9 +1359,19 @@ public class MainActivity extends AppCompatActivity { // 设置地图点击监听器以添加航点 allView.map.getMap().setOnMapClickListener(latLng -> { if (isSetLink) { +// Log.d("setOnMapClickListener", latLng.toString()+"++"+isSetLink); addWaypoint(latLng); } }); + + //地图长按 + allView.map.getMap().setOnMapLongClickListener(latLng -> { + if (isAdviseFly) { + pointFlyDialog.setLatLng(latLng); + pointFlyDialog.show(); + } + }); + // 设置标记点击监听器以删除航点 allView.map.getMap().setOnMarkerClickListener(marker -> { if (isSetLink) { @@ -1365,16 +1407,120 @@ public class MainActivity extends AppCompatActivity { } }); - allView.unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() { + //根据输入的文字模糊查询(名字)搜索框 + allView.et_link_search.addTextChangedListener(new TextWatcher() { @Override - public void onUnlock() { - // 解锁飞机 - flyVoid.requestArm(); - allView.rl_unlock.setVisibility(View.GONE); + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + // 不需要实现 + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + // 实时查询 + filterLinkList(s.toString()); + } + + @Override + public void afterTextChanged(Editable s) { + // 不需要实现 } }); + //清除飞行轨迹 + allView.ll_clear_fly_line.setOnClickListener(v -> { + if (mapVoid.isTracking){ + mapVoid.isTracking = false; + mapVoid.clearFlightTrack(); + mapVoid.stopFlightTracking(); + }else { + mapVoid.startFlightTracking(); + } + }); + + //开启|关闭航线点位 + allView.iv_open_link_list.setOnClickListener(v -> { + if (allView.ll_create_link_item_layout.getVisibility() == View.GONE){ + allView.ll_create_link_item_layout.setVisibility(View.VISIBLE); + }else { + allView.ll_create_link_item_layout.setVisibility(View.GONE); + } + }); + + } + + /** + * 方法:保存航线 + * + * @cuijingzhou + */ + public void saveLink( String linkName) { + // 初始化数据库 + SQLClass sqlClass = new SQLClass(this); + // 添加一个CreateLink列表 + ArrayList createLinkLists = new ArrayList<>(); + if (createLinkList.size() > 0) { + createLinkLists.addAll(createLinkList); + boolean success; + if (linkName == null){ + // 添加CreateLink对象到列表中 + if (allView.et_link_name.getText().toString().length() != 0) { + success = sqlClass.addCreateLinkList(allView.et_link_name.getText().toString(), createLinkLists); + } else { + success = sqlClass.addCreateLinkList("航线-" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()), createLinkLists); + } + }else { + success = sqlClass.addCreateLinkList(linkName, createLinkLists); + } + + if (success) { + // 清除所有航点和航线 + clearWaypoints(); + isSetLink = false; + allView.ll_all_link_layout.setVisibility(VISIBLE); + allView.ll_link_start.setVisibility(VISIBLE); + allView.v_mainDisplay.setVisibility(GONE); + allView.ll_open_layout.setVisibility(GONE); + allView.ll_text.setVisibility(GONE); + allView.ll_link.setVisibility(GONE); + allView.ll_create_link_layout.setVisibility(GONE); + allView.fpvWidget.setVisibility(GONE); + allView.et_link_name.setText(""); + // 在地图上显示航线-之前选中的航线 + displayRouteOnMap(selectedLinkList); + refreshLinkList();//刷新航线列表 + Toast.makeText(this, "航线保存成功", Toast.LENGTH_SHORT).show(); + } + } else { + Toast.makeText(this, "请先添加航点", Toast.LENGTH_SHORT).show(); + } + + + + } + + // 添加过滤方法 + private void filterLinkList(String query) { + if (sqlClass != null && allLinkAdapter != null) { + if (query.isEmpty()) { + // 如果查询为空,显示所有数据 + List allList = sqlClass.getAllLinkListInfo(); + allLinkAdapter.updateDataList(allList); + } else { + // 根据输入文字模糊查询 + List filteredList = new ArrayList<>(); + List fullList = sqlClass.getAllLinkListInfo(); + + for (SQLClass.LinkListInfo item : fullList) { + // 模糊匹配航线名称 + if (item.getListName().toLowerCase().contains(query.toLowerCase())) { + filteredList.add(item); + } + } + + allLinkAdapter.updateDataList(filteredList); + } + } } /** @@ -1387,7 +1533,7 @@ public class MainActivity extends AppCompatActivity { // 创建自定义对话框 AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("删除航点"); - builder.setMessage("确定要删除点位" +(index+1) + "吗?"); + builder.setMessage("确定要删除航点" + (index + 1) + "吗?"); builder.setPositiveButton("确定", (dialog, which) -> { // 删除航点时同时删除对应的列表项 @@ -1409,7 +1555,7 @@ public class MainActivity extends AppCompatActivity { // 创建自定义标记视图 View markerView = getLayoutInflater().inflate(R.layout.custom_marker_layout, null); @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView markerText = markerView.findViewById(R.id.marker_text); - markerText.setText("点位" + (waypointMarkers.size() + 1)); + markerText.setText( "" + (waypointMarkers.size() + 1)); // 将视图转换为Bitmap markerView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED); @@ -1430,7 +1576,15 @@ public class MainActivity extends AppCompatActivity { waypointPositions.add(latLng); // 添加到列表 - CreateLink createLink = new CreateLink("点位" + waypointMarkers.size(), 30, 10, waypointMarkers.size() - 1, latLng); + CreateLink createLink = new CreateLink( + waypointMarkers.size()+"", + 30, + 10, + waypointMarkers.size() - 1, + latLng, + true, + true + ); createLinkList.add(createLink); createLinkAdapter.setCreateLinkList(createLinkList); @@ -1462,20 +1616,22 @@ public class MainActivity extends AppCompatActivity { private void renumberWaypoints() { for (int i = 0; i < waypointMarkers.size(); i++) { // 创建新的自定义标记Bitmap - Bitmap markerBitmap = createCustomMarkerBitmap("点位" + (i + 1)); + Bitmap markerBitmap = createCustomMarkerBitmap( (i + 1)+""); // 更新标记图标 waypointMarkers.get(i).setIcon(BitmapDescriptorFactory.fromBitmap(markerBitmap)); // 更新列表项名称 if (i < createLinkList.size()) { - createLinkList.get(i).setName("点位" + (i + 1)); + createLinkList.get(i).setName( (i + 1)+""); } } + createLinkAdapter.setCreateLinkList(createLinkList); } /** * 创建自定义标记Bitmap + * * @param text 标记文字 * @return Bitmap */ @@ -1502,6 +1658,7 @@ public class MainActivity extends AppCompatActivity { waypointMarkers.clear(); waypointPositions.clear(); createLinkList.clear(); + selectedLinkList.clear(); createLinkAdapter.setCreateLinkList(createLinkList); // 移除航线 @@ -1523,7 +1680,6 @@ public class MainActivity extends AppCompatActivity { } - /** * 更新航线显示 */ @@ -1538,8 +1694,8 @@ public class MainActivity extends AppCompatActivity { if (waypointPositions.size() > 1) { flightPathPolyline = allView.map.getMap().addPolyline(new PolylineOptions() .addAll(waypointPositions) - .width(8) - .color(Color.BLACK)); + .width(6) + .color(Color.parseColor("#FFEB3B"))); } } @@ -1553,10 +1709,6 @@ public class MainActivity extends AppCompatActivity { } - // 创建航线列表适配器 - private AllLinkAdapter allLinkAdapter; - private SQLClass sqlClass; - private List linkListInfoList; private void setupAllLinkList() { // 初始化数据库 sqlClass = new SQLClass(this); @@ -1573,14 +1725,13 @@ public class MainActivity extends AppCompatActivity { allLinkAdapter.setOnItemClickListener(new AllLinkAdapter.OnItemClickListener() { @Override public void onItemClick(int listId, int position) { - // 清除当前地图上的所有航点和航线 + // 清除所有航点和航线 clearWaypoints(); - selectedLinkList = null; // 从数据库中获取选中的航线数据 selectedLinkList = sqlClass.getCreateLinkList(listId); - if (selectedLinkList != null) { - Toast.makeText(MainActivity.this, "已加载航线: " + linkListInfoList.get(position).getListName(), - Toast.LENGTH_SHORT).show(); + if (selectedLinkList.size() > 0) { +// Toast.makeText(MainActivity.this, "已加载航线: " + linkListInfoList.get(position).getListName(), +// Toast.LENGTH_SHORT).show(); // 在地图上显示航线 displayRouteOnMap(selectedLinkList); } else { @@ -1601,11 +1752,10 @@ public class MainActivity extends AppCompatActivity { /** * 在地图上显示航线 + * * @param createLinkList 航线数据列表 */ private void displayRouteOnMap(ArrayList createLinkList) { - // 清除现有的航点和航线 - clearWaypoints(); // 遍历航线数据并在地图上显示 for (int i = 0; i < createLinkList.size(); i++) { @@ -1645,7 +1795,9 @@ public class MainActivity extends AppCompatActivity { createLink.getHeight(), createLink.getSpeed(), createLink.getWaypointIndex(), - latLng + latLng, + createLink.isBom1_show(), + createLink.isBom2_show() ); this.createLinkList.add(newCreateLink); } @@ -1663,8 +1815,6 @@ public class MainActivity extends AppCompatActivity { } } - - @Override protected void onDestroy() { super.onDestroy(); @@ -1726,9 +1876,10 @@ public class MainActivity extends AppCompatActivity { } fpvVoid.Fstop(allView.fpvWidget); + //关闭航线 + mapVoid.stopFlightTracking(); } - @Override protected void onResume() { super.onResume(); diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/AllLinkAdapter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/AllLinkAdapter.java index db88742..dcb805d 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/AllLinkAdapter.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/AllLinkAdapter.java @@ -6,6 +6,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; +import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; @@ -46,7 +47,13 @@ public class AllLinkAdapter extends RecyclerView.Adapter { if (onItemClickListener != null) { + setSelects(position); onItemClickListener.onItemClick(linkListInfo.getListId(), position); } }); } + /** + * 方法:选择其中一个航线列表 + * + * @cuijingzhou + */ + public void setSelects(int position){ + for (int i = 0; i < linkListInfoList.size(); i++){ + if (i != position){ + linkListInfoList.get(i).setSelect(false); + } else { + linkListInfoList.get(i).setSelect(true); + } + } + notifyDataSetChanged(); + } + @Override public int getItemCount() { return linkListInfoList != null ? linkListInfoList.size() : 0; @@ -127,6 +151,7 @@ public class AllLinkAdapter extends RecyclerView.Adapter { private List createLinkList; private OnItemClickListener onItemClickListener; + private Activity content; + public static ArrayList isExpand = new ArrayList<>();//当前两个弹舱是否可以使用 0=弹舱1 1=弹舱2 public interface OnItemClickListener { void onDeleteClick(int position); } - public CreateLinkAdapter() { + public CreateLinkAdapter(Activity content) { this.createLinkList = new ArrayList<>(); + this.content = content; + isExpand.add(true); + isExpand.add(true); } public void setOnItemClickListener(OnItemClickListener listener) { @@ -60,22 +74,111 @@ public class CreateLinkAdapter extends RecyclerView.Adapter linkAdapter = new ArrayAdapter<>(content, + android.R.layout.simple_spinner_item, linkOptions); + linkAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + sp_turn.setAdapter(linkAdapter); + + + + //投弹是否显示 + if (createLink.isBom1_show()){ + ll_bom_layout1.setVisibility(View.VISIBLE); + }else { + ll_bom_layout1.setVisibility(View.GONE); + } + if (createLink.isBom2_show()){ + ll_bom_layout2.setVisibility(View.VISIBLE); + }else { + ll_bom_layout2.setVisibility(View.GONE); + } + + //投弹高度 + et_bom1.setText(createLink.getBom1_height() + ""); + et_bom2.setText(createLink.getBom2_height() + ""); + + if (!createLink.isBom1_show() && !createLink.isBom2_show()){ + tv_null_data.setVisibility(View.VISIBLE); + }else { + tv_null_data.setVisibility(View.GONE); + } + + + if (createLink.isBom1_select()) { + tv_bom_text1.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg); + iv_bom1.setImageResource(R.mipmap.icon_select_link_yes); +// ll_bom_height_layout1.setVisibility(View.VISIBLE); + } else { + tv_bom_text1.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg); + iv_bom1.setImageResource(R.mipmap.icon_select_link_no); +// ll_bom_height_layout1.setVisibility(View.INVISIBLE); + } + + if (createLink.isBom2_select()) { + tv_bom_text2.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg); + iv_bom2.setImageResource(R.mipmap.icon_select_link_yes); +// ll_bom_height_layout2.setVisibility(View.VISIBLE); + } else { + tv_bom_text2.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg); + iv_bom2.setImageResource(R.mipmap.icon_select_link_no); +// ll_bom_height_layout2.setVisibility(View.INVISIBLE); + } + tvDel.setOnClickListener(v -> { if (onItemClickListener != null) { @@ -94,15 +197,147 @@ public class CreateLinkAdapter extends RecyclerView.Adapter { - if (!hasFocus) { - try { - createLink.setSpeed(Double.parseDouble(etSpeed.getText().toString())); - } catch (NumberFormatException e) { - etSpeed.setText(String.valueOf((int) createLink.getSpeed())); - } + // 为Spinner设置选择监听器 + sp_turn.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + tv_turn.setText(parent.getItemAtPosition(position).toString()); + + } + + @Override + public void onNothingSelected(AdapterView parent) { + // 什么都不做 } }); + + rl_turn.setOnClickListener(v -> { + showCustomDropdown(rl_turn, tv_turn,ll_turn); + }); + + //长按弹出窗口 + tv_expand.setOnClickListener(v -> { + if (ll_expand.getVisibility() == View.VISIBLE) { + ll_expand.setVisibility(View.GONE); + tv_expand.setText("展开"); + } else { + ll_expand.setVisibility(View.VISIBLE); + tv_expand.setText("收起"); + } + }); + + //投弹选中1 + ll_bom_layout1.setOnClickListener(v -> { + if (createLink.isBom1_select()) { + // 取消选中状态 + tv_bom_text1.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg); + iv_bom1.setImageResource(R.mipmap.icon_select_link_no); + } else { + // 设置当前项为选中状态 + tv_bom_text1.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg); + iv_bom1.setImageResource(R.mipmap.icon_select_link_yes); + } + // 选中状态 - 先取消其他所有项的选中状态 + clearAllSelectionsExcept(position, 1); // 1表示bom1 + }); + + //投弹选中2 + ll_bom_layout2.setOnClickListener(v -> { + if (createLink.isBom2_select()) { + // 取消选中状态 + tv_bom_text2.setBackgroundResource(R.drawable.b2101010_4round_1stroke_bg); + iv_bom2.setImageResource(R.mipmap.icon_select_link_no); + + } else { + // 设置当前项为选中状态 + tv_bom_text2.setBackgroundResource(R.drawable.ff029a45_2round_1stroke_bg); + iv_bom2.setImageResource(R.mipmap.icon_select_link_yes); + } + // 选中状态 - 先取消其他所有项的选中状态 + clearAllSelectionsExcept(position, 2); // 2表示bom2 + }); + + } + + /** + * 清除除指定位置和类型外的所有显示状态 + * @param currentPosition 当前项的位置 + * @param type 1表示bom1,2表示bom2 + */ + private void clearAllSelectionsExcept(int currentPosition, int type) { + // bom1 + if (type == 1){ + //如果当前项是选中状态,则取消所有bom1的选中状态并显示出来 + if (createLinkList.get(currentPosition).isBom1_select()){ + for (int i = 0; i < createLinkList.size(); i++) { + CreateLink link = createLinkList.get(i); + link.setBom1_show(true); + link.setBom1_select(false); + } + isExpand.set(0,true); + } + //如果当前项不是选中状态,则取消除了当前项其它所有bom1的选中状态并隐藏 + else { + for (int i = 0; i < createLinkList.size(); i++) { + CreateLink link = createLinkList.get(i); + if (i == currentPosition){ + link.setBom1_show(true); + link.setBom1_select(true); + }else { + link.setBom1_show(false); + link.setBom1_select(false); + } + } + isExpand.set(0,false); + } + + } + //bom2 + else { + if (createLinkList.get(currentPosition).isBom2_select()){ + for (int i = 0; i < createLinkList.size(); i++) { + CreateLink link = createLinkList.get(i); + link.setBom2_show(true); + link.setBom2_select(false); + } + isExpand.set(1,true); + } + //如果当前项不是选中状态,则取消除了当前项其它所有bom2的选中状态并隐藏 + else { + for ( int i = 0; i < createLinkList.size(); i++) { + CreateLink link = createLinkList.get(i); + if (i == currentPosition){ + link.setBom2_show(true); + link.setBom2_select(true); + }else { + link.setBom2_show(false); + link.setBom2_select(false); + } + } + isExpand.set(1,false); + } + } + + notifyDataSetChanged(); } } + + //转弯方式选择弹窗 + private void showCustomDropdown(RelativeLayout anchor, TextView tv_turn,LinearLayout ll_turn) { + String[] options = {"协调转弯", "到点转弯"}; + AlertDialog.Builder builder = new AlertDialog.Builder(content); + builder.setItems(options, (dialog, which) -> { + tv_turn.setText(options[which]); + if (which == 1){ + ll_turn.setVisibility(View.VISIBLE); + }else { + ll_turn.setVisibility(View.GONE); + } + // 更新选中状态 + }); + builder.show(); + } + + + } diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java index 5697a37..84266be 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java @@ -82,7 +82,7 @@ public class TypeAdapter extends RecyclerView.Adapter { + // 移除参数更新检查的回调 + if (uiHandler != null) { + uiHandler.removeCallbacks(paramUpdateChecker); + } + // 返回主页 + finish(); + }); paramLoadingDialog.show(); } + @Override protected void onResume() { super.onResume(); diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Adapter/MultiSelectAdapter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Adapter/MultiSelectAdapter.java index 1358796..49be845 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Adapter/MultiSelectAdapter.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Adapter/MultiSelectAdapter.java @@ -5,7 +5,6 @@ import android.graphics.Color; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.Button; import android.widget.TextView; import androidx.annotation.NonNull; @@ -41,7 +40,7 @@ public class MultiSelectAdapter extends RecyclerView.Adapter { -// switch (position) { -// case 0: -// tab.setText("机型设置"); -// break; -// case 1: -// tab.setText("安装设置"); -// break; -// case 2: -// tab.setText("加速度计"); -// break; -// case 3: -// tab.setText("磁力计"); -// break; -// } -// } -// ); -// tabLayoutMediator.attach(); -// -// // 为Tab之间添加间距 -// for (int i = 0; i < tabLayout.getTabCount(); i++) { -// View tab = (((ViewGroup) tabLayout.getChildAt(0)).getChildAt(i)); -// ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) tab.getLayoutParams(); -// layoutParams.setMargins(6, 0, 6, 0); // 左右各16dp的间距 -// tab.setLayoutParams(layoutParams); -// } -// -// -// } + rl_low_end = view.findViewById(R.id.rl_low_end); + rl_mid_range = view.findViewById(R.id.rl_mid_range); + rl_high_end = view.findViewById(R.id.rl_high_end); + sp_low_end = view.findViewById(R.id.sp_low_end); + sp_mid_range = view.findViewById(R.id.sp_mid_range); + sp_high_end = view.findViewById(R.id.sp_high_end); + tv_low_end_text = view.findViewById(R.id.tv_low_end_text); + tv_mid_range_text = view.findViewById(R.id.tv_mid_range_text); + tv_high_end_text = view.findViewById(R.id.tv_high_end_text); + tv_save = view.findViewById(R.id.tv_save); + initSpinnerData(); + initText(); } /** @@ -99,30 +86,181 @@ public class FoundationFragment extends Fragment { * @cuijingzhou */ private void initOnClick() { + rl_low_end.setOnClickListener(v -> { + // 点击TextView后打开对应的Spinner + sp_low_end.performClick(); + }); + rl_mid_range.setOnClickListener(v -> { + // 点击TextView后打开对应的Spinner + sp_mid_range.performClick(); + }); + rl_high_end.setOnClickListener(v -> { + // 点击TextView后打开对应的Spinner + sp_high_end.performClick(); + }); + // 修改所有的Spinner监听器 + sp_low_end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @SuppressLint("SetTextI18n") + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + Log.d("无事发生", "onItemSelected: sp_m7"); + tv_low_end_text.setText( parent.getSelectedItem().toString()); + } + + @Override + public void onNothingSelected(AdapterView parent) { + + Log.d("无事发生", "onNothingSelected: sp_m7"); + } + }); + + // 修改所有的Spinner监听器 + sp_mid_range.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @SuppressLint("SetTextI18n") + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + Log.d("无事发生", "onItemSelected: sp_m7"); + tv_mid_range_text.setText( parent.getSelectedItem().toString()); + } + + @Override + public void onNothingSelected(AdapterView parent) { + + Log.d("无事发生", "onNothingSelected: sp_m7"); + } + }); + + // 修改所有的Spinner监听器 + sp_high_end.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @SuppressLint("SetTextI18n") + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + Log.d("无事发生", "onItemSelected: sp_m7"); + tv_high_end_text.setText( parent.getSelectedItem().toString()); + } + + @Override + public void onNothingSelected(AdapterView parent) { + + Log.d("无事发生", "onNothingSelected: sp_m7"); + } + }); + + //保存 + tv_save.setOnClickListener(v -> { + save(); + }); + + + } + + /** + * 方法:保存 + * + * @cuijingzhou + */ + private void save() { + try { + flyVoid.requestParamSet("FLTMODE1", + getSelectedChannelValue(sp_low_end) + "", + FlyVoid.paramList.get("FLTMODE1").getParam_type()); + flyVoid.requestParamSet("FLTMODE2", + getSelectedChannelValue(sp_low_end) + ""); + + Thread.sleep(100); + + flyVoid.requestParamSet("FLTMODE3", + getSelectedChannelValue(sp_mid_range) + "", + FlyVoid.paramList.get("FLTMODE3").getParam_type()); + flyVoid.requestParamSet("FLTMODE4", + getSelectedChannelValue(sp_mid_range) + ""); + + Thread.sleep(100); + + flyVoid.requestParamSet("FLTMODE5", + getSelectedChannelValue(sp_high_end) + "", + FlyVoid.paramList.get("FLTMODE5").getParam_type()); + flyVoid.requestParamSet("FLTMODE6", + getSelectedChannelValue(sp_high_end) + ""); + + Toast.makeText(requireContext(), "保存成功", Toast.LENGTH_SHORT).show(); + }catch (Exception e){ + Log.d("FLTMODE-save", e.toString()); + } + } + + /** + * 方法:初始化文字 + * + * @cuijingzhou + */ + private void initText() { + setSelectedChannel(sp_low_end, Integer.parseInt(FlyVoid.paramList.get("FLTMODE1").getParam_value())); + setSelectedChannel(sp_mid_range, Integer.parseInt(FlyVoid.paramList.get("FLTMODE3").getParam_value())); + setSelectedChannel(sp_high_end, Integer.parseInt(FlyVoid.paramList.get("FLTMODE5").getParam_value())); + } + + /** + * 方法:初始化Spinner数据 + * + * @cuijingzhou + */ + private void initSpinnerData() { + // 创建通道数据列表 + List channelList = new ArrayList<>(); + channelList.add(new ModeItem("姿态", 0)); + channelList.add(new ModeItem("定高", 2)); + channelList.add(new ModeItem("航线", 3)); + channelList.add(new ModeItem("定点", 5)); + channelList.add(new ModeItem("返航", 6)); + channelList.add(new ModeItem("降落", 9)); + + // 创建适配器 + ArrayAdapter adapter = new ArrayAdapter<>(requireContext(), + android.R.layout.simple_spinner_item, channelList); + adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + + // 为所有Spinner设置适配器 + Spinner[] spinners = {sp_low_end, sp_mid_range, sp_high_end}; + for (Spinner spinner : spinners) { + if (spinner != null) { + spinner.setAdapter(adapter); + } + } + } + + // 示例:设置Spinner选中项 + private void setSelectedChannel(Spinner spinner, int value) { + ArrayAdapter adapter = (ArrayAdapter) spinner.getAdapter(); + for (int i = 0; i < adapter.getCount(); i++) { + ModeItem item = adapter.getItem(i); + if (item != null && item.getValue() == value) { + spinner.setSelection(i); + break; + } + } + } + + // 示例:获取选中的值 + private int getSelectedChannelValue(Spinner spinner) { + if (spinner.getSelectedItem() instanceof ModeItem) { + ModeItem item = (ModeItem) spinner.getSelectedItem(); + return item.getValue(); + } + return 0; // 默认值 } @Override public void onResume() { super.onResume(); -// // 使用post方法将initData()推迟到下一个UI循环执行,避免FragmentManager冲突 -// getView().post(new Runnable() { -// @Override -// public void run() { -// initData(); -// initView(); -// initOnClick(); -// } -// }); + // 使用post方法将initData()推迟到下一个UI循环执行,避免FragmentManager冲突 + } @Override public void onDestroyView() { super.onDestroyView(); - // 清理TabLayoutMediator资源 - if (tabLayoutMediator != null) { - tabLayoutMediator.detach(); - tabLayoutMediator = null; - } + } } \ No newline at end of file diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Fragment/LoadFragment.java b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Fragment/LoadFragment.java index 7f248b4..4fd66b7 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Fragment/LoadFragment.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Fragment/LoadFragment.java @@ -423,7 +423,7 @@ public class LoadFragment extends Fragment { et_off_m13.setText("1900"); } }); -// 修改所有的Spinner监听器,以sp_m7为例: + // 修改所有的Spinner监听器,以sp_m7为例: sp_m7.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @SuppressLint("SetTextI18n") @Override diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/PointFlyDialog.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/PointFlyDialog.java new file mode 100644 index 0000000..57e9097 --- /dev/null +++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/PointFlyDialog.java @@ -0,0 +1,115 @@ +package com.example.longyi_groundstation.Main.View; + +import android.annotation.SuppressLint; +import android.app.Activity; +import android.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; +import android.widget.TextView; +import android.widget.Toast; + +import com.amap.api.maps.model.LatLng; +import com.example.longyi_groundstation.Main.Void.FlyVoid; +import com.example.longyi_groundstation.Main.Void.MyTool; +import com.example.longyi_groundstation.R; + +public class PointFlyDialog { + + private final Activity context; + private String title; + private String message; + private String positiveButtonText; + private LatLng latLng; + + private FlyVoid flyVoid = new FlyVoid(); + + + public PointFlyDialog(Activity context) { + this.context = context; + this.title = "错误日志"; + this.message = ""; + this.positiveButtonText = "确定"; + this.latLng = latLng; + + } + + // 设置弹窗标题 + public PointFlyDialog setLatLng(LatLng latLng) { + this.latLng = latLng; + return this; + } + + // 设置弹窗标题 + public PointFlyDialog setTitle(String title) { + this.title = title; + return this; + } + + // 设置弹窗内容 + public PointFlyDialog setMessage(String message) { + this.message = message; + return this; + } + + // 设置确认按钮文字 + public PointFlyDialog setPositiveButtonText(String text) { + this.positiveButtonText = text; + return this; + } + + // 显示弹窗 + public void show() { + MyTool.hideBottomNavigationBar( context); + AlertDialog.Builder builder = new AlertDialog.Builder(context); + + // 使用自定义布局 + View view = LayoutInflater.from(context).inflate(R.layout.dialog_point_fly, null); + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message); + // 滑动模块 + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView); + + if (latLng != null){ + tvMessage.setText("经度:" + latLng.latitude + "\n纬度:" + latLng.latitude); + } + + // 添加日志 + builder.setView(view); + + AlertDialog dialog = builder.create(); + dialog.show(); + + // 设置宽高 + Window window = dialog.getWindow(); + if (window != null) { + WindowManager.LayoutParams layoutParams = window.getAttributes(); + layoutParams.width = MyTool.dpToPx(context, 300); // 或具体像素值 + layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; // 或具体像素值 + window.setAttributes(layoutParams); + window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg); + } + + unlockView.setText("滑动执行"); + unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() { + @Override + public void onUnlock() { +// // 发送命令 + + MyTool.hideBottomNavigationBar( context); + dialog.dismiss(); + // 滑动到阈值后触发(如关闭对话框或执行操作) + Toast.makeText(context, "操作已确认", Toast.LENGTH_SHORT).show(); + } + }); + + //取消按钮 + tvMessage.setOnClickListener(v -> { + dialog.dismiss(); + MyTool.hideBottomNavigationBar(context); + + }); + } + +} diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/SaveLinkNameDialog.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/SaveLinkNameDialog.java new file mode 100644 index 0000000..6d918bf --- /dev/null +++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/SaveLinkNameDialog.java @@ -0,0 +1,113 @@ +package com.example.longyi_groundstation.Main.View; + +import android.annotation.SuppressLint; +import android.app.Activity; +import android.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.view.WindowManager; +import android.widget.EditText; +import android.widget.TextView; +import android.widget.Toast; + +import com.example.longyi_groundstation.Main.Activity.MainActivity; +import com.example.longyi_groundstation.Main.Void.FlyVoid; +import com.example.longyi_groundstation.Main.Void.MyTool; +import com.example.longyi_groundstation.R; + +public class SaveLinkNameDialog { + + private final MainActivity context; + private String title; + private String message; + private String positiveButtonText; + + private FlyVoid flyVoid = new FlyVoid(); + + + public SaveLinkNameDialog(MainActivity context) { + this.context = context; + this.title = "错误日志"; + this.message = ""; + this.positiveButtonText = "确定"; + } + + // 设置弹窗标题 + public SaveLinkNameDialog setTitle(String title) { + this.title = title; + return this; + } + + // 设置弹窗内容 + public SaveLinkNameDialog setMessage(String message) { + this.message = message; + return this; + } + + // 设置确认按钮文字 + public SaveLinkNameDialog setPositiveButtonText(String text) { + this.positiveButtonText = text; + return this; + } + + // 显示弹窗 + public void show() { + MyTool.hideBottomNavigationBar( context); + AlertDialog.Builder builder = new AlertDialog.Builder(context); + + // 使用自定义布局 + View view = LayoutInflater.from(context).inflate(R.layout.dialog_link_name, null); + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message); + // 滑动模块 + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView); + // 高度输入 + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) EditText et_name = view.findViewById(R.id.et_name); + + + // 添加日志 + builder.setView(view); + + AlertDialog dialog = builder.create(); + dialog.show(); + + // 设置宽高 + Window window = dialog.getWindow(); + if (window != null) { + WindowManager.LayoutParams layoutParams = window.getAttributes(); + layoutParams.width = MyTool.dpToPx(context, 300); // 或具体像素值 + layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; // 或具体像素值 + window.setAttributes(layoutParams); + window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg); + } + + unlockView.setText("滑动确认"); + unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() { + @Override + public void onUnlock() { + + if (et_name.getText().toString().length() > 0){ + context.saveLink(et_name.getText().toString()); + }else { + context.saveLink(null); + } + + + MyTool.hideBottomNavigationBar( context); + dialog.dismiss(); + // 滑动到阈值后触发(如关闭对话框或执行操作) + Toast.makeText(context, "操作已确认", Toast.LENGTH_SHORT).show(); + MyTool.hideBottomNavigationBar(context); + } + }); + + ; + //取消按钮 + tvMessage.setOnClickListener(v -> { + dialog.dismiss(); + MyTool.hideBottomNavigationBar(context); + }); + } + +} diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/SlideToUnlockView.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/SlideToUnlockView.java index d2b278a..e6a6d9a 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/View/SlideToUnlockView.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/SlideToUnlockView.java @@ -8,7 +8,7 @@ import android.view.*; import android.view.animation.OvershootInterpolator; public class SlideToUnlockView extends View { - private static String DEFAULT_TEXT = "滑动执行"; + private String defaultText = "滑动执行"; // private float progress = 0f; private Paint paint; private Paint textPaint; @@ -23,7 +23,7 @@ public class SlideToUnlockView extends View { private float cornerRadius; // 背景圆角弧度 private float thumbCornerRadius; // 滑块圆角弧度 private int componentAlpha = 255; // 组件透明度,默认为完全不透明 - + public boolean isSlide = true;//是否可以滑动 public interface OnUnlockListener { void onUnlock(); @@ -94,8 +94,7 @@ public class SlideToUnlockView extends View { canvas.drawRoundRect(thumbRect, thumbCornerRadius, thumbCornerRadius, paint); // 3. 绘制文本(始终可见) - textPaint.setAlpha(componentAlpha); // 固定不透明度 - canvas.drawText(DEFAULT_TEXT, + canvas.drawText(defaultText, getWidth()/2f, getHeight()/2f + textPaint.getTextSize()/3, textPaint); @@ -109,38 +108,45 @@ public class SlideToUnlockView extends View { @Override public boolean onTouchEvent(MotionEvent event) { - float eventX = event.getX(); - switch (event.getAction()) { - case MotionEvent.ACTION_DOWN: - // 检查是否点击在滑块上 - return thumbRect.contains(eventX, event.getY()); - case MotionEvent.ACTION_MOVE: - // 计算进度(限制在0-1) - progress = Math.max(0f, Math.min(1f, (eventX - minX) / (maxX - minX))); - invalidate(); - return true; - case MotionEvent.ACTION_UP: - if (progress > 0.7f) { - reboundAnimator.start(); - if (listener != null) listener.onUnlock(); - } else { - resetProgress(); - } - return true; + if (isSlide){ + float eventX = event.getX(); + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + // 检查是否点击在滑块上 + return thumbRect.contains(eventX, event.getY()); + case MotionEvent.ACTION_MOVE: + // 计算进度(限制在0-1) + progress = Math.max(0f, Math.min(1f, (eventX - minX) / (maxX - minX))); + invalidate(); + return true; + case MotionEvent.ACTION_UP: + if (progress > 0.7f) { +// reboundAnimator.start(); + isSlide = false; + if (listener != null) listener.onUnlock(); + } else { + resetProgress(); + } + return true; + } + return super.onTouchEvent(event); + }else { + return true; } - return super.onTouchEvent(event); + } - // 其他方法保持不变... - private void setProgress(float progress) { + // 设置进度 + public void setProgress(float progress) { this.progress = progress; invalidate(); } public void setText(String s) { - DEFAULT_TEXT = s; + this.defaultText = s; } + public void resetProgress() { ValueAnimator animator = ValueAnimator.ofFloat(progress, 0); animator.setDuration(300); @@ -169,18 +175,17 @@ public class SlideToUnlockView extends View { /** * 恢复到初始化状态 */ - public void resetToInitialState(String text) { + public void resetToInitialState(String text) { // 重置进度为0 progress = 0f; if (text != null){ setText(text); - }else { + } else { // 重置默认文本 - DEFAULT_TEXT = "滑动执行"; + this.defaultText = "滑动执行"; } - // 重置颜色为默认值 bgColor = Color.parseColor("#cfcfcf"); activeColor = Color.parseColor("#029A45"); diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/StartExecuteDialog.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/StartExecuteDialog.java index 0635359..ba44397 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/View/StartExecuteDialog.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/StartExecuteDialog.java @@ -3,6 +3,7 @@ package com.example.longyi_groundstation.Main.View; import android.annotation.SuppressLint; import android.app.Activity; import android.app.AlertDialog; +import android.os.CountDownTimer; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,6 +16,7 @@ import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; +import com.example.longyi_groundstation.Main.Activity.MainActivity; import com.example.longyi_groundstation.Main.Void.FlyVoid; import com.example.longyi_groundstation.Main.Void.MyTool; import com.example.longyi_groundstation.R; @@ -26,9 +28,11 @@ public class StartExecuteDialog { private String message; private String positiveButtonText; private String height = "10"; - private FlyVoid flyVoid = new FlyVoid(); - + private CountDownTimer countDownTimer; + private AlertDialog dialog; + private TextView tvStartCountdown; + private TextView tvStartCancel; public StartExecuteDialog(Activity context, String height) { this.context = context; @@ -57,13 +61,16 @@ public class StartExecuteDialog { } // 显示弹窗 + @SuppressLint("MissingInflatedId") public void show() { - MyTool.hideBottomNavigationBar( context); + MyTool.hideBottomNavigationBar(context); AlertDialog.Builder builder = new AlertDialog.Builder(context); // 使用自定义布局 View view = LayoutInflater.from(context).inflate(R.layout.dialog_start_execute, null); @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message); + // 滑动模块-解锁 + @SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView_unlock = view.findViewById(R.id.unlockView_unlock); // 滑动模块 @SuppressLint({"MissingInflatedId", "LocalSuppress"}) SlideToUnlockView unlockView = view.findViewById(R.id.unlockView); // 高度 @@ -72,6 +79,10 @@ public class StartExecuteDialog { @SuppressLint({"MissingInflatedId", "LocalSuppress"}) Spinner sp_protect = view.findViewById(R.id.sp_protect); // 完成文字 @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tv_protect = view.findViewById(R.id.tv_protect); + // 取消执行 + tvStartCancel = view.findViewById(R.id.tv_start_cancel); + // 倒计时文字 + tvStartCountdown = view.findViewById(R.id.tv_start_countdown); //初始化下拉 String[] onePowerOptions = {"返航", "降落", "继续飞行"}; @@ -98,7 +109,7 @@ public class StartExecuteDialog { builder.setView(view); - AlertDialog dialog = builder.create(); + dialog = builder.create(); dialog.show(); // 设置宽高 @@ -111,27 +122,120 @@ public class StartExecuteDialog { window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg); } + //判断是否解锁 + if (MainActivity.isUnlock){ + unlockView_unlock.setProgress(1f); + unlockView_unlock.isSlide = false; + } + unlockView_unlock.setText("滑动解锁"); + unlockView_unlock.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() { + @Override + public void onUnlock() { + //解锁飞机 + flyVoid.requestArm(); + new Thread(() -> { + for (int i = 0; i < 6; i++) { + try { + Thread.sleep(490); + if (i == 5){ + context.runOnUiThread(() -> { + unlockView_unlock.setProgress(0f); + unlockView_unlock.resetProgress(); + Toast.makeText(context, "解锁失败", Toast.LENGTH_SHORT).show(); + }); + break; + } + + if (MainActivity.isUnlock){ + // 滑动到阈值后触发(如关闭对话框或执行操作) + context.runOnUiThread(() -> { + Toast.makeText(context, "解锁成功", Toast.LENGTH_SHORT).show(); + unlockView_unlock.setProgress(1f); + unlockView_unlock.isSlide = false; + }); + break; + } + + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }).start(); + } + }); unlockView.setText("滑动执行"); unlockView.setOnUnlockListener(new SlideToUnlockView.OnUnlockListener() { @Override public void onUnlock() { -// // 发送命令 - // 调用FlyVoid中的方法发送航线到飞控 - flyVoid.requestMissionStart(0,0); - MyTool.hideBottomNavigationBar( context); - dialog.dismiss(); - // 滑动到阈值后触发(如关闭对话框或执行操作) - Toast.makeText(context, "开始执行航线", Toast.LENGTH_SHORT).show(); + if (MainActivity.isUnlock){ + // 开始5秒倒计时 + startCountdown(); + }else { + Toast.makeText(context, "请先解锁", Toast.LENGTH_SHORT).show(); + unlockView.isSlide = true; + unlockView.resetProgress(); + } } }); - ; //取消按钮 tvMessage.setOnClickListener(v -> { + cancelCountdown(); dialog.dismiss(); MyTool.hideBottomNavigationBar(context); }); + + // 取消执行按钮 + tvStartCancel.setOnClickListener(v -> { + cancelCountdown(); + // 隐藏倒计时和取消按钮 + tvStartCountdown.setVisibility(View.GONE); + tvStartCancel.setVisibility(View.GONE); + // 重置滑动条 + unlockView.isSlide = true; + unlockView.resetProgress(); + }); + } + + // 开始5秒倒计时 + private void startCountdown() { + // 显示倒计时和取消按钮 + tvStartCountdown.setVisibility(View.VISIBLE); + tvStartCancel.setVisibility(View.VISIBLE); + tvStartCountdown.setText("执行倒计时 5"); + + // 创建倒计时器 + countDownTimer = new CountDownTimer(3000, 1000) { + @Override + public void onTick(long millisUntilFinished) { + int seconds = (int) (millisUntilFinished / 1000); + tvStartCountdown.setText("执行倒计时 " + seconds); + } + + @Override + public void onFinish() { + // 倒计时结束,执行任务 + if (dialog != null && dialog.isShowing()) { + dialog.dismiss(); + } + MyTool.hideBottomNavigationBar(context); + flyVoid.requestMissionStart(0, 0); + Toast.makeText(context, "开始执行航线", Toast.LENGTH_SHORT).show(); + + // 隐藏倒计时和取消按钮 + tvStartCountdown.setVisibility(View.GONE); + tvStartCancel.setVisibility(View.GONE); + } + }.start(); + } + + // 取消倒计时 + private void cancelCountdown() { + if (countDownTimer != null) { + countDownTimer.cancel(); + countDownTimer = null; + } } private void initSpinners() { diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java index e00dbef..dea08f1 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java @@ -35,19 +35,15 @@ public class AllView { public TextView tv_power; public TextView tv_connect; public ImageView iv_error; - public LinearLayout ll_line_fly_layout; public LinearLayout ll_pitch; public CircularLinearLayout cll_layout; public ImageView iv_yaw; public View v_welkin; public TextView tv_yaw; public View v_mainDisplay; - public ImageView iv_location_me; -// public ImageView iv_line_fly; public LinearLayout ll_turn_back; public LinearLayout ll_lift_off; public LinearLayout ll_icon_land; - public LinearLayout ll_mode_select; public RecyclerView rv_error_list; public LinearLayout ll_left_error_layout; public LinearLayout ll_setting; @@ -56,16 +52,11 @@ public class AllView { public LinearLayout ll_left_open; public LinearLayout ll_function_layout; public LinearLayout ll_clear; - public LinearLayout ll_antenna; public LinearLayout ll_map; - public LinearLayout ll_one_word; public LinearLayout ll_execute_line; - public LinearLayout ll_joystick; - public LinearLayout ll_fire; public LinearLayout ll_bombing; public LinearLayout ll_shout; public LinearLayout ll_searchlight; - public LinearLayout ll_thoroughfare; public LinearLayout ll_hook; public ImageView iv_ptz_top; public ImageView iv_ptz_left; @@ -83,8 +74,8 @@ public class AllView { public LinearLayout ll_text; public LinearLayout ll_link; public LinearLayout ll_link_save; - public LinearLayout ll_link_fun1; - public LinearLayout ll_link_fun2; + public TextView tv_link_fun1; + public TextView tv_link_fun2; public LinearLayout ll_link_back; public LinearLayout ll_create_link_layout; public RecyclerView rv_create_link_list; @@ -94,9 +85,19 @@ public class AllView { public LinearLayout ll_link_start_fun1; public LinearLayout ll_link_start_fun2; public LinearLayout ll_link_start_back; + public TextView tv_add_link; + public LinearLayout ll_assistance_layout; + public EditText et_link_name; + public LinearLayout ll_location_me; + public EditText et_link_search; + public TextView tv_test1; + public ImageView iv_open_link_list; + public LinearLayout ll_clear_fly_line; + public LinearLayout ll_create_link_item_layout; - public SlideToUnlockView unlockView; - public RelativeLayout rl_unlock; + +// public SlideToUnlockView unlockView; +// public RelativeLayout rl_unlock; public EditText et_start_execute_height; @@ -119,18 +120,15 @@ public class AllView { tv_power = activity.findViewById(R.id.tv_power); tv_connect = activity.findViewById(R.id.tv_connect); iv_error = activity.findViewById(R.id.iv_error); - ll_line_fly_layout = activity.findViewById(R.id.ll_line_fly_layout); ll_pitch = activity.findViewById(R.id.ll_pitch); cll_layout = activity.findViewById(R.id.cll_layout); iv_yaw = activity.findViewById(R.id.iv_yaw); v_welkin = activity.findViewById(R.id.v_welkin); tv_yaw = activity.findViewById(R.id.tv_yaw); v_mainDisplay = activity.findViewById(R.id.v_mainDisplay); - iv_location_me = activity.findViewById(R.id.iv_location_me); ll_turn_back = activity.findViewById(R.id.ll_turn_back); ll_lift_off = activity.findViewById(R.id.ll_lift_off); ll_icon_land = activity.findViewById(R.id.ll_icon_land); - ll_mode_select = activity.findViewById(R.id.ll_mode_select); rv_error_list = activity.findViewById(R.id.rv_error_list); ll_left_error_layout = activity.findViewById(R.id.ll_left_error_layout); ll_setting = activity.findViewById(R.id.ll_setting); @@ -139,16 +137,11 @@ public class AllView { ll_left_open = activity.findViewById(R.id.ll_left_open); ll_function_layout = activity.findViewById(R.id.ll_function_layout); ll_clear = activity.findViewById(R.id.ll_clear); - ll_antenna = activity.findViewById(R.id.ll_antenna); ll_map = activity.findViewById(R.id.ll_map); - ll_one_word = activity.findViewById(R.id.ll_one_word); ll_execute_line = activity.findViewById(R.id.ll_execute_line); - ll_joystick = activity.findViewById(R.id.ll_joystick); - ll_fire = activity.findViewById(R.id.ll_fire); ll_bombing = activity.findViewById(R.id.ll_bombing); ll_shout = activity.findViewById(R.id.ll_shout); ll_searchlight = activity.findViewById(R.id.ll_searchlight); - ll_thoroughfare = activity.findViewById(R.id.ll_thoroughfare); ll_hook = activity.findViewById(R.id.ll_hook); iv_ptz_top = activity.findViewById(R.id.iv_ptz_top); iv_ptz_left = activity.findViewById(R.id.iv_ptz_left); @@ -166,8 +159,8 @@ public class AllView { ll_text= activity.findViewById(R.id.ll_text); ll_link = activity.findViewById(R.id.ll_link); ll_link_save = activity.findViewById(R.id.ll_link_save); - ll_link_fun1 = activity.findViewById(R.id.ll_link_fun1); - ll_link_fun2 = activity.findViewById(R.id.ll_link_fun2); + tv_link_fun1 = activity.findViewById(R.id.tv_link_fun1); + tv_link_fun2 = activity.findViewById(R.id.tv_link_fun2); ll_link_back = activity.findViewById(R.id.ll_link_back); ll_create_link_layout = activity.findViewById(R.id.ll_create_link_layout); rv_create_link_list = activity.findViewById(R.id.rv_create_link_list); @@ -177,9 +170,18 @@ public class AllView { ll_link_start_fun1 = activity.findViewById(R.id.ll_link_start_fun1); ll_link_start_fun2 = activity.findViewById(R.id.ll_link_start_fun2); ll_link_start_back = activity.findViewById(R.id.ll_link_start_back); - unlockView = activity.findViewById(R.id.unlockView); - rl_unlock = activity.findViewById(R.id.rl_unlock); +// unlockView = activity.findViewById(R.id.unlockView); +// rl_unlock = activity.findViewById(R.id.rl_unlock); + ll_location_me = activity.findViewById(R.id.ll_location_me); et_start_execute_height = activity.findViewById(R.id.et_start_execute_height); + tv_add_link = activity.findViewById(R.id.tv_add_link); + ll_assistance_layout = activity.findViewById(R.id.ll_assistance_layout); + et_link_name = activity.findViewById(R.id.et_link_name); + et_link_search = activity.findViewById(R.id.et_link_search); + tv_test1 = activity.findViewById(R.id.tv_test1); + ll_clear_fly_line = activity.findViewById(R.id.ll_clear_fly_line); + ll_create_link_item_layout = activity.findViewById(R.id.ll_create_link_item_layout); + iv_open_link_list = activity.findViewById(R.id.iv_open_link_list); } } diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java index 5bcf2c0..4a873ac 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java @@ -80,10 +80,10 @@ public class FlyVoid { isParamUpdateComplete = isComplete; } - public void setAttitude(Context content, AllView allView, double roll, double pitch, double yaw) { + public void setAttitude(Context content, AllView allView, double roll, double pitch, int yaw) { //设置偏航 // allView.iv_yaw.setRotation((int) Math.round(yaw * 57.2)); - allView.iv_yaw.setRotation((int) Math.toDegrees(yaw * -1)); + allView.iv_yaw.setRotation((yaw + 360) * -1); //设置翻滚 allView.cll_layout.setPivotX((float) allView.cll_layout.getWidth() / 2); @@ -375,7 +375,7 @@ public class FlyVoid { // 创建 ProgressDialog android.app.ProgressDialog progressDialog = new android.app.ProgressDialog(context); - progressDialog.setTitle("任务执行中"); + progressDialog.setTitle("任务上传中"); progressDialog.setMessage("正在发送航线到飞控..."); progressDialog.setProgressStyle(android.app.ProgressDialog.STYLE_HORIZONTAL); progressDialog.setCancelable(false); // 设置不可手动关闭 @@ -419,7 +419,7 @@ public class FlyVoid { sentWaypoints = seq + 1; // 更新发送进度 - final int progress = (int) ((sentWaypoints / (float) totalWaypoints) * 50); // 发送占50%进度 + final int progress = (int) ((sentWaypoints / (float) totalWaypoints) * 92); // 发送占50%进度 context.runOnUiThread(() -> { progressDialog.setProgress(progress); }); @@ -455,8 +455,7 @@ public class FlyVoid { progressDialog.dismiss(); if (verifyResult) { - Toast.makeText(context, "航线已发送到飞控并校验通过", Toast.LENGTH_SHORT).show(); - startExecuteDialog.show(); + Toast.makeText(context, "航线上传成功", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, "航线发送完成但校验失败", Toast.LENGTH_SHORT).show(); } @@ -475,6 +474,60 @@ public class FlyVoid { } + /** + * 方法:整理收到的点位,并且转换成mavlink可以识别的格式 + * + * @cuijingzhou + * */ + private void creatDataList (ArrayList createLinkList, String height) { + ArrayList dataList = new ArrayList<>(); + //home点,默认第一个为home点 + msg_mission_item_int waypoint = new msg_mission_item_int(); + waypoint.target_system = 1; // 无人机系统ID + waypoint.target_component = 1; // 无人机组件ID + waypoint.seq = 0; // 航点序号 + waypoint.frame = MAV_FRAME.MAV_FRAME_GLOBAL_RELATIVE_ALT; // 坐标系 + waypoint.command = MAV_CMD.MAV_CMD_NAV_WAYPOINT; // 航点指令 + waypoint.current = 1 ; // 第一个航点设为当前航点 + waypoint.autocontinue = 1; // 自动继续到下一个航点 + waypoint.param1 = 0; // 停留时间(秒) + waypoint.param2 = 0; // 接受半径(m) + waypoint.param3 = 0; // 通过半径(m) + waypoint.param4 = 0; // 航向角 + waypoint.x = 0; + waypoint.y = 0; + waypoint.z = 0; // 高度(相对) + dataList.add(waypoint); + //起飞,将飞机拉起来 + msg_mission_item_int waypoint1 = new msg_mission_item_int(); + waypoint1.target_system = 1; // 无人机系统ID + waypoint1.target_component = 1; // 无人机组件ID + waypoint1.seq = 1; // 航点序号 + waypoint1.frame = MAV_FRAME.MAV_FRAME_GLOBAL_RELATIVE_ALT; // 坐标系 + waypoint1.command = MAV_CMD.MAV_CMD_NAV_TAKEOFF; // 航点指令 + waypoint1.current = 0; // 第一个航点设为当前航点 + waypoint1.autocontinue = 1; // 自动继续到下一个航点 + waypoint1.param1 = 0; // 停留时间(秒) + waypoint1.param2 = 0; // 接受半径(m) + waypoint1.param3 = 0; // 通过半径(m) + waypoint1.param4 = 0; // 航向角 + waypoint1.x = 0; + waypoint1.y = 0; + waypoint1.z = Float.parseFloat(height); // 高度(相对) + waypoint1.mission_type = MAV_MISSION_TYPE.MAV_MISSION_TYPE_MISSION; + +// //添加航点 +// for (int i = 0; i < createLinkList.size(); i++) { +// if (){ +// +// } +// } + + + } + + + /** * 方法:给飞控发送点位 * @@ -763,6 +816,4 @@ public class FlyVoid { } - - } diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java index 42ba12b..50152d4 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java @@ -8,6 +8,8 @@ import android.graphics.Paint; import android.graphics.Rect; import android.location.Location; import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; import android.util.Log; import android.view.View; import android.widget.TextView; @@ -118,6 +120,115 @@ public class MapVoid { + // 在成员变量部分添加 + public List flightTrackPoints = new ArrayList<>(); // 飞行轨迹点 + public Polyline flightTrackPolyline = null; // 飞行轨迹线 + public Handler flightTrackHandler = new Handler(Looper.getMainLooper()); // 轨迹更新Handler + public Runnable flightTrackRunnable; // 轨迹更新任务 + public boolean isTracking = false; // 是否正在追踪 + /** + * 开始飞行轨迹跟踪 + */ + public void startFlightTracking() { + if (isTracking) return; + + isTracking = true; + flightTrackPoints.clear(); + + flightTrackRunnable = new Runnable() { + @Override + public void run() { + try { + if (isTracking) { + // 获取当前飞机位置 + double lat = MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000; + double lon = MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000; + + // 检查坐标有效性 + if (lat != 0 && lon != 0) { + // 转换坐标 + double[] convertedCoords = CoordinateConverter.wgs84ToGcj02(lon, lat); + if (convertedCoords != null && convertedCoords.length >= 2) { + LatLng currentPos = new LatLng(convertedCoords[1], convertedCoords[0]); + + // 添加到轨迹点列表 + flightTrackPoints.add(currentPos); + + // 更新轨迹线 + updateFlightTrack(); + } + } + // 0.3秒后再次执行 + flightTrackHandler.postDelayed(this, 600); + } + } catch (Exception e) { +// e.printStackTrace(); + Log.d(TAG, "error: "+e); + // 2秒后再次执行 + flightTrackHandler.postDelayed(this, 600); + } + + } + }; + + // 立即开始第一次执行 + flightTrackHandler.post(flightTrackRunnable); + } + + /** + * 停止飞行轨迹跟踪 + */ + public void stopFlightTracking() { + isTracking = false; + if (flightTrackRunnable != null) { + flightTrackHandler.removeCallbacks(flightTrackRunnable); + } + } + + /** + * 更新飞行轨迹线 + */ + public void updateFlightTrack() { + // 移除旧的轨迹线 + if (flightTrackPolyline != null) { + flightTrackPolyline.remove(); + } + + // 控制轨迹点数量不超过20个 + if (flightTrackPoints.size() > 2048) { + flightTrackPoints.remove(0); // 删除最后一个点 + } + + List sparsePoints = new ArrayList<>(); + // 每5个点取1个点,减少点密度 + for (int i = 0; i < flightTrackPoints.size(); i += 5) { + sparsePoints.add(flightTrackPoints.get(i)); + } + + flightTrackPolyline = allView.map.getMap().addPolyline(new PolylineOptions() + .addAll(sparsePoints) + .width(12) + .color(Color.RED) + .setDottedLine(true) + .setDottedLineType(PolylineOptions.DOTTEDLINE_TYPE_CIRCLE)); + + } + + /** + * 清除飞行轨迹 + */ + public void clearFlightTrack() { + stopFlightTracking(); + + // 移除轨迹线 + if (flightTrackPolyline != null) { + flightTrackPolyline.remove(); + flightTrackPolyline = null; + } + + // 清空轨迹点 + flightTrackPoints.clear(); + } diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java index 483b97c..53c3c49 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java @@ -20,8 +20,10 @@ public class MyReceiver extends BroadcastReceiver { public static JSONObject PARAM_VALUE_json = null;//飞机基础飞行模式 public static JSONObject RC_CHANNELS_json = null;//RC通道监控 public static JSONObject VFR_HUD_json = null;//油门量 - public static JSONObject MISSION_REQUEST_json = null;//路线上传报错回调 + public static JSONObject MISSION_REQUEST_json = null;//航线上传报错回调 public static JSONObject MISSION_ACK_json = null;//路线上传穿插回调 + public static JSONObject MISSION_CURRENT_json = null;//路线上传穿插回调 + //ATTITUDE @@ -93,7 +95,10 @@ public class MyReceiver extends BroadcastReceiver { } private OnMissionAckListener MissionAcklistener; - + public interface OnMissionCurrentListener { + void onMissionCurrent(JSONObject data); + } + private OnMissionCurrentListener MissionCurrentlistener; public void setATTITUDEListener(OnATTITUDEListener listener) { @@ -136,7 +141,9 @@ public class MyReceiver extends BroadcastReceiver { public void setMissionAcklistener(OnMissionAckListener listener) { this.MissionAcklistener = listener; } - + public void setMissionCurrentlistener(OnMissionCurrentListener listener) { + this.MissionCurrentlistener = listener; + } @Override public void onReceive(Context context, Intent intent) { @@ -360,5 +367,25 @@ public class MyReceiver extends BroadcastReceiver { Log.e("cuijingzhou-e Broadcast_MISSION_ACK", e.toString()); } } + + if ("Broadcast_MISSION_CURRENT".equals(intent.getAction())) { + try { + String receivedData = intent.getStringExtra("data"); + if (receivedData != null) { + MISSION_CURRENT_json = new JSONObject(receivedData); + MISSION_CURRENT_json.optString("jsonObject"); +// Log.d("cuijingzhou", "onReceive: " + receivedData); + // 触发回调 + if (MissionCurrentlistener != null) { + MissionCurrentlistener.onMissionCurrent(MISSION_CURRENT_json); + } + } + + } catch (Exception e) { + Log.e("cuijingzhou-e Broadcast_MISSION_CURRENT", e.toString()); + } + } + + } } \ No newline at end of file diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/SQLClass.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/SQLClass.java index a3d0968..fbee95f 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Main/Void/SQLClass.java +++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/SQLClass.java @@ -22,7 +22,7 @@ import java.util.List; * // 添加一个CreateLink列表 * ArrayList createLinkList = new ArrayList<>(); * // ... 添加CreateLink对象到列表中 - * boolean success = sqlClass.addCreateLinkList("路线1", createLinkList); + * boolean success = sqlClass.addCreateLinkList("航线1", createLinkList); * * // 获取所有列表信息 * List listInfos = sqlClass.getAllLinkListInfo(); @@ -31,7 +31,7 @@ import java.util.List; * ArrayList retrievedList = sqlClass.getCreateLinkList(1); * * // 更新列表 - * sqlClass.updateCreateLinkList(1, "新路线名称", updatedCreateLinkList); + * sqlClass.updateCreateLinkList(1, "新航线名称", updatedCreateLinkList); * * // 删除列表 * sqlClass.deleteCreateLinkList(1); @@ -65,6 +65,10 @@ public class SQLClass extends SQLiteOpenHelper { private static final String COLUMN_WAYPOINT_INDEX = "waypoint_index"; private static final String COLUMN_LATITUDE = "latitude"; private static final String COLUMN_LONGITUDE = "longitude"; + private static final String COLUMN_BOM1_SELECT = "bom1_select"; + private static final String COLUMN_BOM2_SELECT = "bom2_select"; + + private static final String COLUMN_ITEM_ORDER = "item_order"; // 项在列表中的顺序 // 创建主表的SQL语句 @@ -120,8 +124,8 @@ public class SQLClass extends SQLiteOpenHelper { */ public boolean addCreateLinkList(String listName, ArrayList createLinkList) { // 检查是否已达到最大数量限制 - if (getLinkListCount() >= 10) { - Log.w(TAG, "已达到最大存储数量限制(10个列表),无法添加新列表"); + if (getLinkListCount() >= 10000) { + Log.w(TAG, "已达到最大存储数量限制(10000个列表),无法添加新列表"); return false; } @@ -235,6 +239,8 @@ public class SQLClass extends SQLiteOpenHelper { int waypointIndex = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_WAYPOINT_INDEX)); double latitude = cursor.getDouble(cursor.getColumnIndexOrThrow(COLUMN_LATITUDE)); double longitude = cursor.getDouble(cursor.getColumnIndexOrThrow(COLUMN_LONGITUDE)); +// boolean bom1_select = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_BOM1_SELECT)) == 1; +// boolean bom2_select = cursor.getInt(cursor.getColumnIndexOrThrow(COLUMN_BOM2_SELECT)) == 1; LatLng latLng = new LatLng(latitude, longitude); CreateLink createLink = new CreateLink(name, height, speed, waypointIndex, latLng); @@ -419,6 +425,14 @@ public class SQLClass extends SQLiteOpenHelper { private int listId; private String listName; private long createdTime; + private boolean isSelect; + + public LinkListInfo(int listId, String listName, long createdTime, boolean isSelect) { + this.listId = listId; + this.listName = listName; + this.createdTime = createdTime; + this.isSelect = isSelect; + } public LinkListInfo(int listId, String listName, long createdTime) { this.listId = listId; @@ -430,12 +444,32 @@ public class SQLClass extends SQLiteOpenHelper { return listId; } + public void setListId(int listId) { + this.listId = listId; + } + public String getListName() { return listName; } + public void setListName(String listName) { + this.listName = listName; + } + public long getCreatedTime() { return createdTime; } + + public void setCreatedTime(long createdTime) { + this.createdTime = createdTime; + } + + public boolean isSelect() { + return isSelect; + } + + public void setSelect(boolean select) { + isSelect = select; + } } } diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java b/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java index c3c2159..d6d366a 100644 --- a/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java +++ b/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java @@ -172,6 +172,18 @@ public class BroadcastUtil { intent.clone(); } + /** + * MAVLINK_MSG_ID_MISSION_CURRENT + * + * @param context 上下文 + * @param data 数据-json + */ + public static void Broadcast_MISSION_CURRENT(Context context, String data) { + Intent intent = new Intent("Broadcast_MISSION_CURRENT"); + intent.putExtra("data", data); + context.sendBroadcast(intent); + intent.clone(); + } } diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/Url.java b/app/src/main/java/com/example/longyi_groundstation/Util/Url.java new file mode 100644 index 0000000..7c49cb6 --- /dev/null +++ b/app/src/main/java/com/example/longyi_groundstation/Util/Url.java @@ -0,0 +1,18 @@ +package com.example.longyi_groundstation.Util; + +public class Url { + + public static String getBaseUrl() { + return "https://api.longyi-uav-cloud.com"; + } + + /** + * 方法:登录接口 + * + * @cuijingzhou + */ + public static String LoginUrl() { + return getBaseUrl() + "/admin-api/system/auth/login"; + } + +} diff --git a/app/src/main/res/drawable/custom_seekbar_progress.xml b/app/src/main/res/drawable/custom_seekbar_progress.xml new file mode 100644 index 0000000..2d79d89 --- /dev/null +++ b/app/src/main/res/drawable/custom_seekbar_progress.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/custom_seekbar_thumb.xml b/app/src/main/res/drawable/custom_seekbar_thumb.xml new file mode 100644 index 0000000..96f8971 --- /dev/null +++ b/app/src/main/res/drawable/custom_seekbar_thumb.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/drawable/ff60b964_4round_1stroke_bg.xml b/app/src/main/res/drawable/ff029a45_2round_1stroke_bg.xml similarity index 86% rename from app/src/main/res/drawable/ff60b964_4round_1stroke_bg.xml rename to app/src/main/res/drawable/ff029a45_2round_1stroke_bg.xml index 81dbea6..1653cb7 100644 --- a/app/src/main/res/drawable/ff60b964_4round_1stroke_bg.xml +++ b/app/src/main/res/drawable/ff029a45_2round_1stroke_bg.xml @@ -3,10 +3,10 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ff62a7f0_2round_1stroke_bg.xml b/app/src/main/res/drawable/ff029a45_4round_1stroke_bg.xml similarity index 86% rename from app/src/main/res/drawable/ff62a7f0_2round_1stroke_bg.xml rename to app/src/main/res/drawable/ff029a45_4round_1stroke_bg.xml index df44ab5..09097ab 100644 --- a/app/src/main/res/drawable/ff62a7f0_2round_1stroke_bg.xml +++ b/app/src/main/res/drawable/ff029a45_4round_1stroke_bg.xml @@ -3,10 +3,10 @@ + + - - \ No newline at end of file diff --git a/app/src/main/res/drawable/ff33b138_1round_1stroke.xml b/app/src/main/res/drawable/ff33b138_1round_1stroke.xml new file mode 100644 index 0000000..d60c5c0 --- /dev/null +++ b/app/src/main/res/drawable/ff33b138_1round_1stroke.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ffdd635a_4round_1stroke_bg.xml b/app/src/main/res/drawable/ffdf4b40_4round_1stroke_bg.xml similarity index 86% rename from app/src/main/res/drawable/ffdd635a_4round_1stroke_bg.xml rename to app/src/main/res/drawable/ffdf4b40_4round_1stroke_bg.xml index f974f40..40ea10f 100644 --- a/app/src/main/res/drawable/ffdd635a_4round_1stroke_bg.xml +++ b/app/src/main/res/drawable/ffdf4b40_4round_1stroke_bg.xml @@ -3,7 +3,7 @@ - + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ffffffff_4round_bg.xml b/app/src/main/res/drawable/ffffffff_4round_bg.xml index c288fbf..d5b53b6 100644 --- a/app/src/main/res/drawable/ffffffff_4round_bg.xml +++ b/app/src/main/res/drawable/ffffffff_4round_bg.xml @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/icon_fly.png b/app/src/main/res/drawable/icon_fly.png deleted file mode 100644 index 7af97cffcb5204ee05de9e7d7ab63ff53e598ad8..0000000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fbd1d --- /dev/null +++ b/app/src/main/res/drawable/x80000000_4round_1stroke_bg.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index dc278a9..6461afe 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -57,34 +57,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ca9d871..58ad39b 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -499,6 +499,7 @@ android:padding="5dp"> - - - - - - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:layout_height="match_parent" + android:layout_marginTop="3dp" /> @@ -1029,32 +1275,29 @@ + android:padding="5dp"> + android:src="@mipmap/icon_one_word" /> - @@ -1066,9 +1309,9 @@ + android:visibility="visible"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1282,32 +1384,6 @@ - - - - - - - - @@ -1318,37 +1394,11 @@ android:orientation="horizontal" android:visibility="visible"> - - - - - - - - - - - - - - - - - + + android:src="@mipmap/icon_shout" /> - + - - - - - - + @@ -1503,7 +1508,7 @@ - + @@ -1538,45 +1543,6 @@ - - - - - - - - - - - - - - + + android:orientation="horizontal" + android:padding="2dp"> + android:textSize="7sp" /> + android:textSize="9sp" /> @@ -1650,11 +1616,10 @@ android:layout_width="65dp" android:layout_height="28dp" android:layout_marginTop="4dp" - android:background="@drawable/ff60b964_4round_1stroke_bg" + android:background="@drawable/ff029a45_4round_1stroke_bg" android:gravity="center" android:orientation="horizontal"> - - + android:orientation="horizontal" + android:visibility="gone"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_play_back.xml b/app/src/main/res/layout/activity_play_back.xml index 5b762e7..5e6bd62 100644 --- a/app/src/main/res/layout/activity_play_back.xml +++ b/app/src/main/res/layout/activity_play_back.xml @@ -225,7 +225,7 @@ android:layout_weight="1" android:layout_margin="5dp" /> - + @@ -55,7 +55,7 @@ + + - - - - - - - - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/adapter_control_data_item.xml b/app/src/main/res/layout/adapter_control_data_item.xml index 66d8e8e..d7fda06 100644 --- a/app/src/main/res/layout/adapter_control_data_item.xml +++ b/app/src/main/res/layout/adapter_control_data_item.xml @@ -56,7 +56,7 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" - android:background="#62a7f0" /> + android:background="#029a45" /> - + + android:textSize="8sp" + android:text="1" + android:layout_width="20dp" + android:layout_height="match_parent"/> - + + + android:background="@drawable/ff33b138_1round_1stroke" + android:gravity="center" + android:text="1" + android:textSize="7sp" + android:id="@+id/et_speed" + android:layout_width="40dp" + android:layout_height="match_parent"/> - + + + + - + android:gravity="center" + android:background="@drawable/ff33b138_1round_1stroke" + android:layout_width="99.5dp" + android:layout_height="match_parent"> - - + android:text="删除" + android:layout_width="42dp" + android:layout_height="18dp"/> + android:text="展开" + android:layout_width="42dp" + android:layout_height="18dp"/> - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/adapter_secure_item.xml b/app/src/main/res/layout/adapter_secure_item.xml index 4868851..11d6fd5 100644 --- a/app/src/main/res/layout/adapter_secure_item.xml +++ b/app/src/main/res/layout/adapter_secure_item.xml @@ -33,7 +33,7 @@ android:layout_height="22dp" android:layout_marginLeft="5dp" android:layout_weight="1" - android:background="@drawable/ff62a7f0_2round_1stroke_bg" + android:background="@drawable/ff029a45_2round_1stroke_bg" android:orientation="vertical"> @@ -9,20 +9,22 @@ + diff --git a/app/src/main/res/layout/dialog_link_name.xml b/app/src/main/res/layout/dialog_link_name.xml new file mode 100644 index 0000000..43526e0 --- /dev/null +++ b/app/src/main/res/layout/dialog_link_name.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_point_fly.xml b/app/src/main/res/layout/dialog_point_fly.xml new file mode 100644 index 0000000..dc50d07 --- /dev/null +++ b/app/src/main/res/layout/dialog_point_fly.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/dialog_start_execute.xml b/app/src/main/res/layout/dialog_start_execute.xml index a17dbc2..682a56a 100644 --- a/app/src/main/res/layout/dialog_start_execute.xml +++ b/app/src/main/res/layout/dialog_start_execute.xml @@ -30,7 +30,7 @@ @@ -116,7 +116,7 @@ - + + + + + + @@ -11,7 +11,7 @@ android:textSize="10sp" android:layout_alignParentRight="true" android:layout_margin="6dp" - android:background="@drawable/ff62a7f0_2round_1stroke_bg" + android:background="@drawable/ff029a45_2round_1stroke_bg" android:textColor="#ffffff" android:id="@+id/tv_calibration" android:gravity="center" @@ -21,7 +21,7 @@ android:layout_height="wrap_content"/> @@ -32,7 +32,7 @@ android:layout_marginRight="20dp" android:gravity="center" android:textColor="#ffffff" - android:background="@drawable/ff62a7f0_2round_1stroke_bg" + android:background="@drawable/ff029a45_2round_1stroke_bg" android:textSize="10sp" android:text="恢复默认" android:paddingLeft="20dp" @@ -45,7 +45,7 @@ android:id="@+id/tv_save" android:gravity="center" android:textColor="#ffffff" - android:background="@drawable/ff60b964_4round_1stroke_bg" + android:background="@drawable/ff029a45_2round_1stroke_bg" android:textSize="10sp" android:text="保存" android:layout_width="42dp" @@ -80,7 +80,7 @@ android:text="-" android:textColor="#ffffff" android:textSize="10sp" - android:background="@drawable/ff62a7f0_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> - /> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:thumb="@drawable/custom_seekbar_thumb" /> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:thumb="@drawable/custom_seekbar_thumb" /> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:thumb="@drawable/custom_seekbar_thumb" /> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:thumb="@drawable/custom_seekbar_thumb" /> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> - + + + + + + - + android:layout_height="wrap_content"> - + + + + + + + + + android:layout_height="wrap_content"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_load.xml b/app/src/main/res/layout/fragment_load.xml index 6d0a106..b6473cf 100644 --- a/app/src/main/res/layout/fragment_load.xml +++ b/app/src/main/res/layout/fragment_load.xml @@ -4,7 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#ff112446" + android:background="#101010" android:orientation="vertical" tools:context=".Main.Setting.Fragment.LoadFragment"> @@ -33,7 +33,7 @@ android:textSize="10sp" android:id="@+id/tv_save" android:textColor="#ffffff" - android:background="@drawable/ff60b964_4round_1stroke_bg" + android:background="@drawable/ff029a45_4round_1stroke_bg" android:padding="5dp" android:gravity="center" android:text="保存" @@ -134,7 +134,7 @@ android:layout_height="22dp" android:layout_marginLeft="5dp" android:layout_weight="1" - android:background="@drawable/ff62a7f0_2round_1stroke_bg" + android:background="@drawable/ff029a45_2round_1stroke_bg" android:orientation="vertical"> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> @@ -44,7 +44,7 @@ android:id="@+id/tv_add" android:gravity="center" android:textColor="#ffffff" - android:background="@drawable/ff60b964_4round_1stroke_bg" + android:background="@drawable/ff029a45_4round_1stroke_bg" android:textSize="10sp" android:text="+ 增加" android:layout_width="42dp" @@ -56,7 +56,7 @@ android:layout_marginLeft="10dp" android:gravity="center" android:textColor="#ffffff" - android:background="@drawable/ffdd635a_4round_1stroke_bg" + android:background="@drawable/ffdf4b40_4round_1stroke_bg" android:textSize="10sp" android:text="- 删除" android:layout_width="42dp" diff --git a/app/src/main/res/layout/fragment_secure.xml b/app/src/main/res/layout/fragment_secure.xml index 394a39c..f0c6951 100644 --- a/app/src/main/res/layout/fragment_secure.xml +++ b/app/src/main/res/layout/fragment_secure.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:padding="6dp" - android:background="#112446" + android:background="#101010" tools:context=".Main.Setting.Fragment.SecureFragment"> @@ -26,7 +26,7 @@ android:layout_height="1.5dp"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> + android:background="@drawable/ff029a45_2round_1stroke_bg"/> diff --git a/app/src/main/res/mipmap-xhdpi/icon_expand.png b/app/src/main/res/mipmap-xhdpi/icon_expand.png new file mode 100644 index 0000000000000000000000000000000000000000..ec163b3a1575689d884a32ce4eaa8f6632c53dd2 GIT binary patch literal 1104 zcmV-W1h4yvP){kcvuv{kZc}a0}fKpf+q{EcP^|O zQGjj8L_cl`;lm_2YVVu_o^`e@O_+QUvQ%(|7aRbbb1aarJR5{#sTdfR zwWFcf$EyUvQ6=Zxt9)xC&6ek!qeH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S?&;SO_1FZ8QkcU@7a7eYpe_~C!hAT>sK+Eqlr4T}^Wgm5DHpwOVTva<5e+*s+! zk$iZta;>f22pJ(ts9Xeaz8^stGBPr_!hM?`e&~X*AVdvNEPa8Tu~2HC9OLToRAJa> xk$2%Y3qwr_%z;!YbA%H~==7EAsR+SW{6A0kBHsKbh?M{U002ovPDHLkV1m>vLTms4 diff --git a/app/src/main/res/mipmap-xhdpi/icon_marker.png b/app/src/main/res/mipmap-xhdpi/icon_marker.png index 68a74267ff99c14c4c7f4ac84d7df0477751f4df..5ce856f1c12b77209c8d86dc6f8098e377a49c1c 100644 GIT binary patch delta 1105 zcmV-X1g`st3*`uqBYy-MNkl08i-Z7E-T=Cs&rt0AeUV7O#(3W7 z2LNwpljgk3JAr_=NY}Ji<6Z#p_<412k(XStS3OVzK;BEy8(v?F^j<_kqfb3h1E3=F zp5AF@rF|->0ATmuu~h8G+9*%~pjquc9oq3II1COaH-7+B{$cvOF6y>AcPXx16SSe^ zT4$PZ^U-D334qBI@Ve`A8gB3s=3Dd43HO!jARsgP>r*%zd-53f7;JTSkpjji}1pITlU04XB(u0={6*JyVF*jDX>hGdBlw%1R$E?rIl^z{#Fz{a&udE>m&XmSIP zRZMFh%V??vixL+)Z#`h*W$54cV$SQx0sx9o4@hzv z*S0R9e-B``IWfnw0f1b7XYlv|4JH< zz8|#a0)Q|jXU`8nyxVsFwdEB;UVbGK=R=ELcmIeV{{a91|Nn}whob-h00v1!K~w_( XM;m~;u;qoK00000NkvXXu0mjf{L%(D delta 1398 zcmV-+1&R9Q2#5=iBYy=wNkl@Uvk?v5XKiI4-%cE^;^g49V$Pznx4VR89Hho zo!%kN$cerh0B@9#IwKfnLF1e|gJdViy97}vm15wmmI%9UY8 zvR7o8B-nr7?}p|w!nR*U^;`?ub*;xLoxscD>v#tc(+Tj0Ei8}q0SH= zk^ndb5UffWI)B$LAYckLZf2R2^F50OK;sPpl&^!5&kbUO6|-UNiR~u}0Nvi)*!aO< zGeC%3Hv|Kq@tmUv1>VBhL8$Cgj4r_dY-C3<%7xS+gqpKMNF~Sy0jLpm*%9i!$pgA= zsAGt7K>$QdmPLpaIf#)LoIebi*ODcL>8J+4NDIQ4dVdnMgwb*|cir}R)&BL&^8?B* z^SZ6N6`!ZTppJ81aH+i-fF!K)Fv9jAlmRK@D()!hrg7zv*GthN73?gTFgo*s?4+J3uK%L~9-2?h`~TB1mu zd9RQtcu za}5`HR=~670Yr2d^~xw|Y3B8-raU&x1Gs8UcOyzsMboxAdf#b9Gp|Ja05GS&s-d}1 z%)gpuE@e#Ml3Wvy`~WVsP+VJVR4T;6L>P~-ybY@)-o=v_K+K|sae(^=k});5j@a|F zUw?fncmc#NYUl;IVu5QXeDp=5yBC1_j*o}~^a9HbRJyKj7-pV3<70llP-o8!z;68j zAQkf(pqg8W@fTL?f4pep(YaP<6#$JZq0b*4^aMf(iV5%9thux(ZPo(x;d0DEd!8^<4#R1SXLg43YTXm~;`)s=H^Qu$+%3}ST z`6d9)1|T?|%aMiDYTp3>0RR6AzMyLW000I_L_t&o0J%#YpEV2WmH+?%07*qoM6N<$ Eg6PGKoB#j- diff --git a/app/src/main/res/mipmap-xhdpi/icon_select_link_no.png b/app/src/main/res/mipmap-xhdpi/icon_select_link_no.png new file mode 100644 index 0000000000000000000000000000000000000000..ba78399956f5e90b0892ea29c110250d686daf97 GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEV3hTAaSW+od^5{etXYAFZDIMA z_AAaoZ!Y=%5WMFuF+VcV(@65wG5;HXm<~K+V&OT^aF(-x#Z0`x-m#CtJ)xLMrcsPB z$ZL6p%+lJg5(Vmky_f!dujaKo`9W%S<*Md&>Kw r^)oXA!~g%ER;Wz`h8G(spqLpH-iA(SSh@EbP=vwL)z4*}Q$iB}{|1t3 literal 0 HcmV?d00001 diff --git a/app/src/main/res/mipmap-xhdpi/icon_select_link_yes.png b/app/src/main/res/mipmap-xhdpi/icon_select_link_yes.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8504051681bc33a94617ccb5b762da6035c1a8 GIT binary patch literal 607 zcmV-l0-*hgP)sh$t>Oe}!9c-rjb+wb>bWLKkz1Q1I+VF(WZf4D53AWwG|UvJk=8x0A_FwE|)HYM`#w$5uu@_5KpCq1@QE9%Cr2|0h|C^6NFUav7`up zjkQ2XDLxJW%F+NKwRkEm>=K|1Wn6(kcX;K;p|11g_)U-T08j-r2=o?3D)E#%E&$3{ zgOE}@l@lKTW&MZXHX&|rDFrvu0HEp!LV$aF8oEoQ1JI?)fPED}K)9nAS{*QoX$n~6 z+EWY-;^`JHX;`mxKT?EAVK&0T?{)k`b^5kJcN2M@~^+@d989^Fg~fsgY;J zkxSVN!1?*}NV_AP00006Nkl