[6.0.0] code opt and update sdk of aicloud , map , plus kotlin union
This commit is contained in:
@@ -52,7 +52,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.kotlinstdlib
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class CronTaskManager {
|
||||
* 请求路口一定范围内的设备信息(包含:摄像头、灯)
|
||||
*/
|
||||
private fun requestDeviceList() {
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.let { location ->
|
||||
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02().let { location ->
|
||||
disposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
|
||||
.create(ICameraListServices::class.java)
|
||||
.getDeviceList(location.longitude, location.latitude, 500)
|
||||
@@ -80,7 +80,7 @@ class CronTaskManager {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
cameraList = it
|
||||
// CallerLogger.d("$M_BIZ$TAG", "requestDeviceList返回结果为:$it")
|
||||
// CallerLogger.d("$M_BIZ$TAG", "requestDeviceList返回结果为:$it")
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
CallerLogger.e(
|
||||
@@ -88,8 +88,6 @@ class CronTaskManager {
|
||||
"requestDeviceList:message is:${it.message}, cause is:${it.cause}"
|
||||
)
|
||||
})
|
||||
}?: run {
|
||||
CallerLogger.e("$M_BIZ$TAG", "CurrentLocation is null!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -589,8 +589,8 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
it.cardIdAge = mySelf.get().age
|
||||
it.cardIdSex = mySelf.get().sex
|
||||
it.cityName = mySelf.get().city
|
||||
it.lat = location?.latitude ?: 0.0
|
||||
it.lon = location?.longitude ?: 0.0
|
||||
it.lat = location.latitude
|
||||
it.lon = location.longitude
|
||||
})
|
||||
if (response.code != 0 && response.code != 200) {
|
||||
send(AnswerState.Error(AnswerState.CODE_ANSWER_API_REQ_FAIL, "[Answer] - ${response.msg}", mutableMapOf<String, String>().also {
|
||||
@@ -818,8 +818,8 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
it.nickName = user.name
|
||||
it.headImgUrl = user.icon
|
||||
it.carInfo = user.brand
|
||||
it.lat = location?.latitude ?: 0.0
|
||||
it.lon = location?.longitude ?: 0.0
|
||||
it.lat = location.latitude
|
||||
it.lon = location.longitude
|
||||
})
|
||||
val code = response.code
|
||||
if (code != 0 && code != 200) {
|
||||
@@ -966,8 +966,8 @@ object MoGoChatFacade: IMoGoChatFacade {
|
||||
it.cardIdAge = mySelf.get().age
|
||||
it.cardIdSex = mySelf.get().sex
|
||||
it.cityName = mySelf.get().city
|
||||
it.lat = location?.latitude ?: 0.0
|
||||
it.lon = location?.longitude ?: 0.0
|
||||
it.lat = location.latitude
|
||||
it.lon = location.longitude
|
||||
})
|
||||
if (response.code != 0 && response.code != 200) {
|
||||
send(JoinState.Error(AnswerState.CODE_ANSWER_API_REQ_FAIL, "[JoinTeam] - ${response.msg}", mutableMapOf<String, String>().also {
|
||||
|
||||
@@ -70,10 +70,8 @@ internal class ChatServiceModel {
|
||||
val sn = MoGoAiCloudClientConfig.getInstance().sn
|
||||
|
||||
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
|
||||
if (location != null) {
|
||||
params.lon = location.longitude
|
||||
params.lat = location.latitude
|
||||
}
|
||||
params.lon = location.longitude
|
||||
params.lat = location.latitude
|
||||
Logger.d(ChatConsts.TAG, "connectStatusParam:$params")
|
||||
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
|
||||
map["data"] = Gson().toJson(params)
|
||||
|
||||
@@ -71,7 +71,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.kotlinstdlib
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.mogologlib
|
||||
|
||||
@@ -50,7 +50,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.kotlinstdlib
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -49,7 +49,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||
implementation rootProject.ext.dependencies.kotlinstdlib
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
|
||||
@@ -84,17 +84,17 @@ class MapPointCloudSubscriber private constructor()
|
||||
if (it.size >= 3) {
|
||||
for (index in 0 until 3) {
|
||||
dockerVersionCode +=
|
||||
when (index) {
|
||||
0 -> {
|
||||
it[index].substring(it[index].lastIndex)
|
||||
}
|
||||
it.size - 1 -> {
|
||||
it[index].substring(0, 1)
|
||||
}
|
||||
else -> {
|
||||
it[index]
|
||||
}
|
||||
when (index) {
|
||||
0 -> {
|
||||
it[index].substring(it[index].lastIndex)
|
||||
}
|
||||
it.size - 1 -> {
|
||||
it[index].substring(0, 1)
|
||||
}
|
||||
else -> {
|
||||
it[index]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_RO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_MAP_ERROR
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_MAP_START
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST_DELAY
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST_ERROR
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_REQUEST_OK
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ROMA_ROUTE_MODE
|
||||
@@ -209,6 +210,10 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
if (dataReceive) {
|
||||
// 请求地图开始漫游
|
||||
CallerMapUIServiceManager.getMapUIController()?.setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
}else{
|
||||
// 保底清除策略
|
||||
MapBizTrace.log("",CHAIN_CODE_ROMA_REQUEST_DELAY,TAG,mutableMapOf("delay" to true),true)
|
||||
MapIdentifySubscriber.instance.clearAiCloudRoma()
|
||||
}
|
||||
},
|
||||
{ errorMsg ->
|
||||
|
||||
@@ -182,10 +182,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
|
||||
}
|
||||
|
||||
override fun onChassisLocationWGS84(gnssInfo: MogoLocation) {
|
||||
if (gnssInfo != null
|
||||
&& gnssInfo.longitude != 0.0
|
||||
&& gnssInfo.latitude != 0.0
|
||||
) {
|
||||
if (gnssInfo.longitude != 0.0 && gnssInfo.latitude != 0.0) {
|
||||
executor.get()?.updateLocation(
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude,
|
||||
|
||||
@@ -412,7 +412,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
resources.getDrawable(R.drawable.transparent_background, null)
|
||||
.toBitmap(AutoSizeUtils.dp2px(context, 32f), AutoSizeUtils.dp2px(context, 230f))
|
||||
)
|
||||
initAMapView(context)
|
||||
initAMapView()
|
||||
//设置全览模式
|
||||
overLayerView?.setOnClickListener { displayCustomOverView() }
|
||||
overLayerView?.let {
|
||||
@@ -426,7 +426,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun initAMapView(context: Context) {
|
||||
private fun initAMapView() {
|
||||
Log.d(TAG, "initAMapView")
|
||||
mCameraUpdate = CameraUpdateFactory.zoomTo(zoomLevel.toFloat())
|
||||
mAMap = mMapView?.map
|
||||
|
||||
@@ -57,8 +57,8 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
|
||||
private val handler = Handler(Looper.getMainLooper()) {
|
||||
if (it.what == 1) {
|
||||
val value = it.obj as Pair<String, String>
|
||||
reConnectSocket(value.first, value.second)
|
||||
val value = it.obj as Pair<*, *>
|
||||
reConnectSocket(value.first as String, value.second as String)
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user