Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_265_220329_2.6.5' into dev_robotaxi-d-app-module_265_220329_2.6.5
This commit is contained in:
@@ -21,6 +21,7 @@ internal class BadCaseNetModel {
|
||||
.get(channel ?: "", pageNo)
|
||||
.takeIf {
|
||||
val body = it.body()
|
||||
CallerLogger.d("$M_DEVA${BadCaseManager.TAG}", "get result: $body")
|
||||
it.isSuccessful && body != null && (body.code == 0 || body.code == 200)
|
||||
}
|
||||
?.body()?.also {
|
||||
@@ -39,16 +40,19 @@ internal class BadCaseNetModel {
|
||||
}
|
||||
|
||||
suspend fun upload(map: Map<String, String>): UploadResult? = try {
|
||||
CallerLogger.d("$M_DEVA${BadCaseManager.TAG}", "upload_params:$map")
|
||||
MoGoRetrofitFactory
|
||||
.getInstance(BadCaseHost.getHost())
|
||||
.create(BadCaseApi::class.java)
|
||||
.post(map)
|
||||
.takeIf {
|
||||
val body = it.body()
|
||||
CallerLogger.d("$M_DEVA${BadCaseManager.TAG}", "upload_result:$body")
|
||||
return@takeIf it.isSuccessful && (body != null) && (body.code == 0 || body.code == 200)
|
||||
}
|
||||
?.body()
|
||||
} catch (t: Throwable) {
|
||||
CallerLogger.d("$M_DEVA${BadCaseManager.TAG}", "upload_error:$t")
|
||||
null
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,12 @@ import android.view.animation.Animation
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.widget.ImageView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import kotlinx.android.synthetic.main.view_turn_light_status.view.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
@@ -31,7 +33,11 @@ class TurnLightViewStatus @JvmOverloads constructor(
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status_daytime, this, true)
|
||||
} else {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_turn_light_status, this, true)
|
||||
}
|
||||
}
|
||||
|
||||
private var isShowNormalBg :Boolean = false
|
||||
|
||||
@@ -12,6 +12,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.UiThread;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
@@ -20,7 +21,9 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotVehicleStateList
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.network.utils.Util;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -40,7 +43,8 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS
|
||||
public class SteeringWheelView extends ConstraintLayout {
|
||||
private static final String TAG = "SteeringWheelView";
|
||||
private ImageView autopilotIV;
|
||||
private TextView steeringTV;
|
||||
private TextView steeringTVL;
|
||||
private TextView steeringTVR;
|
||||
private TapPositionView tapPositionView;
|
||||
private CircularProgressView steeringCircularV;
|
||||
private RotateAnimation rotateAnimation;
|
||||
@@ -62,13 +66,13 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
|
||||
private void initView() {
|
||||
autopilotIV = (ImageView) findViewById(R.id.autopilot_iv);
|
||||
steeringTV = findViewById(R.id.steering_tv);
|
||||
steeringTVL = findViewById(R.id.steering_tv_left);
|
||||
steeringTVR = findViewById(R.id.steering_tv_right);
|
||||
tapPositionView = findViewById(R.id.tap_position);
|
||||
steeringCircularV = findViewById(R.id.steering_circular);
|
||||
steeringCircularV.setBackWidth(8);
|
||||
steeringCircularV.setBackColor(R.color.hmi_light_blue_00);
|
||||
steeringCircularV.setProgColor(R.color.hmi_light_blue, R.color.hmi_dark_blue);
|
||||
steeringCircularV.setProgress(10, 1000);
|
||||
}
|
||||
|
||||
public SteeringWheelView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
@@ -94,24 +98,30 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
|
||||
if (autopilotStatusInfo == null) return;
|
||||
int state = autopilotStatusInfo.getState();
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "state = %s", state);
|
||||
if (autopilotIV != null) {
|
||||
Log.d(TAG, "autopilotIV != null");
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (autopilotStatusInfo == null) return;
|
||||
int state = autopilotStatusInfo.getState();
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "state = %s", state);
|
||||
if (autopilotIV != null) {
|
||||
Log.d(TAG, "autopilotIV != null");
|
||||
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto);
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto);
|
||||
|
||||
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto_nor);
|
||||
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE) {
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto_nor);
|
||||
|
||||
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto_nor);
|
||||
} else if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE) {
|
||||
autopilotIV.setImageResource(R.drawable.bg_auto_nor);
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "autopilotIV=null");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Log.d(TAG, "autopilotIV=null");
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,15 +149,34 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
Log.d(TAG, "刹车灯:" + String.valueOf(brakeLight));
|
||||
}
|
||||
|
||||
/**
|
||||
* 方向盘转向角
|
||||
* @param steering
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotSteeringData(float steering) {
|
||||
if (steeringTV != null && String.valueOf(steering) != null) {
|
||||
steeringTV.setText(String.valueOf(steering) + "°");
|
||||
steeringCircularV.setProgress((int) steering, 1000);
|
||||
animationWithSteeringData(steering);
|
||||
} else {
|
||||
Log.d(TAG, "steering未呈现");
|
||||
}
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d(TAG, "steering" + String.valueOf(steering));
|
||||
if (steeringTVL != null && steering < 0) {
|
||||
steeringTVR.setVisibility(View.INVISIBLE);
|
||||
steeringTVL.setVisibility(View.VISIBLE);
|
||||
steeringTVL.setText(String.valueOf((int) steering) + "°");
|
||||
steeringCircularV.setProgress((int) steering, 1000);
|
||||
animationWithSteeringData(steering);
|
||||
} else if (steeringTVR != null && steering > 0) {
|
||||
steeringTVL.setVisibility(View.INVISIBLE);
|
||||
steeringTVR.setVisibility(View.VISIBLE);
|
||||
steeringTVR.setText(String.valueOf((int) steering) + "°");
|
||||
steeringCircularV.setProgress((int) steering, 1000);
|
||||
animationWithSteeringData(steering);
|
||||
} else {
|
||||
Log.d(TAG, "onAutopilotSteeringData error");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,10 +185,16 @@ public class SteeringWheelView extends ConstraintLayout {
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotGearData(@NotNull Chassis.GearPosition gear) {
|
||||
Log.d(TAG, "档位" + gear.toString());
|
||||
if (tapPositionView != null) {
|
||||
tapPositionView.updateWithGear(gear);
|
||||
}
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.d(TAG, "档位" + gear.toString());
|
||||
if (tapPositionView != null) {
|
||||
tapPositionView.updateWithGear(gear);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
* @description 车辆监控
|
||||
* @description 车辆监控,暂时隐藏该功能
|
||||
* @since: 8/16/21
|
||||
*/
|
||||
public class VehicleMonitoring implements Handler.Callback {
|
||||
@@ -34,31 +34,36 @@ public class VehicleMonitoring implements Handler.Callback {
|
||||
}
|
||||
|
||||
public void vehicleCheck() {
|
||||
if (AutopilotStatus == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "自动驾驶中...");
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, AUTO_CHECK_STATUS_DELAY);
|
||||
} else {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "非自动驾驶状态");
|
||||
//非自动驾驶状态只展示一次
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, MANUAL_CHECK_STATUS_DELAY);
|
||||
}
|
||||
//暂时隐藏自检功能
|
||||
/**
|
||||
*
|
||||
if (AutopilotStatus == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "自动驾驶中...");
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, AUTO_CHECK_STATUS_DELAY);
|
||||
} else {
|
||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "非自动驾驶状态");
|
||||
//非自动驾驶状态只展示一次
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, MANUAL_CHECK_STATUS_DELAY);
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleMessage(Message msg) {
|
||||
AutopilotStatus = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState();
|
||||
switch (msg.what) {
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
|
||||
vehicleMonitor();
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, AUTO_CHECK_STATUS_DELAY);
|
||||
return true;
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE:
|
||||
case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE:
|
||||
vehicleMonitor();
|
||||
mHandler.sendEmptyMessageDelayed(AutopilotStatus, MANUAL_CHECK_STATUS_DELAY);
|
||||
return true;
|
||||
default:
|
||||
}
|
||||
// AutopilotStatus = CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getState();
|
||||
// switch (msg.what) {
|
||||
// case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING:
|
||||
// vehicleMonitor();
|
||||
// mHandler.sendEmptyMessageDelayed(AutopilotStatus, AUTO_CHECK_STATUS_DELAY);
|
||||
// return true;
|
||||
// case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE:
|
||||
// case IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_ENABLE:
|
||||
// vehicleMonitor();
|
||||
// mHandler.sendEmptyMessageDelayed(AutopilotStatus, MANUAL_CHECK_STATUS_DELAY);
|
||||
// return true;
|
||||
// default:
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -19,15 +19,31 @@
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/steering_tv"
|
||||
android:id="@+id/steering_tv_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:layout_marginRight="-10px"
|
||||
android:gravity="right"
|
||||
android:text="-18°"
|
||||
android:textColor="#415479"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintRight_toLeftOf="@+id/blue_circle"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/steering_tv_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-10px"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:gravity="left"
|
||||
android:text="18°"
|
||||
android:textColor="#415479"
|
||||
android:textSize="@dimen/dp_26"
|
||||
app:layout_constraintRight_toLeftOf="@+id/blue_circle"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintLeft_toRightOf="@+id/autopilot_iv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CircularProgressView
|
||||
@@ -45,11 +61,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/autopilot_iv"
|
||||
android:layout_width="@dimen/dp_144"
|
||||
android:layout_height="@dimen/dp_144"
|
||||
android:layout_width="@dimen/dp_186"
|
||||
android:layout_height="@dimen/dp_186"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_54"
|
||||
android:layout_marginTop="@dimen/dp_34"
|
||||
android:src="@drawable/bg_auto"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -69,7 +85,7 @@
|
||||
android:id="@+id/tap_position"
|
||||
android:layout_width="@dimen/dp_240"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="@dimen/brakelight_width_daytime"
|
||||
android:layout_height="@dimen/brakelight_height_daytime"
|
||||
android:visibility="visible">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/turn_light_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/brakelight_background_daytime"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_nor_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="15px"
|
||||
android:src="@drawable/module_arrow_left_nor_daytime" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_nor_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginRight="15px"
|
||||
android:src="@drawable/module_arrow_right_nor_daytime" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left_select_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|center_vertical"
|
||||
android:layout_marginLeft="13px"
|
||||
android:layout_marginTop="2px"
|
||||
android:src="@drawable/module_arrow_left_select_nor_daytime"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_select_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right|center_vertical"
|
||||
android:layout_marginTop="2px"
|
||||
android:layout_marginRight="13px"
|
||||
android:src="@drawable/module_arrow_right_select_nor_daytime"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -171,7 +171,7 @@ public class SmallMapDirectionView
|
||||
if (mCarMarker != null) {
|
||||
// mCarMarker.setRotateAngle(location.getBearing());
|
||||
mCarMarker.setPosition(currentLatLng);
|
||||
mCarMarker.setToTop();
|
||||
// mCarMarker.setToTop();
|
||||
}
|
||||
|
||||
CameraPosition cameraPosition;
|
||||
@@ -245,8 +245,11 @@ public class SmallMapDirectionView
|
||||
// 设置开始结束Marker位置
|
||||
mStartMarker.setPosition(mCoordinatesLatLng.get(0));
|
||||
mEndMarker.setPosition(mCoordinatesLatLng.get(mCoordinatesLatLng.size() - 1));
|
||||
mStartMarker.setToTop();
|
||||
mStartMarker.setVisible(true);
|
||||
mEndMarker.setVisible(true);
|
||||
mEndMarker.setToTop();
|
||||
|
||||
|
||||
//存放所有点的经纬度
|
||||
LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder();
|
||||
@@ -262,7 +265,7 @@ public class SmallMapDirectionView
|
||||
new PolylineOptions()
|
||||
.addAll(mCoordinatesLatLng)
|
||||
.color(Color.argb(255, 31, 127, 255))
|
||||
.width(6));
|
||||
.width(12));
|
||||
|
||||
}
|
||||
// else {
|
||||
|
||||
Reference in New Issue
Block a user