[2.15.0] fix bug of roma click and add trace log
This commit is contained in:
@@ -25,6 +25,9 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
@Volatile
|
||||
private var click = false
|
||||
|
||||
private val openRes: Int
|
||||
private val normalRes: Int
|
||||
|
||||
@@ -36,10 +39,15 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
normalRes = a.getResourceId(R.styleable.RomaPassengerView_roma_close, 0)
|
||||
a.recycle()
|
||||
setOnClickListener {
|
||||
if(!click){
|
||||
return@setOnClickListener
|
||||
}
|
||||
romaMode = !romaMode
|
||||
romaTrigger(romaMode) { mode ->
|
||||
click = true
|
||||
romaMode = mode
|
||||
}
|
||||
click = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +73,7 @@ class RomaPassengerView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
click = true
|
||||
if (status) {
|
||||
romaMode = true
|
||||
if (openRes != 0) {
|
||||
|
||||
@@ -24,9 +24,15 @@ class RomaView @JvmOverloads constructor(
|
||||
@Volatile
|
||||
private var romaMode = false
|
||||
|
||||
@Volatile
|
||||
private var click = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_roma_bg, this, true)
|
||||
setOnClickListener {
|
||||
if(!click){
|
||||
return@setOnClickListener
|
||||
}
|
||||
romaMode = !romaMode
|
||||
// 司机屏发送事件给乘客屏
|
||||
if (romaMode) {
|
||||
@@ -40,6 +46,7 @@ class RomaView @JvmOverloads constructor(
|
||||
"1".toByteArray()
|
||||
)
|
||||
}
|
||||
click = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +56,7 @@ class RomaView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onReceivedMsg(type: Int, byteArray: ByteArray) {
|
||||
click = true
|
||||
when(type){
|
||||
TelematicConstant.OPEN_ROMA_STATUS -> {
|
||||
when (String(byteArray)) {
|
||||
|
||||
@@ -128,17 +128,14 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
|
||||
private fun openRoma() {
|
||||
if (!MogoMapUIController.getInstance().currentMapVisualAngle.isRoma) {
|
||||
requestRangeOfIdentify(true)
|
||||
updateLongSightLevel(true)
|
||||
requestRangeOfIdentify(true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun closeRoma(manual: Boolean = true) {
|
||||
if (!showAiCloud.get()) {
|
||||
return
|
||||
}
|
||||
requestRangeOfIdentify(false)
|
||||
updateLongSightLevel(false)
|
||||
requestRangeOfIdentify(false)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
// 主动关闭roma,回到中景视角
|
||||
if (manual) {
|
||||
@@ -157,6 +154,7 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
// CallerMapRomaListener.invokeMapRoma(false)
|
||||
// sendMsgToServer(TelematicConstant.OPEN_ROMA_STATUS, "4".toByteArray())
|
||||
// }
|
||||
MapBizTrace.log(TAG,"开启请求,data:$dataReceive")
|
||||
aiCloudIdentifyNetWorkModel.requestIdentifyRange(dataReceive, serverSn, {
|
||||
MapBizTrace.log(
|
||||
TAG,
|
||||
@@ -176,6 +174,8 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
TAG,
|
||||
"requestIdentifyRange error : $it , startRange:$START_METRE, endRange:$END_METRE, dataReceive:$dataReceive"
|
||||
)
|
||||
CallerMapRomaListener.invokeMapRoma(false)
|
||||
updateLongSightLevel(false)
|
||||
if(DebugConfig.isDebug()){
|
||||
ToastUtils.showShort("漫游请求异常,msg:$it")
|
||||
}
|
||||
@@ -194,8 +194,8 @@ class AiCloudIdentifyDataManager : IMogoMapListener, IReceivedMsgListener,
|
||||
else -> {
|
||||
if (showAiCloud.get()) {
|
||||
MapBizTrace.log(TAG, "onMapVisualAngleChanged, invoke close roma")
|
||||
closeRoma(false)
|
||||
showAiCloud.set(false)
|
||||
closeRoma(false)
|
||||
FunctionBuildConfig.isDrawIdentifyData = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ class AiCloudIdentifyNetWorkModel private constructor(){
|
||||
}
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = getEagleHost()): IAiCloudIdentifyApiService {
|
||||
// private fun getNetWorkApi(baseUrl: String = "http://dzt-qa-city.zhidaozhixing.com/"): IAiCloudIdentifyApiService { //todo 2023/4/19 衡阳临时测试
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(IAiCloudIdentifyApiService::class.java)
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ interface IAiCloudIdentifyApiService {
|
||||
@Headers("Content-type:application/json;charset=UTF-8")
|
||||
@POST("eagle-eye-dns/yycp-c-v2x-service/dataFusion/remoteDrivingSet")
|
||||
// @POST("yycp-data-center-service1/remoteDrivingSet")
|
||||
// @POST("yycp-c-v2x-service/dataFusion/remoteDrivingSet") //todo 2023/4/19 衡阳临时测试
|
||||
suspend fun identifyRange(@Body map: MutableMap<String, Any>): BaseResponse<Any>
|
||||
}
|
||||
Reference in New Issue
Block a user