[Sweeper-Cloud] refactor: 清扫车适配魔方,启动自驾接口时source传递魔方,以便telematics区分并处理;

This commit is contained in:
aibingbing
2023-06-14 19:10:23 +08:00
parent e476c3b0ce
commit 7c9f78f7c8
5 changed files with 77 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ import android.content.Intent
import android.content.IntentFilter
import android.view.KeyEvent
import com.mogo.commons.context.ContextHolderUtil
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.deva.mofang.MfConstants
import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangListener
@@ -17,9 +18,11 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetAcceleratedSpeed
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.sendOperatorSetHorn
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilot
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.startAutoPilotByMoFang
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager.invokeMoFangStatus
import com.mogo.eagle.core.function.call.mofang.CallerMofangListenerManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.e
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_F
@@ -319,7 +322,12 @@ class MoFangManager private constructor() : IMoGoMoFangListener {
if (HmiBuildConfig.isShowMfToastView) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 timeInterval: ${pressEUpTime - startPressTime}ms")
}
startAutoPilot(getAutoPilotStatusInfo().autopilotControlParameters)
//清扫车有FSM模块魔方启动自驾时需要将Source修改为魔方以便telamatics做区分并在转发时增加flag标记
if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
startAutoPilotByMoFang(getAutoPilotStatusInfo().autopilotControlParameters)
} else{
startAutoPilot(getAutoPilotStatusInfo().autopilotControlParameters)
}
}
}
}