parent
fb0d12cd49
commit
0814bc4f89
50 changed files with 2109 additions and 1 deletions
@ -0,0 +1,491 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode; |
||||||
|
|
||||||
|
import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL; |
||||||
|
|
||||||
|
import android.app.Activity; |
||||||
|
import android.content.Intent; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.view.Menu; |
||||||
|
import android.view.MenuItem; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Button; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.annotation.Nullable; |
||||||
|
import androidx.appcompat.widget.Toolbar; |
||||||
|
import androidx.recyclerview.widget.DefaultItemAnimator; |
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager; |
||||||
|
import androidx.recyclerview.widget.RecyclerView; |
||||||
|
|
||||||
|
import com.bingce.device.Device; |
||||||
|
import com.bingce.device.enums.ConnectTypeEnum; |
||||||
|
import com.bingce.device.service.ntrip_sdk.CmccSdkService; |
||||||
|
import com.bingce.device.service.ntrip_sdk.LuoWangSdkService; |
||||||
|
import com.bingce.device.service.ntrip_sdk.NtripService; |
||||||
|
import com.bingce.device.service.ntrip_sdk.QxwzSdkService; |
||||||
|
import com.bingce.device.service.ntrip_sdk.SixentsSdkService; |
||||||
|
import com.bingce.device.ui.adapter.GnssConfigAdapter; |
||||||
|
import com.bingce.device.ui.utils.DeviceUtil; |
||||||
|
import com.bingce.rtk.command.RTK; |
||||||
|
import com.bingce.rtk.command.RtkCommand; |
||||||
|
import com.bingce.rtk.command.alpha.AlphaRTK; |
||||||
|
import com.bingce.rtk.command.comnav.ComNavRTK; |
||||||
|
import com.bingce.rtk.command.daspatial.DasMiniRTK; |
||||||
|
import com.bingce.rtk.command.devecent.DevecentRTK; |
||||||
|
import com.bingce.rtk.command.fjd.FJDRTK; |
||||||
|
import com.bingce.rtk.command.geo.GeoRTK; |
||||||
|
import com.bingce.rtk.command.geomax.GeoMaxRTK; |
||||||
|
import com.bingce.rtk.command.huace.HuaceRTK; |
||||||
|
import com.bingce.rtk.command.icegps.IceGpsRTK; |
||||||
|
import com.bingce.rtk.command.lianshi.LianshiRTK; |
||||||
|
import com.bingce.rtk.command.quanfang.QuanFangRTK; |
||||||
|
import com.bingce.rtk.command.qxlite.QxwzLiteRTK; |
||||||
|
import com.bingce.rtk.command.qxwz.QxwzRTK; |
||||||
|
import com.bingce.rtk.command.share.ShareRTK; |
||||||
|
import com.bingce.rtk.command.south.SouthRTK; |
||||||
|
import com.bingce.rtk.command.spectra.SpectraRTK; |
||||||
|
import com.bingce.rtk.command.tersus.TersusRTK; |
||||||
|
import com.bingce.rtk.command.xinyue.XinYueRTK; |
||||||
|
import com.bingce.rtk.command.zhd_new.ZhdNewRTK; |
||||||
|
import com.bingce.rtk.command.zhd_old.ZhdOldRTK; |
||||||
|
import com.bingce.rtk.config.GnssConfig; |
||||||
|
import com.bingce.rtk.config.GnssConfigManager; |
||||||
|
import com.bingce.rtk.enums.DataLinkModeEnum; |
||||||
|
import com.bingce.rtk.enums.WorkModeEnum; |
||||||
|
import com.bingce.rtk.event.RtkStartCmccServiceEvent; |
||||||
|
import com.bingce.rtk.event.RtkStartLuoWangServiceEvent; |
||||||
|
import com.bingce.rtk.event.RtkStartNtripServiceEvent; |
||||||
|
import com.bingce.rtk.event.RtkStartQxwzSdkServiceEvent; |
||||||
|
import com.bingce.rtk.event.RtkStartSixentsServiceEvent; |
||||||
|
import com.bingce.rtk.gnss.Gnss; |
||||||
|
import com.bingce.rtk.util.GnssUtil; |
||||||
|
import com.bingce.surveyor.agentweb.HelpWebActivity; |
||||||
|
import com.bingce.utils.Util; |
||||||
|
import com.project.survey.R; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.ComnavRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.DevecentRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.FJDRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.GeoRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.GeomaxRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.HuaceRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.IceGpsRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.LianshiRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.QxwzRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.SouthRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.SpectraRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.TersusRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.ZhdRtkBaseSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.ComnavRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.DevecentRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.FJDRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.GeoRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.GeomaxRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.HuaceRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.IceGpsRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.LianshiRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.QxwzLiteQuanFangRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.QxwzRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.SouthRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.SpectraRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.TersusRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.rover.ZhdRtkRoverSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.ComnavRtkStaticSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.FjdRtkStaticSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.GeoRtkStaticSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.HuaceRtkStaticSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.SouthRtkStaticSettingActivity; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.staticc.ZhdRtkStaticSettingActivity; |
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus; |
||||||
|
import org.polaric.colorful.ColorfulActivity; |
||||||
|
|
||||||
|
import blankj.utilcode.util.ServiceUtils; |
||||||
|
import blankj.utilcode.util.ToastUtils; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GnssConfigSetActivity extends ColorfulActivity implements GnssConfigAdapter.onSlidingViewClickListener { |
||||||
|
private Toolbar mToolbar; |
||||||
|
public RecyclerView recyclerView; |
||||||
|
public Button mBtnCreate; |
||||||
|
public Button mBtnApply; |
||||||
|
public Button mBtnStopStatic; |
||||||
|
GnssConfigAdapter adapter; |
||||||
|
private int apply_position; |
||||||
|
private WorkModeEnum sysMode; |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
setContentView(R.layout.activity_gnss_config_set); |
||||||
|
mToolbar = findViewById(R.id.toolbar); |
||||||
|
recyclerView = findViewById(R.id.recyclerView); |
||||||
|
mBtnCreate = findViewById(R.id.activity_gnss_config_set_create); |
||||||
|
mBtnApply = findViewById(R.id.activity_gnss_config_set_apply); |
||||||
|
mBtnStopStatic = findViewById(R.id.activity_gnss_config_set_stop_static); |
||||||
|
setSupportActionBar(mToolbar); |
||||||
|
if (getSupportActionBar() != null) |
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||||
|
|
||||||
|
int type = getIntent().getIntExtra("sysMode", 0); |
||||||
|
switch (type) { |
||||||
|
case 1: |
||||||
|
sysMode = WorkModeEnum.BASE; |
||||||
|
setTitle(getResources().getString(R.string.base_mode)); |
||||||
|
mBtnStopStatic.setVisibility(View.GONE); |
||||||
|
String current_base_config_id = Util.getStringPreference("current_base_config_id", ""); |
||||||
|
for (int i = 0; i < GnssConfigManager.getInstance().getBaseConfigList().size(); i++) { |
||||||
|
if (current_base_config_id.equals(GnssConfigManager.getInstance().getBaseConfigList().get(i).getId())) { |
||||||
|
apply_position = i; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
sysMode = WorkModeEnum.STATIC; |
||||||
|
setTitle(getResources().getString(R.string.static_mode)); |
||||||
|
mBtnStopStatic.setVisibility(View.VISIBLE); |
||||||
|
String current_static_config_id = Util.getStringPreference("current_static_config_id", ""); |
||||||
|
for (int i = 0; i < GnssConfigManager.getInstance().getStaticConfigList().size(); i++) { |
||||||
|
if (current_static_config_id.equals(GnssConfigManager.getInstance().getStaticConfigList().get(i).getId())) { |
||||||
|
apply_position = i; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
break; |
||||||
|
default: |
||||||
|
sysMode = WorkModeEnum.ROVER; |
||||||
|
setTitle(getResources().getString(R.string.rover_mode)); |
||||||
|
mBtnStopStatic.setVisibility(View.GONE); |
||||||
|
String current_rover_config_id = Util.getStringPreference("current_rover_config_id", ""); |
||||||
|
for (int i = 0; i < GnssConfigManager.getInstance().getRoverConfigList().size(); i++) { |
||||||
|
if (current_rover_config_id.equals(GnssConfigManager.getInstance().getRoverConfigList().get(i).getId())) { |
||||||
|
apply_position = i; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
mBtnCreate.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
switch (sysMode) { |
||||||
|
case ROVER: |
||||||
|
roverSetting(-1); |
||||||
|
break; |
||||||
|
case BASE: |
||||||
|
baseSetting(-1); |
||||||
|
break; |
||||||
|
case STATIC: |
||||||
|
staticSetting(-1); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
mBtnApply.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
if (!Device.getInstance().isDeviceConnected()) { |
||||||
|
ToastUtils.showShort(R.string.rtk_not_connected); |
||||||
|
return; |
||||||
|
} |
||||||
|
ServiceUtils.stopService(NtripService.class); |
||||||
|
ServiceUtils.stopService(QxwzSdkService.class); |
||||||
|
ServiceUtils.stopService(CmccSdkService.class); |
||||||
|
ServiceUtils.stopService(LuoWangSdkService.class); |
||||||
|
ServiceUtils.stopService(SixentsSdkService.class); |
||||||
|
GnssConfig gnssConfig; |
||||||
|
switch (sysMode) { |
||||||
|
case ROVER: |
||||||
|
if (apply_position >= 0 && apply_position < GnssConfigManager.getInstance().getRoverConfigList().size()) { |
||||||
|
gnssConfig = GnssConfigManager.getInstance().getRoverConfigList().get(apply_position); |
||||||
|
GnssUtil.config2Gnss(gnssConfig); |
||||||
|
Gnss.getInstance().save(); |
||||||
|
Util.putPreference("current_rover_config_id", gnssConfig.getId(), true); |
||||||
|
if (gnssConfig.getDevice().getCurDataLink() == DataLinkModeEnum.PHONE && !(RTK.getInstance() instanceof QxwzRTK)) { |
||||||
|
switch (gnssConfig.getNetwork().getMode()) { |
||||||
|
case NTRIP: |
||||||
|
case BASE_SN: |
||||||
|
EventBus.getDefault().post(new RtkStartNtripServiceEvent()); |
||||||
|
break; |
||||||
|
case QXWZ_SDK: |
||||||
|
EventBus.getDefault().post(new RtkStartQxwzSdkServiceEvent()); |
||||||
|
break; |
||||||
|
case SIXENTS_SDK: |
||||||
|
EventBus.getDefault().post(new RtkStartSixentsServiceEvent()); |
||||||
|
break; |
||||||
|
case CMCC_SDK: |
||||||
|
EventBus.getDefault().post(new RtkStartCmccServiceEvent()); |
||||||
|
break; |
||||||
|
case LUOWANG_SDK: |
||||||
|
EventBus.getDefault().post(new RtkStartLuoWangServiceEvent()); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
if (Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_SPP |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_BLE |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_QXBT) { |
||||||
|
Device.getInstance().rtkSendCommand(RtkCommand.getInstance().setRover(true)); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.please_choose_config_first); |
||||||
|
} |
||||||
|
break; |
||||||
|
case BASE: |
||||||
|
if (apply_position >= 0 && apply_position < GnssConfigManager.getInstance().getBaseConfigList().size()) { |
||||||
|
gnssConfig = GnssConfigManager.getInstance().getBaseConfigList().get(apply_position); |
||||||
|
GnssUtil.config2Gnss(gnssConfig); |
||||||
|
Gnss.getInstance().save(); |
||||||
|
Util.putPreference("current_base_config_id", gnssConfig.getId(), true); |
||||||
|
if (Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_SPP |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_BLE |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_QXBT) { |
||||||
|
Device.getInstance().rtkSendCommand(RtkCommand.getInstance().setBase()); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.please_choose_config_first); |
||||||
|
} |
||||||
|
break; |
||||||
|
case STATIC: |
||||||
|
if (apply_position >= 0 && apply_position < GnssConfigManager.getInstance().getStaticConfigList().size()) { |
||||||
|
gnssConfig = GnssConfigManager.getInstance().getStaticConfigList().get(apply_position); |
||||||
|
GnssUtil.config2Gnss(gnssConfig); |
||||||
|
Gnss.getInstance().save(); |
||||||
|
Util.putPreference("current_static_config_id", gnssConfig.getId(), true); |
||||||
|
if (Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_SPP |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_BLE |
||||||
|
|| Device.getInstance().connectType == ConnectTypeEnum.CONNECT_TYPE_QXBT) { |
||||||
|
Device.getInstance().rtkSendCommand(RtkCommand.getInstance().setStatic()); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.please_choose_config_first); |
||||||
|
} |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
mBtnStopStatic.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View view) { |
||||||
|
ToastUtils.showShort(R.string.stop_static); |
||||||
|
RTK.getInstance().sendStopStaticCmd(); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
if (adapter == null) { |
||||||
|
adapter = new GnssConfigAdapter(this, sysMode); |
||||||
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); |
||||||
|
linearLayoutManager.setOrientation(VERTICAL); |
||||||
|
recyclerView.setLayoutManager(linearLayoutManager); |
||||||
|
recyclerView.setAdapter(adapter); |
||||||
|
recyclerView.setItemAnimator(new DefaultItemAnimator()); |
||||||
|
} else { |
||||||
|
adapter.notifyDataSetChanged(); |
||||||
|
} |
||||||
|
adapter.setOnSlidListener(this); |
||||||
|
} |
||||||
|
|
||||||
|
private void baseSetting(int gnssConfigIndex) { |
||||||
|
if (Device.getInstance().isDeviceConnected() || DeviceUtil.isDebug()) { |
||||||
|
Intent intent = new Intent(); |
||||||
|
if (gnssConfigIndex >= 0) |
||||||
|
intent.putExtra("gnssConfigIndex", gnssConfigIndex); |
||||||
|
if (RTK.getInstance() instanceof GeoRTK |
||||||
|
|| RTK.getInstance() instanceof AlphaRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, GeoRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ZhdNewRTK |
||||||
|
|| RTK.getInstance() instanceof ZhdOldRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ZhdRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof HuaceRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, HuaceRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof SouthRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, SouthRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ComNavRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ComnavRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof GeoMaxRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, GeomaxRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof IceGpsRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, IceGpsRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof LianshiRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, LianshiRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof TersusRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, TersusRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof SpectraRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, SpectraRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof DevecentRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, DevecentRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof FJDRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, FJDRtkBaseSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof QxwzRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, QxwzRtkBaseSettingActivity.class); |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.current_rtk_type_not_support_this_action); |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
if (intent.getComponent() != null) { |
||||||
|
startActivityForResult(intent, 1); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.device_connect_lost); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void roverSetting(int gnssConfigIndex) { |
||||||
|
if (Device.getInstance().isDeviceConnected() || DeviceUtil.isDebug()) { |
||||||
|
Intent intent = new Intent(); |
||||||
|
if (gnssConfigIndex >= 0) |
||||||
|
intent.putExtra("gnssConfigIndex", gnssConfigIndex); |
||||||
|
|
||||||
|
if (RTK.getInstance() instanceof GeoRTK |
||||||
|
|| RTK.getInstance() instanceof AlphaRTK |
||||||
|
|| RTK.getInstance() instanceof ShareRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, GeoRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ZhdNewRTK |
||||||
|
|| RTK.getInstance() instanceof ZhdOldRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ZhdRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof HuaceRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, HuaceRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof SouthRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, SouthRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ComNavRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ComnavRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof GeoMaxRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, GeomaxRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof IceGpsRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, IceGpsRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof LianshiRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, LianshiRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof TersusRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, TersusRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof SpectraRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, SpectraRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof DevecentRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, DevecentRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof FJDRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, FJDRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof QxwzRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, QxwzRtkRoverSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof QxwzLiteRTK |
||||||
|
|| RTK.getInstance() instanceof QuanFangRTK |
||||||
|
|| RTK.getInstance() instanceof DasMiniRTK |
||||||
|
|| RTK.getInstance() instanceof XinYueRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, QxwzLiteQuanFangRtkRoverSettingActivity.class); |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.current_rtk_type_not_support_this_action); |
||||||
|
return; |
||||||
|
} |
||||||
|
if (intent.getComponent() != null) { |
||||||
|
startActivityForResult(intent, 0); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.device_connect_lost); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private void staticSetting(int gnssConfigIndex) { |
||||||
|
if (Device.getInstance().isDeviceConnected() || DeviceUtil.isDebug()) { |
||||||
|
Intent intent = new Intent(); |
||||||
|
if (gnssConfigIndex >= 0) |
||||||
|
intent.putExtra("gnssConfigIndex", gnssConfigIndex); |
||||||
|
|
||||||
|
if (RTK.getInstance() instanceof GeoRTK || RTK.getInstance() instanceof AlphaRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, GeoRtkStaticSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ZhdNewRTK |
||||||
|
|| RTK.getInstance() instanceof ZhdOldRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ZhdRtkStaticSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof HuaceRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, HuaceRtkStaticSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof SouthRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, SouthRtkStaticSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof ComNavRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, ComnavRtkStaticSettingActivity.class); |
||||||
|
} else if (RTK.getInstance() instanceof FJDRTK) { |
||||||
|
intent.setClass(GnssConfigSetActivity.this, FjdRtkStaticSettingActivity.class); |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.current_rtk_type_not_support_this_action); |
||||||
|
return; |
||||||
|
} |
||||||
|
if (intent.getComponent() != null) { |
||||||
|
startActivityForResult(intent, 2); |
||||||
|
} |
||||||
|
} else { |
||||||
|
ToastUtils.showShort(R.string.device_connect_lost); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onCreateOptionsMenu(Menu menu) { |
||||||
|
if (sysMode == WorkModeEnum.ROVER || sysMode == WorkModeEnum.BASE) { |
||||||
|
getMenuInflater().inflate(R.menu.menu_activity_rtk_station, menu); |
||||||
|
} |
||||||
|
return super.onCreateOptionsMenu(menu); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||||
|
switch (item.getItemId()) { |
||||||
|
case android.R.id.home: |
||||||
|
finish(); |
||||||
|
break; |
||||||
|
case R.id.menu_help: |
||||||
|
HelpWebActivity.navigation2RtkStationHelp(this, sysMode); |
||||||
|
break; |
||||||
|
} |
||||||
|
return super.onOptionsItemSelected(item); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onResume() { |
||||||
|
super.onResume(); |
||||||
|
if (adapter != null) { |
||||||
|
adapter.updateCurrentId(); |
||||||
|
adapter.notifyDataSetChanged(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onDestroy() { |
||||||
|
super.onDestroy(); |
||||||
|
EventBus.getDefault().unregister(this); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onItemClick(WorkModeEnum workMode, int position) { |
||||||
|
apply_position = position; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onDeleteBtnClick(WorkModeEnum workMode, int position) { |
||||||
|
adapter.removeData(position); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void onEditBtnClick(WorkModeEnum workMode, int position) { |
||||||
|
switch (workMode) { |
||||||
|
case ROVER: |
||||||
|
roverSetting(position); |
||||||
|
break; |
||||||
|
case BASE: |
||||||
|
baseSetting(position); |
||||||
|
break; |
||||||
|
case STATIC: |
||||||
|
staticSetting(position); |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { |
||||||
|
super.onActivityResult(requestCode, resultCode, data); |
||||||
|
if (resultCode == RESULT_OK && data != null) { |
||||||
|
boolean isReturnHome = data.getBooleanExtra("isReturnHome", false); |
||||||
|
if (isReturnHome) { |
||||||
|
Intent intent = new Intent(); |
||||||
|
intent.putExtra("isReturnHome", true); |
||||||
|
setResult(Activity.RESULT_OK, intent); |
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.adapter; |
||||||
|
|
||||||
|
import android.content.Context; |
||||||
|
import android.content.Intent; |
||||||
|
|
||||||
|
import com.bingce.coordlib.model.CoordinateSystem; |
||||||
|
import com.bingce.data.database.ProjectDb; |
||||||
|
import com.bingce.device.ui.adapter.AbstractMatchingPointRecyclerViewAdapter; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.base.RtkMatchingPointsActivity; |
||||||
|
|
||||||
|
public class MatchingPointRecyclerViewAdapter extends AbstractMatchingPointRecyclerViewAdapter { |
||||||
|
public MatchingPointRecyclerViewAdapter(Context context, CoordinateSystem coordinateSystem) { |
||||||
|
super(context, coordinateSystem); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void startRtkMatchingPointsActivity(Context context, int position) { |
||||||
|
Intent intent = new Intent(context, RtkMatchingPointsActivity.class); |
||||||
|
intent.putExtra("position", position); |
||||||
|
context.startActivity(intent); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void save(CoordinateSystem coordinateSystem) { |
||||||
|
ProjectDb.getInstance().updateCurrentCoordinator(coordinateSystem); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,109 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.annotation.SuppressLint; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.view.KeyEvent; |
||||||
|
import android.view.MenuItem; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Button; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.appcompat.widget.Toolbar; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
import com.bingce.device.ui.rtk.RtkBaseSettingFragment; |
||||||
|
import com.bingce.device.ui.utils.DeviceUtil; |
||||||
|
import com.bingce.rtk.command.RTK; |
||||||
|
import com.bingce.rtk.command.qxwz.QxwzRTK; |
||||||
|
import com.project.survey.R; |
||||||
|
|
||||||
|
import org.polaric.colorful.ColorfulActivity; |
||||||
|
|
||||||
|
|
||||||
|
@Keep |
||||||
|
public abstract class AbstractRtkBaseSettingActivity extends ColorfulActivity { |
||||||
|
protected Button mBtnSaveApply, mBtnSave; |
||||||
|
|
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity") |
||||||
|
@Override |
||||||
|
public void onCreate(Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
setContentView(R.layout.activity_rtk_base_setting); |
||||||
|
Toolbar mToolbar = findViewById(R.id.toolbar); |
||||||
|
setSupportActionBar(mToolbar); |
||||||
|
if (getSupportActionBar() != null) |
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||||
|
|
||||||
|
RtkBaseSettingFragment fragment = new RtkBaseSettingFragment(); |
||||||
|
setBasePositionClickListener(fragment); |
||||||
|
initUiSetting(fragment); |
||||||
|
|
||||||
|
getSupportFragmentManager() |
||||||
|
.beginTransaction() |
||||||
|
.add(R.id.activity_rtk_base_setting_fragment, fragment) |
||||||
|
.commit(); |
||||||
|
|
||||||
|
mBtnSave = findViewById(R.id.activity_base_setting_btn_save); |
||||||
|
mBtnSaveApply = findViewById(R.id.activity_base_setting_btn_save_apply); |
||||||
|
|
||||||
|
mBtnSave.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkBaseSettingFragment fragment = getBaseFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
mBtnSaveApply.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkBaseSettingFragment fragment = getBaseFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
fragment.apply(); |
||||||
|
if (RTK.getInstance() instanceof QxwzRTK) {//千寻的设备没有进度条对话框,所以直接返回上一界面
|
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
public RtkBaseSettingFragment getBaseFragment() { |
||||||
|
Fragment fragment = DeviceUtil.getCurrentFragment(this, R.id.activity_rtk_base_setting_fragment); |
||||||
|
if (fragment instanceof RtkBaseSettingFragment) { |
||||||
|
return (RtkBaseSettingFragment) fragment; |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||||
|
int itemId = item.getItemId(); |
||||||
|
if (itemId == android.R.id.home) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
return super.onOptionsItemSelected(item); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) { |
||||||
|
switch (keyCode) { |
||||||
|
case KeyEvent.KEYCODE_BACK: |
||||||
|
finish(); |
||||||
|
break; |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
protected abstract void setBasePositionClickListener(RtkBaseSettingFragment fragment); |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ComnavRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", true); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class DevecentRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class FJDRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", false); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GeoRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", true); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", true); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", true); |
||||||
|
bundle.putBoolean("supportEnablePPK", true); |
||||||
|
bundle.putBoolean("supportAutoConnect", true); |
||||||
|
bundle.putBoolean("supportPdopThreshold", true); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", true); |
||||||
|
bundle.putBoolean("supportGsmBand", true); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GeomaxRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class HuaceRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class IceGpsRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class LianshiRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class QxwzRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", false); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,89 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import com.bingce.coordlib.model.Blh; |
||||||
|
import com.bingce.coordlib.model.Coordinate; |
||||||
|
import com.bingce.coordlib.model.CoordinateSystem; |
||||||
|
import com.bingce.data.cache.CachedCurrentCoordinateSystem; |
||||||
|
import com.bingce.device.ui.dialog.DialogUtil; |
||||||
|
import com.bingce.device.ui.rtk.RtkBaseSettingFragment; |
||||||
|
import com.bingce.rtk.util.CoordTransUtil; |
||||||
|
import com.bingce.utils.ThreadPoolUtil; |
||||||
|
import com.project.survey.R; |
||||||
|
import com.project.survey.ui.instrument.setupstation.ControlPointsNewActivity; |
||||||
|
import com.project.survey.ui.instrument.setupstation.CoordinatePointsLibraryActivity; |
||||||
|
import com.project.survey.ui.instrument.setupstation.StakingNewJobActivity; |
||||||
|
import com.project.survey.util.CommonUtils; |
||||||
|
|
||||||
|
public class RtkBaseSettingActivity extends AbstractRtkBaseSettingActivity { |
||||||
|
@Override |
||||||
|
protected void setBasePositionClickListener(RtkBaseSettingFragment fragment) { |
||||||
|
fragment.setBasePositionClickListener(coordinateType -> { |
||||||
|
CommonUtils.hideSoftInput(); |
||||||
|
String[] arr = new String[]{RtkBaseSettingActivity.this.getString(R.string.road_control_point), RtkBaseSettingActivity.this.getString(R.string.global_control_point), RtkBaseSettingActivity.this.getString(R.string.point_survey_point_library), RtkBaseSettingActivity.this.getString(R.string.staking_point_library)}; |
||||||
|
ThreadPoolUtil.execute(new Runnable() { |
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
CoordinateSystem coordinateSystem = CachedCurrentCoordinateSystem.currentCoordinateSystem(); |
||||||
|
runOnUiThread(new Runnable() { |
||||||
|
@Override |
||||||
|
public void run() { |
||||||
|
DialogUtil.mMaterialItemsDialog(RtkBaseSettingActivity.this, R.string.data_source, arr, (dialog, itemView, position, text) -> { |
||||||
|
switch (position) { |
||||||
|
case 0: |
||||||
|
ControlPointsNewActivity.pickPoint(RtkBaseSettingActivity.this, false, (name, code, x, y, z, lat, lon, alt, remarks) -> { |
||||||
|
switch (coordinateType) { |
||||||
|
case GEODETIC: |
||||||
|
fragment.setBasePositionBlh(new Blh(lat, lon, alt)); |
||||||
|
break; |
||||||
|
case PROJECTION: |
||||||
|
fragment.setBasePositionCoordinate(new Coordinate(x, y, z)); |
||||||
|
break; |
||||||
|
} |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 1: |
||||||
|
ControlPointsNewActivity.pickPoint(RtkBaseSettingActivity.this, true, (name, code, x, y, z, lat, lon, alt, remarks) -> { |
||||||
|
switch (coordinateType) { |
||||||
|
case GEODETIC: |
||||||
|
fragment.setBasePositionBlh(new Blh(lat, lon, alt)); |
||||||
|
break; |
||||||
|
case PROJECTION: |
||||||
|
fragment.setBasePositionCoordinate(new Coordinate(x, y, z)); |
||||||
|
break; |
||||||
|
} |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
CoordinatePointsLibraryActivity.pickPoint(RtkBaseSettingActivity.this, (name, code, x, y, z, b, l, h) -> { |
||||||
|
switch (coordinateType) { |
||||||
|
case GEODETIC: |
||||||
|
fragment.setBasePositionBlh(new Blh(b, l, h)); |
||||||
|
break; |
||||||
|
case PROJECTION: |
||||||
|
fragment.setBasePositionCoordinate(new Coordinate(x, y, z)); |
||||||
|
break; |
||||||
|
} |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 3: |
||||||
|
StakingNewJobActivity.pickPoint(RtkBaseSettingActivity.this, (name, x, y, z) -> { |
||||||
|
switch (coordinateType) { |
||||||
|
case GEODETIC: |
||||||
|
Blh blh = CoordTransUtil.xyz2Wgs84Blh(x, y, z, coordinateSystem); |
||||||
|
fragment.setBasePositionBlh(blh == null ? new Blh() : blh); |
||||||
|
break; |
||||||
|
case PROJECTION: |
||||||
|
fragment.setBasePositionCoordinate(new Coordinate(x, y, z)); |
||||||
|
break; |
||||||
|
} |
||||||
|
}); |
||||||
|
break; |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,124 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import com.afollestad.materialdialogs.MaterialDialog; |
||||||
|
import com.bingce.coordlib.model.CoordinateSystem; |
||||||
|
import com.bingce.data.database.DBQueryConstant; |
||||||
|
import com.bingce.data.database.KeyValueDb; |
||||||
|
import com.bingce.data.database.ProjectDb; |
||||||
|
import com.bingce.data.surveyor.designdata.project.ProjectConstants; |
||||||
|
import com.bingce.data.surveyor.designdata.project.ProjectRecord; |
||||||
|
import com.bingce.device.ui.rtk.AbstractRtkMatchingPointsActivity; |
||||||
|
|
||||||
|
import com.bingce.utils.IOnSingleGetCallback; |
||||||
|
import com.bingce.utils.ThreadPoolUtil; |
||||||
|
import com.project.survey.App; |
||||||
|
import com.project.survey.R; |
||||||
|
import com.project.survey.ui.instrument.setupstation.BingCeBaseSurveyPresenter; |
||||||
|
import com.project.survey.ui.instrument.setupstation.ControlPointsNewActivity; |
||||||
|
import com.project.survey.ui.instrument.setupstation.CoordinatePointsLibraryActivity; |
||||||
|
import com.project.survey.ui.instrument.setupstation.StakingNewJobActivity; |
||||||
|
|
||||||
|
import blankj.utilcode.util.Utils; |
||||||
|
|
||||||
|
public class RtkMatchingPointsActivity extends AbstractRtkMatchingPointsActivity { |
||||||
|
@Override |
||||||
|
protected void hideSoftKey() { |
||||||
|
BingCeBaseSurveyPresenter.hideSoftKey(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void speak(String string) { |
||||||
|
BingCeBaseSurveyPresenter.speak(string); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void updateLastRTKLocation() { |
||||||
|
BingCeBaseSurveyPresenter.updateLastRTKLocation(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected boolean checkRegister() { |
||||||
|
return BingCeBaseSurveyPresenter.checkRegister(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected int volumeUpAction() { |
||||||
|
return BingCeBaseSurveyPresenter.volumeUpAction(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected int volumeDownAction() { |
||||||
|
return BingCeBaseSurveyPresenter.volumeDownAction(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void selectBLH() { |
||||||
|
new MaterialDialog.Builder(RtkMatchingPointsActivity.this) |
||||||
|
.title(R.string.data_source) |
||||||
|
.items(new String[]{getString(R.string.point_survey_point_library)}) |
||||||
|
.itemsCallback((dialog, itemView, which, text) -> { |
||||||
|
switch (which) { |
||||||
|
case 0: |
||||||
|
CoordinatePointsLibraryActivity.pickPoint(this, (name, code, x, y, z, b, l, h) -> { |
||||||
|
onPicked(b, l, h); |
||||||
|
}); |
||||||
|
break; |
||||||
|
} |
||||||
|
}).show(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void selectXYZ() { |
||||||
|
new MaterialDialog.Builder(RtkMatchingPointsActivity.this) |
||||||
|
.title(R.string.data_source) |
||||||
|
.items(new String[]{getString(R.string.road_control_point), getString(R.string.global_control_point), getString(R.string.point_survey_point_library), getString(R.string.staking_point_library)}) |
||||||
|
.itemsCallback((dialog, itemView, which, text) -> { |
||||||
|
switch (which) { |
||||||
|
case 0: |
||||||
|
ControlPointsNewActivity.pickPoint(this, false, (name, code, x, y, z, remarks) -> { |
||||||
|
onPicked(name, x, y, z); |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 1: |
||||||
|
ControlPointsNewActivity.pickPoint(this, true, (name, code, x, y, z, remarks) -> { |
||||||
|
onPicked(name, x, y, z); |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 2: |
||||||
|
CoordinatePointsLibraryActivity.pickPoint(this, (name, code, x, y, z, b, l, h) -> { |
||||||
|
onPicked(name, x, y, z); |
||||||
|
}); |
||||||
|
break; |
||||||
|
case 3: |
||||||
|
StakingNewJobActivity.pickPoint(this, (name, x, y, z) -> { |
||||||
|
onPicked(name, x, y, z); |
||||||
|
}); |
||||||
|
break; |
||||||
|
} |
||||||
|
}).show(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected boolean isThemeDark() { |
||||||
|
return ((App) Utils.getApp()).isThemeDark; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void save(CoordinateSystem coordinateSystem) { |
||||||
|
ProjectDb.getInstance().updateCurrentCoordinator(coordinateSystem); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void loadCurrentCoordinateSystem(IOnSingleGetCallback<CoordinateSystem> callback) { |
||||||
|
ThreadPoolUtil.execute(() -> { |
||||||
|
String currentProjectId = KeyValueDb.currentProjectId(); |
||||||
|
ProjectRecord projectRecord = ProjectDb.getInstance() |
||||||
|
.rawQueryData(DBQueryConstant.findById(ProjectConstants.DB_NAME, currentProjectId)); |
||||||
|
if (projectRecord != null) { |
||||||
|
runOnUiThread(() -> { |
||||||
|
callback.onGet(projectRecord.coordinateSystem); |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,80 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.content.Context; |
||||||
|
import android.content.Intent; |
||||||
|
import android.view.Menu; |
||||||
|
import android.view.MenuItem; |
||||||
|
|
||||||
|
import com.bingce.coordlib.model.CoordinateSystem; |
||||||
|
import com.bingce.data.database.DBQueryConstant; |
||||||
|
import com.bingce.data.database.KeyValueDb; |
||||||
|
import com.bingce.data.database.ProjectDb; |
||||||
|
import com.bingce.data.surveyor.designdata.project.ProjectConstants; |
||||||
|
import com.bingce.device.ui.adapter.AbstractMatchingPointRecyclerViewAdapter; |
||||||
|
import com.bingce.device.ui.rtk.AbstractRtkPointCorrectActivity; |
||||||
|
import com.bingce.surveyor.agentweb.HelpWebActivity; |
||||||
|
import com.bingce.ui.coordinatesystem.BingCeCoordinateSystemActivity; |
||||||
|
import com.bingce.utils.IOnSingleGetCallback; |
||||||
|
import com.bingce.utils.ThreadPoolUtil; |
||||||
|
import com.project.survey.R; |
||||||
|
import com.project.survey.ui.instrument.mobilestationmode.adapter.MatchingPointRecyclerViewAdapter; |
||||||
|
|
||||||
|
|
||||||
|
public class RtkPointCorrectActivity extends AbstractRtkPointCorrectActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void observeCurrentCoordinate(IOnSingleGetCallback<CoordinateSystem> callback) { |
||||||
|
ThreadPoolUtil.execute(() -> { |
||||||
|
String currentProjectId = KeyValueDb.currentProjectId(); |
||||||
|
runOnUiThread(() -> { |
||||||
|
ProjectDb.getInstance().rawQueryLiveData( |
||||||
|
DBQueryConstant.findById(ProjectConstants.DB_NAME, currentProjectId)) |
||||||
|
.observe(this, projectRecord -> { |
||||||
|
if (projectRecord == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
callback.onGet(projectRecord.coordinateSystem); |
||||||
|
}); |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected AbstractMatchingPointRecyclerViewAdapter newMatchingPointRecyclerViewAdapter(Context context, CoordinateSystem coordinateSystem) { |
||||||
|
return new MatchingPointRecyclerViewAdapter(context, coordinateSystem); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void startRtkMatchingPointsActivityForResult(int requestCode) { |
||||||
|
Intent intent = new Intent(RtkPointCorrectActivity.this, RtkMatchingPointsActivity.class); |
||||||
|
startActivityForResult(intent, requestCode); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void skip2ProjViewAndModifyCurrentCoordinateSystem() { |
||||||
|
BingCeCoordinateSystemActivity.skip2ProjViewAndModifyCurrentCoordinateSystem(this); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void save(CoordinateSystem coordinateSystem) { |
||||||
|
ProjectDb.getInstance().updateCurrentCoordinator(coordinateSystem); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onCreateOptionsMenu(Menu menu) { |
||||||
|
getMenuInflater().inflate(R.menu.menu_activity_rtk_point_correct, menu); |
||||||
|
return super.onCreateOptionsMenu(menu); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||||
|
if (android.R.id.home == item.getItemId()) { |
||||||
|
onBackPressed(); |
||||||
|
return true; |
||||||
|
} else if (R.id.menu_help == item.getItemId()) { |
||||||
|
HelpWebActivity.navigation2RtkPointCorrectHelp(this); |
||||||
|
return true; |
||||||
|
} |
||||||
|
return super.onOptionsItemSelected(item); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class SouthRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", true); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class SpectraRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class TersusRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.base; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ZhdRtkBaseSettingActivity extends RtkBaseSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportAutoStart", false); |
||||||
|
bundle.putBoolean("supportEnablePPK", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
bundle.putBoolean("supportExtRadioBaud", true); |
||||||
|
bundle.putBoolean("supportDelayStart", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ComnavRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", true); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class DevecentRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class FJDRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GeoRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", true); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", true); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", true); |
||||||
|
bundle.putBoolean("supportAutoConnect", true); |
||||||
|
bundle.putBoolean("supportPPK", true); |
||||||
|
bundle.putBoolean("supportApnSetting", true); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", true); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GeomaxRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class HuaceRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class IceGpsRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class LianshiRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class QxwzLiteQuanFangRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class QxwzRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", true); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", true); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,125 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.annotation.SuppressLint; |
||||||
|
import android.content.Intent; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.view.KeyEvent; |
||||||
|
import android.view.MenuItem; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Button; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.appcompat.widget.Toolbar; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
import com.bingce.device.ui.rtk.RtkRoverSettingFragment; |
||||||
|
import com.bingce.device.ui.utils.DeviceUtil; |
||||||
|
import com.bingce.rtk.command.RTK; |
||||||
|
import com.bingce.rtk.command.qxwz.QxwzRTK; |
||||||
|
import com.huawei.hms.hmsscankit.ScanUtil; |
||||||
|
import com.huawei.hms.ml.scan.HmsScan; |
||||||
|
import com.project.survey.R; |
||||||
|
|
||||||
|
import org.polaric.colorful.ColorfulActivity; |
||||||
|
|
||||||
|
|
||||||
|
@Keep |
||||||
|
public class RtkRoverSettingActivity extends ColorfulActivity { |
||||||
|
protected Button btn_save_apply, btn_save; |
||||||
|
|
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity") |
||||||
|
@Override |
||||||
|
public void onCreate(Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
setContentView(R.layout.activity_rtk_rover_setting); |
||||||
|
Toolbar mToolbar = findViewById(R.id.toolbar); |
||||||
|
setSupportActionBar(mToolbar); |
||||||
|
if (getSupportActionBar() != null) |
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||||
|
|
||||||
|
RtkRoverSettingFragment fragment = new RtkRoverSettingFragment(); |
||||||
|
initUiSetting(fragment); |
||||||
|
|
||||||
|
getSupportFragmentManager() |
||||||
|
.beginTransaction() |
||||||
|
.add(R.id.activity_rtk_rover_setting_fragment, fragment) |
||||||
|
.commit(); |
||||||
|
|
||||||
|
btn_save = findViewById(R.id.activity_rover_setting_btn_save); |
||||||
|
btn_save_apply = findViewById(R.id.activity_rover_setting_btn_save_apply); |
||||||
|
|
||||||
|
btn_save.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkRoverSettingFragment fragment = getRoverFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
btn_save_apply.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkRoverSettingFragment fragment = getRoverFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
fragment.apply(); |
||||||
|
if (RTK.getInstance() instanceof QxwzRTK) {//千寻没有进度条,所以直接返回上一界面
|
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) { |
||||||
|
super.onActivityResult(requestCode, resultCode, data); |
||||||
|
if (resultCode != RESULT_OK || data == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
if (requestCode == RtkRoverSettingFragment.REQUEST_CODE_SCAN_ONE) { |
||||||
|
HmsScan obj = data.getParcelableExtra(ScanUtil.RESULT); |
||||||
|
String result = obj.getOriginalValue(); |
||||||
|
RtkRoverSettingFragment fragment = getRoverFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
fragment.scanResult(result); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public RtkRoverSettingFragment getRoverFragment() { |
||||||
|
Fragment fragment = DeviceUtil.getCurrentFragment(this, R.id.activity_rtk_rover_setting_fragment); |
||||||
|
if (fragment instanceof RtkRoverSettingFragment) { |
||||||
|
return (RtkRoverSettingFragment) fragment; |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||||
|
int itemId = item.getItemId(); |
||||||
|
if (itemId == android.R.id.home) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
return super.onOptionsItemSelected(item); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) { |
||||||
|
switch (keyCode) { |
||||||
|
case KeyEvent.KEYCODE_BACK: |
||||||
|
finish(); |
||||||
|
break; |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class SouthRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
|
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class SpectraRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class TersusRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.rover; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ZhdRtkRoverSettingActivity extends RtkRoverSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportRadioFrequency", false); |
||||||
|
bundle.putBoolean("supportRadioInterval", false); |
||||||
|
bundle.putBoolean("supportRadioForeCorrect", false); |
||||||
|
bundle.putBoolean("supportRadioPowerMode", false); |
||||||
|
bundle.putBoolean("supportGGAUploadInterval", false); |
||||||
|
bundle.putBoolean("supportAutoConnect", false); |
||||||
|
bundle.putBoolean("supportPPK", false); |
||||||
|
bundle.putBoolean("supportApnSetting", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
bundle.putBoolean("supportGsmBand", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ComnavRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportPointName", true); |
||||||
|
bundle.putBoolean("supportEleMask", true); |
||||||
|
bundle.putBoolean("supportAutoRecord", true); |
||||||
|
bundle.putBoolean("supportFileInterval", false); |
||||||
|
bundle.putBoolean("supportSatelliteSystem", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class FjdRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportPointName", true); |
||||||
|
bundle.putBoolean("supportEleMask", true); |
||||||
|
bundle.putBoolean("supportAutoRecord", false); |
||||||
|
bundle.putBoolean("supportFileInterval", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class GeoRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class HuaceRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
} |
@ -0,0 +1,98 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import android.annotation.SuppressLint; |
||||||
|
import android.os.Bundle; |
||||||
|
import android.view.KeyEvent; |
||||||
|
import android.view.MenuItem; |
||||||
|
import android.view.View; |
||||||
|
import android.widget.Button; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.appcompat.widget.Toolbar; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
import com.bingce.device.ui.rtk.RtkStaticSettingFragment; |
||||||
|
import com.bingce.device.ui.utils.DeviceUtil; |
||||||
|
import com.project.survey.R; |
||||||
|
|
||||||
|
import org.polaric.colorful.ColorfulActivity; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class RtkStaticSettingActivity extends ColorfulActivity { |
||||||
|
protected Button btn_apply, btn_save; |
||||||
|
|
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@SuppressLint("SourceLockedOrientationActivity") |
||||||
|
@Override |
||||||
|
public void onCreate(Bundle savedInstanceState) { |
||||||
|
super.onCreate(savedInstanceState); |
||||||
|
setContentView(R.layout.activity_rtk_static_setting); |
||||||
|
Toolbar mToolbar = findViewById( R.id.toolbar); |
||||||
|
setSupportActionBar(mToolbar); |
||||||
|
if (getSupportActionBar() != null) |
||||||
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
||||||
|
|
||||||
|
RtkStaticSettingFragment fragment = new RtkStaticSettingFragment(); |
||||||
|
initUiSetting(fragment); |
||||||
|
|
||||||
|
getSupportFragmentManager() |
||||||
|
.beginTransaction() |
||||||
|
.add( R.id.activity_rtk_static_setting_fragment, fragment) |
||||||
|
.commit(); |
||||||
|
|
||||||
|
btn_save = findViewById(R.id.activity_static_setting_btn_save); |
||||||
|
btn_apply = findViewById(R.id.activity_static_setting_btn_save_apply); |
||||||
|
btn_save.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkStaticSettingFragment fragment = getStaticFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
btn_apply.setOnClickListener(new View.OnClickListener() { |
||||||
|
@Override |
||||||
|
public void onClick(View v) { |
||||||
|
RtkStaticSettingFragment fragment = getStaticFragment(); |
||||||
|
if (fragment != null) { |
||||||
|
if (fragment.saveSettings()) { |
||||||
|
fragment.apply(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
public RtkStaticSettingFragment getStaticFragment() { |
||||||
|
Fragment fragment = DeviceUtil.getCurrentFragment(this, R.id.activity_rtk_static_setting_fragment); |
||||||
|
if (fragment instanceof RtkStaticSettingFragment) { |
||||||
|
return (RtkStaticSettingFragment) fragment; |
||||||
|
} |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onOptionsItemSelected(MenuItem item) { |
||||||
|
int itemId = item.getItemId(); |
||||||
|
if (itemId == android.R.id.home) { |
||||||
|
finish(); |
||||||
|
} |
||||||
|
return super.onOptionsItemSelected(item); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) { |
||||||
|
switch (keyCode) { |
||||||
|
case KeyEvent.KEYCODE_BACK: |
||||||
|
finish(); |
||||||
|
break; |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class SouthRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
package com.project.survey.ui.instrument.mobilestationmode.staticc; |
||||||
|
|
||||||
|
import android.os.Bundle; |
||||||
|
|
||||||
|
import androidx.annotation.Keep; |
||||||
|
import androidx.fragment.app.Fragment; |
||||||
|
|
||||||
|
@Keep |
||||||
|
public class ZhdRtkStaticSettingActivity extends RtkStaticSettingActivity { |
||||||
|
@Override |
||||||
|
public void initUiSetting(Fragment fragment) { |
||||||
|
Bundle bundle = new Bundle(); |
||||||
|
bundle.putBoolean("supportPdopThreshold", false); |
||||||
|
bundle.putBoolean("supportPointName", false); |
||||||
|
bundle.putBoolean("supportEleMask", false); |
||||||
|
bundle.putBoolean("supportAutoRecord", false); |
||||||
|
fragment.setArguments(bundle); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<include layout="@layout/toolbar" /> |
||||||
|
|
||||||
|
<FrameLayout |
||||||
|
android:id="@+id/activity_rtk_base_setting_fragment" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_weight="1" /> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="horizontal"> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_base_setting_btn_save" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save" /> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_base_setting_btn_save_apply" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save_and_apply" /> |
||||||
|
</LinearLayout> |
||||||
|
</LinearLayout> |
@ -0,0 +1,38 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<include layout="@layout/toolbar" /> |
||||||
|
|
||||||
|
<FrameLayout |
||||||
|
android:id="@+id/activity_rtk_rover_setting_fragment" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_weight="1" /> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="horizontal"> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_rover_setting_btn_save" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save" /> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_rover_setting_btn_save_apply" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save_and_apply" /> |
||||||
|
</LinearLayout> |
||||||
|
</LinearLayout> |
@ -0,0 +1,38 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical"> |
||||||
|
|
||||||
|
<include layout="@layout/toolbar" /> |
||||||
|
|
||||||
|
<FrameLayout |
||||||
|
android:id="@+id/activity_rtk_static_setting_fragment" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="0dp" |
||||||
|
android:layout_weight="1" /> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:orientation="horizontal"> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_static_setting_btn_save" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save" /> |
||||||
|
|
||||||
|
<Button |
||||||
|
android:id="@+id/activity_static_setting_btn_save_apply" |
||||||
|
style="@style/Widget.AppCompat.Button.Colored" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="@dimen/bt_height" |
||||||
|
android:layout_weight="1" |
||||||
|
android:singleLine="true" |
||||||
|
android:text="@string/save_and_apply" /> |
||||||
|
</LinearLayout> |
||||||
|
</LinearLayout> |
@ -0,0 +1,9 @@ |
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"> |
||||||
|
|
||||||
|
<item |
||||||
|
android:id="@+id/menu_help" |
||||||
|
android:title="@string/help" |
||||||
|
app:showAsAction="ifRoom" /> |
||||||
|
|
||||||
|
</menu> |
@ -0,0 +1,8 @@ |
|||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"> |
||||||
|
|
||||||
|
<item |
||||||
|
android:id="@+id/menu_help" |
||||||
|
android:title="@string/help" |
||||||
|
app:showAsAction="ifRoom" /> |
||||||
|
</menu> |
Loading…
Reference in new issue