ui opt
This commit is contained in:
@@ -50,6 +50,8 @@ import com.mogo.module.service.strategy.CarIconDisplayStrategy;
|
||||
import com.mogo.module.service.ttsConfig.TtsConfigModleData;
|
||||
import com.mogo.module.service.uploadintime.SnapshotUploadInTime;
|
||||
import com.mogo.service.adas.IMogoADASController;
|
||||
import com.mogo.service.adas.IMogoAdasCarDataCallback;
|
||||
import com.mogo.service.adas.entity.ADASCarStateInfo;
|
||||
import com.mogo.service.fragmentmanager.FragmentStackTransactionListener;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
@@ -65,6 +67,8 @@ import com.mogo.utils.NetworkUtils;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -86,6 +90,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
IMogoVoiceCmdCallBack,
|
||||
FragmentStackTransactionListener,
|
||||
IMogoCarLocationChangedListener2,
|
||||
IMogoAdasCarDataCallback,
|
||||
IDestroyable {
|
||||
|
||||
private boolean mInternalUnWakeupRegisterStatus = false;
|
||||
@@ -370,6 +375,7 @@ public class MogoServices implements IMogoMapListener,
|
||||
mIntentManager.registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, this );
|
||||
|
||||
mADASController = MarkerServiceHandler.getADASController();
|
||||
mADASController.setAdasCarDataCallback( this );
|
||||
mFragmentManager = MarkerServiceHandler.getFragmentManager();
|
||||
|
||||
mFragmentManager.addMainFragmentStackTransactionListener( this );
|
||||
@@ -950,4 +956,25 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdasCarDataCallback( ADASCarStateInfo stateInfo ) {
|
||||
if ( stateInfo != null && stateInfo.getValues() != null ) {
|
||||
JSONObject data = new JSONObject();
|
||||
try {
|
||||
data.putOpt( "lon", stateInfo.getValues().getLon() );
|
||||
data.putOpt( "lat", stateInfo.getValues().getLat() );
|
||||
data.putOpt( "alt", stateInfo.getValues().getAlt() );
|
||||
data.putOpt( "speed", stateInfo.getValues().getGnss_speed() );
|
||||
data.putOpt( "satelliteTime", stateInfo.getValues().getSatelliteTime() );
|
||||
data.putOpt( "heading", stateInfo.getValues().getHeading() );
|
||||
data.putOpt( "acceleration", stateInfo.getValues().getAcceleration() );
|
||||
data.putOpt( "yawRate", stateInfo.getValues().getYaw_rate() );
|
||||
MarkerServiceHandler.getApis().getMapServiceApi().getMapUIController().syncLocation2Map( data );
|
||||
SnapshotUploadInTime.getInstance().syncAdasLocationInfo( data );
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,6 +434,7 @@ public class MockIntentHandler implements IntentHandler {
|
||||
{40.20254135131836, 116.74005889892578},
|
||||
{40.20252990722656, 116.74007415771484},
|
||||
{40.20254898071289, 116.74008178710938},
|
||||
|
||||
{40.20254135131836, 116.74005889892578},
|
||||
{40.20252227783203, 116.74006652832031},
|
||||
{40.20254898071289, 116.74002838134766},
|
||||
@@ -472,6 +473,12 @@ public class MockIntentHandler implements IntentHandler {
|
||||
double delta = CoordinateUtils.calculateLineDistance( lon, lat, originCoor[0], originCoor[1] );
|
||||
Logger.d( TAG, "偏差值:%s", delta );
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
// adb shell am broadcast -a com.mogo.mock --ei oper 41 --ei type 0 平滑移动
|
||||
// adb shell am broadcast -a com.mogo.mock --ei oper 41 --ei type 1 直接打点
|
||||
DebugConfig.setNotSmooth( intent.getIntExtra( "type", 0 ) == 1 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user