[code_opt_3.3.0] split autopilot status and param
This commit is contained in:
@@ -91,12 +91,15 @@ public class MogoRouteOverlayManager implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
int mode = autoPilotStatusInfo.getState();
|
||||
if (mode == 2) {
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
if (state == 2) {
|
||||
isArriveAtStation.set(false);
|
||||
}
|
||||
this.autopilotMode.set(mode);
|
||||
this.autopilotMode.set(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,4 +138,12 @@ public class MogoRouteOverlayManager implements
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDockerInfo(@NonNull String dockerVersion) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotConnectInfo(boolean connectInfo) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import android.widget.RelativeLayout
|
||||
import androidx.annotation.UiThread
|
||||
import com.amap.api.maps.*
|
||||
import com.amap.api.maps.model.*
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
@@ -50,9 +49,6 @@ class SmallMapView @JvmOverloads constructor(
|
||||
private var mContext: Context? = null
|
||||
private var mLocation: MogoLocation? = null
|
||||
|
||||
@Volatile
|
||||
private var autoPilotStatus = 0
|
||||
|
||||
companion object {
|
||||
const val TAG = "SmallMapView"
|
||||
}
|
||||
@@ -318,14 +314,12 @@ class SmallMapView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
val tempStatus = autoPilotStatusInfo.state
|
||||
if (tempStatus != 2) {
|
||||
override fun onAutopilotStatusResponse(state: Int) {
|
||||
if (state != 2) {
|
||||
UiThreadHandler.post {
|
||||
clearPolyline()
|
||||
}
|
||||
}
|
||||
autoPilotStatus = tempStatus
|
||||
}
|
||||
|
||||
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
|
||||
|
||||
Reference in New Issue
Block a user