diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.java index 2fbe43a58f..b155cb084c 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/network/BusPassengerServiceManager.java @@ -47,8 +47,8 @@ public class BusPassengerServiceManager { * @return */ private String getDriverAppSn(){ -// return CallerTelematicManager.INSTANCE.getServerToken(); - return "X2020211111NG0XNFK"; + return CallerTelematicManager.INSTANCE.getServerToken(); +// return "X2020211111NG0XNFK"; } /** diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/repository/net/BadCaseNetModel.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/repository/net/BadCaseNetModel.kt index e643ed63ef..569eb88383 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/repository/net/BadCaseNetModel.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/repository/net/BadCaseNetModel.kt @@ -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): 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 } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt index de079bb6b6..b05a685da3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/turnlight/TurnLightViewStatus.kt @@ -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 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java index 97ab6a6dcd..8dd8526f1c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/SteeringWheelView.java @@ -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); + } + } + }); + } }; diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/monitoring/VehicleMonitoring.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/monitoring/VehicleMonitoring.java index b841092909..bca60eed1e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/monitoring/VehicleMonitoring.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/monitoring/VehicleMonitoring.java @@ -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; } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_daytime.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_daytime.png new file mode 100644 index 0000000000..f35fc125c4 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_nor_daytime.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_daytime.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_daytime.png new file mode 100644 index 0000000000..2e4b0cd003 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_left_select_nor_daytime.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_daytime.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_daytime.png new file mode 100644 index 0000000000..67f7c5b0e9 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_nor_daytime.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_daytime.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_daytime.png new file mode 100644 index 0000000000..0837df937c Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/module_arrow_right_select_nor_daytime.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel.xml index aa5a02d635..0dc4ac8ab0 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/hmi_steering_wheel.xml @@ -19,15 +19,31 @@ app:layout_constraintTop_toTopOf="parent" /> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java index ecbb52d6be..a86bf21e7a 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java @@ -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 { diff --git a/modules/mogo-module-common/src/main/res/values-xhdpi-2560x1600/dimens.xml b/modules/mogo-module-common/src/main/res/values-xhdpi-2560x1600/dimens.xml index e8a50c2de8..182125356c 100644 --- a/modules/mogo-module-common/src/main/res/values-xhdpi-2560x1600/dimens.xml +++ b/modules/mogo-module-common/src/main/res/values-xhdpi-2560x1600/dimens.xml @@ -11,6 +11,8 @@ 120px 37px 27px + 90px 144px + 186px 300px