[状态栏]状态栏需求代码提交
[状态栏]网络可访问状态获取
This commit is contained in:
@@ -4,6 +4,7 @@ import androidx.annotation.Nullable
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
@@ -23,6 +24,9 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
private val M_AUTOPILOT_STATUS_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotStatusListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
@Volatile
|
||||
private var autoPilotMessageCode: String = ""
|
||||
|
||||
/**
|
||||
* 查询AutoPilot状态
|
||||
*/
|
||||
@@ -37,6 +41,8 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
return GsonUtils.toJson(mAutopilotStatusInfo)
|
||||
}
|
||||
|
||||
fun getAutoPilotReportMessageCode(): String = autoPilotMessageCode
|
||||
|
||||
/**
|
||||
* 通过Gnss定位更新来同步更新自动驾驶状态
|
||||
*/
|
||||
@@ -163,6 +169,7 @@ object CallerAutoPilotStatusListenerManager : CallerBase() {
|
||||
M_AUTOPILOT_STATUS_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
autoPilotMessageCode = guardianInfo?.code ?: ""
|
||||
listener.onAutopilotGuardian(guardianInfo)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ object CallerAutopilotCarStatusListenerManager : CallerBase() {
|
||||
private val M_AUTOPILOT_STATUS_LISTENERS: ConcurrentHashMap<String, IMoGoAutopilotCarStateListener> =
|
||||
ConcurrentHashMap()
|
||||
|
||||
@Volatile
|
||||
private var gnssInfo: MessagePad.GnssInfo? = null
|
||||
|
||||
/**
|
||||
* 添加 ADAS车辆状态&定位 监听
|
||||
@@ -56,12 +58,18 @@ object CallerAutopilotCarStatusListenerManager : CallerBase() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun getCurrentGnssInfo():MessagePad.GnssInfo? {
|
||||
return gnssInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* 车辆状态数据 回调
|
||||
* @param gnssInfo
|
||||
*/
|
||||
@Synchronized
|
||||
fun invokeAutopilotCarStateData(gnssInfo: MessagePad.GnssInfo?) {
|
||||
this.gnssInfo = gnssInfo
|
||||
M_AUTOPILOT_STATUS_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
val listener = it.value
|
||||
|
||||
@@ -113,4 +113,14 @@ object CallerAutopilotVehicleStateListenerManager : CallerBase() {
|
||||
fun getAutopilotTimeStamp(): Long {
|
||||
return this.timeStamp
|
||||
}
|
||||
|
||||
/**
|
||||
* 底盘没有返回数据
|
||||
*/
|
||||
fun invokeAutopilotNotData(timestamp: Long) {
|
||||
M_AUTOPILOT_VEHICLE_LISTENERS.forEach{
|
||||
val listener = it.value
|
||||
listener.onAutopilotNotData(timestamp)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,4 +136,11 @@ object CallerDevaToolsManager {
|
||||
fun downLoadPackage(downloadKey: String, downloadUrl: String) {
|
||||
devaToolsProviderApi?.downLoadPackage(downloadKey, downloadUrl)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示状态栏
|
||||
*/
|
||||
fun showStatusBar(ctx: Context) {
|
||||
devaToolsProviderApi?.showStatusBar(ctx)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user