A、增加最后一次启动自动驾驶参数记录,注意,实时回调和主动查询出来对可能为null即没有行程信息,需要做好容错,使用方法:
1、实时监听:实现监听接口,IMoGoAutopilotStatusListener::onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo),注册变化监听CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
2、单次查询: CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()
3、TODO @文君需要在Taxi行程结束和Bus跑完最后一站后对数据进行清空操作。

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-10-10 11:42:14 +08:00
parent 9667ff224b
commit 503755609b
4 changed files with 29 additions and 5 deletions

View File

@@ -85,12 +85,17 @@ open class AutopilotStatusInfo : Serializable, Cloneable {
// 默认未连接
var ipcConnStatus = 0x01
/**
* 记录最后一次启动自动驾驶需要的参数结束自动驾驶后设置为null
*/
var autopilotControlParameters: AutopilotControlParameters? = null
override fun toString(): String {
return "connectIP=$connectIP, connectPort=$connectPort, " +
"connectStatus=$connectStatus, connectDescribe=$connectStatusDescribe, version=$version, dockVersion=$dockVersion," +
" locationStatus=$locationStatus), locationLat=$locationLat, locationLon=$locationLon," +
" satelliteTime=$satelliteTime, speed=$speed, state=$state, reason=$reason, camera=$camera," +
" radar=$radar, rtk=$rtk, pilotmode=$pilotmode, ipcConnStatus=$ipcConnStatus"
" radar=$radar, rtk=$rtk, pilotmode=$pilotmode, ipcConnStatus=$ipcConnStatus, autopilotControlParameters=$autopilotControlParameters"
}
public override fun clone(): AutopilotStatusInfo {