Merge branch 'dev_MogoAP_eagle-930_210926_8.0.12' into dev/dev_eagle_architecture_upgrade
# Conflicts: # .idea/misc.xml # core/function-impl/mogo-core-function-check/src/main/java/com/mogo/eagle/core/function/check/view/CheckActivity.java # core/function-impl/mogo-core-function-obu-mogo/src/main/java/com/mogo/eagle/core/function/obu/mogo/MogoPrivateObuManager.kt # modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XMessageListener_404000.kt
This commit is contained in:
@@ -53,7 +53,6 @@ public class CheckActivity extends AppCompatActivity {
|
||||
private static final String TAG = "CheckActivity";
|
||||
private static RecyclerView mRecyclerView;
|
||||
private static CheckResultData sCheckResultData;
|
||||
private static Context mContext;
|
||||
private static NetworkStatusUtil.NetWorkStatus sNetWorkStatus;
|
||||
private ImageView mImageView;
|
||||
//车模
|
||||
@@ -85,7 +84,7 @@ public class CheckActivity extends AppCompatActivity {
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
animation();
|
||||
loadDetail(mContext, null);
|
||||
loadDetail(this.getApplicationContext(), null);
|
||||
}
|
||||
/**
|
||||
* 列表View初始化
|
||||
@@ -99,7 +98,6 @@ public class CheckActivity extends AppCompatActivity {
|
||||
scanTopImageView = findViewById(R.id.scan_car_top_image);
|
||||
tipsImageView = findViewById(R.id.scan_car_tips);
|
||||
mProgressBar = findViewById(R.id.check_progress);
|
||||
mContext = mImageView.getContext();
|
||||
mImageView.setOnClickListener(v -> {
|
||||
finish();
|
||||
});
|
||||
@@ -109,7 +107,7 @@ public class CheckActivity extends AppCompatActivity {
|
||||
new CheckLinearLayout(this, CheckLinearLayout.VERTICAL, false);
|
||||
mRecyclerView.addItemDecoration(new SpacesItemDecoration((int) getResources().getDimension(R.dimen.check_item_space_vr)));
|
||||
mRecyclerView.setLayoutManager(linearLayoutManager);
|
||||
mCheckAdapter = new CheckAdapter(mContext, sCheckResultData);
|
||||
mCheckAdapter = new CheckAdapter(this, sCheckResultData);
|
||||
mRecyclerView.setAdapter(mCheckAdapter);
|
||||
}
|
||||
|
||||
@@ -118,20 +116,18 @@ public class CheckActivity extends AppCompatActivity {
|
||||
*/
|
||||
public static void checkMonitor(Context context, ICheckResultCallBack checkResultCallBack) {
|
||||
Log.d(TAG, "checkMonitor");
|
||||
mContext = context;
|
||||
loadDetail(mContext, checkResultCallBack);
|
||||
loadDetail(context.getApplicationContext(), checkResultCallBack);
|
||||
}
|
||||
|
||||
//网络请求,获取自车检测结果(工控机上报云端)
|
||||
public static void loadDetail(Context context, ICheckResultCallBack checkResultCallBack) {
|
||||
mContext = context;
|
||||
final Map<String, Object> params = ParamsBuilder.of(false)
|
||||
.append("sn", MoGoAiCloudClientConfig.getInstance().getSn())
|
||||
.build();
|
||||
CheckApiServiceFactory.getDataApiService(context).loadMonitorDetail(params)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new SubscribeImpl<CheckResultData>(RequestOptions.create(mContext)) {
|
||||
.subscribe(new SubscribeImpl<CheckResultData>(RequestOptions.create(context)) {
|
||||
@Override
|
||||
public void onSuccess(CheckResultData o) {
|
||||
super.onSuccess(o);
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.amap.api.maps.CameraUpdateFactory;
|
||||
import com.amap.api.maps.TextureMapView;
|
||||
import com.amap.api.maps.UiSettings;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.CameraPosition;
|
||||
import com.amap.api.maps.model.CustomMapStyleOptions;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.LatLngBounds;
|
||||
@@ -130,7 +131,6 @@ public class SmallMapDirectionView
|
||||
mAMap.setMapType(AMap.MAP_TYPE_NIGHT);
|
||||
// 关闭显示实时路况图层,aMap是地图控制器对象。
|
||||
mAMap.setTrafficEnabled(false);
|
||||
|
||||
// 设置 锚点 图标
|
||||
mCarMarker = mAMap.addMarker(new MarkerOptions()
|
||||
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo))
|
||||
@@ -183,7 +183,7 @@ public class SmallMapDirectionView
|
||||
LatLng currentLatLng = new LatLng(latLng.getLatitude(), latLng.getLongitude());
|
||||
|
||||
if (mCarMarker != null) {
|
||||
mCarMarker.setRotateAngle(360 - latLng.getBearing());
|
||||
// mCarMarker.setRotateAngle(360 - latLng.getBearing());
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
mCarMarker.setToTop();
|
||||
}
|
||||
@@ -219,6 +219,8 @@ public class SmallMapDirectionView
|
||||
//设置希望展示的地图缩放级别
|
||||
mAMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, zoomLevel));
|
||||
}
|
||||
CameraPosition cameraPosition = new CameraPosition.Builder().target(mCarMarker.getPosition()).bearing(latLng.getBearing()).tilt(0).zoom(zoomLevel).build();
|
||||
mAMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -63,6 +63,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
MogoServicePaths.PATH_SMALL_MAP,
|
||||
StatusDescriptor.MAIN_PAGE_RESUME,
|
||||
this);
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().addAdasAutopilotRouteCallBack(this);
|
||||
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
showPanel();
|
||||
@@ -84,6 +85,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
Log.d(TAG, "准备show fragment");
|
||||
mActivity.getSupportFragmentManager().beginTransaction().show(mSmallMapFragment).commitAllowingStateLoss();
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG, "add fragment 失败 ======"+e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user