From fe44c2efb7b5ae0e4db93dcd61c6b1f016cd5d26 Mon Sep 17 00:00:00 2001 From: renwj Date: Mon, 5 Sep 2022 22:03:13 +0800 Subject: [PATCH 01/13] =?UTF-8?q?[=E7=BA=BF=E7=A8=8B=E4=BC=98=E5=8C=96]?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e65d1be81d..859b9de1c5 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ buildscript { classpath "com.bytedance.android.byteX:base-plugin:0.3.0" classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}" classpath 'com.volcengine:apm_insight_plugin:1.4.1' - classpath 'com.mogo.thread.opt:plg:2.1.6' + classpath 'com.mogo.thread.opt:plg:2.1.10' classpath 'com.mogo.cloud:systrace:1.0.1' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' classpath 'com.mogo.sticky:service:1.0.8' From cc27c4f63067f4a69199bc92aec7a24e7902c10b Mon Sep 17 00:00:00 2001 From: renwj Date: Tue, 6 Sep 2022 11:00:57 +0800 Subject: [PATCH 02/13] =?UTF-8?q?[CrashFix]=E4=BF=AE=E6=AD=A3=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=20java.lang.RuntimeException:=20android.os.DeadSystem?= =?UTF-8?q?Exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../status/flow/gps/GpsImpl.kt | 14 +++++++++++--- .../status/flow/nets/NetsImpl.kt | 19 ++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/gps/GpsImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/gps/GpsImpl.kt index c290ed65b0..f53bf35c5e 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/gps/GpsImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/gps/GpsImpl.kt @@ -35,15 +35,23 @@ internal class GpsImpl(ctx: Context): IFlow(ctx) { } private val onClose = { - send(false, PermissionUtils.isGranted(Manifest.permission.ACCESS_FINE_LOCATION)) + send(false, isGrandFineLocation()) } private val onOpen = { - send(true, PermissionUtils.isGranted(Manifest.permission.ACCESS_FINE_LOCATION)) + send(true, isGrandFineLocation()) } + private fun isGrandFineLocation(): Boolean = try { + PermissionUtils.isGranted(Manifest.permission.ACCESS_FINE_LOCATION) + } catch (t: Throwable) { + t.printStackTrace() + false + } + + override fun onCreate() { - val isGranted = PermissionUtils.isGranted(Manifest.permission.ACCESS_FINE_LOCATION) + val isGranted = isGrandFineLocation() send(isLocationEnabled(), isGranted) if (!isGranted) { PermissionUtils.requestAccessFineLocation(object : SimpleCallback { diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/nets/NetsImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/nets/NetsImpl.kt index 0e15261740..0adb0bee7c 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/nets/NetsImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/nets/NetsImpl.kt @@ -78,12 +78,21 @@ internal class NetsImpl(ctx: Context): IFlow(ctx) { private var loopCheckAndSendJob: Job? = null private fun checkAndSend() { - val connectionInfo = wifiMgr.connectionInfo - val enabled = isNetConnected() - val name = if (isLocationEnabled()) connectionInfo.ssid?.replace(Regex("[\\W]"), "") else "WI-FI" loopCheckAndSendJob?.safeCancel() - launch(Dispatchers.Default) { delay(1000); checkAndSend() }.also { loopCheckAndSendJob = it } - send(enabled, name) + launch(Dispatchers.Default) { + val connectionInfo = wifiMgr.connectionInfo + val enabled = isNetConnected() + val name = + try { + if (isLocationEnabled()) connectionInfo.ssid?.replace(Regex("[\\W]"), "") else "WI-FI" + } catch (t: Throwable) { + t.printStackTrace() + "WI-FI" + } + send(enabled, name) + delay(1000); + checkAndSend() + }.also { loopCheckAndSendJob = it } } private fun isLocationEnabled() = From abdc3266b4fc83777002626db096c5878127d23b Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Tue, 13 Sep 2022 11:20:17 +0800 Subject: [PATCH 03/13] =?UTF-8?q?[change]=20pb=E6=9B=B4=E6=96=B0=E9=9A=9C?= =?UTF-8?q?=E7=A2=8D=E7=89=A9=E6=8E=A5=E5=8F=A3=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/proto/chassis.proto | 58 ++++++++++++++++++ .../src/main/proto/message_pad.proto | 6 +- .../main/proto/special_vehicle_task_cmd.proto | 11 ++-- .../src/main/proto/vehicle_state.proto | 60 +++++++++++++++++++ 4 files changed, 129 insertions(+), 6 deletions(-) diff --git a/libraries/mogo-adas-data/src/main/proto/chassis.proto b/libraries/mogo-adas-data/src/main/proto/chassis.proto index 52e3dfe9eb..be6cada7fb 100644 --- a/libraries/mogo-adas-data/src/main/proto/chassis.proto +++ b/libraries/mogo-adas-data/src/main/proto/chassis.proto @@ -39,3 +39,61 @@ enum EPSSteeringMode { ManualFromEPSFailure = 3; TemporaryInhibited = 4; } + +enum EPBWorkStatus { + EPBSTATUS_NONE = 0; + EPBSTATUS_LOCKED = 1; + EPBSTATUS_RELEASED = 2; + EPBSTATUS_LOCKED_FAIL = 3; + EPBSTATUS_RELEASE_FAIL = 4; + EPBSTATUS_FAULT = 5; +} + +enum VehicleTakeOverStatus { + None_TakeOver = 0; + Vehicle_TakeOver = 1; + Longitude_TakeOver = 2; + Latteral_TakeOver = 3; +} + +enum VehicleFaultLevel { + None_Fault = 0; + General_Fault = 1; + Serious_Fault = 2; + Critical_Fault = 3; +} + +enum VehicleControlMode { + VehicleControl_Manual = 0; + VehicleControl_Nonemanualdefault = 1; + VehicleControl_Autostandby = 2; + VehicleControl_Autoactive = 3; + VehicleControl_Remotestandby = 4; + VehicleControl_Remoteactive = 5; + VehicleControl_Telecontrolstandby = 6; + VehicleControl_Telecontrolactive = 7; + VehicleControl_Fault = 8; +} + +enum VehicleWireControlModeRequest { + NoneWireControl = 0; + WireControl = 1; +} + +enum CleanSystemControlMode { + Clean_Off_Line = 0; + Clean_Ready = 1; + Clean_Work_Standby = 2; + Clean_Sweeping_Standby = 3; + Clean_Sweeping_Both_Side_Work = 4; + Clean_Sweeping_Left_Work = 5; + Clean_Sweeping_Right_Work = 6; + Clean_WashSweep_Standby = 7; + Clean_WashSweep_Both_Side_Work = 8; + Clean_WashSweep_Left_Work = 9; + Clean_WashSweep_Right_Wrok = 10; + Clean_PureWash_Standby = 11; + Clean_PureWash_Both_Side_Work = 12; + Clean_PureWash_Left_Work = 13; + Clean_PureWash_Right_Work = 14; +} \ No newline at end of file diff --git a/libraries/mogo-adas-data/src/main/proto/message_pad.proto b/libraries/mogo-adas-data/src/main/proto/message_pad.proto index ac536c7c6b..3c16b7d91f 100644 --- a/libraries/mogo-adas-data/src/main/proto/message_pad.proto +++ b/libraries/mogo-adas-data/src/main/proto/message_pad.proto @@ -83,7 +83,7 @@ message Trajectory // message definition for MsgTypeTrackedObjects message SubSource { - uint32 source = 1; //[default = 0] v2v_bsm = 1(v2x他车自车信息) v2i_rsm = 2(v2x路侧感知交通参与者信息) v2v_ssm = 3(v2x他车感知信息) v2n_cloud = 4(v2x云端感知信息) + uint32 source = 1; //[default = 0] v2v_bsm = 1 v2i_rsm = 2 v2v_ssm = 3 v2n_rsm = 4 v2n_rsi = 5 string id = 2; //HEX_string } @@ -97,7 +97,8 @@ message TrackedObject { uint32 type = 1; //物体类型, 0:Background, 1:Person, 2:Bicycle, 3:Car, 4:MotorCycle, //5:TrafficSign, 6:Bus, 7:CellPhone, 8:Truck, 9:Bottle, 10:TrafficLight, - //11:Rider, 12:TriangleRoadblock, 13:WarningTriangle, 100:Unknown + //11:Rider, 12:TriangleRoadblock, 13:WarningTriangle, 100:Unknown, + //501:RoadWork_occupy_0501, 502:RoadWork_break_0502 double longitude = 2; //经度 double latitude = 3; //纬度 double altitude = 4; //海拔 @@ -111,6 +112,7 @@ message TrackedObject uint32 drawLevel = 12; //危险等级 1 绿,2 黄,3 红 double driverTime = 13; //驱动感知时间, abandoned repeated TrackedSource tracked_source = 14; + repeated Location polygon = 15; } message TrackedObjects diff --git a/libraries/mogo-adas-data/src/main/proto/special_vehicle_task_cmd.proto b/libraries/mogo-adas-data/src/main/proto/special_vehicle_task_cmd.proto index 69a2d6fc3d..87d2f9619f 100644 --- a/libraries/mogo-adas-data/src/main/proto/special_vehicle_task_cmd.proto +++ b/libraries/mogo-adas-data/src/main/proto/special_vehicle_task_cmd.proto @@ -1,10 +1,12 @@ syntax = "proto2"; package chassis; +import "header.proto"; + message RoboSweeperFuTianCleanCmd { optional uint32 clean_open_requirement = 1 [default = 0]; // 清扫作业开启需求 0--no req 1--Req_clean_work, 2--No_clean_work - optional uint32 clean_mode_requirement = 2 [default = 0]; // 清扫作业模式需求 0--no req, 1--Sweeping mode, 2--Wash sweeper mode, 3--Pure wash mode, 4--Pure draw mode - optional uint32 clean_direction_requirement = 3 [default = 0]; // 清扫方向需求指 0--no req, 1--both side work, 2--left side work, 3--right side work + optional uint32 clean_mode_requirement = 2 [default = 0]; // 清扫作业模式需求 0--no req, 1--Sweeping mode, 2--Wash sweeper mode, 3--Pure wash mode, 4--Pure draw mode, 5--close clean mode + optional uint32 clean_direction_requirement = 3 [default = 0]; // 清扫方向需求指 0--no req, 1--both side work, 2--left side work, 3--right side work, 4--close side work optional uint32 clean_intensity_requirement = 4 [default = 0]; // 作业强度需求 0--no req, 1--stand clean work, 2--strong clean work optional uint32 dusk_close_requirement = 5 [default = 0]; // 降尘关闭需求 0--no req, 1--close dusk, 2--open dusk optional uint32 suction_nozzlefle_open_requirement = 6 [default = 0]; // 吸嘴挡板需求 0--no req, 1--open, 2--close @@ -22,6 +24,7 @@ message RoboVanSkywellTaskCmd { } message SpecialVehicleTaskCmd { - optional RoboSweeperFuTianTaskCmd robo_sweeper_futian_task_cmd = 1; // 福田清扫车业务指令 - optional RoboVanSkywellTaskCmd robo_van_skywell_task_cmd = 2; // 开沃小巴业务指令 + optional common.Header header = 1; + optional RoboSweeperFuTianTaskCmd robo_sweeper_futian_task_cmd = 2; // 福田清扫车业务指令 + optional RoboVanSkywellTaskCmd robo_van_skywell_task_cmd = 3; // 开沃小巴业务指令 } diff --git a/libraries/mogo-adas-data/src/main/proto/vehicle_state.proto b/libraries/mogo-adas-data/src/main/proto/vehicle_state.proto index 8bce80eb61..b0046c2df6 100644 --- a/libraries/mogo-adas-data/src/main/proto/vehicle_state.proto +++ b/libraries/mogo-adas-data/src/main/proto/vehicle_state.proto @@ -4,6 +4,51 @@ package chassis; import "header.proto"; import "chassis.proto"; +message SweeperFuTianCleanSystemState { + optional bool secu_rem_ctrl_sts = 1 [default = false]; // 远程控制使能信号 + optional bool secu_mot_work_sts = 2 [default = false]; // 电机启停控制状态信号 + optional bool secu_dup_tail_door_open_sts = 3 [default = false]; // 垃圾箱尾门开状态信号 + optional bool secu_dup_tail_door_close_sts = 4 [default = false]; // 垃圾箱尾门关状态信号 + optional bool secu_auto_dup_tail_tip_sts = 5 [default = false]; // 垃圾箱倾翻状态信号 + optional bool secu_dup_tail_ret_sts = 6 [default = false]; // 垃圾箱回位状态信号 + optional bool secu_work_stand_sts = 7 [default = false]; // 标准作业状态信号 + optional bool secu_work_strong_sts = 8 [default = false]; // 强力作业状态信号 + optional bool secu_suctionnozzlebaffle_sts = 9 [default = false]; // 吸嘴挡板开状态信号 + optional bool secu_dusk_close_sts = 10 [default = false]; // 降尘关闭状态信号 + optional bool secu_work_left_sts = 11 [default = false]; // 左侧作业状态信号 + optional bool secu_work_on_bothsides_sts = 12 [default = false]; // 两侧作业状态信号 + optional bool secu_work_right_sts = 13 [default = false]; // 右侧作业状态信号 + optional bool secu_work_ton_sts = 14 [default = false]; // 纯吸作业状态信号 + optional bool secu_work_spray_gun_sts = 15 [default = false]; // 喷雾喷枪作业状态信号 + optional bool secu_work_enc_des_sts = 16 [default = false]; // 箱体清淤作业状态信号 + optional bool secu_mod_wash_sweep_sts = 17 [default = false]; // 洗扫模式状态信号 + optional bool secu_mod_wash_sts = 18 [default = false]; // 纯洗模式状态信号 + optional bool secu_sweepdisk_red_sts = 19 [default = false]; // 扫盘减速开关状态信号 + optional bool secu_sweepdisk_acc_sts = 20 [default = false]; // 扫盘加速开关状态信号 + optional bool secu_arrowlight_sts = 21 [default = false]; // 箭头灯开关状态信号 + optional bool secu_floodlight_sts = 22 [default = false]; // 照明灯开关状态信号 + optional bool secu_work_cleaning_sts = 23 [default = false]; // 保洁作业状态信号 + optional bool secu_clean_music_sts = 24 [default = false]; // 音乐开关状态信号 + + optional bool secu_motor_oil_com_fail = 25 [default = false]; // 油泵电机通讯失败报警 + optional bool secu_motor_water_com_fail = 26 [default = false]; // 水泵电机通讯失败报警 + optional bool secu_motor_air_com_fail = 27 [default = false]; // 风机电机通讯失败报警 + optional bool secu_fan_fault = 28 [default = false]; // 散热风扇故障报警 + optional bool secu_chassis_com_fail = 29 [default = false]; // 底盘通讯失败报警 + optional bool secu_panel_com_fail = 30 [default = false]; // 操作面板通讯失败报警 + optional bool secu_oillevel_check = 31 [default = false]; // 液压油位低请停机检查报警信号 + optional bool secu_oilstmjam_check = 32 [default = false]; // 液压油滤堵塞请停机检查报警信号 + optional bool secu_water_valve_close = 33 [default = false]; // 出水阀门关闭不能清洗作业报警信号 + optional bool secu_clean_water_tank_low = 34 [default = false]; // 清水箱水位低不能清洗作业报警信号 + optional bool secu_sewage_water_tank_full = 35 [default = false]; // 污水箱满请停止作业报警信号 + optional bool secu_coolwatertemp_high = 36 [default = false]; // 水温过高请停机检查报警信号 + optional bool secu_coolwater_less = 37 [default = false]; // 冷却液位低报警信号 + optional bool secu_tail_gate_open = 38 [default = false]; // 尾门打开接近开关 + optional bool secu_manual_intervention_sts = 39 [default = false]; // 提示是否有人为介入 + optional bool secu_ready_finish_sts = 40 [default = false]; // 上装ready完成 + optional float secu_sweepdisk_speed = 41 [default = 0]; // 扫盘转速 +} + message VehicleState { optional common.Header header = 1; optional chassis.PilotMode pilot_mode = 2 [default = MODE_MANUAL]; @@ -38,4 +83,19 @@ message VehicleState { optional bool chassis_status_missing = 29 [default = false]; //未收到车辆底盘反馈信息 optional bool brake_light_status = 30 [default = false]; //自驾模式下制动灯状态 optional bool pilot_mode_condition_met = 31 [default = false]; + + optional float steeringSpd = 32 [default = 0]; // steering angle speed in degrees/s + + optional float leftFrontWheelAngle = 33 [default = 0];//左前轮角度(deg),左负右正 + optional float rightFrontWheelAngle = 34 [default = 0]; //右前轮角度(deg),左负右正 + + optional chassis.EPBWorkStatus epb = 35 [default = EPBSTATUS_NONE]; // EPB工作状态 + + optional chassis.VehicleTakeOverStatus vehicletakeoverstatus = 36 [default = None_TakeOver]; // 车辆人工接管状态 + optional bool Emergency_Stop_Switch = 37 [default = false]; // 急停开关状态 + optional chassis.VehicleFaultLevel vehiclefaultlevel = 38 [default = None_Fault]; // 整车故障状态 + + reserved 39 to 199; + + optional SweeperFuTianCleanSystemState sweeper_futian_clean_system_state = 200; // 福田清扫车上装状态信息 } From c22a967e1e8ccdd7660a50759f970b104848644c Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Wed, 14 Sep 2022 18:10:55 +0800 Subject: [PATCH 04/13] =?UTF-8?q?[2.10.0]=20taxi=E5=8F=B8=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF,=E8=AE=A2=E5=8D=95=E5=88=B0=E7=AB=99=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=B7=A6=E4=B8=8B=E8=A7=92=E5=9C=B0=E5=9B=BE=E8=B7=AF?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java index 0153576032..8f74c6ff54 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiBeingServerdOrdersFragment.java @@ -470,6 +470,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement showOrHideNavi(false); setOrRemoveMapMaker(false, TaxiConst.TAXI_START_MAP_MAKER,order.startSitePoint,R.raw.star_marker); setOrRemoveMapMaker(false, TaxiConst.TAXI_END_MAP_MAKER,order.endSitePoint,R.raw.end_marker); + clearSmallMapRouteLine(); break; case JourneyCompleted: mCurrentOrder = null; @@ -497,6 +498,7 @@ public class TaxiBeingServerdOrdersFragment extends BaseTaxiUIFragment implement mNoDataView.setVisibility(View.GONE); mBeingOrderLayout.setVisibility(View.VISIBLE); mTaxiFragment.changeOperationViewVisible(View.GONE); + clearSmallMapRouteLine(); } else { mNoDataView.setVisibility(View.VISIBLE); mNoDatasTv.setText("暂无进行中订单"); From 0adf85f61f5fc12663856af3522b261ddfe6825a Mon Sep 17 00:00:00 2001 From: renwj Date: Wed, 14 Sep 2022 19:28:12 +0800 Subject: [PATCH 05/13] =?UTF-8?q?[=E7=8A=B6=E6=80=81=E6=A0=8F]=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=BE=AA=E8=BF=B9/=E7=AE=97=E8=B7=AF=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E9=80=BB=E8=BE=91=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../status/entity/Status.kt | 17 ++++++----------- .../status/flow/trace/TracingImpl.kt | 5 +++-- .../CallerAutoPilotStatusListenerManager.kt | 10 ++++++++++ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt index 6639a3fb46..4e9b503deb 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt @@ -230,18 +230,13 @@ class TracingStatus(var state: Tracing = UNKNOWN): Status() { override fun isException(): Boolean = state.isException() } -fun String.toState(): Tracing? { - val ss = split("|") - var code = "" - if (ss.isNotEmpty()) { - code = ss[0] - } +fun String.toState(msg: String?): Tracing? { + val ss = msg?.split("|") var extra: Map? = null - if (ss.size > 1) { - + if (ss != null && ss.isNotEmpty()) { val sb = StringBuilder() - for (i in 1 until ss.size) { - sb.append(ss[i]) + for (element in ss) { + sb.append(element) sb.append(",") } if (sb.isNotEmpty()) { @@ -249,7 +244,7 @@ fun String.toState(): Tracing? { } extra = mutableMapOf("extra" to sb.toString()) } - return when(code) { + return when(this) { "IMAP_TRA_EXIST" -> TRACK_FINDED.apply { this.extra = extra } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt index c44b3372dc..5c047e2b61 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt @@ -21,7 +21,8 @@ internal class TracingImpl(ctx: Context): IFlow(ctx), IMoGoAutopi override fun onCreate() { val code = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageCode() - val state = code.toState() ?: UNKNOWN + val msg = CallerAutoPilotStatusListenerManager.getAutoPilotReportMessageContent() + val state = code.toState(msg) ?: UNKNOWN old = state send(TracingStatus(state)) CallerAutoPilotStatusListenerManager.addListener(TAG, this) @@ -31,7 +32,7 @@ internal class TracingImpl(ctx: Context): IFlow(ctx), IMoGoAutopi override fun onAutopilotGuardian(guardianInfo: MogoReportMessage?) { super.onAutopilotGuardian(guardianInfo) val current = guardianInfo?.code - val newState = current?.toState() + val newState = current?.toState(guardianInfo.msg) if (newState != null && newState != old) { send(TracingStatus(newState)) old = newState diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt index df63a364f3..0c915a5f31 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotStatusListenerManager.kt @@ -1,10 +1,12 @@ package com.mogo.eagle.core.function.call.autopilot +import android.util.* import androidx.annotation.Nullable import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener import com.mogo.eagle.core.function.call.base.CallerBase import com.mogo.eagle.core.utilcode.kotlin.* +import com.mogo.eagle.core.utilcode.mogo.logger.* import com.mogo.eagle.core.utilcode.util.GsonUtils import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg @@ -29,6 +31,10 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { @Volatile private var autoPilotMessageCode: String = "" + + @Volatile + private var autoPilotMessageContent: String = "" + /** * 查询AutoPilot状态 */ @@ -45,6 +51,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { fun getAutoPilotReportMessageCode(): String = autoPilotMessageCode + fun getAutoPilotReportMessageContent(): String = autoPilotMessageContent + /** * 通过Gnss定位更新来同步更新自动驾驶状态 */ @@ -171,6 +179,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase() { M_AUTOPILOT_STATUS_LISTENERS.forEach { val listener = it.value autoPilotMessageCode = guardianInfo?.code ?: "" + autoPilotMessageContent = guardianInfo?.msg ?: "" + Logger.d("XXXXX", "code: ${guardianInfo?.code}, msg: ${guardianInfo?.msg}") listener.onAutopilotGuardian(guardianInfo) } } From 885b1e8e79eed8ac3d35b166367eb65e18bb9409 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 14 Sep 2022 20:00:33 +0800 Subject: [PATCH 06/13] =?UTF-8?q?[Fix]=E5=90=8C=E6=AD=A5=E7=BE=8E=E5=8C=96?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function/autopilot/MoGoAutopilotProvider.kt | 2 +- .../autopilot/telematic/TeleMsgHandler.kt | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index a95120b060..e701e71223 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -379,7 +379,7 @@ class MoGoAutopilotProvider : override fun setDemoMode(isEnable: Boolean) { // 同步给乘客端 if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - var byteArray = if (isEnable) byteArrayOf(1) else byteArrayOf(0) + val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray() if (NSDNettyManager.getInstance().isServerStart) { NSDNettyManager.getInstance() .sendMsgToAllClients( diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt index 758f6e6cd6..62c733e268 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt @@ -56,11 +56,15 @@ class TeleMsgHandler : IMsgHandler { } } MogoProtocolMsg.SYNC_MODE_STATUS -> { - FunctionBuildConfig.isDemoMode = when (it.body[0].toInt()) { - 1 -> true - else -> false + val demoModeAndTrajectoryString = String(it.body) + invokeNettyConnResult("乘客屏收到的美化模式状态为:${demoModeAndTrajectoryString}") + if (demoModeAndTrajectoryString.contains(",")) { + val strArray = demoModeAndTrajectoryString.split(",") + if (strArray.size == 2) { + FunctionBuildConfig.isDemoMode = (strArray[0] == "true") + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = (strArray[1] == "true") + } } - setDemoMode(FunctionBuildConfig.isDemoMode) } MogoProtocolMsg.REQ_MAC_ADDRESS -> { val carConfig = MessagePad.CarConfigResp.parseFrom(msg.body) @@ -140,8 +144,7 @@ class TeleMsgHandler : IMsgHandler { override fun handleClientConn2Server(channel: Channel?) { val socketAddress = channel?.remoteAddress().toString() CallerLogger.d("${SceneConstant.M_ADAS_IMPL}$TAG", "Client ip is:${socketAddress}") - val byteArray = - if (FunctionBuildConfig.isDemoMode) byteArrayOf(1) else byteArrayOf(0) + val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray() NSDNettyManager.getInstance().sendMsgToSpecifiedClient( MogoProtocolMsg( MogoProtocolMsg.SYNC_MODE_STATUS, From 0309d160d51bcebee6ca982a5770e1a7d7494b96 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 15 Sep 2022 15:02:33 +0800 Subject: [PATCH 07/13] =?UTF-8?q?[=E7=8A=B6=E6=80=81=E6=A0=8F]=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [状态栏]代码逻辑优化 --- .../mogo_core_function_devatools/status/entity/Status.kt | 8 +++----- .../status/flow/trace/TracingImpl.kt | 6 ++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt index 4e9b503deb..1804b27ecd 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/entity/Status.kt @@ -200,12 +200,10 @@ class TracingStatus(var state: Tracing = UNKNOWN): Status() { UNKNOWN; fun isException(): Boolean { - val c1 = when (this) { - TRACK_FINDED, TRACK_NOT_EXIST, TRACK_LOAD_FAIL, ROUTE_FAILED, UNKNOWN -> true - else -> false + if (this == TRACK_LOADED || this == ROUTE_LOADED) { + return false } - val c2 = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state != IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING - return c1 and c2 + return true } } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt index 5c047e2b61..9728d4c1ba 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/trace/TracingImpl.kt @@ -1,7 +1,6 @@ package com.zhjt.mogo_core_function_devatools.status.flow.trace import android.content.* -import android.util.* import com.mogo.eagle.core.data.autopilot.* import com.mogo.eagle.core.function.api.autopilot.* import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener.Companion.STATUS_AUTOPILOT_RUNNING @@ -42,6 +41,7 @@ internal class TracingImpl(ctx: Context): IFlow(ctx), IMoGoAutopi override fun onAutopilotIpcConnectStatusChanged(status: Int, reason: String?) { super.onAutopilotIpcConnectStatusChanged(status, reason) if (!CallerAutoPilotManager.isConnected()) { + old = UNKNOWN send(TracingStatus(UNKNOWN)) } } @@ -49,10 +49,12 @@ internal class TracingImpl(ctx: Context): IFlow(ctx), IMoGoAutopi override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) { super.onAutopilotStatusResponse(autoPilotStatusInfo) if (autoPilotStatusInfo.state != STATUS_AUTOPILOT_RUNNING) { + old = UNKNOWN send(TracingStatus(UNKNOWN)) return } - if (old.isException() && autoPilotStatusInfo.state == STATUS_AUTOPILOT_RUNNING) { + if (old.isException()) { + old = TRACK_LOADED send(TracingStatus(TRACK_LOADED)) } } From 09580410ad68aa62ad88b69ce50f7b2a2bfccea7 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Thu, 15 Sep 2022 15:28:26 +0800 Subject: [PATCH 08/13] =?UTF-8?q?[Fix]=E5=90=8C=E6=AD=A5=E7=BE=8E=E5=8C=96?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autopilot/MoGoAutopilotProvider.kt | 21 +++++++++++- .../autopilot/telematic/TeleMsgHandler.kt | 34 +++++++++---------- .../api/autopilot/IMoGoAutopilotProvider.kt | 7 ++++ .../call/autopilot/CallerAutoPilotManager.kt | 8 +++++ 4 files changed, 51 insertions(+), 19 deletions(-) diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index e701e71223..ec53f2ee68 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -379,7 +379,7 @@ class MoGoAutopilotProvider : override fun setDemoMode(isEnable: Boolean) { // 同步给乘客端 if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray() + val byteArray = if (isEnable) byteArrayOf(1) else byteArrayOf(0) if (NSDNettyManager.getInstance().isServerStart) { NSDNettyManager.getInstance() .sendMsgToAllClients( @@ -395,6 +395,25 @@ class MoGoAutopilotProvider : } } + override fun setIgnoreConditionDraw(isIgnore: Boolean) { + // 同步给乘客端 + if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { + val byteArray = if (isIgnore) byteArrayOf(1) else byteArrayOf(0) + if (NSDNettyManager.getInstance().isServerStart) { + NSDNettyManager.getInstance() + .sendMsgToAllClients( + MogoProtocolMsg( + 11, + byteArray.size, + byteArray + ) + ) + } else { + CallerLogger.d("$M_ADAS_IMPL$TAG", "同步美化模式状态时司机端Server未启动!") + } + } + } + /** * 设置工控机演示模式(美化模式)开启、关闭 * isEnable = true 开启 diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt index 62c733e268..fbf3c04fb7 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/telematic/TeleMsgHandler.kt @@ -11,6 +11,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setDemoMode +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager.setIgnoreConditionDraw import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant @@ -56,15 +57,11 @@ class TeleMsgHandler : IMsgHandler { } } MogoProtocolMsg.SYNC_MODE_STATUS -> { - val demoModeAndTrajectoryString = String(it.body) - invokeNettyConnResult("乘客屏收到的美化模式状态为:${demoModeAndTrajectoryString}") - if (demoModeAndTrajectoryString.contains(",")) { - val strArray = demoModeAndTrajectoryString.split(",") - if (strArray.size == 2) { - FunctionBuildConfig.isDemoMode = (strArray[0] == "true") - FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = (strArray[1] == "true") - } + FunctionBuildConfig.isDemoMode = when (it.body[0].toInt()) { + 1 -> true + else -> false } + invokeNettyConnResult("乘客屏收到的美化模式DemoMode为:${FunctionBuildConfig.isDemoMode}") } MogoProtocolMsg.REQ_MAC_ADDRESS -> { val carConfig = MessagePad.CarConfigResp.parseFrom(msg.body) @@ -82,11 +79,20 @@ class TeleMsgHandler : IMsgHandler { MoGoAiCloudClientConfig.getInstance().sn ) } + // SN 10 -> { val sn = String(it.body) isReceiveSN = true NettyTcpClient.sSERVER_SN = sn } + // 美化模式是否忽略条件直接绘制 + 11 -> { + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = when (it.body[0].toInt()) { + 1 -> true + else -> false + } + invokeNettyConnResult("乘客屏收到的美化模式isIgnore为:${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}") + } else -> { } } @@ -144,16 +150,8 @@ class TeleMsgHandler : IMsgHandler { override fun handleClientConn2Server(channel: Channel?) { val socketAddress = channel?.remoteAddress().toString() CallerLogger.d("${SceneConstant.M_ADAS_IMPL}$TAG", "Client ip is:${socketAddress}") - val byteArray = "${FunctionBuildConfig.isDemoMode},${FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData}".toByteArray() - NSDNettyManager.getInstance().sendMsgToSpecifiedClient( - MogoProtocolMsg( - MogoProtocolMsg.SYNC_MODE_STATUS, - byteArray.size, - byteArray - ), channel - ) { - CallerLogger.d("${SceneConstant.M_ADAS_IMPL}$TAG", "同步美化模式状态是否成功:${it.isSuccess}") - } + setDemoMode(FunctionBuildConfig.isDemoMode) + setIgnoreConditionDraw(FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData) } override fun handleClientConnStatus(statusCode: Int, content: String?, channel: Channel) { diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt index 3bb1317489..083e93fb7e 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt @@ -125,11 +125,18 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { /** * 演示模式(美化模式)该设置作用域只限定于鹰眼 + * 司机屏同步给乘客屏 * isEnable = true 开启 * isEnable = false 关闭 */ fun setDemoMode(isEnable: Boolean) + /** + * 是否忽略条件直接绘制 + * 司机屏同步给乘客屏 + */ + fun setIgnoreConditionDraw(isIgnore: Boolean) + /** * 设置工控机演示模式(美化模式)开启、关闭 * isEnable = true 开启 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index c2bbe23556..a9d63a6b1b 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -160,6 +160,14 @@ object CallerAutoPilotManager { providerApi?.setDemoMode(isEnable) } + /** + * 是否忽略条件直接绘制 + * 司机屏同步给乘客屏 + */ + fun setIgnoreConditionDraw(isIgnore: Boolean) { + providerApi?.setIgnoreConditionDraw(isIgnore) + } + /** * 设置工控机演示模式(美化模式)开启、关闭 * isEnable = true 开启 From 398b7e43240c4e80caa56b79a4eadb232745308a Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 15 Sep 2022 15:36:54 +0800 Subject: [PATCH 09/13] =?UTF-8?q?[2.10.0]=20taxi/bus=E5=8F=B8=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF=E5=A2=9E=E5=8A=A0setIgnoreConditionDraw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/bus/model/BusOrderModel.java | 3 +++ .../src/main/java/com/mogo/och/taxi/model/TaxiModel.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index 54e2773b9e..f8e5b3bd17 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -683,6 +683,7 @@ public class BusOrderModel { private void closeBeautificationMode() { if (FunctionBuildConfig.isDemoMode) {//收车结束美化 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为false(收车)"); } @@ -802,6 +803,7 @@ public class BusOrderModel { && backgroundCurrentStationIndex <= stationList.size()-1) && stationList.get(backgroundCurrentStationIndex).isLeaving()){//行驶过程中设置美化 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为true(每次滑动出发)"); } @@ -948,6 +950,7 @@ public class BusOrderModel { if (FunctionBuildConfig.isDemoMode && backgroundCurrentStationIndex <= stationList.size() - 1) {//到达一站结束美化 FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerLogger.INSTANCE.d(M_BUS + TAG, "美化模式-ignore:置为false(到最后一站)"); } diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 873e27282b..06b77b0491 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -859,6 +859,7 @@ public class TaxiModel { && mCurrentOCHOrder.orderStatus == TaxiOrderStatusEnum.OnTheWayToEnd.getCode()) { // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后,置true FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为true(更新本地order信息)"); } @@ -874,6 +875,7 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 取消或订单已完成时,置false FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为false(已完成or清除当前订单)"); } @@ -1163,6 +1165,7 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 订单对应自动驾驶开启后,置true FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = true; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(true); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(true); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为true(到达出发点且已开启自动驾驶)"); } @@ -1231,6 +1234,7 @@ public class TaxiModel { if (FunctionBuildConfig.isDemoMode) { // 当美化模式(演示模式)开启时: 到达目的地,置false FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData = false; + CallerAutoPilotManager.INSTANCE.setIgnoreConditionDraw(false); CallerAutoPilotManager.INSTANCE.setIPCDemoMode(false); CallerLogger.INSTANCE.d(M_TAXI + TAG, "美化模式-ignore:置为false(到达目的地)"); } From 5fbef0e33f63b424b0ea4dc000878fec35fa6bc5 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 15 Sep 2022 19:50:22 +0800 Subject: [PATCH 10/13] =?UTF-8?q?[=E7=BA=BF=E7=A8=8B=E4=BC=98=E5=8C=96]?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 26 +++---- .../com/mogo/launcher/MogoApplication.java | 70 +++++++++---------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ec88716351..d7334c8151 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,19 +33,19 @@ if (!isAndroidTestBuild()) { apply plugin: 'apm-plugin' } -if (!isAndroidTestBuild()) { - apply plugin: 'bytex.threadOpt' - thread_opt { - enable true - enableInDebug true - logLevel "DEBUG" - //白名单中的类不进行替换 - white_list = [ - 'leakcanary.*', - 'com.loc.*' - ] - } -} +//if (!isAndroidTestBuild()) { +// apply plugin: 'bytex.threadOpt' +// thread_opt { +// enable true +// enableInDebug true +// logLevel "DEBUG" +// //白名单中的类不进行替换 +// white_list = [ +// 'leakcanary.*', +// 'com.loc.*' +// ] +// } +//} //if (!isAndroidTestBuild()) { // /** diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 2427ed9414..c472f0a6d4 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -3,14 +3,14 @@ package com.mogo.launcher; import com.mogo.eagle.core.function.main.MainMoGoApplication; import android.content.Context; -import androidx.annotation.NonNull; +//import androidx.annotation.NonNull; import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel; import com.mogo.eagle.core.utilcode.mogo.logger.Logger; import com.mogo.launcher.crash.CrashSystem; -import com.mogo.thread.ext.core.ThreadManager; -import com.mogo.thread.ext.core.config.ThreadConfig; - -import java.util.concurrent.ThreadPoolExecutor; +//import com.mogo.thread.ext.core.ThreadManager; +//import com.mogo.thread.ext.core.config.ThreadConfig; +// +//import java.util.concurrent.ThreadPoolExecutor; /** * @author congtaowang @@ -23,36 +23,36 @@ public class MogoApplication extends MainMoGoApplication { @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); - ThreadConfig.Builder builder = new ThreadConfig.Builder().listener(new ThreadConfig.TaskExecuteListener() { - @Override - public boolean isEnabled() { - return true; // 如果返回true,会有后续的回调;如果返回false, 不会有后续的回调 - } - - @Override - public void onExecutorBefore(@NonNull Runnable runnable) { - //每个任务执行前回调 - } - - @Override - public void onExecutorAfter(@NonNull Runnable runnable) { - //每个任务执行后回调 - } - - /** - * @param core 线程池的核心数 - * @param max 线程池的最大线程数 - * @param active 线程池正在活跃的任务数 - * @param completed 线程池已完成的任务数 - */ - @Override - public void onExecutorStateChanged(@NonNull ThreadPoolExecutor pool, int core, int max, int active, long completed) { - //线程池在执行过程,状态变化回调 - //Log.d("POOL", "core:" + core + ";max:" + max + ";active:" + active + ";completed:" + completed); - } - }); - builder.loggable(false); - ThreadManager.INSTANCE.init(builder); +// ThreadConfig.Builder builder = new ThreadConfig.Builder().listener(new ThreadConfig.TaskExecuteListener() { +// @Override +// public boolean isEnabled() { +// return true; // 如果返回true,会有后续的回调;如果返回false, 不会有后续的回调 +// } +// +// @Override +// public void onExecutorBefore(@NonNull Runnable runnable) { +// //每个任务执行前回调 +// } +// +// @Override +// public void onExecutorAfter(@NonNull Runnable runnable) { +// //每个任务执行后回调 +// } +// +// /** +// * @param core 线程池的核心数 +// * @param max 线程池的最大线程数 +// * @param active 线程池正在活跃的任务数 +// * @param completed 线程池已完成的任务数 +// */ +// @Override +// public void onExecutorStateChanged(@NonNull ThreadPoolExecutor pool, int core, int max, int active, long completed) { +// //线程池在执行过程,状态变化回调 +// //Log.d("POOL", "core:" + core + ";max:" + max + ";active:" + active + ";completed:" + completed); +// } +// }); +// builder.loggable(false); +// ThreadManager.INSTANCE.init(builder); } @Override From 9a7cfca9977b28be928743fc7ef3b9aea9e1fc06 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 15 Sep 2022 22:14:21 +0800 Subject: [PATCH 11/13] =?UTF-8?q?[2.10.0]=20taxi=E5=90=8E=E9=97=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java | 6 +----- OCH/mogo-och-taxi/src/main/res/layout/taxi_panel.xml | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java index af84d17295..27c23d222a 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiFragment.java @@ -109,11 +109,7 @@ public class TaxiFragment extends BaseTaxiTabFragment