[Change]
替换主动获取自动驾驶状态的调用方式 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -9,7 +9,6 @@ import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlCmdParameter;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
@@ -67,24 +66,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
if (mAdasDataListener == null) {
|
||||
mAdasDataListener = new IAdasDataListener() {
|
||||
|
||||
@Override
|
||||
public void autopilotArrive(AutopilotStationInfo autopilotArriveModel) {
|
||||
if (autopilotArriveModel == null) {
|
||||
Logger.d(TAG, "autopilotArrive autopilotArriveModel is null");
|
||||
return;
|
||||
}
|
||||
if (!mAdasOCHCallback.isEmpty()) {
|
||||
for (IMogoAdasOCHCallback cb : mAdasOCHCallback) {
|
||||
cb.onArriveAt(new AutopilotStationInfo(
|
||||
autopilotArriveModel.getType(),
|
||||
autopilotArriveModel.getLon(),
|
||||
autopilotArriveModel.getLat())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void ownerCarStateInfo(String ownerCarStateInfo) {
|
||||
// 接收 adas 定位数据线程
|
||||
@@ -141,30 +122,6 @@ public class MogoADASController implements IMogoADASController {
|
||||
mMogoAdasCarDataCallback = carDataCallback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAdasOCHCallback(IMogoAdasOCHCallback callback) {
|
||||
if (mAdasOCHCallback.contains(callback)) {
|
||||
return;
|
||||
}
|
||||
mAdasOCHCallback.add(callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAdasOCHCallback() {
|
||||
mAdasOCHCallback.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAutopilotStatus() {
|
||||
int status = IMogoAdasOCHCallback.STATUS_AUTOPILOT_DISABLE;
|
||||
try {
|
||||
status = adasProvider.autopilotStateCall().getState();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user