Merge branch 'dev_opt_2.15.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_opt_2.15.0

This commit is contained in:
xinfengkun
2023-03-08 10:50:24 +08:00
23 changed files with 83 additions and 60 deletions

View File

@@ -95,7 +95,7 @@ public class BusPassengerModel {
List<BusPassengerStation> mStations = new ArrayList<>();
private int mNextStationIndex = 0;// 要到达站的index
private List<MogoLocation> mTwoStationsRouts = new ArrayList<>();
private final List<MogoLocation> mTwoStationsRouts = new ArrayList<>();
private int mPreRouteIndex = 0;
private int mWipePreIndex = 0;
@@ -352,7 +352,6 @@ public class BusPassengerModel {
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
if (autopilotStatusInfo == null) return;
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
//2022.7.20 自动驾驶更换成带档位的

View File

@@ -169,7 +169,6 @@ public class BusPresenter extends Presenter<BusFragment>
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
if (autopilotStatusInfo == null) return;
int state = autopilotStatusInfo.getState();
// CallerLogger.INSTANCE.d(M_BUS + TAG, "onStateChange: " + state + "currentAutopilotStatus = " + currentAutopilotStatus);
switch (state) {

View File

@@ -168,7 +168,6 @@ public class SweeperPresenter extends Presenter<SweeperFragment>
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
if (autopilotStatusInfo == null) return;
int state = autopilotStatusInfo.getState();
// CallerLogger.INSTANCE.d(M_BUS + TAG, "onStateChange: " + state + "currentAutopilotStatus = " + currentAutopilotStatus);
switch (state) {

View File

@@ -117,8 +117,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
private IOCHTaxiPassengerADASStatusCallback mADASStatusCallback; //Model->Presenter自动驾驶状态相关
private IOCHTaxiPassengerAutopilotPlanningCallback mAutopilotPlanningCallback; //Model->Presenter自动驾驶线路规划
private Map<String,IOCHTaxiPassengerOrderStatusCallback> mOrderStatusCallbackMap = new ConcurrentHashMap<>();
private Map<String,IOCHTaxiPassengerControllerStatusCallback> mControllerStatusCallbackMap = new ConcurrentHashMap<>();
private final Map<String,IOCHTaxiPassengerOrderStatusCallback> mOrderStatusCallbackMap = new ConcurrentHashMap<>();
private final Map<String,IOCHTaxiPassengerControllerStatusCallback> mControllerStatusCallbackMap = new ConcurrentHashMap<>();
private ITaxiPassengerVeloctityCallback mVeloctityCallback;//道路限速返回
@@ -130,7 +130,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
private double mLongitude, mLatitude;
private MogoLocation mLocation = null;
private List<MogoLocation> mLocationsModels = new ArrayList<>();
private final List<MogoLocation> mLocationsModels = new ArrayList<>();
private TaxiPassengerModel() {
}
@@ -517,7 +517,6 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
if (autopilotStatusInfo == null) return;
int state = autopilotStatusInfo.getState();
// CallerLogger.INSTANCE.d( M_TAXI_P + TAG, "state = %s", state );
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {

View File

@@ -129,7 +129,7 @@ public class TaxiModel {
private volatile boolean isRestartAutopilot = false;
private List<MogoLocation> mRoutePoints = new ArrayList<>();
private final List<MogoLocation> mRoutePoints = new ArrayList<>();
private int mPreRouteIndex = 0;
private double mLongitude, mLatitude;
@@ -1160,7 +1160,6 @@ public class TaxiModel {
@Override
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autopilotStatusInfo) {
if (autopilotStatusInfo == null) return;
int state = autopilotStatusInfo.getState();
if (state == IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_RUNNING) {
if (state != mPrevAPStatus && mADASStatusCallback != null){

View File

@@ -149,6 +149,7 @@ android {
packagingOptions {
exclude 'META-INF/proguard/coroutines.pro'
exclude 'META-INF/*'
exclude "/lib/armeabi-v7a/*.so"
}
signingConfigs {
@@ -356,6 +357,7 @@ dependencies {
implementation project(':core:function-impl:mogo-core-function-hmi')
implementation project(':core:function-impl:mogo-core-function-map')
implementation project(':core:function-impl:mogo-core-function-chat')
implementation project(':core:function-impl:mogo-core-function-patch')
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-utils')

View File

@@ -14,7 +14,7 @@ interface IDispatchAdasApiService {
* @return [BaseData]
*/
@FormUrlEncoded
@POST("eagle-eye-dns/eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
@POST("eagle-eye-dns/dataService/autoDriver/receiveCarPreSetPath")
fun uploadAutopilotRoute(@FieldMap parameters: Map<String, String>): Observable<BaseData>
/**

View File

@@ -10,7 +10,7 @@ import retrofit2.http.POST
interface ILineUploadApi {
@Headers("Content-type:application/json;charset=UTF-8" )
@POST( "/yycp-data-center-service/carTrack/receiveCarTrack/" )
@POST( "eagle-eye-dns/yycp-data-center-service/carTrack/receiveCarTrack/" )
fun uploadLineId(@Body lineId: LineUploadData): Observable<BaseData>
}

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.function.biz.v2x.road
import android.content.Context
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.HostConst.DATA_CENTER_HOST
import com.mogo.commons.constants.HostConst.getEagleHost
import com.mogo.eagle.core.data.v2x.LineUploadData
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
@@ -54,7 +55,7 @@ class LineUploadManager private constructor(context: Context) : IMoGoAutopilotSt
private fun uploadLine(lineId: Long) {
val lineUploadData = LineUploadData(lineId, MoGoAiCloudClientConfig.getInstance().sn)
disposable = MoGoRetrofitFactory.getInstance(DATA_CENTER_HOST)
disposable = MoGoRetrofitFactory.getInstance(getEagleHost())
.create(ILineUploadApi::class.java)
.uploadLineId(lineUploadData)
.subscribeOn(Schedulers.io())

View File

@@ -134,8 +134,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
if (gnssInfo != null) {
if (1 == FunctionBuildConfig.gpsProvider) {
// 同步给MAP地图
//CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(gnssInfo)
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(
gnssInfo.satelliteTime,
@@ -146,7 +144,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
}
}
/**
* 老底盘信息,透传底盘状态pb参考底盘
* TODO 目前由于M1车型不会在新底盘PB添加新的字段 所以临时保留

View File

@@ -50,9 +50,11 @@ class TrafficLightDispatcher : IMoGoAutopilotIdentifyListener, IMoGoTrafficLight
private var mContext: Context? = null
//是否有AI获取红绿灯灯态
@Volatile
private var hasAiLightStatus: Boolean = false
//obu数据
@Volatile
private var hasObuLightStatus: Boolean = false
fun initServer(context: Context) {

View File

@@ -86,10 +86,18 @@ class BindingCarNetWorkManager private constructor() {
SharedPrefsConstants.CAR_INFO,
GsonUtils.toJson(info.getData())
)
} else {
// SharedPrefsMgr.getInstance(context).putString(
// SharedPrefsConstants.CAR_INFO, "null")
e(
SceneConstant.M_BINDING + TAG, "getBindingCarInfo data = null "
)
}
}
override fun onError(e: Throwable) {
// SharedPrefsMgr.getInstance(context).putString(
// SharedPrefsConstants.CAR_INFO, e.message.toString())
e(
SceneConstant.M_BINDING + TAG,
"getBindingCarInfo onError e = " + e.toString() + "---e.getMessage = " + e.message

View File

@@ -10,6 +10,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
import mogo_msg.MogoReportMsg
@@ -69,29 +70,30 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
*工控机监控节点上报
*/
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
guardianInfo?.let{
if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|| it.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|| it.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|| it.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| it.resultList.contains(RESULT_SHOW_WARNING)
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)){
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList)
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))
}
ThreadUtils.runOnUiThread {
guardianInfo?.let{
if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|| it.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|| it.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|| it.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| it.resultList.contains(RESULT_SHOW_WARNING)
|| it.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)){
val reportEntity = ReportEntity(TimeUtils.millis2String(System.currentTimeMillis()),
it.src,it.level,it.msg,it.code,it.resultList,it.actionsList)
CallerMsgBoxManager.saveMsgBox(MsgBoxBean(MsgBoxType.REPORT, reportEntity))
}
if (reportList.size > 49) {
reportList.removeLast()
}
reportList.add(
0,
ReportEntity(
TimeUtils.millis2String(System.currentTimeMillis()),
it.src, it.level, it.msg, it.code, it.resultList, it.actionsList
if (reportList.size > 49) {
reportList.removeLast()
}
reportList.add(
0,
ReportEntity(
TimeUtils.millis2String(System.currentTimeMillis()),
it.src, it.level, it.msg, it.code, it.resultList, it.actionsList
)
)
)
reportListFloatWindow?.refreshData(reportList)
reportListFloatWindow?.refreshData(reportList)
// //Error 弹窗并有提示音
// if(it.resultList.contains(RESULT_AUTOPILOT_DISABLE)
@@ -128,6 +130,7 @@ class IPCReportManager : IMoGoAutopilotStatusListener {
// }
// }
// }
}
}
}

View File

@@ -1,6 +1,5 @@
package com.zhjt.mogo_core_function_devatools.upgrade
import android.app.NotificationManager
import android.content.Context
import android.content.pm.PackageInstaller
import com.mogo.eagle.core.data.constants.MogoServicePaths
@@ -265,31 +264,20 @@ class UpgradeManager : IDownload {
}
/**
* 鹰眼app下载监听 liyz
* 鹰眼app下载监听
*/
fun updateUpgradeProgress(context: Context) {
val builder = NotificationCompat.Builder(context)
// builder.setSmallIcon(R.mipmap.icon1001);//todo emArrow 更换图标,去除地图下载图标的依赖关系
builder.setContentTitle("下载")
builder.setContentText("正在下载")
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
CallerDevaToolsUpgradeListenerManager.addListener(
TAG,
object : IMogoDevaToolsUpgradeListener {
override fun onStart(url: String?) {}
override fun onPause(url: String?) {}
override fun onProgress(url: String?, length: Int) {
builder.setProgress(100, length, false)
manager.notify(0x3, builder.build())
//下载进度提示
builder.setContentText("已下载$length%")
updateStatusBarDownloadView(true, "download", length)
}
override fun onFinished(url: String?, localPath: String) {
builder.setContentText("已下载" + 100 + "%")
UiThreadHandler.postDelayed({
manager.cancel(0x3)
updateStatusBarDownloadView(false, "download", 100)
}, 1000)
}

View File

@@ -71,7 +71,6 @@ dependencies {
implementation rootProject.ext.dependencies.cicle_indicator
implementation rootProject.ext.dependencies.koomnative
implementation rootProject.ext.dependencies.koomxhook
implementation project(':core:function-impl:mogo-core-function-patch')
api project(':test:crashreport-apmbyte')
compileOnly project(':core:function-impl:mogo-core-function-datacenter')
implementation project(':foudations:mogo-commons')

View File

@@ -21,6 +21,7 @@ import chassis.Chassis
import chassis.ChassisStatesOuterClass
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.SharedPrefsConstants
import com.mogo.commons.debug.DebugConfig
import com.mogo.commons.module.status.MogoStatusManager
import com.mogo.eagle.core.data.app.AppConfigInfo
@@ -117,6 +118,7 @@ internal class DebugSettingView @JvmOverloads constructor(
private var logInfoView: LogInfoView? = null
private var logViewAttach = false
@Volatile
private var mAutoPilotStatusInfo: AutopilotStatusInfo? = null
private var mGnssInfo: MogoLocation? = null
@@ -206,7 +208,6 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerChassisGearStateListenerManager.addListener(TAG, this)
CallerChassisSteeringStateListenerManager.addListener(TAG, this)
CallerChassisThrottleStateListenerManager.addListener(TAG, this)
//添加 开发套件工具接口 监听
CallerDevaToolsListenerManager.addListener(TAG, this)
//添加 底盘灯光数据 监听
@@ -257,6 +258,7 @@ internal class DebugSettingView @JvmOverloads constructor(
CallerChassisLamplightListenerManager.removeListener(TAG)
// 移除 obu获取信息 监听
CallerObuInfoListenerManager.removeListener(TAG)
// 移除 业务配置监听
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(
FuncBizConfig.FOUNDATION,
@@ -359,6 +361,7 @@ internal class DebugSettingView @JvmOverloads constructor(
swDevelopMode.visibility = View.GONE
}
}
/**
* 开发者模式
*/
@@ -1589,6 +1592,7 @@ internal class DebugSettingView @JvmOverloads constructor(
tvAutopilotInfo.text = autopilotJson
tvIpcInfo.text = autopilotJson
tvIpcInfoKey.text = autopilotJson
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)
tvCarInfo.text =
"GPS时间${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
@@ -2046,4 +2050,5 @@ internal class DebugSettingView @JvmOverloads constructor(
override fun onObuDeviceId(obuDeviceId: String) {
mObuDeviceId = obuDeviceId
}
}

View File

@@ -27,6 +27,7 @@ class SpeedPanelView @JvmOverloads constructor(
var mContext: Context
var mSpeedChartView: SpeedChartView
@Volatile
var mLatLng: MogoLocation? = null
init {

View File

@@ -206,6 +206,29 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvCmdbCarInfo"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="车辆信息: " />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvCmdbCarInfoContent"
style="@style/DebugSettingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minLines="5" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F0F0F0" />
<ToggleButton
android:id="@+id/tbIsDemoMode"
android:layout_width="match_parent"

View File

@@ -217,8 +217,8 @@
android:scaleY="1.2"
android:scaleX="1.2"
app:layout_constraintTop_toBottomOf="@id/tbObuWeaknessTrafficSop"
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
@@ -226,7 +226,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/tbCloudWeaknessTrafficSop"
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
android:text="变道速度阈值:"
android:textSize="@dimen/dp_36"
android:textColor="#1A1A1A"

View File

@@ -23,7 +23,7 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
private final static String TAG = "SpeedLimitDataManager";
private static volatile SpeedLimitDataManager instance;
private MogoLocation mLocation;
private volatile MogoLocation mLocation;
private SpeedLimitDataManager() {
}

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.business.ai.net
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.HostConst
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE
@@ -27,7 +28,7 @@ class AiCloudIdentifyNetWorkModel {
return host
}
private fun getNetWorkApi(baseUrl: String = getHost()): IAiCloudIdentifyApiService {
private fun getNetWorkApi(baseUrl: String = HostConst.getEagleHost()): IAiCloudIdentifyApiService {
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
.create(IAiCloudIdentifyApiService::class.java)
}

View File

@@ -8,6 +8,6 @@ import retrofit2.http.POST
interface IAiCloudIdentifyApiService {
@Headers("Content-type:application/json;charset=UTF-8")
@POST("yycp-c-v2x-service/dataFusion/remoteDrivingSet")
@POST("eagle-eye-dns/yycp-c-v2x-service/dataFusion/remoteDrivingSet")
suspend fun identifyRange(@Body map: MutableMap<String, Any>): BaseResponse<Any>
}

View File

@@ -118,10 +118,8 @@ public class DownloadTask implements DownloadCallBack {
public void progressCallBack(String url, int length) {
finishedProgress += length;
//每500毫秒发送刷新进度事件
Log.d(DOWN_LOAD_TAG, "process:" + finishedProgress);
if (System.currentTimeMillis() - curTime > 500 || finishedProgress == fileBean.getLength()) {
int progress = (int) (finishedProgress * 1.0 / fileBean.getLength() * 100);
Log.d(DOWN_LOAD_TAG, "DownloadTask ----length = " + length + " ---progress = " + progress);
fileBean.setFinished(finishedProgress);
DownloadData downloadData = new DownloadData();
downloadData.setUrl(fileBean.getUrl());