Merge branch 'dev_robotaxi-d-app-module_251_220125_2.5.1' into dev_MogoAP_eagle-220_211207_8.0.17_merge

This commit is contained in:
donghongyu
2022-02-11 19:05:19 +08:00
25 changed files with 104 additions and 145 deletions

View File

@@ -417,7 +417,7 @@ public abstract class BaseOchBusTabFragment<V extends IView, P extends Presenter
* @param newSpeed
*/
public void updateSpeedView(float newSpeed){
int speed = (int) (newSpeed * 3.6F);
int speed = (int) (Math.abs(newSpeed) * 3.6F); // 倒车时工控机反馈定位信息中speed为负值
mouduleArc.setArcColor(Color.parseColor(speed > 60 ? "#DB3137" : "#3E77F6"));
mouduleArc.setValues(speed);
flSpeed.setBackgroundResource(speed > 60 ? R.drawable.bus_yi_biao_pan_bg_speeding : R.drawable.bus_yi_biao_pan_bg_nor);

View File

@@ -1,5 +1,7 @@
package com.mogo.och.bus.presenter;
import static com.mogo.och.bus.constant.OchBusConst.STATION_STATUS_STOPPED;
import android.content.Context;
import android.location.Location;
import android.os.Handler;
@@ -14,7 +16,6 @@ import com.mogo.eagle.core.data.BaseData;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager;
@@ -56,7 +57,6 @@ import io.reactivex.exceptions.UndeliverableException;
import io.reactivex.functions.Consumer;
import io.reactivex.plugins.RxJavaPlugins;
import io.reactivex.schedulers.Schedulers;
import static com.mogo.och.bus.constant.OchBusConst.STATION_STATUS_STOPPED;
/**
* @author congtaowang
@@ -273,10 +273,6 @@ public class OchBusOrderModel {
};
// 自车定位
private IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
}
@Override
public void onCarLocationChanged2( Location location ) {

View File

@@ -18,7 +18,6 @@ import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
@@ -31,11 +30,6 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiAutopilotPlanningCallback;
import com.mogo.och.taxi.passenger.constant.OCHTaxiConst;
import com.mogo.och.taxi.passenger.constant.OrderStatusEnum;
import com.mogo.och.taxi.passenger.constant.OrderTypeEnum;
import com.mogo.och.taxi.passenger.network.OCHTaxiServiceCallback;
import com.mogo.och.taxi.passenger.bean.DriverServiceDataRespBean;
import com.mogo.och.taxi.passenger.bean.DriverStatusQueryRespBean;
import com.mogo.och.taxi.passenger.bean.OrderGrabRespBean;
@@ -46,9 +40,14 @@ import com.mogo.och.taxi.passenger.bean.OrdersInServiceQueryRespBean;
import com.mogo.och.taxi.passenger.bean.OrdersListQueryRespBean;
import com.mogo.och.taxi.passenger.bean.OrdersNewBookingQueryRespBean;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiADASStatusCallback;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiAutopilotPlanningCallback;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiCarStatusCallback;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiControllerStatusCallback;
import com.mogo.och.taxi.passenger.callback.IOCHTaxiOrderStatusCallback;
import com.mogo.och.taxi.passenger.constant.OCHTaxiConst;
import com.mogo.och.taxi.passenger.constant.OrderStatusEnum;
import com.mogo.och.taxi.passenger.constant.OrderTypeEnum;
import com.mogo.och.taxi.passenger.network.OCHTaxiServiceCallback;
import com.mogo.och.taxi.passenger.network.OCHTaxiServiceManagerNew;
import com.mogo.och.taxi.passenger.utils.OrderUtil;
import com.mogo.och.taxi.passenger.utils.PinYinUtil;
@@ -856,10 +855,6 @@ public class MogoOCHTaxiModelNew {
// 自车定位
private IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
}
@Override
public void onCarLocationChanged2( Location location ) {

View File

@@ -427,7 +427,7 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
}
public void updateSpeedView(float newSpeed){
int speed = (int) (newSpeed * 3.6F);
int speed = (int) (Math.abs(newSpeed) * 3.6F); // 倒车时工控机反馈定位信息中speed为负值
mSpeedView.setText(String.valueOf(speed));
}

View File

@@ -19,7 +19,6 @@ import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
@@ -32,11 +31,6 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.och.taxi.callback.IOCHTaxiAutopilotPlanningCallback;
import com.mogo.och.taxi.constant.OCHTaxiConst;
import com.mogo.och.taxi.constant.OrderStatusEnum;
import com.mogo.och.taxi.constant.OrderTypeEnum;
import com.mogo.och.taxi.network.OCHTaxiServiceCallback;
import com.mogo.och.taxi.bean.DriverServiceDataRespBean;
import com.mogo.och.taxi.bean.DriverStatusQueryRespBean;
import com.mogo.och.taxi.bean.OrderGrabRespBean;
@@ -47,9 +41,14 @@ import com.mogo.och.taxi.bean.OrdersInServiceQueryRespBean;
import com.mogo.och.taxi.bean.OrdersListQueryRespBean;
import com.mogo.och.taxi.bean.OrdersNewBookingQueryRespBean;
import com.mogo.och.taxi.callback.IOCHTaxiADASStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiAutopilotPlanningCallback;
import com.mogo.och.taxi.callback.IOCHTaxiCarStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiControllerStatusCallback;
import com.mogo.och.taxi.callback.IOCHTaxiOrderStatusCallback;
import com.mogo.och.taxi.constant.OCHTaxiConst;
import com.mogo.och.taxi.constant.OrderStatusEnum;
import com.mogo.och.taxi.constant.OrderTypeEnum;
import com.mogo.och.taxi.network.OCHTaxiServiceCallback;
import com.mogo.och.taxi.network.OCHTaxiServiceManagerNew;
import com.mogo.och.taxi.utils.OrderUtil;
import com.mogo.och.taxi.utils.PinYinUtil;
@@ -905,10 +904,6 @@ public class MogoOCHTaxiModelNew {
// 自车定位
private IMogoCarLocationChangedListener2 mCarLocationChangedListener2 = new IMogoCarLocationChangedListener2() {
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
}
@Override
public void onCarLocationChanged2( Location location ) {

View File

@@ -419,7 +419,7 @@ public abstract class BaseOchTaxiTabFragment<V extends IView, P extends Presente
}
public void updateSpeedView(float newSpeed){
int speed = (int) (newSpeed * 3.6F);
int speed = (int) (Math.abs(newSpeed) * 3.6F); // 倒车时工控机反馈定位信息中speed为负值
mSpeedView.setText(String.valueOf(speed));
}

View File

@@ -114,7 +114,7 @@ ext {
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
mogoobu : 'com.zhidao.support.obu:mogoobu:1.0.0.19',
mogoami : 'com.zhidao.support.obu.ami:mogoami:1.0.0.10',
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate16',
adasHigh : 'com.zhidao.support.adas:high:1.2.1.2_bate21',
// google
googlezxing : "com.google.zxing:core:3.3.3",

View File

@@ -42,8 +42,8 @@ class MoGoAutopilotProvider :
Logger.d(TAG, "初始化工控机连接……")
mContext = context
// 初始化ADAS 域控制器
CupidLogUtils.setEnableLog(false)
CupidLogUtils.setIsWriteLog(false)
//CupidLogUtils.setEnableLog(false)
//CupidLogUtils.setIsWriteLog(false)
// TODO 临时方案根据不同的身份标识连接不同的工控机IP
when (FunctionBuildConfig.appIdentityMode) {
0 -> // 司机
@@ -156,4 +156,17 @@ class MoGoAutopilotProvider :
override fun setIPCUpgradeCancel() {
AdasManager.getInstance().sendBaseInfo(IPCUpgradeInfo.cancel());
}
/**
* 演示模式(美化模式)
* isEnable = true 开启
* isEnable = false 关闭
*/
override fun setDemoMode(isEnable: Boolean) {
if (isEnable) {
AdasManager.getInstance().enableDemoMode()
} else {
AdasManager.getInstance().disableDemoMode()
}
}
}

View File

@@ -268,9 +268,11 @@ class DebugSettingView @JvmOverloads constructor(
// 演示模式,上一次勾选的数据
val isDemoMode =
SharedPrefsMgr.getInstance(context).getBoolean(MoGoConfig.IS_DEMO_MODE, false)
CallerAutoPilotManager.setDemoMode(isDemoMode)
rbIsDemoMode.isChecked = isDemoMode
// 演示模式
rbIsDemoMode.setOnCheckedChangeListener { buttonView, isChecked ->
CallerAutoPilotManager.setDemoMode(isChecked)
FunctionBuildConfig.isDemoMode = isChecked
SharedPrefsMgr.getInstance(context).putBoolean(MoGoConfig.IS_DEMO_MODE, isChecked)
}

View File

@@ -8,7 +8,6 @@ import android.view.Gravity
import android.widget.FrameLayout
import com.alibaba.android.arouter.launcher.ARouter
import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
@@ -99,10 +98,6 @@ class SpeedPanelView @JvmOverloads constructor(
}
override fun onCarLocationChanged(latLng: MogoLatLng?) {
}
override fun onCarLocationChanged2(latLng: Location) {
mLatLng = latLng
}

View File

@@ -203,10 +203,6 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
)
}
override fun onCarLocationChanged(latLng: MogoLatLng?) {
}
override fun onCarLocationChanged2(latLng: Location?) {
latLng?.let {
mLocation = it

View File

@@ -1,9 +1,7 @@
package com.mogo.eagle.core.function.v2x.speedlimit;
import android.content.Context;
import android.location.Location;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.navi.IMogoCarLocationChangedListener2;
@@ -58,8 +56,4 @@ public class SpeedLimitDataManager implements IMogoCarLocationChangedListener2 {
mLocation = latLng;
}
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
}
}

View File

@@ -4,7 +4,6 @@ import android.content.Context
import android.location.Location
import android.os.Handler
import android.os.Looper
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.trafficlight.RoadIDResult
import com.mogo.eagle.core.data.trafficlight.TrafficLightDetail
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
@@ -163,10 +162,6 @@ class MogoTrafficLightManager : IMogoCarLocationChangedListener2 {
)
}
override fun onCarLocationChanged(latLng: MogoLatLng?) {
}
override fun onCarLocationChanged2(latLng: Location?) {
latLng?.let {
mLocation = latLng

View File

@@ -1,27 +0,0 @@
package com.mogo.eagle.core.function.api.autopilot;
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo;
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
import java.util.ArrayList;
/**
* 自动驾驶规划路线相关的监听
*/
public interface IMoGoAutopilotPlanningListener {
/**
* 工控机引导线数据
*
* @param trajectoryInfos 引导线数据经纬度
*/
void onAutopilotTrajectory(ArrayList<ADASTrajectoryInfo> trajectoryInfos);
/**
* 2021/6/23 工控机经纬度 绘制时转成高德经纬度
*
* @param routeList 工控机全局规划路径
*/
void onAutopilotRotting(AutopilotRouteInfo routeList);
}

View File

@@ -0,0 +1,24 @@
package com.mogo.eagle.core.function.api.autopilot
import com.mogo.eagle.core.data.autopilot.ADASTrajectoryInfo
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo
import java.util.ArrayList
/**
* 自动驾驶规划路线相关的监听
*/
interface IMoGoAutopilotPlanningListener {
/**
* 工控机引导线数据
*
* @param trajectoryInfos 引导线数据经纬度
*/
fun onAutopilotTrajectory(trajectoryInfos: ArrayList<ADASTrajectoryInfo>)
/**
* 2021/6/23 工控机经纬度 绘制时转成高德经纬度
*
* @param routeList 工控机全局规划路径
*/
fun onAutopilotRotting(routeList: AutopilotRouteInfo?)
}

View File

@@ -1,64 +1,60 @@
package com.mogo.eagle.core.function.api.autopilot;
package com.mogo.eagle.core.function.api.autopilot
import androidx.annotation.NonNull;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider;
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
import com.mogo.eagle.core.function.api.base.IMoGoFunctionServerProvider
/**
* @author xiaoyuzhou
* @date 2021/9/22 8:27 下午
* 自动驾驶节点
*/
public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider {
interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider {
/**
* 重新连接自动驾驶域控制器指定IP地址
*
* @param autoPilotIp 指定与控制器IP
*/
void resetIpAddress(String autoPilotIp);
fun resetIpAddress(autoPilotIp: String)
/**
* 开启自动驾驶
*
* @param controlParameters 开启自动驾驶的控制参数
*/
void startAutoPilot(AutopilotControlParameters controlParameters);
fun startAutoPilot(controlParameters: AutopilotControlParameters)
/**
* 发送json数据给 Autopilot 自动驾驶控制器
* 具体的json格式需要与@宋克难 进行沟通
*/
void sendMessageToAutopilot(@NonNull String jsonString);
fun sendMessageToAutopilot(jsonString: String)
/**
* 结束自动驾驶
*/
void cancelAutoPilot();
fun cancelAutoPilot()
/**
* 开启域控制器录制bag包
*
* @return true-成功,false-失败
*/
boolean recordPackage();
fun recordPackage(): Boolean
/**
* Log 是否显示
*
* @param isEnableLog true-打开,false-关闭
*/
void setEnableLog(boolean isEnableLog);
fun setEnableLog(isEnableLog: Boolean)
/**
* Log 是否写入
*
* @param isWriteLog true-打开,false-关闭
*/
void setIsWriteLog(boolean isWriteLog);
Boolean setAutoPilotSpeed(int speed);
fun setIsWriteLog(isWriteLog: Boolean)
fun setAutoPilotSpeed(speed: Int): Boolean
/**
* 记录各种失败
@@ -66,25 +62,32 @@ public interface IMoGoAutopilotProvider extends IMoGoFunctionServerProvider {
* @param name 文件名字
* @param reason 原因
*/
void recordCause(String key, String name, String id, String reason);
fun recordCause(key: String?, name: String?, id: String?, reason: String?)
/**
* 关机
*/
void setIPCShutDown();
fun setIPCShutDown()
/**
* 重启
*/
void setIPCReboot();
fun setIPCReboot()
/**
* 工控机升级确认
*/
void setIPCUpgradeAffirm();
fun setIPCUpgradeAffirm()
/**
* 工控机升级取消
*/
void setIPCUpgradeCancel();
}
fun setIPCUpgradeCancel()
/**
* 演示模式美化模式
* isEnable = true 开启
* isEnable = false 关闭
*/
fun setDemoMode(isEnable: Boolean)
}

View File

@@ -15,8 +15,8 @@ object CallerAutoPilotManager {
private val providerApi: IMoGoAutopilotProvider?
get() = CallerBase.getApiInstance(
IMoGoAutopilotProvider::class.java,
MogoServicePaths.PATH_AUTO_PILOT
IMoGoAutopilotProvider::class.java,
MogoServicePaths.PATH_AUTO_PILOT
)
/**
@@ -90,15 +90,23 @@ object CallerAutoPilotManager {
/**
* 设置工控机升级确认
*/
fun setIPCUpgradeAffirm(){
fun setIPCUpgradeAffirm() {
providerApi?.setIPCUpgradeAffirm()
}
/**
* 设置工控机升级取消
*/
fun setIPCUpgradeCancel(){
fun setIPCUpgradeCancel() {
providerApi?.setIPCUpgradeCancel()
}
/**
* 演示模式(美化模式)
* isEnable = true 开启
* isEnable = false 关闭
*/
fun setDemoMode(isEnable: Boolean) {
providerApi?.setDemoMode(isEnable)
}
}

View File

@@ -80,7 +80,7 @@ MOGO_TRAFFICLIVE_VERSION=1.3.18
MOGO_LOCATION_VERSION=1.3.18
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.0.0.23
MAP_SDK_VERSION=2.0.0.24
# websocket
WEBSOCKET_VERSION=1.1.7
## 产品库必备配置产品库自动对versionCode和versionName版本进行升级

View File

@@ -1,8 +1,6 @@
package com.mogo.map.navi;
import com.mogo.eagle.core.data.map.MogoLatLng;
/**
* @author congtaowang
* @since 2020-03-14
@@ -11,5 +9,4 @@ import com.mogo.eagle.core.data.map.MogoLatLng;
*/
public interface IMogoCarLocationChangedListener {
void onCarLocationChanged( MogoLatLng latLng );
}

View File

@@ -90,12 +90,6 @@ public class EventDispatchCenter implements
return false;
}
@Override
public void onCarLocationChanged( MogoLatLng latLng ) {
// do nothing.
}
@Override
public void onCarLocationChanged2( Location latLng ) {
@@ -112,15 +106,6 @@ public class EventDispatchCenter implements
} catch ( Exception e ) {
e.printStackTrace();
}
} else {
try {
if ( target == null ) {
target = new MogoLatLng( latLng.getLatitude(), latLng.getLongitude() );
}
listener.onCarLocationChanged( target );
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
}

View File

@@ -8,11 +8,6 @@ package com.mogo.module.main.constants;
*/
public class MainConstants {
/**
* 消息:加载卡片模块
*/
public static final int MSG_LOAD_CARD_MODULES = 5000;
/**
* 消息:隐藏地图遮罩(避免地图加载白屏)
*/

View File

@@ -639,11 +639,6 @@ public class MogoServices implements IMogoMapListener,
}
}
@Override
public void onCarLocationChanged( MogoLatLng latLng ) {
}
/**
* 刷新数据
*/

View File

@@ -208,10 +208,6 @@ public class DispatchAutoPilotManager implements IMogoOnMessageListener<Dispatch
mogoLocation = loc;
}
@Override
public void onCarLocationChanged(MogoLatLng mogoLatLng) {
}
@Override
public void onCheck(boolean isChecked) {

View File

@@ -112,13 +112,20 @@ public class MogoRouteOverlayManager implements
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
if (FunctionBuildConfig.isIgnoreConditionsDrawAutopilotTrajectoryData ){
return;
}
this.STATUS_AUTOPILOT = autoPilotStatusInfo.getControl_pilotmode();
//Log.d("lianglihui","onAutopilotStatusResponse:"+STATUS_AUTOPILOT);
if (STATUS_AUTOPILOT == 1 ){
// if (STATUS_AUTOPILOT == 1 ){
// if (mEnding != null){
// RouteOverlayDrawer.getInstance(mContext).addEndingMarker(mEnding.lat,mEnding.lon);
// }
}else {
// }else {
//
// }我
if ( STATUS_AUTOPILOT != 1){
RouteOverlayDrawer.getInstance(mContext).clearEndingMarker();
RouteOverlayDrawer.getInstance(mContext).clearMogoRouteOverlay();
}

View File

@@ -81,11 +81,6 @@ public class V2XLocationListener
return mV2XLocationListener;
}
@Override
public void onCarLocationChanged(MogoLatLng latLng) {
// do not impl
}
@Override
public void onCarLocationChanged2(Location location) {
MogoLocation loc = new MogoLocation();