Merge remote-tracking branch 'origin/dev_robotaxi-d_230711_3.4.0' into dev_robotaxi-d_230711_3.4.0
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -81,7 +81,7 @@ internal object V2NIdentifyDrawer {
|
||||
CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent)
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent(itx.longitude, itx.latitude, itx.angle))
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
@@ -136,7 +136,7 @@ internal object V2NIdentifyDrawer {
|
||||
CallerHmiManager.warningV2X(poiType, alertContent, ttsContent, object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent)
|
||||
CallerVisualAngleManager.changeAngle(RoadEvent(lon, lat, car.heading))
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
|
||||
@@ -153,13 +153,16 @@ public class V2XRoadEventScenario extends AbsV2XScenario<V2XRoadEventEntity> imp
|
||||
|
||||
@Override
|
||||
public void onShow() {
|
||||
if (isNeedChangeAngle()) {
|
||||
CallerVisualAngleManager.INSTANCE.changeAngle(RoadEvent.INSTANCE);
|
||||
}
|
||||
V2XMessageEntity<V2XRoadEventEntity> entity = getV2XMessageEntity();
|
||||
if (entity != null) {
|
||||
V2XRoadEventEntity content = entity.getContent();
|
||||
if (content != null) {
|
||||
if (isNeedChangeAngle()) {
|
||||
MarkerLocation location = content.getLocation();
|
||||
if (location != null) {
|
||||
CallerVisualAngleManager.INSTANCE.changeAngle(new RoadEvent(content.getLocation().getLon(), content.getLocation().getLat(), content.getLocation().getAngle()));
|
||||
}
|
||||
}
|
||||
if (entity.isNeedAddLine() && !EventTypeEnumNew.TYPE_SOCKET_ROAD_CONGESTION.getPoiType().equals(content.getPoiType())) {
|
||||
drawPOI();
|
||||
}
|
||||
|
||||
@@ -729,8 +729,20 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼
|
||||
* @return boolean
|
||||
*/
|
||||
override fun sendV2iToPncCmd(switchCmd: Boolean) {
|
||||
AdasManager.getInstance().sendV2iToPncCmd(switchCmd)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
override fun sendV2nToPncCmd(switchCmd: Boolean) {
|
||||
AdasManager.getInstance().sendV2nToPncCmd(switchCmd)
|
||||
@@ -1032,6 +1044,14 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
}
|
||||
|
||||
override fun setIsSubscribeBackCameraVideoVideo(role: Int, isSubscribe: Boolean) {
|
||||
val type =
|
||||
if (isSubscribe) Constants.SUBSCRIBE_TYPE.SUBSCRIBE else Constants.SUBSCRIBE_TYPE.UNSUBSCRIBE
|
||||
AdasManager.getInstance().subscribeInterface(
|
||||
role, type, MessageType.TYPE_RECEIVE_BACK_CAMERA_VIDEO
|
||||
)
|
||||
}
|
||||
|
||||
override fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean {
|
||||
return AdasManager.getInstance().sendRoboBusJinlvM1FrontDoorCmd(switchCmd)
|
||||
}
|
||||
|
||||
@@ -534,7 +534,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
* @param data 数据
|
||||
*/
|
||||
override fun onBackCameraVideo(header: MessagePad.Header, data: ByteArray) {
|
||||
CallerSweeperFutianBackCameraVideoListenerManager.invokeSweeperFutianBackCameraVideo(data)
|
||||
CallerBackCameraVideoListenerManager.invokeBackCameraVideo(data)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,8 +7,6 @@ import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.*
|
||||
import com.mogo.eagle.core.data.obu.MogoObuConst
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.api.map.angle.Default
|
||||
import com.mogo.eagle.core.function.api.map.angle.TooClose
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
@@ -949,20 +947,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
CallerHmiManager.warningV2X(v2xType,
|
||||
alertContent,
|
||||
ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
super.onShow()
|
||||
if (changeVisualAngle) {
|
||||
CallerVisualAngleManager.changeAngle(TooClose)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDismiss() {
|
||||
if (changeVisualAngle) {
|
||||
CallerVisualAngleManager.changeAngle(Default())
|
||||
}
|
||||
}
|
||||
},
|
||||
null,
|
||||
direction,
|
||||
isFromObu = true
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ import mogo.telematics.pad.MessagePad.SetParamReq
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import kotlin.concurrent.*
|
||||
|
||||
internal class MoGoLookAroundProviderImpl: IMoGoLookAroundProvider, IMoGoSweeperFutianBackCameraVideoListener, IMoGoRoboBusJinlvM1StitchedVideoListener, IMoGoGetParamResponseListener {
|
||||
internal class MoGoLookAroundProviderImpl: IMoGoLookAroundProvider, IMoGoBackCameraVideoListener, IMoGoRoboBusJinlvM1StitchedVideoListener, IMoGoGetParamResponseListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MoGoLookAroundProvider"
|
||||
@@ -58,7 +58,7 @@ internal class MoGoLookAroundProviderImpl: IMoGoLookAroundProvider, IMoGoSweeper
|
||||
private var job: Job? = null
|
||||
|
||||
override fun init(ctx: Context) {
|
||||
CallerSweeperFutianBackCameraVideoListenerManager.addListener(TAG, this)
|
||||
CallerBackCameraVideoListenerManager.addListener(TAG, this)
|
||||
CallerRoboBusJinlvM1StitchedVideoListenerManager.addListener(TAG, this)
|
||||
CallerAutopilotGetParamResponseDispatcher.addListener(TAG, this)
|
||||
if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)) {
|
||||
@@ -116,7 +116,7 @@ internal class MoGoLookAroundProviderImpl: IMoGoLookAroundProvider, IMoGoSweeper
|
||||
|
||||
}
|
||||
|
||||
override fun onSweeperFutianBackCameraVideo(data: ByteArray) {
|
||||
override fun onBackCameraVideo(data: ByteArray) {
|
||||
if (bitmapWidth.get() == 0 || bitmapHeight.get() == 0) {
|
||||
val options = BitmapFactory.Options()
|
||||
options.inJustDecodeBounds = true
|
||||
|
||||
@@ -15,18 +15,17 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBackCameraVideoListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoRoboBusJinlvM1StitchedVideoListener;
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianBackCameraVideoListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerBackCameraVideoListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerRoboBusJinlvM1StitchedVideoListenerManager;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianBackCameraVideoListenerManager;
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
/**
|
||||
* 清扫车摄像头展示View 10Hz
|
||||
* M1拼接视频展示View 10Hz 需要订阅(连接成功后订阅才生效):CallerAutoPilotControlManager.setIsSubscribeM1StitchedVideo(isSubscribe)
|
||||
* 图片帧展示View
|
||||
*/
|
||||
public class MogoVideoView extends AppCompatImageView implements IMoGoSweeperFutianBackCameraVideoListener, IMoGoRoboBusJinlvM1StitchedVideoListener {
|
||||
public class MogoVideoView extends AppCompatImageView implements IMoGoBackCameraVideoListener, IMoGoRoboBusJinlvM1StitchedVideoListener {
|
||||
private static final String TAG = MogoVideoView.class.getSimpleName();
|
||||
private final RequestOptions requestOptions = new RequestOptions()
|
||||
.priority(Priority.HIGH)
|
||||
@@ -49,14 +48,14 @@ public class MogoVideoView extends AppCompatImageView implements IMoGoSweeperFut
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
CallerSweeperFutianBackCameraVideoListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerBackCameraVideoListenerManager.INSTANCE.addListener(TAG, this);
|
||||
CallerRoboBusJinlvM1StitchedVideoListenerManager.INSTANCE.addListener(TAG, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
CallerSweeperFutianBackCameraVideoListenerManager.INSTANCE.removeListener(this);
|
||||
CallerBackCameraVideoListenerManager.INSTANCE.removeListener(this);
|
||||
CallerRoboBusJinlvM1StitchedVideoListenerManager.INSTANCE.removeListener(this);
|
||||
}
|
||||
|
||||
@@ -90,7 +89,7 @@ public class MogoVideoView extends AppCompatImageView implements IMoGoSweeperFut
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSweeperFutianBackCameraVideo(@NonNull byte[] data) {
|
||||
public void onBackCameraVideo(@NonNull byte[] data) {
|
||||
draw(data);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,10 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.*
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine
|
||||
import com.mogo.eagle.core.function.api.map.angle.*
|
||||
import com.mogo.eagle.core.function.api.map.angle.Scene
|
||||
import com.mogo.eagle.core.function.call.autopilot.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager.OnRoadListener
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.*
|
||||
@@ -32,11 +30,8 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
private const val TAG = "VisualAngleChange"
|
||||
}
|
||||
|
||||
private val triggerLocation = AtomicReference<MogoLocation>()
|
||||
|
||||
private val distanceOfCarToStopLine = AtomicReference(0.0)
|
||||
|
||||
private val travelled by lazy { AtomicReference(0.0) }
|
||||
@Volatile
|
||||
private var roadEventFlag: Boolean = false
|
||||
|
||||
/**
|
||||
* 业务实体,不对外暴露
|
||||
@@ -55,52 +50,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
PriorityQueue<Record>()
|
||||
}
|
||||
|
||||
private val listener = object : OnRoadListener {
|
||||
private val roadId = AtomicReference<String>()
|
||||
private val triggerRoadId = AtomicReference<String>()
|
||||
|
||||
override fun onRoadIdInfo(roadId: String) {
|
||||
this.roadId.set(roadId)
|
||||
Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId")
|
||||
val loc = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
var triggerClose = false
|
||||
val distance = distanceOfCarToStopLine.get() + 5
|
||||
if (hasCrossRoad && distance > 0) {
|
||||
val prev = triggerLocation.get()
|
||||
if (prev != null) {
|
||||
travelled.set(MapTools.distance(loc.longitude, loc.latitude, prev.longitude, prev.latitude) + travelled.get())
|
||||
triggerLocation.set(loc)
|
||||
}
|
||||
val oldRoadId = triggerRoadId.get()
|
||||
Log.d(TAG, "-- onRoadIdInfo --: travelled --: ${travelled.get()}")
|
||||
if ((travelled.get() > distance) && oldRoadId != roadId) {
|
||||
distanceOfCarToStopLine.set(0.0)
|
||||
hasCrossRoad = false
|
||||
triggerRoadId.set(null)
|
||||
travelled.set(0.0)
|
||||
triggerLocation.set(null)
|
||||
Log.d(TAG, "-- onRoadIdInfo --: trigger close --")
|
||||
triggerClose = true
|
||||
}
|
||||
}
|
||||
if (triggerClose) {
|
||||
changeAngle(CrossRoad(false))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onStopLineInfo(info: StopLine) {
|
||||
Log.d(TAG, "-- onStopLineInfo --: ${info.distanceOfCarToStopLine}")
|
||||
if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) {
|
||||
hasCrossRoad = true
|
||||
triggerRoadId.set(this.roadId.get())
|
||||
distanceOfCarToStopLine.set(info.distanceOfCarToStopLine)
|
||||
triggerLocation.set(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02())
|
||||
changeAngle(CrossRoad(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun init(context: Context?) {
|
||||
if (Thread.currentThread() != Looper.getMainLooper().thread) {
|
||||
scope.launch {
|
||||
@@ -120,13 +69,8 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
}
|
||||
}
|
||||
})
|
||||
CallerMapRoadListenerManager.registerRoadListener("VisualAngleChange", listener)
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var hasCrossRoad = false
|
||||
|
||||
|
||||
private var scope: CoroutineScope = acquireScope()
|
||||
@Synchronized
|
||||
get() {
|
||||
@@ -161,12 +105,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
val displayed = getDisplayed()
|
||||
if (displayed == null) {
|
||||
Log.d(TAG, "--- 2 ---")
|
||||
if (scene is Turning) {
|
||||
if (!scene.open) {
|
||||
changeAngle(Default())
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
if (scene is CrossRoad) {
|
||||
if (!scene.open) {
|
||||
changeAngle(Default())
|
||||
@@ -178,7 +116,7 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
val prev = displayed.target
|
||||
Log.d(TAG, "--- 3 --- old: $prev -> cur: $scene")
|
||||
val prevTriggerTime = displayed.triggerTime
|
||||
if (scene !is Default && prev.priority > scene.priority && (prev is RoadEvent || prev is TooClose)) {
|
||||
if (scene !is Default && prev.priority > scene.priority && (prev is RoadEvent)) {
|
||||
val displayDuration = triggerTime - prevTriggerTime
|
||||
Log.d(TAG, "--- 4 ---:场景[$prev], 已展示时长: duration: $displayDuration")
|
||||
if (displayDuration < prev.displayThreshold) {
|
||||
@@ -191,15 +129,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
if (prev is Turning && scene is Turning) {
|
||||
val isOpen = scene.open
|
||||
if (!isOpen) {
|
||||
Log.d(TAG, "--- 7 --- 场景[$scene], 收到关闭通知")
|
||||
queue -= displayed
|
||||
changeAngle(Default())
|
||||
return@launch
|
||||
}
|
||||
}
|
||||
if (prev is CrossRoad && scene is CrossRoad) {
|
||||
val isOpen = scene.open
|
||||
if (!isOpen) {
|
||||
@@ -251,13 +180,6 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
displayed?.also {
|
||||
queue -= it
|
||||
}
|
||||
if (target is Turning) {
|
||||
if (!target.open) {
|
||||
Log.d(TAG, "--- doRealVisualAngleChange --- 7 ---")
|
||||
changeAngle(Default())
|
||||
return
|
||||
}
|
||||
}
|
||||
if (target is CrossRoad) {
|
||||
if (!target.open) {
|
||||
Log.d(TAG, "--- doRealVisualAngleChange --- 8 ---")
|
||||
@@ -282,7 +204,24 @@ class MoGoVisualAngleChangeProvider: IMoGoVisualAngleChangeProvider {
|
||||
queue += record
|
||||
}
|
||||
}
|
||||
it.changeMapVisualAngle(angle, null)
|
||||
if (record.target is Default && roadEventFlag) {
|
||||
roadEventFlag = false
|
||||
//it.setLockMode(true)
|
||||
}
|
||||
if (record.target is RoadEvent) {
|
||||
it.setLockMode(false)
|
||||
roadEventFlag = true
|
||||
Log.d("TTTTTT", "scene:${record.target}")
|
||||
// scope.launch {
|
||||
// delay(500)
|
||||
// it.changeMapVisualAngle(angle, null)
|
||||
// }
|
||||
it.animateTo(record.target.poi_lon, record.target.poi_lat, record.target.poi_angle.toFloat(), 1000, true)
|
||||
// it.animateTo(record.target.poi_lon, record.target.poi_lat, 0f, 1000, true)
|
||||
|
||||
} else {
|
||||
it.changeMapVisualAngle(angle, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,15 +94,12 @@ class MapBizView(context: Context?, attrs: AttributeSet?) : MogoMapView(context,
|
||||
lightSwitch?.let {
|
||||
when (it.number) {
|
||||
Chassis.LightSwitch.LIGHT_LEFT_VALUE -> { //左转灯
|
||||
CallerVisualAngleManager.showTurning(true)
|
||||
turn(1)
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_RIGHT_VALUE -> { //右转灯
|
||||
CallerVisualAngleManager.showTurning(true)
|
||||
turn(2)
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_NONE_VALUE -> {
|
||||
CallerVisualAngleManager.showTurning(false)
|
||||
turn(0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,8 +234,18 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
fun sendBagManagerCmd(bagManagerEntity: BagManagerEntity): Boolean
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼
|
||||
* @return boolean
|
||||
*/
|
||||
fun sendV2iToPncCmd(switchCmd: Boolean)
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
fun sendV2nToPncCmd(switchCmd: Boolean)
|
||||
|
||||
@@ -412,6 +422,13 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
*/
|
||||
fun setIsSubscribeM1StitchedVideo(isSubscribe: Boolean)
|
||||
|
||||
/**
|
||||
* 后摄像头接口订阅 目前用于清扫车后摄像头接口和Taxi右后摄像头接口
|
||||
* @param role 角色 详情参见{@link Constants.TERMINAL_ROLE}
|
||||
* @param isSubscribe 是否订阅
|
||||
*/
|
||||
fun setIsSubscribeBackCameraVideoVideo(role: Int,isSubscribe: Boolean)
|
||||
|
||||
fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean
|
||||
|
||||
fun sendRoboBusJinlvM1AirConditionerCmd(
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 后摄像头视频数据
|
||||
* 目前用于清扫车(福田)后摄像头和Taxi右后摄像头
|
||||
* 需要进行接口订阅才能 CallerAutoPilotControlManager.setIsSubscribeBackCameraVideoVideo(role: Int, isSubscribe: Boolean)
|
||||
*/
|
||||
interface IMoGoBackCameraVideoListener {
|
||||
/**
|
||||
* 后摄像头视频数据 10Hz 每一帧为一张图片
|
||||
*/
|
||||
fun onBackCameraVideo(data: ByteArray)
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
/**
|
||||
* 清扫车(福田)后摄像头视频数据
|
||||
*/
|
||||
interface IMoGoSweeperFutianBackCameraVideoListener {
|
||||
/**
|
||||
* 清扫车(福田)后摄像头视频数据 10Hz 每一帧为一张图片
|
||||
*/
|
||||
fun onSweeperFutianBackCameraVideo(data: ByteArray)
|
||||
}
|
||||
@@ -34,56 +34,20 @@ class Default(val delay: Long = 2, val unit: TimeUnit = SECONDS): Scene() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 变道-接收到转向灯信息号
|
||||
*/
|
||||
class Turning(var open: Boolean = false): Scene() {
|
||||
|
||||
override val angle: VisualAngleMode = VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
|
||||
|
||||
override val priority: Int = 3
|
||||
|
||||
override val displayThreshold: Long
|
||||
get() = -1
|
||||
|
||||
override fun toString(): String {
|
||||
return "Turning(open: ${open}, priority=$priority, displayThreshold: $displayThreshold, priority=$priority)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 后方车辆离自车过近
|
||||
*/
|
||||
object TooClose: Scene() {
|
||||
|
||||
override val angle: VisualAngleMode = VisualAngleMode.MAP_STYLE_VR_ANGLE_300
|
||||
|
||||
override val priority: Int = 2
|
||||
|
||||
override val displayThreshold: Long
|
||||
get() = SECONDS.toMillis(8)
|
||||
|
||||
override fun toString(): String {
|
||||
return "TooClose(priority=$priority, displayThreshold: $displayThreshold, priority=$priority)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 道路事件
|
||||
*/
|
||||
object RoadEvent: Scene() {
|
||||
class RoadEvent(val poi_lon: Double, val poi_lat: Double, val poi_angle: Double): Scene() {
|
||||
|
||||
override val angle: VisualAngleMode = VisualAngleMode.MODE_LONG_SIGHT
|
||||
|
||||
override val priority: Int = 5
|
||||
|
||||
override val displayThreshold: Long
|
||||
get() = SECONDS.toMillis(8)
|
||||
get() = SECONDS.toMillis(5)
|
||||
|
||||
override fun toString(): String {
|
||||
return "RoadEvent(priority=${priority}, displayThreshold: ${displayThreshold}, priority=${priority})"
|
||||
return "RoadEvent(priority=${priority}, displayThreshold: ${displayThreshold}, priority=${priority}, lon: $poi_lon, lat: $poi_lat, angle: $poi_angle)"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -329,8 +329,20 @@ object CallerAutoPilotControlManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼
|
||||
* @return boolean
|
||||
*/
|
||||
fun sendV2iToPncCmd(switchCmd: Boolean){
|
||||
providerApi?.sendV2iToPncCmd(switchCmd)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
fun sendV2nToPncCmd(switchCmd: Boolean){
|
||||
providerApi?.sendV2nToPncCmd(switchCmd)
|
||||
@@ -566,6 +578,15 @@ object CallerAutoPilotControlManager {
|
||||
providerApi?.setIsSubscribeM1StitchedVideo(isSubscribe)
|
||||
}
|
||||
|
||||
/**
|
||||
* 后摄像头接口订阅 目前用于清扫车后摄像头接口和Taxi右后摄像头接口
|
||||
* @param role 角色 详情参见{@link Constants.TERMINAL_ROLE}
|
||||
* @param isSubscribe 是否订阅
|
||||
*/
|
||||
fun setIsSubscribeBackCameraVideoVideo(role: Int, isSubscribe: Boolean) {
|
||||
providerApi?.setIsSubscribeBackCameraVideoVideo(role, isSubscribe)
|
||||
}
|
||||
|
||||
fun sendRoboBusJinlvM1FrontDoorCmd(switchCmd: Int): Boolean {
|
||||
return providerApi?.sendRoboBusJinlvM1FrontDoorCmd(switchCmd) ?: false
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoBackCameraVideoListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 后摄像头视频数据
|
||||
*/
|
||||
object CallerBackCameraVideoListenerManager : CallerBase<IMoGoBackCameraVideoListener>() {
|
||||
|
||||
/**
|
||||
* 后摄像头视频数据
|
||||
*/
|
||||
fun invokeBackCameraVideo(data: ByteArray) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onBackCameraVideo(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.eagle.core.function.call.autopilot
|
||||
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoSweeperFutianBackCameraVideoListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
* 清扫车(福田)后摄像头视频数据
|
||||
*/
|
||||
object CallerSweeperFutianBackCameraVideoListenerManager : CallerBase<IMoGoSweeperFutianBackCameraVideoListener>() {
|
||||
|
||||
/**
|
||||
* 后摄像头视频数据
|
||||
*/
|
||||
fun invokeSweeperFutianBackCameraVideo(data: ByteArray) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onSweeperFutianBackCameraVideo(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,6 @@ object CallerVisualAngleManager {
|
||||
.navigation() as? IMoGoVisualAngleChangeProvider
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var isVisualAngleChanged = false
|
||||
|
||||
fun init() {
|
||||
provider?.let {
|
||||
Log.d("CallerVisualAngle", "--- init ---")
|
||||
@@ -32,18 +29,4 @@ object CallerVisualAngleManager {
|
||||
fun updateLongSightLevel(level: Boolean) {
|
||||
provider?.updateLongSightLevel(level)
|
||||
}
|
||||
|
||||
fun showTurning(open: Boolean) {
|
||||
if (open) {
|
||||
if (!isVisualAngleChanged) {
|
||||
isVisualAngleChanged = true
|
||||
changeAngle(Turning(true))
|
||||
}
|
||||
} else {
|
||||
if (isVisualAngleChanged) {
|
||||
isVisualAngleChanged = false
|
||||
changeAngle(Turning(false))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,3 +100,13 @@ enum CleanSystemControlMode {
|
||||
Clean_PureWash_Left_Work = 13;
|
||||
Clean_PureWash_Right_Work = 14;
|
||||
}
|
||||
|
||||
enum DoorNumber {
|
||||
NONE = 0;
|
||||
FRONT_LEFT = 1;
|
||||
FRONT_RIGHT = 2;
|
||||
REAR_LEFT = 3;
|
||||
REAR_RIGHT = 4;
|
||||
MIDDLE = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package mogo.telematics;
|
||||
|
||||
enum ParamSetType
|
||||
enum ParamSetType
|
||||
{
|
||||
ParamSetTypeNone = 0;
|
||||
ParamSetTypeBlindArea = 1; //bool, 0:off 1:on
|
||||
ParamSetTypeV2N = 2; //bool, 0:不发给PnC 1:发给Pnc
|
||||
ParamSetTypeV2I = 3; //bool, 0:不发给PnC和鹰眼 1:发给Pnc和鹰眼,默认0
|
||||
}
|
||||
|
||||
message ParamSetCmd
|
||||
|
||||
@@ -74,6 +74,11 @@ message DoorState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
}
|
||||
|
||||
message DoorStateV2 {
|
||||
optional DoorNumber number = 1; // 车门编号
|
||||
optional uint32 status = 2; // 车门开闭状态(0-关, 1-开)
|
||||
}
|
||||
|
||||
message LightState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
optional uint32 color = 2; //颜色
|
||||
@@ -116,13 +121,13 @@ message VehicleState {
|
||||
optional bool steer_inference = 23 [default = false]; //方向盘干预
|
||||
optional bool brake_inference = 24 [default = false]; //制动踏板干预
|
||||
optional bool accel_inference = 25 [default = false]; //加速踏板干预
|
||||
optional bool gear_switch_inference = 26 [default = false]; //档位切换干预
|
||||
optional bool gear_switch_inference = 26 [default = false]; //档位切换干预
|
||||
optional bool location_missing = 27 [default = false]; //未收到定位
|
||||
optional bool trajectory_missing = 28 [default = false]; //未收到轨迹
|
||||
optional bool chassis_status_missing = 29 [default = false]; //未收到车辆底盘反馈信息
|
||||
optional bool brake_light_status = 30 [default = false]; //自驾模式下制动灯状态
|
||||
optional bool pilot_mode_condition_met = 31 [default = false];
|
||||
|
||||
|
||||
optional float steeringSpd = 32 [default = 0]; // steering angle speed in degrees/s
|
||||
|
||||
optional float leftFrontWheelAngle = 33 [default = 0];//左前轮角度(deg),左负右正
|
||||
@@ -136,6 +141,8 @@ message VehicleState {
|
||||
optional float bms_soc = 40 [default = 0]; // 电量百分比范围 0~100
|
||||
optional float fuel_value = 41 [default = 0]; // 油车剩余油量
|
||||
|
||||
repeated DoorStateV2 door_state = 42; // 车门状态
|
||||
|
||||
optional SweeperFuTianCleanSystemState sweeper_futian_clean_system_state = 200; // 福田清扫车上装状态信息
|
||||
optional RoboTaxiState robo_taxi_state = 201; // taxi状态
|
||||
optional RoboBusState robo_bus_state = 202; // bus状态
|
||||
|
||||
@@ -5,7 +5,6 @@ import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_INIT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_GLOBAL_PATH;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_SYSTEM_CMD;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_SEND_TRAJECTORY_DOWNLOAD;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_ADAS_START_AUTOPILOT;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_CONNECT_ADDRESS;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_CODE_STATUS_CHANGE_REASON;
|
||||
import static com.zhidao.support.adas.high.chain.AdasChain.CHAIN_SOURCE_ADAS;
|
||||
@@ -16,13 +15,11 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.AutopilotReview;
|
||||
import com.zhidao.support.adas.high.common.ByteUtil;
|
||||
@@ -47,6 +44,7 @@ import com.zhidao.support.adas.high.subscribe.SubscribeInterface;
|
||||
import com.zhidao.support.adas.high.subscribe.SubscribeInterfaceOptions;
|
||||
import com.zhidao.support.adas.high.thread.DispatchHandler;
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam;
|
||||
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics;
|
||||
import com.zhjt.mogo.adas.data.sweeper.SweeperCloudTask;
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable;
|
||||
@@ -68,8 +66,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
import common.HeaderOuterClass;
|
||||
import mogo.telematics.ParamSetCmdOuterClass;
|
||||
import function_state_management.FSMStatusReasonQueryOuterClass;
|
||||
import mogo.telematics.ParamSetCmdOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import okio.ByteString;
|
||||
|
||||
@@ -1713,9 +1711,36 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendFSMStatusReasonQuery(int type) {
|
||||
FSMStatusReasonQueryOuterClass.FSMStatusReasonQuery query = FSMStatusReasonQueryOuterClass.FSMStatusReasonQuery.newBuilder()
|
||||
.setType(type)
|
||||
.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_FSM_STATUS_REASON_QUERY_REQ.typeCode, query.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendV2iToPncCmd(boolean switchCmd) {
|
||||
return sendSetParamReqV2(ParamSetCmdOuterClass.ParamSetType.ParamSetTypeV2I, switchCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
@@ -1742,27 +1767,14 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
ParamSetCmdOuterClass.ParamSetCmd.Builder builder = ParamSetCmdOuterClass.ParamSetCmd.newBuilder()
|
||||
.setSrc(1)
|
||||
.setType(paramSetType);
|
||||
if (paramSetType == ParamSetCmdOuterClass.ParamSetType.ParamSetTypeBlindArea || paramSetType == ParamSetCmdOuterClass.ParamSetType.ParamSetTypeV2N) {
|
||||
if (paramSetType == ParamSetCmdOuterClass.ParamSetType.ParamSetTypeBlindArea
|
||||
|| paramSetType == ParamSetCmdOuterClass.ParamSetType.ParamSetTypeV2N
|
||||
|| paramSetType == ParamSetCmdOuterClass.ParamSetType.ParamSetTypeV2I) {
|
||||
builder.setBoolValue((Boolean) value);
|
||||
}
|
||||
ParamSetCmdOuterClass.ParamSetCmd req = builder.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_SET_PARAM_REQ_V2.typeCode, req.toByteArray());
|
||||
}
|
||||
/**
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendFSMStatusReasonQuery(int type) {
|
||||
FSMStatusReasonQueryOuterClass.FSMStatusReasonQuery query = FSMStatusReasonQueryOuterClass.FSMStatusReasonQuery.newBuilder()
|
||||
.setType(type)
|
||||
.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_FSM_STATUS_REASON_QUERY_REQ.typeCode, query.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送清扫车指令到云控
|
||||
|
||||
@@ -5,7 +5,6 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam;
|
||||
import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.AppPreferenceHelper;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
@@ -13,12 +12,13 @@ import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.common.Define;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
import com.zhidao.support.adas.high.common.ReceiveTimeoutManager;
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
import com.zhjt.mogo.adas.data.bean.AdasParam;
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTaskSuspendResume;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -929,7 +929,7 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* 参数获取请求
|
||||
* 结果回调{@link OnAdasListener#onGetParamResp(MessagePad.Header, MessagePad.SetParamReq, AdasParam)}
|
||||
*
|
||||
* @param paramType 参数类型:libraries/mogo-adas-data/src/main/proto/personal/adas_constants.proto
|
||||
* @param paramType 参数类型:libraries/mogo-adas-data/src/main/proto/personal/adas_constants.proto
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
@@ -967,9 +967,33 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendFSMStatusReasonQuery(int type) {
|
||||
return mChannel != null && mChannel.sendFSMStatusReasonQuery(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendV2iToPncCmd(boolean switchCmd) {
|
||||
return mChannel != null && mChannel.sendV2iToPncCmd(switchCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
@@ -988,19 +1012,6 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendBlindAreaCmd(switchCmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendFSMStatusReasonQuery(int type) {
|
||||
return mChannel != null && mChannel.sendFSMStatusReasonQuery(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始大任务响应
|
||||
* 1、云端下发大任务信息(type: 100001)-> sweeper_task.proto/StartTaskResp 响应信息
|
||||
|
||||
@@ -6,12 +6,12 @@ import com.zhidao.support.adas.high.bean.VersionCompatibility;
|
||||
import com.zhidao.support.adas.high.common.Constants;
|
||||
import com.zhidao.support.adas.high.common.Define;
|
||||
import com.zhidao.support.adas.high.common.MessageType;
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTaskSuspendResume;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm;
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop;
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -572,7 +572,7 @@ public interface IAdasNetCommApi {
|
||||
/**
|
||||
* 参数获取请求
|
||||
*
|
||||
* @param paramType 参数类型:libraries/mogo-adas-data/src/main/proto/personal/adas_constants.proto
|
||||
* @param paramType 参数类型:libraries/mogo-adas-data/src/main/proto/personal/adas_constants.proto
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendGetParamReq(AdasConstants.MapSystemParamType paramType);
|
||||
@@ -602,9 +602,27 @@ public interface IAdasNetCommApi {
|
||||
boolean sendBagManagerCmd(BagManagerOuterClass.BagManager bagManager);
|
||||
|
||||
/**
|
||||
* 控制V2N数据给车端PnC
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param switchCmd true为发给PnC,false为不发给PnC
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendFSMStatusReasonQuery(int type);
|
||||
|
||||
/**
|
||||
* 控制V2I进PnC
|
||||
*
|
||||
* @param switchCmd true:发给Pnc和鹰眼,false:不发给PnC和鹰眼 默认false
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendV2iToPncCmd(boolean switchCmd);
|
||||
|
||||
/**
|
||||
* 控制V2N进PnC
|
||||
*
|
||||
* @param switchCmd true:发给PnC,false:不发给PnC
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendV2nToPncCmd(boolean switchCmd);
|
||||
@@ -617,16 +635,6 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean sendBlindAreaCmd(boolean switchCmd);
|
||||
|
||||
/**
|
||||
* FSM状态原因查询
|
||||
* 当FSMFunctionStates的类型是XXX_DRIVING_OFF时查询OFF的原因
|
||||
* 当FSMFunctionStates的类型是PILOT_DRIVING_OFF时会自动调用
|
||||
*
|
||||
* @param type 0:default, 1:请求反馈原因
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendFSMStatusReasonQuery(int type);
|
||||
|
||||
/**
|
||||
* 开始大任务响应
|
||||
* 1、云端下发大任务信息(type: 100001)-> sweeper_task.proto/StartTaskResp 响应信息
|
||||
|
||||
@@ -261,8 +261,8 @@ public interface OnAdasListener {
|
||||
// void onFSMStatusReasonRespond(@NonNull MessagePad.Header header, @NonNull FSMStatusReasonQueryOuterClass.FSMStatusReasonRespond respond);
|
||||
|
||||
/**
|
||||
* 清扫车后部摄像头视频 10Hz
|
||||
*
|
||||
* 后部摄像头视频 10Hz
|
||||
* 目前用于清扫车后摄像头和Taxi右右后摄像头
|
||||
* @param header 头
|
||||
* @param data 数据
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum MessageType {
|
||||
TYPE_RECEIVE_PLANNING_OBJECTS(MessagePad.MessageType.MsgTypePlanningObjects, "Planning障碍物"),
|
||||
TYPE_RECEIVE_CHASSIS_STATES(MessagePad.MessageType.MsgTypeChassisStates, "底盘状态"),
|
||||
TYPE_RECEIVE_FUNCTION_STATES(MessagePad.MessageType.MsgTypeFunctionStates, "重构后功能状态"),
|
||||
TYPE_RECEIVE_BACK_CAMERA_VIDEO(MessagePad.MessageType.MsgTypeBackCameraVideo, "清扫车后摄像头"),
|
||||
TYPE_RECEIVE_BACK_CAMERA_VIDEO(MessagePad.MessageType.MsgTypeBackCameraVideo, "后摄像头"),
|
||||
TYPE_RECEIVE_M1_STITCHED_VIDEO(MessagePad.MessageType.MsgTypeM1StitchedVideo, "M1拼接视频"),
|
||||
|
||||
TYPE_RECEIVE_BASIC_INFO_REQ(MessagePad.MessageType.MsgTypeBasicInfoReq, "自动驾驶设备基础信息请求"),
|
||||
|
||||
@@ -9,7 +9,8 @@ import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
/**
|
||||
* 清扫车后摄像头 10Hz
|
||||
* 清扫车和Taxi后摄像头
|
||||
* 需要主动订阅,否则工控机不会发送此数据
|
||||
*/
|
||||
public class BackCameraVideoMessage extends MyAbstractMessageHandler {
|
||||
|
||||
@@ -21,13 +22,13 @@ public class BackCameraVideoMessage extends MyAbstractMessageHandler {
|
||||
int len = raw.getPackageLengthValue() - raw.getOffsetValue();
|
||||
byte[] data = new byte[len];
|
||||
System.arraycopy(raw.originalData.toByteArray(), raw.getOffsetValue(), data, 0, len);
|
||||
AdasChannel.calculateTimeConsumingOnDispatchRaw("清扫车后摄像头", raw.receiveTime);
|
||||
AdasChannel.calculateTimeConsumingOnDispatchRaw("后摄像头", raw.receiveTime);
|
||||
long nowTime = 0;
|
||||
if (CupidLogUtils.isEnableLog())
|
||||
nowTime = SystemClock.elapsedRealtime();
|
||||
if (adasListener != null) {
|
||||
adasListener.onBackCameraVideo(raw.getHeader(), data);
|
||||
}
|
||||
AdasChannel.calculateTimeConsumingBusiness("清扫车后摄像头", nowTime);
|
||||
AdasChannel.calculateTimeConsumingBusiness("后摄像头", nowTime);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
/**
|
||||
* M1拼接视频 10Hz
|
||||
* 需要主动订阅,否则工控机不会发送此数据
|
||||
*/
|
||||
public class M1StitchedVideoMessage extends MyAbstractMessageHandler {
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ public class SubscribeInterface {
|
||||
if (types.length > 0) {
|
||||
for (MessageType messageType : types) {
|
||||
if (messageType.name().toLowerCase().contains("type_receive")) {
|
||||
//连接成功后只有M1拼接视频接收接口默认不进行订阅,其他接收接口默认自动订阅
|
||||
if (messageType == MessageType.TYPE_RECEIVE_M1_STITCHED_VIDEO) {
|
||||
//连接成功后只有M1拼接视频接收接口和后摄像头接口默认不进行订阅,其他接收接口默认自动订阅
|
||||
if (messageType == MessageType.TYPE_RECEIVE_M1_STITCHED_VIDEO || messageType == MessageType.TYPE_RECEIVE_BACK_CAMERA_VIDEO) {
|
||||
unsubscribedInterface.put(messageType, messageType.typeCode.getNumber());
|
||||
} else {
|
||||
subscribedInterface.put(messageType, messageType.typeCode.getNumber());
|
||||
|
||||
@@ -378,4 +378,15 @@ public interface IMogoMapUIController {
|
||||
void cancelDownloadCacheData();
|
||||
|
||||
String getCityCode();
|
||||
|
||||
/**
|
||||
* 自动切换视角到指定点,包含过渡动画,并持续指定duration毫秒
|
||||
*
|
||||
* @param lon 经度
|
||||
* @param lat 纬度
|
||||
* @param rotateAngle 旋转角度
|
||||
* @param duration 持续时间
|
||||
* @param isGps 是否是高精坐标
|
||||
*/
|
||||
void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps);
|
||||
}
|
||||
|
||||
@@ -978,7 +978,8 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void setLockMode(boolean isLock) {
|
||||
if (checkAMapView()) {
|
||||
mMapView.getMapAutoViewHelper().setLockMode(true);
|
||||
Log.d("TTTTT", "setLockMode:" +isLock);
|
||||
mMapView.getMapAutoViewHelper().setLockMode(isLock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,4 +1155,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
return GDLocationClient.getInstance(getContext()).getLastCityCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps) {
|
||||
if (mMapView.getMapAutoViewHelper() != null) {
|
||||
mMapView.getMapAutoViewHelper().animateTo(lon, lat, rotateAngle, duration, isGps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,4 +505,11 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps) {
|
||||
if (mDelegate != null) {
|
||||
mDelegate.animateTo(lon, lat, rotateAngle, duration, isGps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,4 +442,11 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTo(double lon, double lat, float rotateAngle, int duration, boolean isGps) {
|
||||
if (mClient != null) {
|
||||
mClient.animateTo(lon, lat, rotateAngle, duration, isGps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user