Merge branch 'dev_robotaxi-d_240401_6.4.0' into dev_robotaxi-d_240401_6.4.0_yyk

# Conflicts:
#	app/script/vehicleFlavors/C1.gradle
This commit is contained in:
yangyakun
2024-04-15 14:54:13 +08:00
82 changed files with 1803 additions and 968 deletions

View File

@@ -11,11 +11,16 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
private var mCarConfigResp: MessagePad.CarConfigResp? = null
@Volatile
private var certFileMsg = "未开启认证"
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotCarConfigListener) {
mCarConfigResp?.let {
listener.onAutopilotCarConfig(it)
}
listener.onCertificationResult(certFileMsg)
}
/**
* 工控机基础信息回调
* @param carConfigResp
@@ -33,5 +38,17 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
}
}
@Synchronized
fun invokeAutopilotCertFileResult(msg: String) {
certFileMsg = msg
M_LISTENERS.forEach {
val listener = it.value
listener.onCertificationResult(msg)
}
}
fun getCertFileResult(): String {
return certFileMsg
}
}

View File

@@ -17,10 +17,10 @@ object CallerChassisLamplightListenerManager : CallerBase<IMoGoChassisLamplightL
* @param lightSwitch
*/
fun invokeAutopilotLightSwitchData(lightSwitch: Chassis.LightSwitch) {
val switch = getTurnLightState(lightSwitch)
// val switch = getTurnLightState(lightSwitch)
M_LISTENERS.forEach {
val listener = it.value
listener.onAutopilotLightSwitchData(switch)
listener.onAutopilotLightSwitchData(lightSwitch)
}
}

View File

@@ -4,6 +4,7 @@ import com.mogo.eagle.core.data.msgbox.FMFilterInfoMsg
import com.mogo.eagle.core.data.msgbox.FMInfoMsg
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.MsgFmData
import com.mogo.eagle.core.function.api.autopilot.IMoGoFaultManagementStateListener
import com.mogo.eagle.core.function.call.base.CallerBase
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
@@ -39,7 +40,11 @@ object CallerFaultManagementStateListenerManager : CallerBase<IMoGoFaultManageme
//判断两个集合重复 true:return
var sameResult = false
list.forEach {
sameResult = fmFilterInfoMsg.cacheFilterList?.contains(it.faultId) == true
if(fmFilterInfoMsg.cacheFilterList?.contains(it.faultId) == true){
if(System.currentTimeMillis()-fmFilterInfoMsg.receiveTime < 10*60*1000){
sameResult = true
}
}
}
if (sameResult) {
return
@@ -52,6 +57,7 @@ object CallerFaultManagementStateListenerManager : CallerBase<IMoGoFaultManageme
fmFilterInfoMsg.cacheFilterList?.clear()
fmFilterInfoMsg.cacheFilterList = cacheFaultList
fmFilterInfoMsg.fmInfoList = list
fmFilterInfoMsg.receiveTime = System.currentTimeMillis()
cachePolicyMap[policyCode] = fmFilterInfoMsg
CallerTrace.write("FaultMsg",fmInfo)
CallerMsgBoxManager.saveMsgBoxHasPB(
@@ -66,7 +72,7 @@ object CallerFaultManagementStateListenerManager : CallerBase<IMoGoFaultManageme
list.forEach {
cacheFaultList.add(it.faultId)
}
cachePolicyMap[policyCode] = FMFilterInfoMsg(list, policyCode, cacheFaultList)
cachePolicyMap[policyCode] = FMFilterInfoMsg(list, policyCode, cacheFaultList,System.currentTimeMillis())
CallerTrace.write("FaultMsg",fmInfo)
CallerMsgBoxManager.saveMsgBoxHasPB(
MsgBoxBean(

View File

@@ -27,6 +27,14 @@ object CallerCloudCertManager {
}
fun getDeviceCrtF(): String? {
return certProviderApi.getDeviceCrtF()
}
fun getRootCrtF(): String? {
return certProviderApi.getRootCrtF()
}
fun getDeviceCrtFDecode(): String? {
var crt = certProviderApi.getDeviceCrtF()
if (!crt.isNullOrEmpty()) {
crt = String(Base64.decode(crt, Base64.NO_WRAP), StandardCharsets.UTF_8)
@@ -34,11 +42,15 @@ object CallerCloudCertManager {
return crt
}
fun getRootCrtF(): String? {
fun getRootCrtFDecode(): String? {
var crt = certProviderApi.getRootCrtF()
if (!crt.isNullOrEmpty()) {
crt = String(Base64.decode(crt, Base64.NO_WRAP), StandardCharsets.UTF_8)
}
return crt
}
fun getCrtFileErrorMsg(): String? {
return certProviderApi.getCrtFileErrorMsg()
}
}

View File

@@ -17,6 +17,12 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
if (!token.isNullOrEmpty() && !sn.isNullOrEmpty()) {
listener.tokenGot(token!!, sn!!)
}
if(CallerCloudCertManager.getDeviceCrtF()!= null && CallerCloudCertManager.getRootCrtF()!= null){
listener.authCrtFile(CallerCloudCertManager.getDeviceCrtF()!!, CallerCloudCertManager.getRootCrtF()!!)
}
if(CallerCloudCertManager.getCrtFileErrorMsg()!= null){
listener.authCrtError(CallerCloudCertManager.getCrtFileErrorMsg()!!)
}
}
fun invokeCloudCrtFile(deviceCrtFile: String, rootCrtFile: String) {
@@ -26,6 +32,13 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
}
}
fun invokeCloudCrtError(errorMsg: String){
M_LISTENERS.forEach {
val listener = it.value
listener.authCrtError(errorMsg)
}
}
/**
* 分发获取到的设备sn
*/

View File

@@ -64,6 +64,13 @@ object CallerMsgBoxManager {
return providerApi?.getCachedRecordBagData()
}
/**
* 查询一段时间范围内的FM数据集合
*/
fun queryFMInfoList(context: Context, startTime: Long, endTime: Long): List<MsgBoxBean>? {
return providerApi?.queryFMInfoList(context, startTime, endTime)
}
/**
* 用户已处理的Bag包需要删除(上传或取消都包含)
* key: Bag包的唯一标识key, msgBoxBean: UI展示的那个对象而不是重新new的