Merge branch 'dev_robotaxi-d-app-module_2110_220915_2.11.0' into dev_local_2.12.0
This commit is contained in:
@@ -56,6 +56,7 @@ import com.mogo.och.common.module.biz.provider.LoginService;
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager;
|
||||
import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil;
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil;
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil;
|
||||
import com.mogo.och.common.module.utils.PinYinUtil;
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
@@ -855,10 +856,30 @@ public class BusOrderModel {
|
||||
return;
|
||||
}
|
||||
|
||||
//MAP 280 每隔100ms左右返回一次到站, 导致在到达中间站后再次滑动出发后会有时间差,收到一次到站,出现问题
|
||||
//此处比对 自驾告诉的到站站点坐标和本地应到站站点坐标, 一致时才能到站
|
||||
if (data != null && data.getEndLocation() != null){
|
||||
|
||||
String latitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLatitude(),5); //wgs
|
||||
String longitude = NumberFormatUtil.cutOutNumber(data.getEndLocation().getLongitude(),5);
|
||||
|
||||
int arrivedStationIndex = backgroundCurrentStationIndex + 1;
|
||||
BusStationBean arriveStation = stationList.get(arrivedStationIndex);
|
||||
String arriveLat = NumberFormatUtil.cutOutNumber(arriveStation.getLat(),5);
|
||||
String arriveLon = NumberFormatUtil.cutOutNumber(arriveStation.getLon(),5);
|
||||
|
||||
if (!latitude.equals(arriveLat) || !longitude.equals(arriveLon)){
|
||||
CallerLogger.INSTANCE.e( M_BUS + TAG, "行程日志-到站拦截,到站坐标不一致" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isArrivedStation) return;
|
||||
isArrivedStation = true;
|
||||
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-到站==backgroundCurrentStationIndex=" + backgroundCurrentStationIndex);
|
||||
CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex="
|
||||
+ backgroundCurrentStationIndex);
|
||||
|
||||
isGoingToNextStation = false;
|
||||
|
||||
arriveSiteStation();
|
||||
|
||||
@@ -21,4 +21,20 @@ public class NumberFormatUtil {
|
||||
}
|
||||
return String.valueOf(num);
|
||||
}
|
||||
|
||||
/**
|
||||
* 截取小数点后cutNum位, 不进行四舍五入
|
||||
* @param num
|
||||
* @param cutNum
|
||||
* @return
|
||||
*/
|
||||
public static String cutOutNumber(double num,int cutNum){
|
||||
try{
|
||||
BigDecimal bg = new BigDecimal(num).setScale(cutNum, RoundingMode.DOWN);
|
||||
return String.valueOf(bg.doubleValue());
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
}
|
||||
|
||||
override fun initBiz() {
|
||||
bizConfigCenter.init(mContext!!)
|
||||
FuncConfigImpl.init()
|
||||
// bizConfigCenter.init(mContext!!)
|
||||
// FuncConfigImpl.init()
|
||||
traceManager.init(mContext!!)
|
||||
MogoLogCatchManager.init(mContext!!)
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_LCW
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_LIMIT_SPEED_SET
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_LTA
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_OPT_LINE
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RAIN_MODE
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RTS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_SLW
|
||||
@@ -88,6 +89,7 @@ class FuncConfigConst {
|
||||
foundationSubList.add(SubBiz(BIZ_LIMIT_SPEED_SET, lock = false, state = true, dependNode = "", data = ""))
|
||||
foundationSubList.add(SubBiz(BIZ_BYPASS, lock = false, state = true, dependNode = "", data = ""))
|
||||
foundationSubList.add(SubBiz(BIZ_AUTOPILOT_LANE_SELECTION, lock = false, state = true, dependNode = "", data = ""))
|
||||
foundationSubList.add(SubBiz(BIZ_PNC_ACTIONS, lock = false, state = true, dependNode = "", data = ""))
|
||||
businessList.add(Business(FOUNDATION,foundationSubList))
|
||||
|
||||
return FuncConfig(0, AppUtils.getAppVersionCode(), getChannelCode(), getEnv(), businessList)
|
||||
|
||||
@@ -49,9 +49,19 @@ internal class GpsImpl(ctx: Context): IFlow<GpsStatus>(ctx) {
|
||||
false
|
||||
}
|
||||
|
||||
private val onStateListener = object : IAppStateListener {
|
||||
|
||||
override fun onAppStateChanged(isForeground: Boolean) {
|
||||
if (isForeground) {
|
||||
send(isLocationEnabled(), isGrandFineLocation())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onCreate() {
|
||||
val isGranted = isGrandFineLocation()
|
||||
AppStateManager.registerAppStateListener(onStateListener)
|
||||
send(isLocationEnabled(), isGranted)
|
||||
if (!isGranted) {
|
||||
PermissionUtils.requestAccessFineLocation(object : SimpleCallback {
|
||||
@@ -88,6 +98,7 @@ internal class GpsImpl(ctx: Context): IFlow<GpsStatus>(ctx) {
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
}
|
||||
AppStateManager.unRegisterAppStateListener(onStateListener)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ import androidx.appcompat.content.res.AppCompatResources
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_PNC_ACTIONS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.FOUNDATION
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight
|
||||
import com.mogo.eagle.core.data.trafficlight.isRed
|
||||
@@ -19,6 +21,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningAction
|
||||
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.view_pnc_actions.view.*
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
@@ -67,6 +70,7 @@ class PncActionsView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
mAutoPilotStatusInfo?.let {
|
||||
if (it.state == STATUS_AUTOPILOT_RUNNING) {
|
||||
|
||||
@@ -26,12 +26,17 @@ class VipIdentificationView @JvmOverloads constructor(
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val lp = this.layoutParams as LayoutParams
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_bus).toInt()
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_bus_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
|
||||
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi_passenger).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_passenger).toInt()
|
||||
} else {
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left_taxi).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top_taxi).toInt()
|
||||
lp.marginStart = resources.getDimension(R.dimen.module_vip_margin_left).toInt()
|
||||
lp.topMargin = resources.getDimension(R.dimen.module_vip_margin_top).toInt()
|
||||
}
|
||||
this.layoutParams = lp
|
||||
invalidate()
|
||||
|
||||
@@ -120,8 +120,7 @@ class TrafficLightNetWorkModel {
|
||||
}
|
||||
loader {
|
||||
apiCall {
|
||||
MoGoRetrofitFactory.getInstanceNoCallAdapter("http://dzt-qa-city.zhidaozhixing.com")
|
||||
.create(TrafficLightApiService::class.java).changeLight(map)
|
||||
getNetWorkApi().changeLight(map)
|
||||
}
|
||||
}
|
||||
onSuccess {
|
||||
|
||||
@@ -245,9 +245,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
|
||||
v2xType, alertContent, ttsContent, tag,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {}
|
||||
override fun onDismiss() {
|
||||
resetConditions()
|
||||
}
|
||||
override fun onDismiss() {}
|
||||
},
|
||||
true,
|
||||
5000L
|
||||
|
||||
@@ -40,6 +40,7 @@ class FuncBizConfig {
|
||||
const val BIZ_LIMIT_SPEED_SET = "BIZ_LIMIT_SPEED_SET" // 限速设置 todo 暂未有场景,未实现
|
||||
const val BIZ_BYPASS = "BIZ_BYPASS" // 绕障 todo 暂未实现
|
||||
const val BIZ_AUTOPILOT_LANE_SELECTION = "BIZ_AUTOPILOT_LANE_SELECTION" // 择机变道 todo 暂未实现
|
||||
const val BIZ_PNC_ACTIONS = "BIZ_PNC_ACTIONS" // PNC行为决策
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,12 @@
|
||||
|
||||
<dimen name="module_vip_width">104px</dimen>
|
||||
<dimen name="module_vip_height">104px</dimen>
|
||||
<dimen name="module_vip_margin_left_bus">540px</dimen>
|
||||
<dimen name="module_vip_margin_top_bus">40px</dimen>
|
||||
|
||||
<dimen name="module_vip_margin_left_taxi">640px</dimen>
|
||||
<dimen name="module_vip_margin_top_taxi">80px</dimen>
|
||||
<dimen name="module_vip_margin_left">640px</dimen>
|
||||
<dimen name="module_vip_margin_top">80px</dimen>
|
||||
<dimen name="module_vip_margin_left_taxi_passenger">540px</dimen>
|
||||
<dimen name="module_vip_margin_left_bus_passenger">640px</dimen>
|
||||
<dimen name="module_vip_margin_top_passenger">40px</dimen>
|
||||
|
||||
<dimen name="module_ext_speed_width_sm_radius">30px</dimen>
|
||||
<dimen name="module_ext_speed_width_big_radius">130px</dimen>
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
|
||||
<dimen name="module_vip_width">104px</dimen>
|
||||
<dimen name="module_vip_height">104px</dimen>
|
||||
<dimen name="module_vip_margin_left_bus">380px</dimen>
|
||||
<dimen name="module_vip_margin_top_bus">40px</dimen>
|
||||
|
||||
<dimen name="module_vip_margin_left_taxi">380px</dimen>
|
||||
<dimen name="module_vip_margin_top_taxi">40px</dimen>
|
||||
<dimen name="module_vip_margin_left">380px</dimen>
|
||||
<dimen name="module_vip_margin_top">40px</dimen>
|
||||
<dimen name="module_vip_margin_left_taxi_passenger">380px</dimen>
|
||||
<dimen name="module_vip_margin_left_bus_passenger">380px</dimen>
|
||||
<dimen name="module_vip_margin_top_passenger">40px</dimen>
|
||||
|
||||
<dimen name="module_ext_speed_width_sm_radius">20px</dimen>
|
||||
<dimen name="module_ext_speed_width_big_radius">110px</dimen>
|
||||
|
||||
@@ -175,4 +175,4 @@ ADAS_DATA_LIB_CHILD_VERSION=.0
|
||||
|
||||
|
||||
# 线程优化版本
|
||||
THREAD_OPT_VERSION=3.0.0
|
||||
THREAD_OPT_VERSION=3.0.1
|
||||
|
||||
@@ -74,14 +74,12 @@ public class MogoRouteOverlayManager implements
|
||||
if (from != 1 || location == null) {
|
||||
return;
|
||||
}
|
||||
if (isArriveAtStation.get()) {
|
||||
Logger.d(TAG, "--- onLocationChanged 1 -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
if (isArriveAtStation.get() && autopilotMode.get() != 1) {
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
boolean force = FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData;
|
||||
if (!force && autopilotMode.get() != 1) {
|
||||
Logger.d(TAG, "--- onLocationChanged 2 -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().clearMogoRouteOverlay();
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +87,6 @@ public class MogoRouteOverlayManager implements
|
||||
if (!queue.isEmpty()) {
|
||||
List<MessagePad.TrajectoryPoint> items = queue.pollLast();
|
||||
if (items != null && !items.isEmpty()) {
|
||||
Logger.d(TAG, "--- onLocationChanged -- [isDemo1: " + FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData + ",isDemo2:" +FunctionBuildConfig.isDemoMode + ",isGps:" + isGps + ",mode:" + autopilotMode.get() + ",lon:" + location.getLongitude() + ",lat:" + location.getLatitude() + ",angle:" + location.getBearing() + "]");
|
||||
RouteOverlayDrawer.getInstance().drawTrajectoryList(items, location.getBearing());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user