[M2] M2 定位接口修改

This commit is contained in:
wangmingjun
2023-02-06 16:14:57 +08:00
parent 1bf5ac91cf
commit f8cb2e4389

View File

@@ -33,7 +33,7 @@ import mogo.telematics.pad.MessagePad
class PM2DrivingModel private constructor() {
private var mContext: Context? = null
private var mLocation: MessagePad.GnssInfo? = null
private var mLocation: MogoLocation? = null
private var mRoutePoints = mutableListOf<MogoLocation>()
private var routesResult: PM2RoutesResult? = null
@@ -83,14 +83,15 @@ class PM2DrivingModel private constructor() {
}
private val mMapLocationListener: IMoGoChassisLocationGCJ02Listener =
object : IMoGoChassisLocationGCJ02Listener {
override fun onChassisLocationGCJ02(gnssInfo: MessagePad.GnssInfo?) {
if (null == gnssInfo) return
mLocation = gnssInfo
object : IMoGoChassisLocationGCJ02Listener{
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
if (null == mogoLocation) return
mLocation = mogoLocation
updateSpeed()
}
}
}
private fun updateSpeed() {
//todo 传入速度
mDrivingInfoCallback?.updateSpeed(0)