Merge remote-tracking branch 'origin/dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0' into dev_robobus-m1-p-app-module_1.0.0_230112_1.0.0

This commit is contained in:
yangyakun
2023-02-10 15:13:16 +08:00
124 changed files with 1304 additions and 865 deletions

View File

@@ -76,12 +76,6 @@ dependencies {
implementation project(":OCH:mogo-och-common-module")
compileOnly project(":libraries:mogo-map")
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_function_v2x
}else {
implementation project(':foudations:mogo-aicloud-services-sdk')
implementation project(':core:function-impl:mogo-core-function-v2x')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -29,7 +29,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.network.utils.GsonUtil;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
@@ -272,7 +272,7 @@ public class BusPassengerModel {
IntentManager.getInstance().registerIntentListener(ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener );
// 定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
//2021.11.1 自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
@@ -284,7 +284,7 @@ public class BusPassengerModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
MogoAiCloudSocketManager.getInstance(mContext)
.unregisterLifecycleListener(10010);

View File

@@ -29,7 +29,7 @@ import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.och.bus.passenger.R;
import com.mogo.och.bus.passenger.callback.IBusPassengerMapViewCallback;
@@ -103,14 +103,14 @@ public class BusPassengerMapDirectionView
initAMapView();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
}
private void initAMapView() {

View File

@@ -20,7 +20,7 @@ import com.mogo.och.bus.passenger.ui.PM2BaseFragment
* Created on 2022/3/29
*/
@Route(path = BusPassengerConst.PATH)
class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
class MogoOCHBusPassenger : IMogoOCH {
private var mActivity: FragmentActivity? = null
private var mContainerId = 0
private var mPM2Fragment: PM2BaseFragment? = null
@@ -28,6 +28,7 @@ class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
override fun createCoverage(activity: FragmentActivity?, containerId: Int?): Fragment? {
mActivity = activity
mContainerId = containerId!!
showFragment()
return null
}
@@ -40,18 +41,6 @@ class MogoOCHBusPassenger : IMogoOCH, IMogoStatusChangedListener {
}
override fun init(context: Context) {
MogoStatusManager.getInstance()
.registerStatusChangedListener("OchBus", StatusDescriptor.VR_MODE, this)
}
override fun onStatusChanged(descriptor: StatusDescriptor, isTrue: Boolean) {
if (descriptor == StatusDescriptor.VR_MODE) {
if (isTrue) {
showFragment()
} else {
hideFragment()
}
}
}
/**

View File

@@ -14,29 +14,15 @@ class URLConst {
private const val Shettle_BASE_URL_OCH_QA = "https://och-driver-qa.zhidaozhixing.com"
private const val Shettle_BASE_URL_OCH_RELEASE = "https://och-driver.zhidaozhixing.com"
private const val BASE_URL_OCH_DEV = "http://tech-dev.zhidaohulian.com"
private const val BASE_URL_OCH_QA = "https://tech-qa.zhidaohulian.com"
private const val BASE_URL_OCH_RELEASE = "https://tech.zhidaohulian.com"
@JvmStatic
fun getBaseUrl(): String {
return if(AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
when (DebugConfig.getNetMode()) {
return when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_DEMO -> Shettle_BASE_URL_OCH_DEV
DebugConfig.NET_MODE_QA -> Shettle_BASE_URL_OCH_QA
DebugConfig.NET_MODE_RELEASE -> Shettle_BASE_URL_OCH_RELEASE
else -> Shettle_BASE_URL_OCH_RELEASE
}
}else{
when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV, DebugConfig.NET_MODE_DEMO -> BASE_URL_OCH_DEV
DebugConfig.NET_MODE_QA -> BASE_URL_OCH_QA
DebugConfig.NET_MODE_RELEASE -> BASE_URL_OCH_RELEASE
else -> BASE_URL_OCH_RELEASE
}
}
}
}
}

View File

@@ -8,7 +8,7 @@ import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
@@ -74,7 +74,8 @@ class PM2DrivingModel private constructor() {
CallerAutoPilotStatusListenerManager.addListener(TAG, mAutoPilotStatusListener)
// 定位监听
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, mMapLocationListener)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, mMapLocationListener)
CallerChassisLocationGCJ02ListenerManager.setListenerHz(TAG,5)//设置5hz, 1s返回一次
}
public fun releaseListener(){
@@ -82,7 +83,7 @@ class PM2DrivingModel private constructor() {
CallerAutoPilotStatusListenerManager.removeListener(TAG)
// 定位监听
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
}
fun setDrivingInfoCallback(drivingInfoCallback : DrivingInfoCallback?){

View File

@@ -3,6 +3,8 @@ package com.mogo.och.bus.passenger.ui.video
import com.mogo.commons.mvp.MvpFragment
import com.mogo.och.bus.passenger.R
import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
import com.mogo.och.bus.passenger.ui.widget.video.RotationItem
import kotlinx.android.synthetic.m2.p_m2_video_fragment.*
/**
* @author: wangmingjun
@@ -10,21 +12,13 @@ import com.mogo.och.bus.passenger.presenter.PM2VideoPresenter
*/
class PM2VideoFragment :
MvpFragment<PM2VideoFragment?, PM2VideoPresenter?>() {
/**
* 改变自动驾驶状态
*
* @param status 2 - running 1 - enable 2 - disable
*/
private var arrayListOf = mutableListOf<RotationItem>()
override fun getLayoutId(): Int {
return R.layout.p_m2_video_fragment
}
override fun getTagName(): String {
return TAG
}
override fun initViews() {
}
override fun createPresenter(): PM2VideoPresenter {
return PM2VideoPresenter(this)
@@ -33,4 +27,59 @@ class PM2VideoFragment :
companion object {
private val TAG = PM2VideoFragment::class.java.simpleName
}
override fun getTagName(): String {
return TAG
}
override fun initViews() {
initResourceData()
image_video_rotation_view.setData(arrayListOf)
}
override fun onPause() {
super.onPause()
image_video_rotation_view.setPause()
}
override fun onResume() {
super.onResume()
image_video_rotation_view.setResume()
}
private fun initResourceData() {
arrayListOf.clear()
arrayListOf.add(
RotationItem(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656558672856/小宝宝.mp4",
0,
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559345882/1.png",
"小宝宝"
)
)
arrayListOf.add(
RotationItem(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559367261/2.png",
0,
"",
"小猫"
)
)
arrayListOf.add(
RotationItem(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656558730074/星空.mp4",
1,
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559406169/4.png",
"星空"
)
)
arrayListOf.add(
RotationItem(
"https://img.zhidaohulian.com/fileServer/online_car_hailing/1656559384635/3.png",
0,
"",
"大海"
)
)
}
}

View File

@@ -13,6 +13,7 @@ import com.bumptech.glide.Glide
class AdvanceImageView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : RelativeLayout(context, attrs) {
private var imageView: ImageView? = null
init {
@@ -22,10 +23,10 @@ class AdvanceImageView @JvmOverloads constructor(
private fun initView() {
imageView = ImageView(context)
imageView?.scaleType = ImageView.ScaleType.FIT_XY
addView(imageView, LayoutParams(-1,-1))
addView(imageView, LayoutParams(-1, -1))
}
public fun setImagePath(path: String){
fun setImagePath(path: String){
imageView?.let { Glide.with(context).load(path).into(it) }
}
}

View File

@@ -1,30 +1,159 @@
package com.mogo.och.bus.passenger.ui.widget.video
import android.content.Context
import android.view.View
import android.view.ViewGroup
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
/**
* @author: wangmingjun
* @date: 2023/2/6
*/
class AdvancePagerAdapter: PagerAdapter() {
class AdvancePagerAdapter(context: Context, viewPager: ViewPager): PagerAdapter(),
ViewPager.OnPageChangeListener {
private val mContext: Context = context
private val mViewPager: ViewPager = viewPager
private var dataList = mutableListOf<RotationItem>()
private var viewList = mutableListOf<View>()
private var lastPosition = -1
private var current = 0
private val time = 5000
private val pause = false
private var thread: Thread? = null
fun setData(list: MutableList<RotationItem>){
if (list.isEmpty()) return
dataList.addAll(list)
viewList.clear()
list.forEach {
addView(it)
}
mViewPager.addOnPageChangeListener(this)
notifyDataSetChanged()
mViewPager.currentItem = 0
if (list.size > 0) {
if (list[0].type == 1) {//有人反应第一个是视频不播放这边优化了一下
var video = list[mViewPager.currentItem] as AdvanceVideoView
video.setVideo {
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
}
}
}
}
override fun getCount(): Int {
TODO("Not yet implemented")
return dataList.size
}
override fun isViewFromObject(view: View, `object`: Any): Boolean {
TODO("Not yet implemented")
return view === `object`
}
public fun setData(list: MutableList<RotationItem>){
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
container.removeView(viewList[position])
}
override fun instantiateItem(container: ViewGroup, position: Int): Any {
val view: View = viewList[position]
container.addView(view)
return view
}
public fun setPause(){
override fun getItemPosition(`object`: Any): Int {
return POSITION_NONE
}
private fun addView(item: RotationItem) {
if (item.type === 1) { // 表示视频
var videoView = AdvanceVideoView(mContext)
videoView.setCacheImageView(item.cacheImgPath)
videoView.setVideoPath(item.path)
viewList.add(videoView)
} else { // 表示图片
var imageView = AdvanceImageView(mContext)
imageView.setImagePath(item.path)
viewList.add(imageView)
}
}
fun setPause(){
}
public fun setResume(){
fun setResume(){
}
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
override fun onPageSelected(position: Int) {
}
override fun onPageScrollStateChanged(state: Int) {
// 由于viewpager的预加载机制onPageSelected这里面加载videoview 放的跟玩一样 等操作完成后再播放videoview就香了 很丝滑
if (state == 0) { //静止,什么都没做
if (viewList.size > 1) { //多于1才会循环跳转
if (lastPosition != -1 && lastPosition != mViewPager.currentItem
&& viewList[lastPosition] is AdvanceVideoView) {
var videoView: AdvanceVideoView = viewList[lastPosition] as AdvanceVideoView
videoView.setPause()
}
if (mViewPager.currentItem < 1) { //首位之前跳转到末尾N
var position = dataList.size //注意这里是mList而不是mViews
mViewPager.setCurrentItem(position, false)
} else if (mViewPager.currentItem > dataList.size) { //末位之后跳转到首位1
mViewPager.setCurrentItem(1, false) //false:不显示跳转过程的动画
}
current = 0//换页重新计算时间
if (viewList[mViewPager.currentItem] is AdvanceVideoView) {
(viewList[mViewPager.currentItem] as AdvanceVideoView).setVideo {
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
}
}else if (viewList[mViewPager.currentItem] is AdvanceImageView){
startTimer()
}
lastPosition = mViewPager.currentItem
}
}
}
private fun startTimer() {
if (null != thread && !thread?.isInterrupted!!) {
thread?.interrupt()
thread = null
}
thread = Thread{
while (null != thread && !thread?.isInterrupted!!) {
try {
Thread.sleep(1000)
if (!pause && viewList[mViewPager.currentItem] !is AdvanceVideoView)
current += 1000
if (current >= time) {
mViewPager.post {
mViewPager.setCurrentItem(mViewPager.currentItem + 1, true)
}
current = 0
}
} catch (e: InterruptedException) {
e.printStackTrace();
}
}
}
thread?.start()
}
}

View File

@@ -0,0 +1,124 @@
package com.mogo.och.bus.passenger.ui.widget.video
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Color
import android.media.MediaMetadataRetriever
import android.media.MediaPlayer
import android.util.AttributeSet
import android.widget.ImageView
import android.widget.RelativeLayout
import android.widget.VideoView
import com.bumptech.glide.Glide
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import java.lang.RuntimeException
/**
* @author: wangmingjun
* @date: 2023/2/8
*/
class AdvanceVideoView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : RelativeLayout(context, attrs) {
private var videoRelativeLayout: RelativeLayout? = null
private var cacheImage: ImageView? = null
private var videoView: VideoView? = null
private var path: String? = null
init {
initView()
}
private fun initView() {
videoRelativeLayout = RelativeLayout(context)
addView(videoRelativeLayout, LayoutParams(-1, -1))
cacheImage = ImageView(context)
cacheImage?.scaleType = ImageView.ScaleType.FIT_XY
addView(cacheImage, LayoutParams(-1, -1))
}
fun setVideoPath(path: String){
this.path = path
}
fun setCacheImageView(imgPath: String){
cacheImage?.visibility = VISIBLE
cacheImage?.let { Glide.with(context).load(imgPath).into(it) }
}
fun setVideo(onCompletionListener : MediaPlayer.OnCompletionListener) {
if (videoView != null){
videoRelativeLayout?.removeView(videoView)
videoView = null
}
//视频播放控件
videoView = VideoView(context)
videoView?.setVideoPath(path)
videoView?.setBackgroundColor(Color.TRANSPARENT)
var layoutParams = LayoutParams(-1, -1)
//设置videoview占满父view播放
layoutParams.addRule(ALIGN_PARENT_LEFT)
layoutParams.addRule(ALIGN_PARENT_RIGHT)
layoutParams.addRule(ALIGN_PARENT_TOP)
layoutParams.addRule(ALIGN_PARENT_BOTTOM)
videoRelativeLayout?.addView(videoView, layoutParams)
videoView?.setOnCompletionListener(onCompletionListener)
videoView?.start()
videoView?.setOnPreparedListener {
UiThreadHandler.postDelayed({
cacheImage?.visibility = GONE
},500)
}
videoView?.setOnCompletionListener(onCompletionListener)
}
fun setPause() {
if (videoView != null) {
videoView?.pause()
}
}
fun setRestart() {
if (videoView != null) {
videoView?.start()
}
}
/**
* 加载首帧,作为视频缓存显示的图片
*/
private fun loadCacheImage(){
Thread {
var retriever = MediaMetadataRetriever()
var bitmap: Bitmap? = null
try {
if (path?.contains("http") == true){
retriever.setDataSource(path, HashMap<String,String>())
}else{
retriever.setDataSource(path)
}
bitmap = retriever.frameAtTime
}catch (ex: Exception){
ex.printStackTrace()
}finally {
try {
retriever.release()
}catch (e: RuntimeException){
e.printStackTrace()
}
}
if (bitmap != null) {
UiThreadHandler.post {
// setCacheImageView(bitmap)
}
}
}
}
}

View File

@@ -3,9 +3,7 @@ package com.mogo.och.bus.passenger.ui.widget.video
import android.content.Context
import android.util.AttributeSet
import android.widget.RelativeLayout
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
/**
* @author: wangmingjun
* @date: 2023/2/6
@@ -23,20 +21,21 @@ class ImageAndVideoRotation @JvmOverloads constructor(
private fun initView() {
viewPager = ViewPager(context)
pagerAdapter = AdvancePagerAdapter()
pagerAdapter = AdvancePagerAdapter(context, viewPager!!)
viewPager?.adapter = pagerAdapter
addView(viewPager, LayoutParams(-1,-1))
addView(viewPager, LayoutParams(-1, -1))
}
public fun setData(list: MutableList<RotationItem>){
fun setData(list: MutableList<RotationItem>){
pagerAdapter?.setData(list)
}
public fun setPause(){
fun setPause(){
pagerAdapter?.setPause()
}
public fun setResume(){
fun setResume(){
pagerAdapter?.setResume()
}
}

View File

@@ -3,5 +3,10 @@ package com.mogo.och.bus.passenger.ui.widget.video
/**
* @author: wangmingjun
* @date: 2023/2/6
* type:0 图片
* type:1 视频
*/
data class RotationItem(var path: String, var type: String)
data class RotationItem(var path: String,
var type: Int,
var cacheImgPath: String,
var title: String)

View File

@@ -134,7 +134,7 @@
<!-- 全览地图带站点-->
<com.mogo.eagle.core.function.overview.view.OverMapView
<com.mogo.eagle.core.function.view.OverMapView
android:id="@+id/overMapView"
android:layout_width="0dp"
android:layout_height="@dimen/dp_600"

View File

@@ -8,7 +8,7 @@
<FrameLayout
android:id="@+id/driving_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="@dimen/dp_853"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
@@ -16,7 +16,7 @@
<FrameLayout
android:id="@+id/hd_map_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="@dimen/dp_853"
app:layout_constraintTop_toBottomOf="@+id/driving_fragment"
app:layout_constraintLeft_toLeftOf="parent"/>
@@ -26,7 +26,7 @@
<FrameLayout
android:id="@+id/video_fragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="@dimen/dp_853"
app:layout_constraintTop_toBottomOf="@+id/hd_map_fragment"
app:layout_constraintLeft_toLeftOf="parent"/>

View File

@@ -4,22 +4,28 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- 高精地图 消息盒子-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="这是hdMap"
android:textSize="@dimen/dp_60"/>
<!-- 高精地图 -->
<!-- 消息盒子气泡 -->
<!--<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView-->
<!-- android:layout_width=""-->
<!-- android:layout_height=""/>-->
<com.mogo.eagle.core.function.view.MapBizView
android:id="@+id/mapBizView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- 消息盒子气泡-->
<!-- <com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView-->
<!-- android:id="@+id/box_bubble_view"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent" />-->
<!--pnc行为决策-->
<!-- <com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView-->
<!-- android:layout_width=""-->
<!-- android:layout_height=""/>-->
<!-- android:id="@+id/pnc_actions_view"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent" />-->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -6,12 +6,9 @@
<!-- 图片或视频广告-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="这是video"
android:textSize="@dimen/dp_60"/>
<com.mogo.och.bus.passenger.ui.widget.video.ImageAndVideoRotation
android:id="@+id/image_video_rotation_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -30,7 +30,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
@@ -151,7 +151,7 @@ public class OrderModel {
mContext = AbsMogoApplication.getApp();
loginService = (LoginService) ARouter.getInstance().build(OchCommonConst.LOGINSERVICE).navigation();
// 定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, mMapLocationListener);
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
@@ -331,7 +331,7 @@ public class OrderModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
//自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);

View File

@@ -60,20 +60,17 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
api rootProject.ext.dependencies.mogoutils
api rootProject.ext.dependencies.mogocommons
api rootProject.ext.dependencies.mogo_core_data
api rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_function_v2x
api rootProject.ext.dependencies.mogo_core_function_hmi
api rootProject.ext.dependencies.mogo_core_function_map
}else {
api project(":core:mogo-core-utils")
api project(":foudations:mogo-commons")
api project(':core:mogo-core-data')
api project(':core:mogo-core-function-call')
implementation project(':core:function-impl:mogo-core-function-v2x')
api project(':core:function-impl:mogo-core-function-hmi')
api project(':core:function-impl:mogo-core-function-map')
}
implementation project(':libraries:mogo-adas')
compileOnly project(':libraries:mogo-adas')
}

View File

@@ -5,7 +5,7 @@ import android.content.Context
import com.mogo.eagle.core.data.BaseData
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.utilcode.util.NetworkUtils
import com.mogo.eagle.core.utilcode.util.SharedPrefs
import com.mogo.eagle.core.utilcode.util.ToastUtils
@@ -36,7 +36,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
fun init(context: Context) {
mContext = context.applicationContext
// 达到起始站围栏监听
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
}
fun hasInit(): Boolean {
@@ -65,7 +65,7 @@ object OchCommonLoginModel : IMoGoChassisLocationGCJ02Listener {
mContext = null
iTaxiLoginCallback = null
// 注销到达起始站围栏监听
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
}
/**

View File

@@ -4,12 +4,10 @@ import android.content.Context;
import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatisticsListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback;
import com.zhidao.support.adas.high.bean.AutopilotStatistics;

View File

@@ -60,7 +60,6 @@ dependencies {
}else {
implementation project(":core:mogo-core-utils")
implementation project(":foudations:mogo-commons")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-function-call')
implementation project(':core:function-impl:mogo-core-function-hmi')
}

View File

@@ -24,7 +24,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
@@ -123,7 +123,7 @@ public class SweeperOrderModel {
public void init() {
mContext = AbsMogoApplication.getApp();
// 定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
@@ -248,7 +248,7 @@ public class SweeperOrderModel {
startOrStopOrderLoop(false);
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
//自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener);

View File

@@ -57,11 +57,6 @@ dependencies {
implementation project(":OCH:mogo-och-common-module")
compileOnly project(":libraries:mogo-map")
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_function_v2x
}else {
implementation project(':core:function-impl:mogo-core-function-v2x')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -34,7 +34,7 @@ import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener;
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager;
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
@@ -241,7 +241,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
IntentManager.getInstance().registerIntentListener( ConnectivityManager.CONNECTIVITY_ACTION, mNetWorkIntentListener );
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationListener);
//2021.11.1 自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG,moGoAutopilotPlanningListener);
@@ -261,7 +261,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
MogoAiCloudSocketManager.getInstance(mContext)
.unregisterLifecycleListener(10010);

View File

@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.och.taxi.passenger.R;
import com.mogo.och.taxi.passenger.callback.ITaxiPassengerMapViewCallback;
@@ -104,14 +104,14 @@ public class TaxiPassengerMapDirectionView
initAMapView();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
}
private void initAMapView() {

View File

@@ -55,11 +55,6 @@ dependencies {
implementation project(":OCH:mogo-och-common-module")
compileOnly project(":libraries:mogo-map")
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_function_v2x
}else {
implementation project(':core:function-impl:mogo-core-function-v2x')
}
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -32,7 +32,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
@@ -223,7 +223,7 @@ public class TaxiModel {
MogoStatusManager.getInstance().registerStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
//定位监听, 传false是高德坐标系
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG,mMapLocationLIstener);
//2021.11.1 自动驾驶路线规划接口
CallerPlanningRottingListenerManager.INSTANCE.addListener(TAG, moGoAutopilotPlanningListener);
@@ -262,7 +262,7 @@ public class TaxiModel {
MogoStatusManager.getInstance().unregisterStatusChangedListener(TAG, StatusDescriptor.VR_MODE, mMogoStatusChangedListener);
// 注销地图监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType);

View File

@@ -31,7 +31,7 @@ import com.amap.api.maps.model.PolylineOptions;
import com.mogo.eagle.core.data.map.MogoLatLng;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.och.taxi.R;
import com.mogo.och.taxi.utils.TaxiMapAssetStyleUtil;
@@ -98,14 +98,14 @@ public class TaxiMapDirectionView
initAMapView();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.INSTANCE.removeListener(TAG);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.removeListener(TAG);
}
private void initAMapView() {

View File

@@ -158,6 +158,12 @@ android {
storePassword 'ZDauto123456'
keyPassword 'ZDauto123456'
}
releaseEB5 {
keyAlias = 'android_platform'
storeFile file('../keystore/EB5/car_launcher.jks')
storePassword 'ZDauto123456'
keyPassword 'ZDauto123456'
}
}
buildTypes {
debug {
@@ -409,21 +415,44 @@ dependencies {
implementation rootProject.ext.dependencies.lancetx_runtime
implementation rootProject.ext.dependencies.mogocustommap
implementation project(':core:function-impl:mogo-core-function-startup')
implementation project(':libraries:map-usbcamera')
// // 暂不使用Shizuku-API
// implementation rootProject.ext.dependencies.shizuku_provider
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.ttspad
implementation rootProject.ext.dependencies.mogo_core_function_hmi
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_map
implementation rootProject.ext.dependencies.mogo_core_function_v2x
implementation rootProject.ext.dependencies.mogo_core_function_datacenter
implementation rootProject.ext.dependencies.mogo_core_function_devatools
implementation rootProject.ext.dependencies.mogo_core_function_chat
implementation rootProject.ext.dependencies.mogo_core_function_biz
implementation rootProject.ext.dependencies.mogo_core_function_call
androidTestImplementation rootProject.ext.dependencies.mogo_core_function_call
androidTestImplementation rootProject.ext.dependencies.mogo_core_res
} else {
implementation project(':tts:tts-pad')
implementation project(':core:function-impl:mogo-core-function-hmi')
implementation project(':core:function-impl:mogo-core-function-map')
implementation project(':core:function-impl:mogo-core-function-v2x')
implementation project(':core:function-impl:mogo-core-function-datacenter')
implementation project(':core:function-impl:mogo-core-function-devatools')
implementation project(':core:function-impl:mogo-core-function-chat')
implementation project(':core:function-impl:mogo-core-function-biz')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-res')
implementation project(':foudations:mogo-commons')
androidTestImplementation project(':core:mogo-core-function-call')
androidTestImplementation project(':core:mogo-core-res')
}
apply from: "./functions/och.gradle"
androidTestImplementation rootProject.ext.dependencies.androidx_test_core

View File

@@ -20,7 +20,12 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchBus",ACTIVITY_ROOT:true]
manifestPlaceholders = [
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
CHANNEL_VALUE : "fOchBus",
ACTIVITY_ROOT : true,
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -17,8 +17,17 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchTaxi",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchTaxi",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -18,8 +18,17 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchBus",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchBus",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -17,8 +17,18 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchBusPassenger",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchBusPassenger",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -18,7 +18,12 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchBusPassenger",ACTIVITY_ROOT:true]
manifestPlaceholders = [
AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,
CHANNEL_VALUE: "fOchBusPassenger",
ACTIVITY_ROOT:true,
SCREEN_ORIENTATION: "portrait"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -17,8 +17,18 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchSweeper",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchSweeper",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -18,8 +18,18 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchTaxi",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchTaxi",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -17,8 +17,18 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
//高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fOchTaxiPassenger",ACTIVITY_ROOT:false]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fOchTaxiPassenger",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : false,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -4,7 +4,7 @@ project.android.productFlavors {
externalNativeBuild {
ndk {
// 设置支持的SO库架构
abiFilters "armeabi-v7a", "arm64-v8a"
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo
@@ -15,8 +15,17 @@ project.android.productFlavors {
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
// 高德地图鉴权信息
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovo",ACTIVITY_ROOT:true]
// 配置AndroidManifest.xml中用到的参数
manifestPlaceholders = [
// 高德地图鉴权信息
AMAP_API_VALUE : rootProject.ext.android.fLauncherAmapApiValue,
// BUGLY_APP_CHANNEL
CHANNEL_VALUE : "fPadLenovo",
// 在启动的时候把Task给清空
ACTIVITY_ROOT : true,
// Activity的朝向
SCREEN_ORIENTATION: "landscape"
]
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'

View File

@@ -24,3 +24,4 @@
- mogo-core-res程序中涉及到的图片及布局资源同一管理并通过设置不同的目录指定是那个模块的资源这里只存放公共资源图片布局动画等
- mogo-core-utils基于成熟的工具类开源框架下沉的这里可以增添针对我们业务上的一些工具类
- MultiDisplayUtils :多屏幕管理工具

View File

@@ -0,0 +1,16 @@
## 多屏幕场景
```java
// 在第二个屏幕启动页面
MultiDisplayUtils.INSTANCE.startActWithSecond(
context,
VideoAdAtc.class);
```
```java
// 在指定屏幕启动页面
MultiDisplayUtils.INSTANCE.startActWithProcess(
1,
context,
VideoAdAtc.class);
```

View File

@@ -62,7 +62,6 @@ dependencies {
implementation rootProject.ext.dependencies.androidxroomktx
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-network')
implementation project(':core:mogo-core-function-call')

View File

@@ -7,7 +7,7 @@ import com.mogo.commons.constants.HostConst
import com.mogo.commons.utils.RetryWithDelay
import com.mogo.eagle.core.data.camera.CameraEntity
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -90,7 +90,7 @@ class CronTaskManager {
* 请求路口一定范围内的设备信息(包含:摄像头、灯)
*/
private fun requestDeviceList() {
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.let { location ->
disposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getDeviceList(location.longitude, location.latitude, 500)
@@ -124,7 +124,7 @@ class CronTaskManager {
}
private fun requestCarCameraList() {
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()?.let { location ->
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.let { location ->
carDisposable = MoGoRetrofitFactory.getInstance(HostConst.getEagleHost())
.create(ICameraListServices::class.java)
.getCarCameraList(ReqLiveCarBean(location.longitude, location.latitude))

View File

@@ -15,7 +15,7 @@ import com.mogo.eagle.core.data.trafficlight.TrafficLightStatusHelper.getCurrent
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.v2x.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.api.v2x.IMoGoVipSetListener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
@@ -84,7 +84,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
fun listenTrafficLight() {
CallerTrafficLightListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
CallVipSetListenerManager.addListener(TAG, this)
}
@@ -266,7 +266,7 @@ class RedLightWarningManager : IMoGoTrafficLightListener, IMoGoVipSetListener,
fun onDestroy() {
CallVipSetListenerManager.removeListener(TAG)
CallerTrafficLightListenerManager.removeListener(TAG)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
}
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {

View File

@@ -6,7 +6,7 @@ import android.os.Looper
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.trafficlight.*
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
@@ -41,7 +41,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener {
fun initServer(context: Context) {
mContext = context
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
mThreadHandler =
TrafficLightThreadHandler(Looper.getMainLooper(), {
//第一次查询路口时,如果红绿灯显示,则隐藏掉

View File

@@ -61,13 +61,11 @@ dependencies {
implementation rootProject.ext.dependencies.androidxrecyclerview
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_res
} else {
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-res')

View File

@@ -15,7 +15,7 @@ import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_DEFAULT
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VEHICLE_TEAM
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
import com.mogo.eagle.core.function.api.chat.biz.IMType.*
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.chat.facade.analytics.ChatAnalyticsFacade
import com.mogo.eagle.core.function.chat.facade.audio.AudioFocusFacade
import com.mogo.eagle.core.function.chat.facade.bridge.BridgeApi
@@ -581,7 +581,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
//告之服务器给发送方下发接收通话消息
try {
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VOICE.type).also {
it.nickName = mySelf.get().name
it.headImgUrl = mySelf.get().icon
@@ -812,7 +812,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
val response = serverApi.inviteJoinVehicleTeam(CallRequestParam().also {
val user = mySelf.get()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
it.snSender = mySn
it.snReceiver = sn
it.nickName = user.name
@@ -958,7 +958,7 @@ object MoGoChatFacade: IMoGoChatFacade {
}
//告之服务器给发送方下发接收通话消息
try {
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
val response = serverApi.requestConnectStatus(ConnectStatusParam(MoGoAiCloudClientConfig.getInstance().sn, sn, roomId, PUSH_MSG_AGREE_ENTER, CALL_TYPE_VEHICLE_TEAM.type).also {
it.nickName = mySelf.get().name
it.headImgUrl = mySelf.get().icon

View File

@@ -8,7 +8,7 @@ import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.data.chat.UserInfo
import com.mogo.eagle.core.function.api.chat.biz.ChatConsts
import com.mogo.eagle.core.function.api.chat.biz.IMCallType.CALL_TYPE_VOICE
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.chat.facade.net.bean.*
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
@@ -69,7 +69,7 @@ internal class ChatServiceModel {
val map = hashMapOf<String, String>()
val sn = MoGoAiCloudClientConfig.getInstance().sn
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
if (location != null) {
params.lon = location.longitude
params.lat = location.latitude
@@ -103,7 +103,7 @@ internal class ChatServiceModel {
suspend fun requestRoomInfo(param: CallRequestParam): BaseResponse<RoomInfo> {
val map = hashMapOf<String, String>()
val location = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
if (location != null) {
param.lat = location.latitude
param.lon = location.longitude

View File

@@ -60,17 +60,14 @@ dependencies {
implementation rootProject.ext.dependencies.amapnavi3dmap
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation project(':libraries:mogo-adas')
implementation rootProject.ext.dependencies.mogocommons
} else {
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-call')
implementation project(':libraries:mogo-adas')
implementation project(':foudations:mogo-commons')
}

View File

@@ -6,16 +6,18 @@ import com.amap.api.location.AMapLocationClientOption
import com.amap.api.location.AMapLocationListener
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.constants.SharedPrefsConstants
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisGnssListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuLocationWGS84Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.support.obu.model.MogoObuHvBasicsData
import mogo.telematics.pad.MessagePad
/**
@@ -25,6 +27,7 @@ import mogo.telematics.pad.MessagePad
*/
object MoGoLocationDispatcher :
IMoGoChassisGnssListener,
IMoGoObuLocationWGS84Listener,
AMapLocationListener {
private val TAG = "MoGoLocationManager"
@@ -37,6 +40,11 @@ object MoGoLocationDispatcher :
*/
private var lastGnssLocation: MogoLocation = MogoLocation()
/**
* 最后一次OBU GNSS 返回更新的位置
*/
private var lastOBULocation: MogoLocation = MogoLocation()
/**
* 最后一次高德定位返回的位置信息
*/
@@ -69,6 +77,7 @@ object MoGoLocationDispatcher :
// 初始化监听订阅工控机位置信息
CallerChassisGnssListenerManager.addListener(TAG, this)
CallerObuLocationWGS84ListenerManager.addListener(TAG, this)
}
override fun onChassisGnss(gnssInfo: MessagePad.GnssInfo) {
@@ -95,17 +104,19 @@ object MoGoLocationDispatcher :
lastGnssLocation.errorCode = it.errorCode
lastGnssLocation.errorInfo = it.errorInfo
}
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGnssLocation,
DataSourceType.TELEMATIC
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
lastGnssLocation,
DataSourceType.TELEMATIC
)
//FileUtils.writeToFile("/sdcard/Download/", "location_wgs84.txt", "${gnssInfo.longitude},${gnssInfo.latitude}\n")
if (1 == FunctionBuildConfig.gpsProvider) {
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGnssLocation,
DataSourceType.TELEMATIC
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
lastGnssLocation,
DataSourceType.TELEMATIC
)
}
}
/**
@@ -115,7 +126,7 @@ object MoGoLocationDispatcher :
override fun onLocationChanged(aMapLocation: AMapLocation) {
mapLocation = aMapLocation
// 更新GNSS 信息
lastGaoDeLocation.lastReceiveTime = TimeUtils.getNowMills()
// 将高德中的一些用于业务的数据进行融合例如CityCode、address等
mapLocation?.let {
@@ -150,27 +161,100 @@ object MoGoLocationDispatcher :
lastGaoDeLocation.errorInfo = it.errorInfo
}
// 计算最后一次工控机同步的定位是否超时,如果超时则切换为高德地图定位,暂定超过10秒需要切换
if (TimeUtils.getNowMills() - lastGnssLocation.lastReceiveTime > 10000) {
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGaoDeLocation,
DataSourceType.MAP
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ20ListenerManager.invokeChassisLocationGCJ02(
lastGaoDeLocation,
DataSourceType.MAP
)
// 计算最后一次工控机同步的定位是否超时,如果超时则切换为高德地图定位,暂定超过30秒需要切换
if (1 == FunctionBuildConfig.gpsProvider) {
if (TimeUtils.getNowMills() - lastGnssLocation.lastReceiveTime > 30000) {
syncGaoDeLocation()
}
} else if (2 == FunctionBuildConfig.gpsProvider) {
if (TimeUtils.getNowMills() - lastOBULocation.lastReceiveTime > 30000) {
syncGaoDeLocation()
}
}
// 本地SP缓存城市Code
val cityCode = aMapLocation.cityCode
if (cityCode != null && cityCode.isNotEmpty()) {
mCityCode = aMapLocation.cityCode
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
.putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
.putString(
SharedPrefsConstants.LOCATION_LATITUDE,
aMapLocation.latitude.toString()
)
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
.putString(
SharedPrefsConstants.LOCATION_LONGITUDE,
aMapLocation.longitude.toString()
)
}
}
/**
* 对外同步高德回掉的定位数据
*/
private fun syncGaoDeLocation() {
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastGaoDeLocation,
DataSourceType.MAP
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
lastGaoDeLocation,
DataSourceType.MAP
)
}
/**
* OBU定位回调监听
*/
override fun onObuLocationWGS84(data: MogoObuHvBasicsData) {
// 更新GNSS 信息
lastOBULocation.longitude = data.vehBasicsMsg.longitude
lastOBULocation.latitude = data.vehBasicsMsg.latitude
lastOBULocation.heading = data.vehBasicsMsg.heading
lastOBULocation.gnssSpeed = data.vehBasicsMsg.speed.toFloat()
lastOBULocation.altitude = data.vehBasicsMsg.elevation
lastOBULocation.satelliteTime = data.vehBasicsMsg.secMark
lastOBULocation.lastReceiveTime = TimeUtils.getNowMills()
// 将高德中的一些用于业务的数据进行融合例如CityCode、address等
mapLocation?.let {
lastOBULocation.cityName = it.city
lastOBULocation.cityCode = it.cityCode
lastOBULocation.provider = it.provider
lastOBULocation.address = it.address
lastOBULocation.district = it.district
lastOBULocation.province = it.province
lastOBULocation.adCode = it.adCode
lastOBULocation.locationDetail = it.locationDetail
lastOBULocation.poiName = it.poiName
lastOBULocation.aoiName = it.aoiName
lastOBULocation.street = it.street
lastOBULocation.streetNum = it.streetNum
lastOBULocation.description = it.description
lastOBULocation.buildingId = it.buildingId
lastOBULocation.floor = it.floor
lastOBULocation.errorCode = it.errorCode
lastOBULocation.errorInfo = it.errorInfo
}
if (2 == FunctionBuildConfig.gpsProvider) {
// WGS84坐标系高精度位置信息
CallerChassisLocationWGS84ListenerManager.invokeChassisLocationWGS84(
lastOBULocation,
DataSourceType.OBU
)
// GCJ02高德坐标系位置信息
CallerChassisLocationGCJ02ListenerManager.invokeChassisLocationGCJ02(
lastOBULocation,
DataSourceType.OBU
)
}
}
}

View File

@@ -37,12 +37,12 @@ class MoGoObuProvider : IMoGoObuProvider {
MogoObuDcCombineManager.INSTANCE.init(context)
CallerLogger.d("$M_OBU$TAG", "初始化蘑菇自研OBU…… localIp = " + CommonUtils.getLocalIPAddress())
//bus乘客版本obu功能去掉
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
) {
//不处理
} else {
//bus乘客版本obu功能去掉,大理项目需要全部车辆接收,不在限制
// if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
// && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
// ) {
// //不处理
// } else {
mContext = context
mContext?.let {
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //bus 司机端
@@ -66,7 +66,7 @@ class MoGoObuProvider : IMoGoObuProvider {
)
}
}
}
// }
}
/**

View File

@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Defa
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.TooClose
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.datacenter.obu.utils.TrafficDataConvertUtilsNew
@@ -31,7 +32,6 @@ import com.mogo.support.obu.model.*
import com.mogo.support.obu.model.advance.SpatLight
import com.mogo.support.obu.option.MogoObuCom
import com.mogo.support.obu.option.MogoObuOptions
import org.json.JSONObject
import kotlin.math.roundToInt
/**
@@ -107,45 +107,22 @@ class MogoPrivateObuNewManager private constructor() {
/**
* HV车辆基础信息 CvxHvCarIndInfo CvxHvInfoIndInfo
*/
override fun onMogoObuHvBasics(p0: MogoObuHvBasicsData?) {
if (p0 != null && p0.vehBasicsMsg != null) {
override fun onMogoObuHvBasics(mogoObuHvBasicsData: MogoObuHvBasicsData?) {
if (mogoObuHvBasicsData != null && mogoObuHvBasicsData.vehBasicsMsg != null) {
CallerLogger.d(
"$M_OBU${MogoObuConst.TAG_MOGO_NEW_OBU}",
"onMogoObuHvBasics lon = ${p0.vehBasicsMsg.longitude} --- lat = ${p0.vehBasicsMsg.latitude} ---speed = ${p0.vehBasicsMsg.speed} ---heading = ${p0.vehBasicsMsg.heading} --acceleration = ${p0.vehBasicsMsg.accFourAxes.accLat} --yawRate = ${p0.vehBasicsMsg.accFourAxes.accYaw}"
"onMogoObuHvBasics lon = ${mogoObuHvBasicsData.vehBasicsMsg.longitude} --- lat = ${mogoObuHvBasicsData.vehBasicsMsg.latitude} ---speed = ${mogoObuHvBasicsData.vehBasicsMsg.speed} ---heading = ${mogoObuHvBasicsData.vehBasicsMsg.heading} --acceleration = ${mogoObuHvBasicsData.vehBasicsMsg.accFourAxes.accLat} --yawRate = ${mogoObuHvBasicsData.vehBasicsMsg.accFourAxes.accYaw}"
)
val data = JSONObject()
try {
data.putOpt("lon", p0.vehBasicsMsg.longitude)
data.putOpt("lat", p0.vehBasicsMsg.latitude)
data.putOpt("speed", p0.vehBasicsMsg.speed)
data.putOpt("heading", p0.vehBasicsMsg.heading)
data.putOpt("acceleration", p0.vehBasicsMsg.accFourAxes.accLat)
data.putOpt("yawRate", p0.vehBasicsMsg.accFourAxes.accYaw)
try {
data.putOpt("systemTime", System.currentTimeMillis())
} catch (e: Exception) {
e.printStackTrace()
}
try {
data.putOpt("satelliteTime", System.currentTimeMillis())
} catch (e: Exception) {
e.printStackTrace()
}
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统1-工控机2-OBU
if (2 == FunctionBuildConfig.gpsProvider) {
// 同步给MAP地图
CallerMapUIServiceManager.getMapUIController()?.syncLocation2Map(data)
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(
System.currentTimeMillis() / 1000.0,
p0.vehBasicsMsg.longitude,
p0.vehBasicsMsg.latitude
)
}
} catch (e: Exception) {
e.printStackTrace()
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统1-工控机2-OBU
if (2 == FunctionBuildConfig.gpsProvider) {
// 同步给MAP地图
CallerObuLocationWGS84ListenerManager.invokeObuLocationWGS84(mogoObuHvBasicsData)
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
CallerAutoPilotStatusListenerManager.updateAutoPilotLatLon(
System.currentTimeMillis() / 1000.0,
mogoObuHvBasicsData.vehBasicsMsg.longitude,
mogoObuHvBasicsData.vehBasicsMsg.latitude
)
}
}
}
@@ -621,7 +598,7 @@ class MogoPrivateObuNewManager private constructor() {
}
}
}
}
/**
* 获取消息的方位 车辆相关
@@ -894,7 +871,6 @@ private var isShowGreenWave = false
private var isShowRunRedLight = false
/**
* 修改红绿灯
*/
@@ -1004,22 +980,38 @@ private fun changeTrafficLightStatus(
when (currentLight.light) {
// 灯光不可用
0 -> {
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(TrafficLightEnum.BLACK,-1,DataSourceType.OBU)
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
TrafficLightEnum.BLACK,
-1,
DataSourceType.OBU
)
}
// 红灯
2, 3 -> {
val red = currentLight.countDown.toInt()
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(TrafficLightEnum.RED,red,DataSourceType.OBU)
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
TrafficLightEnum.RED,
red,
DataSourceType.OBU
)
}
// 绿灯
4, 5, 6 -> {
val green = currentLight.countDown.toInt()
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(TrafficLightEnum.GREEN,green,DataSourceType.OBU)
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
TrafficLightEnum.GREEN,
green,
DataSourceType.OBU
)
}
// 黄灯
7, 8 -> {
val yellow = currentLight.countDown.toInt()
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(TrafficLightEnum.YELLOW,yellow,DataSourceType.OBU)
CallerTrafficLightListenerManager.invokeTrafficLightPlusSource(
TrafficLightEnum.YELLOW,
yellow,
DataSourceType.OBU
)
}
}
}

View File

@@ -88,14 +88,11 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_res
}else {
implementation project(':foudations:mogo-aicloud-services-sdk')
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-res')
}
}

View File

@@ -13,7 +13,9 @@ import com.mogo.eagle.core.data.deva.scene.SceneModule
import com.mogo.eagle.core.data.deva.scene.SceneTAG
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
import com.zhjt.mogo_core_function_devatools.binding.BindingCarManager.Companion.bindingCarManager
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter
@@ -21,6 +23,8 @@ import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
import com.zhjt.mogo_core_function_devatools.mofang.MoFangManager.Companion.moFangManager
import com.zhjt.mogo_core_function_devatools.monitor.MonitorManager
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb.Companion.getDb
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager.Companion.iPCReportManager
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
import com.zhjt.mogo_core_function_devatools.status.StatusManager
@@ -55,6 +59,27 @@ class DevaToolsProvider : IDevaToolsProvider {
bindingCarManager.init(mContext!!)
}
override fun checkMonitorDb() {
mContext?.let {
Thread {
val limitId: Long = 50001
val file = it.getDatabasePath(MonitorDb.INTERNAL_DB_NAME)
try {
if (file != null && file.exists()) {
val cpuList = getDb(it).monitorDao().getAllCPUById(limitId)
val memList = getDb(it).monitorDao().getAllMemById(limitId)
// 大于5w条清除
if (cpuList.isNotEmpty() || memList.isNotEmpty()) {
it.deleteDatabase(MonitorDb.INTERNAL_DB_NAME)
}
}
} catch (e: Exception) {
CallerLogger.e(TAG, e.message)
}
}.start()
}
}
override fun startLogCatch() {
MogoLogCatchManager.startCatchLog()
}
@@ -148,6 +173,26 @@ class DevaToolsProvider : IDevaToolsProvider {
return EnvChangeManager.getEnvConfig()
}
override fun getEnvCityName(): String {
return EnvChangeManager.getCityName()
}
override fun getEnvNetMode(): String {
return EnvChangeManager.getNetMode()
}
override fun envConfigReset() {
EnvChangeManager.reset()
}
override fun envConfigChange(cityCode: String, netMode: Int) {
EnvChangeManager.changeTo(cityCode, netMode)
}
override fun dockerVersion(dockerVersion: String?) {
BadCaseConfig.dockerVersion = dockerVersion
}
override fun modifyCarInfo(callBack: (ModifyBindingcarInfo) -> Unit) {
bindingCarManager.modifyCarInfo(callBack)
}

View File

@@ -2,12 +2,12 @@ package com.zhjt.mogo_core_function_devatools.env
import android.content.Context.MODE_PRIVATE
import android.os.Process
import com.mogo.commons.constants.*
import com.mogo.commons.debug.*
import com.mogo.commons.constants.SharedPrefsConstants
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.EnvConfig
import com.mogo.eagle.core.function.call.map.*
import com.mogo.eagle.core.utilcode.mogo.storage.*
import com.mogo.eagle.core.utilcode.util.*
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.util.Utils
object EnvChangeManager {
@@ -34,7 +34,7 @@ object EnvChangeManager {
fun getCityName(): String {
val cache = getConfig()
return if (cache == null) {
when(CallerMapLocationListenerManager.getCurrentLocation()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
when(CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()?.cityCode ?: SharedPrefsMgr.getInstance(Utils.getApp()).getString(SharedPrefsConstants.LOCATION_CITY_CODE) ?: "010") {
"010" -> "北京"
"0734" -> "衡阳"
else -> "未知"

View File

@@ -78,39 +78,23 @@ dependencies {
implementation rootProject.ext.dependencies.koomnative
implementation rootProject.ext.dependencies.koomxhook
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
api rootProject.ext.dependencies.mogoaicloudservicesdk
api rootProject.ext.dependencies.mogocommons
api rootProject.ext.dependencies.mogomap
api rootProject.ext.dependencies.crashreportupgrade
api rootProject.ext.dependencies.mogo_core_res
api rootProject.ext.dependencies.mogo_core_data
api rootProject.ext.dependencies.mogo_core_utils
api rootProject.ext.dependencies.mogo_core_network
api rootProject.ext.dependencies.mogo_core_function_map
api rootProject.ext.dependencies.mogo_core_function_v2x
api rootProject.ext.dependencies.mogo_core_function_devatools
api rootProject.ext.dependencies.mogo_core_function_call
implementation project(':libraries:map-usbcamera')
compileOnly rootProject.ext.dependencies.mogocommons
compileOnly rootProject.ext.dependencies.mogo_core_res
compileOnly rootProject.ext.dependencies.mogo_core_utils
compileOnly rootProject.ext.dependencies.mogo_core_function_datacenter
compileOnly rootProject.ext.dependencies.mogo_core_function_call
compileOnly project(':libraries:mogo-adas')
} else {
api project(':foudations:mogo-aicloud-services-sdk')
api project(':foudations:mogo-commons')
api project(':test:crashreport-upgrade')
api project(':test:crashreport-apmbyte')
api project(':core:mogo-core-res')
api project(':core:mogo-core-data')
api project(':core:mogo-core-utils')
api project(':core:function-impl:mogo-core-function-map')
api project(':core:function-impl:mogo-core-function-v2x')
api project(':core:function-impl:mogo-core-function-devatools')
api project(':core:function-impl:mogo-core-function-chat')
api project(':core:function-impl:mogo-core-function-datacenter')
api project(':core:function-impl:mogo-core-function-biz')
api project(':core:mogo-core-function-call')
api project(':libraries:mogo-adas')
api project(':libraries:map-usbcamera')
compileOnly project(':core:function-impl:mogo-core-function-datacenter')
compileOnly project(':foudations:mogo-commons')
compileOnly project(':core:mogo-core-res')
compileOnly project(':core:mogo-core-utils')
compileOnly project(':core:mogo-core-function-call')
compileOnly project(':libraries:mogo-adas')
}
}

View File

@@ -42,7 +42,7 @@
android:launchMode="singleTop"
android:resizeableActivity="false"
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:screenOrientation="${SCREEN_ORIENTATION}"
android:stateNotNeeded="true"
android:theme="@style/Main"
android:windowSoftInputMode="adjustPan|stateHidden">
@@ -67,7 +67,6 @@
<activity
android:name="com.mogo.eagle.core.function.main.PassengerLauncherActivity"
android:clearTaskOnLaunch="${ACTIVITY_ROOT}"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true"
android:exported="true"
@@ -99,7 +98,6 @@
<activity
android:name="com.mogo.eagle.core.function.main.VideoAdAtc"
android:clearTaskOnLaunch="${ACTIVITY_ROOT}"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true"
android:exported="true"

View File

@@ -7,18 +7,15 @@ import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxBubbleAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_driver_msg_box_bubble.view.*

View File

@@ -45,14 +45,12 @@ import com.mogo.eagle.core.function.api.autopilot.*
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
import com.mogo.eagle.core.function.api.obu.IMoGoObuConnectListener
import com.mogo.eagle.core.function.business.routeoverlay.*
import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerSmpManager
import com.mogo.eagle.core.function.call.obu.CallerObuApiManager
import com.mogo.eagle.core.function.call.obu.CallerObuConnectListenerManager
import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager
@@ -77,7 +75,6 @@ import com.mogo.map.uicontroller.VisualAngleMode.*
import com.mogo.support.obu.MogoObuManager
import com.mogo.support.obu.constants.MogoObuLogLevel
import com.mogo.support.obu.option.MogoObuLog
import com.zhjt.mogo_core_function_devatools.env.*
import kotlinx.android.synthetic.main.view_debug_setting.view.*
import kotlinx.coroutines.launch
import mogo.telematics.pad.MessagePad
@@ -233,7 +230,7 @@ internal class DebugSettingView @JvmOverloads constructor(
// 移除 ADAS车辆状态&定位 监听
CallerChassisLocationWGS84ListenerManager.removeListener(TAG)
// 移除 地图样式改变 监听
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
// 移除 域控制器感知数据 监听
CallerAutopilotIdentifyListenerManager.removeListener(TAG)
// 移除 规划路径相关回调 监听
@@ -932,7 +929,7 @@ internal class DebugSettingView @JvmOverloads constructor(
}
//切换环境
tvCurEnv.text = "当前环境:${EnvChangeManager.getCityName()}${EnvChangeManager.getNetMode()}"
tvCurEnv.text = "当前环境:${CallerDevaToolsManager.getEnvCityName()}${CallerDevaToolsManager.getEnvNetMode()}"
btChangeEnv.onClick {
PopupMenu(context, btChangeEnv).also { p ->
p.menuInflater.inflate(R.menu.menu_env_pop, p.menu)
@@ -946,19 +943,19 @@ internal class DebugSettingView @JvmOverloads constructor(
return@setOnMenuItemClickListener false
}
R.id.env_reset ->
EnvChangeManager.reset()
CallerDevaToolsManager.envConfigReset()
R.id.hy_product ->
EnvChangeManager.changeTo("0734", DebugConfig.NET_MODE_RELEASE)
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_RELEASE)
R.id.hy_qa ->
EnvChangeManager.changeTo("0734", DebugConfig.NET_MODE_QA)
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_QA)
R.id.hy_demo ->
EnvChangeManager.changeTo("0734", DebugConfig.NET_MODE_DEMO)
CallerDevaToolsManager.envConfigChange("0734", DebugConfig.NET_MODE_DEMO)
R.id.bj_product ->
EnvChangeManager.changeTo("010", DebugConfig.NET_MODE_RELEASE)
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_RELEASE)
R.id.bj_qa ->
EnvChangeManager.changeTo("010", DebugConfig.NET_MODE_QA)
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_QA)
R.id.bj_demo ->
EnvChangeManager.changeTo("010", DebugConfig.NET_MODE_DEMO)
CallerDevaToolsManager.envConfigChange("010", DebugConfig.NET_MODE_DEMO)
else ->
throw AssertionError("invalid item: $item")
}
@@ -1099,17 +1096,9 @@ internal class DebugSettingView @JvmOverloads constructor(
accelerationIsShow = isChecked
}
tbRouteDynamicEffect.isChecked =
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !AppIdentityModeUtils.isBus(
FunctionBuildConfig.appIdentityMode
)
tbRouteDynamicEffect.isChecked = HmiBuildConfig.isShowRouteStrategy
tbRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
RouteStrategy.enable(true)
} else {
RouteStrategy.enable(false)
}
HmiBuildConfig.isShowRouteStrategy = isChecked
}
btnThresholdDefine.setOnClickListener {

View File

@@ -18,7 +18,6 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
@@ -64,16 +63,9 @@ internal class SOPSettingView @JvmOverloads constructor(
}
//引导线动态效果
tbRouteDynamicEffect.isChecked =
AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode) && !AppIdentityModeUtils.isBus(
FunctionBuildConfig.appIdentityMode
)
tbRouteDynamicEffect.isChecked = HmiBuildConfig.isShowRouteStrategy
tbRouteDynamicEffect.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
RouteStrategy.enable(true)
} else {
RouteStrategy.enable(false)
}
HmiBuildConfig.isShowRouteStrategy = isChecked
}
/**

View File

@@ -76,8 +76,8 @@ class BatteryGroupView : LinearLayout, IMoGoSkinModeChangeListener {
if (isCharging) {
it.ivBatteryCharge.visibility = View.VISIBLE
when(it.mSkinMode){
0 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_light)
1 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_dark)
0 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_dark)
1 -> it.ivBatteryCharge.setImageResource(R.drawable.battery_charge_light)
}
} else {
it.ivBatteryCharge.visibility = View.GONE

View File

@@ -7,7 +7,7 @@ import android.view.Gravity
import android.widget.FrameLayout
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
@@ -55,7 +55,7 @@ class SpeedPanelView @JvmOverloads constructor(
override fun onAttachedToWindow() {
super.onAttachedToWindow()
// 注册位置回调
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
// 开启定时查询速度
timerTask?.cancel()
val task = object : TimerTask() {
@@ -86,7 +86,7 @@ class SpeedPanelView @JvmOverloads constructor(
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// 解除注册
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
try {
timerTask?.cancel()
} catch (e: Exception) {

View File

@@ -9,11 +9,11 @@ import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.AppUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
import kotlinx.android.synthetic.main.view_version_name.view.*
/**
@@ -90,7 +90,7 @@ class VersionNameView @JvmOverloads constructor(
dockerVersion = autoPilotStatusInfo.dockVersion
showCurrentMapVersion()
//将工控机版本赋值给BadCase配置常量
BadCaseConfig.dockerVersion = autoPilotStatusInfo.dockVersion
CallerDevaToolsManager.dockerVersion(autoPilotStatusInfo.dockVersion)
}
}

View File

@@ -50,14 +50,9 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.map.listener.IMogoMapListener
import com.mogo.map.listener.MogoMapListenerHandler.Companion.mogoMapListenerHandler
import com.mogo.map.uicontroller.EnumMapUI
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb.Companion.getDb
import com.zhjt.service.chain.ChainLog
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
import kotlinx.android.synthetic.main.module_main_activity_main.*
import mogo.telematics.pad.MessagePad
import mogo_msg.MogoReportMsg
import system_master.SystemStatusInfo
/**
* @author congtaowang
@@ -223,7 +218,7 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
// 启动Native内存泄漏监测
startLeakMonitor()
}
checkMonitorDb()
CallerDevaToolsManager.checkMonitorDb()
}
private fun startLeakMonitor() {
@@ -255,25 +250,6 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
start()
}
private fun checkMonitorDb() {
Thread {
val limitId: Long = 50001
val file = getDatabasePath(MonitorDb.INTERNAL_DB_NAME)
try {
if (file != null && file.exists()) {
val cpuList = getDb(this).monitorDao().getAllCPUById(limitId)
val memList = getDb(this).monitorDao().getAllMemById(limitId)
// 大于5w条清除
if (cpuList.isNotEmpty() || memList.isNotEmpty()) {
deleteDatabase(MonitorDb.INTERNAL_DB_NAME)
}
}
} catch (e: Exception) {
e(TAG, e.message)
}
}.start()
}
@ChainLog(
linkChainLog = ChainConstant.CHAIN_LINK_LOG_NATIVE_LEAK,
linkCode = ChainConstant.CHAIN_LINK_LEAK,

View File

@@ -13,7 +13,6 @@ import android.os.Handler;
import android.os.Process;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
@@ -46,8 +45,6 @@ import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import me.jessyan.autosize.utils.AutoSizeUtils;
/**
* 针对作为Launcher的情况做个性化操作
*
@@ -78,6 +75,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
private long pressEDownTime = 0;
private long pressEUpTime = 0;
private int clickTime = 300; //单击
private int clickTimeInterval = 330;
private int longPressTime = 670;
private int longPressTimeInterval = 700;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -251,7 +253,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressADownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime);
if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) {
if ((pressADownTime - startPressTime) > clickTimeInterval && (pressADownTime - startPressTime) < longPressTime && pressBDownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 A 按AB组合 +1 ");
}
@@ -260,7 +262,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
}
if (isCombinationKey != 3 && isCombinationKey != 1) {
if ((pressADownTime - startPressTime) > 1320) {
if ((pressADownTime - startPressTime) > longPressTimeInterval) {
if (isShowToast) {
ToastUtils.showShort("方块 长按A -2 ");
}
@@ -271,7 +273,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressAUpTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime);
if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) {
if ((pressAUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
isCombinationKey = 1;
if (isShowToast) {
ToastUtils.showShort("方块 单击A -1 ");
@@ -292,7 +294,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressBDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime);
if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) {
if ((pressBDownTime - startPressTime) > clickTimeInterval && (pressBDownTime - startPressTime) < longPressTime && pressADownTime > 0) {
if (isShowToast) {
ToastUtils.showShort("方块 B 按AB组合 +1 ");
}
@@ -300,7 +302,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
isCombinationKey = 3;
}
if (isCombinationKey != 3 && isCombinationKey != 1) {
if ((pressBDownTime - startPressTime) > 1320) {
if ((pressBDownTime - startPressTime) > longPressTimeInterval) {
if (isShowToast) {
ToastUtils.showShort("方块 长按B 无操作 ");
}
@@ -310,7 +312,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
} else if (event.getAction() == KeyEvent.ACTION_UP) {
pressBUpTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime);
if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) {
if ((pressBUpTime - startPressTime) < clickTime && isCombinationKey != 3) {
if (isShowToast) {
ToastUtils.showShort("方块 单击B 0 ");
}
@@ -332,7 +334,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressCDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime));
if ((pressCDownTime - startPressTime) > 1320) {
if ((pressCDownTime - startPressTime) > longPressTimeInterval) {
if (isShowToast) {
ToastUtils.showShort("方块 长按C 无操作 ");
}
@@ -341,7 +343,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
pressCUpTime = System.currentTimeMillis();
isPressEnd = false;
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime));
if ((pressCUpTime - startPressTime) < 350) {
if ((pressCUpTime - startPressTime) < clickTime) {
if (isShowToast) {
ToastUtils.showShort("方块 单击C ← 向左变道 ");
}
@@ -353,7 +355,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressDDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime));
if ((pressDDownTime - startPressTime) > 1320) {
if ((pressDDownTime - startPressTime) > longPressTimeInterval) {
if (isShowToast) {
ToastUtils.showShort("方块 长按D 无操作 ");
}
@@ -362,7 +364,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
pressDUpTime = System.currentTimeMillis();
isPressEnd = false;
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime));
if ((pressDUpTime - startPressTime) < 350) {
if ((pressDUpTime - startPressTime) < clickTime) {
if (isShowToast) {
ToastUtils.showShort("方块 单击D → 向右变道 ");
}
@@ -374,7 +376,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
if (event.getAction() == KeyEvent.ACTION_DOWN) {
pressEDownTime = System.currentTimeMillis();
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime));
if ((pressEDownTime - startPressTime) > 1320) {
if ((pressEDownTime - startPressTime) > longPressTimeInterval) {
if (isShowToast) {
ToastUtils.showShort("方块 长按E 鸣笛 ");
}
@@ -394,7 +396,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
pressEUpTime = System.currentTimeMillis();
isPressEnd = false;
CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime));
if ((pressEUpTime - startPressTime) < 350) {
if ((pressEUpTime - startPressTime) < clickTime) {
if (isShowToast) {
ToastUtils.showShort("方块 单击E 开启自动驾驶 ");
}

View File

@@ -45,7 +45,7 @@ import java.util.Timer;
import java.util.TimerTask;
/**
* 针对作为Launcher的情况做个性化操作
* 针对作为Launcher的情况做个性化操作 TODO 测试用的,可删除
*
* @author tongchenfei
*/

View File

@@ -7,7 +7,7 @@ import com.mogo.eagle.core.utilcode.util.BarUtils
import com.mogo.eagle.core.widget.TextureVideoView
/**
* 视频广告
* 视频广告 TODO 测试用的,可删除
*/
class VideoAdAtc : AppCompatActivity() {

View File

@@ -75,13 +75,10 @@ dependencies {
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogomap
implementation rootProject.ext.dependencies.mogomapapi
} else {
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-res')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:function-impl:mogo-core-function-datacenter')
implementation project(':core:mogo-core-function-call')
implementation project(":libraries:mogo-map")
}

View File

@@ -5,7 +5,7 @@ import androidx.annotation.Nullable;
import com.mogo.eagle.core.data.enums.DataSourceType;
import com.mogo.eagle.core.data.map.MogoLocation;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.call.v2x.CallerLimitingVelocityListenerManager;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -65,7 +65,7 @@ public class SpeedLimitDataManager implements IMoGoChassisLocationGCJ02Listener
}
public void start() {
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
Timer mTimer = new Timer();
mTimer.schedule(new SpeedTimerTask(), 3000, 1000);
}

View File

@@ -13,8 +13,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MAP
import com.zhidaoauto.map.operational.open.GatherApi
@@ -26,7 +25,8 @@ import java.util.concurrent.CopyOnWriteArrayList
import java.util.concurrent.atomic.AtomicReference
@Route(path = MogoServicePaths.PATH_MAP_DATA_COLLECT_PROVIDER)
class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener, IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
IMoGoAutopilotRecordListener {
companion object {
@@ -52,16 +52,19 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
override fun init(context: Context?) {
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
CallerAutopilotRecordListenerManager.addListener(TAG, this)
executor.set(context?.let {
GatherApi.also { itx ->
itx.init(it,
GatherParams.init()
.setDebugMode(false)
.setCoordinateType(GatherParams.COORDINATETYPE_GCJ02))
} })
itx.init(
it,
GatherParams.init()
.setDebugMode(false)
.setCoordinateType(GatherParams.COORDINATETYPE_GCJ02)
)
}
})
executor.get()?.setOnTaskListener(this)
val carSn = MoGoAiCloudClientConfig.getInstance().sn
if (!TextUtils.isEmpty(carSn)) {
@@ -69,12 +72,12 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
}
MoGoAiCloudClient.getInstance().addTokenCallbacks(this)
CallerLogger.d("$M_MAP$TAG", "--------- init --------")
CallerLogger.d("$M_MAP$TAG", "executor: ${ executor.get()?.hashCode() ?: 0 }")
CallerLogger.d("$M_MAP$TAG", "executor: ${executor.get()?.hashCode() ?: 0}")
}
override fun onDestroy() {
CallerLogger.d("$M_MAP$TAG", "--------- onDestroy --------")
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
CallerAutopilotRecordListenerManager.removeListener(TAG)
executor.get()?.setOnTaskListener(null)
listeners.clear()
@@ -90,7 +93,13 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
recordPanel.stat == 102 || //工控机达到最大采集时长
recordPanel.stat == 103) //工控机磁盘满了
) {
finish(recordPanel.id, recordPanel.stat, "", recordPanel.filename ?: "", recordPanel.note ?: "")
finish(
recordPanel.id,
recordPanel.stat,
"",
recordPanel.filename ?: "",
recordPanel.note ?: ""
)
}
}
@@ -131,7 +140,7 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
}
CallerLogger.d("$M_MAP$TAG", "-- finish: 结束任务[$id]")
executor.get()?.finishTask(id, state, gpsPath, videoPath, reason)
} catch (e : Throwable) {
} catch (e: Throwable) {
e.printStackTrace()
CallerLogger.e("$M_MAP$TAG", "-- finish:\n$e")
} finally {
@@ -171,14 +180,16 @@ class MoGoMapDataCollectProvider : IMoGoMapDataCollectProvider, OnTaskListener,
}
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return
executor.get()?.updateLocation(
location.longitude,
location.latitude,
location.altitude,
location.heading.toFloat(),
location.gnssSpeed,
false)
if (gnssInfo != null) {
executor.get()?.updateLocation(
gnssInfo.longitude,
gnssInfo.latitude,
gnssInfo.altitude,
gnssInfo.heading.toFloat(),
gnssInfo.gnssSpeed,
false
)
}
}
private fun isInValidStatus(): Boolean {

View File

@@ -55,8 +55,8 @@ public class TrackObj {
}
private void correct() {
// calAverageSpeedAndType();
// calLoc();
calAverageSpeedAndType();
calLoc();
// calHeading();
}

View File

@@ -10,7 +10,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener;
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningTrajectoryListener;
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager;
import org.jetbrains.annotations.NotNull;
@@ -43,7 +43,7 @@ public class MogoRouteOverlayManager implements
public void init() {
CallerPlanningTrajectoryListenerManager.INSTANCE.addListener(TAG, this);
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ20ListenerManager.INSTANCE.addListener(TAG, this);
CallerChassisLocationGCJ02ListenerManager.INSTANCE.addListener(TAG, this);
}
public static MogoRouteOverlayManager getInstance() {

View File

@@ -1,16 +1,17 @@
package com.mogo.eagle.core.function.business.routeoverlay
import android.animation.*
import android.graphics.*
import android.view.animation.*
import com.mogo.eagle.core.data.config.*
import com.mogo.eagle.core.utilcode.mogo.*
import android.animation.ArgbEvaluator
import android.graphics.Color
import android.view.animation.AccelerateInterpolator
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_BLUE
import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_BLUE_DARK
import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_RED_DARK
import com.mogo.eagle.core.function.business.routeoverlay.Colors.Companion.COLOR_TRANSPARENT
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import java.util.*
import kotlin.collections.ArrayList
import kotlin.properties.Delegates
interface IStrategy {
@@ -22,26 +23,31 @@ class Colors {
companion object {
val COLOR_BLUE = Color.parseColor("#FF2ABAD9")
val COLOR_BLUE_DARK = Color.parseColor("#FF074EFF")
val COLOR_RED_DARK = Color.parseColor("#FFFF5F00")
val COLOR_TRANSPARENT = Color.parseColor("#002ABAD9")
val COLOR_RED_DARK = Color.parseColor("#FFFF5F00")
val COLOR_TRANSPARENT = Color.parseColor("#002ABAD9")
}
}
sealed class Strategy: IStrategy
sealed class Strategy : IStrategy
class DefaultStrategy(private val colors: List<Int>? = null): Strategy() {
class DefaultStrategy(private val colors: List<Int>? = null) : Strategy() {
override fun getColors(): List<Int> = colors ?: listOf(COLOR_BLUE, COLOR_TRANSPARENT)
}
class ColorfulStrategy(private val colors: List<Int> = emptyList(), var isLightOn: Boolean): Strategy() {
class ColorfulStrategy(private val colors: List<Int> = emptyList(), var isLightOn: Boolean) :
Strategy() {
override fun getColors(): List<Int> = colors
}
object RouteStrategy {
@Volatile
private var isEnable = !AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
private var isEnable by Delegates.observable(HmiBuildConfig.isShowRouteStrategy) { _, _, newValue ->
if (!newValue) {
strategy = null
colors.clear()
}
}
private var strategy: Strategy? = null
@@ -57,14 +63,6 @@ object RouteStrategy {
private var hasLessThan0 = false
fun enable(enable: Boolean) {
isEnable = enable
if (!enable) {
strategy = null
colors.clear()
}
}
fun start() {
if (sorted.isEmpty()) {
fill()
@@ -89,7 +87,7 @@ object RouteStrategy {
}
fun check(speed: Double, acc: Double, total: Int) {
if (!isEnable){
if (!isEnable) {
return
}
if (sorted.isEmpty()) {
@@ -112,7 +110,11 @@ object RouteStrategy {
} else {
if (endEvaluator != null) {
val fraction = (index - last) * 1.0f / delta
colors += endEvaluator!!.evaluate(fraction, startColor, COLOR_TRANSPARENT) as Int
colors += endEvaluator!!.evaluate(
fraction,
startColor,
COLOR_TRANSPARENT
) as Int
}
}
} else {
@@ -156,11 +158,14 @@ object RouteStrategy {
total = endValue - startValue
while (current <= endValue) {
val fraction = (current - startValue) / total
val colorValue = evaluator.evaluate(fraction.toFloat(), COLOR_BLUE, COLOR_BLUE_DARK) as Int
val colorValue =
evaluator.evaluate(fraction.toFloat(), COLOR_BLUE, COLOR_BLUE_DARK) as Int
sorted[current] = colorValue
current += step
}
}
fun getStrategy(): Strategy = if (isEnable) { (strategy ?: DefaultStrategy()) } else DefaultStrategy()
fun getStrategy(): Strategy = if (isEnable) {
(strategy ?: DefaultStrategy())
} else DefaultStrategy()
}

View File

@@ -41,7 +41,7 @@ public class MogoMapService implements IMogoMapService {
}
@Override
public IMogoOverlayManager getOverlayManager(Context context) {
public IMogoOverlayManager getOverlayManager() {
return MogoOverlayManager.getInstance();
}

View File

@@ -20,7 +20,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.getGlobalPath
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.function.view.R
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
@@ -29,7 +29,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import mogo.telematics.pad.MessagePad
import java.util.*
import kotlin.math.floor
class SmallMapView @JvmOverloads constructor(
@@ -45,7 +44,7 @@ class SmallMapView @JvmOverloads constructor(
private var mCarMarker: Marker? = null
private var mStartMarker: Marker? = null
private var mEndMarker: Marker? = null
private val zoomLevel = 15
private val zoomLevel = 17
private val mCoordinatesLatLng: MutableList<LatLng> = ArrayList()
private var mPolyline: Polyline? = null
private var mCameraUpdate: CameraUpdate? = null
@@ -156,10 +155,9 @@ class SmallMapView @JvmOverloads constructor(
initAMapView()
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 10, this)
CallerPlanningRottingListenerManager.addListener(TAG, this)
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
startTask()
}
private fun initAMapView() {
@@ -237,52 +235,6 @@ class SmallMapView @JvmOverloads constructor(
})
}
private fun startTask() {
val mTimer = Timer()
mTimer.schedule(UpdateLocationTask(), 1000, 200)
}
private inner class UpdateLocationTask : TimerTask() {
override fun run() {
if (mLocation != null) {
if (mCarMarker == null) {
mCarMarker = mAMap!!.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.module_small_map_view_my_location_logo))
.anchor(0.5f, 0.5f)
)
}
if (mCarMarker == null) {
return
}
val currentLatLng = LatLng(mLocation!!.latitude, mLocation!!.longitude)
val bearing = floor(mLocation!!.heading).toFloat()
//更新车辆位置
mCarMarker!!.position = currentLatLng
if (mCoordinatesLatLng.size > 1) {
// 结束位置
val endLatLng = mCoordinatesLatLng[mCoordinatesLatLng.size - 1]
val calculateDistance = CoordinateUtils.calculateLineDistance(
endLatLng.latitude, endLatLng.longitude,
currentLatLng.latitude, currentLatLng.longitude
)
CallerLogger.d(
SceneConstant.M_MAP + TAG,
"calculateDistance=$calculateDistance"
)
if (calculateDistance <= 5) {
clearPolyline()
mCoordinatesLatLng.clear()
}
}
val cameraPosition: CameraPosition =
CameraPosition.Builder().target(mCarMarker!!.position).tilt(0f).bearing(bearing)
.zoom(zoomLevel.toFloat()).build()
mAMap?.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
}
}
private fun coordinateConverterFrom84(mContext: Context?, mogoLatLng: MogoLatLng): LatLng {
val mCoordinateConverter = CoordinateConverter(mContext)
mCoordinateConverter.from(CoordinateConverter.CoordType.GPS)
@@ -307,6 +259,53 @@ class SmallMapView @JvmOverloads constructor(
return
}
mLocation = mogoLocation
if (mCarMarker == null) {
mCarMarker =
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_bus_icon))
.anchor(0.5f, 0.5f)
)
} else {
mAMap?.addMarker(
MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.map_car_icon))
.anchor(0.5f, 0.5f)
)
}
}
if (mCarMarker == null) {
return
}
val currentLatLng = LatLng(mLocation!!.latitude, mLocation!!.longitude)
val bearing = floor(mLocation!!.heading).toFloat()
//更新车辆位置
mCarMarker!!.position = currentLatLng
if (mCoordinatesLatLng.size > 1) {
// 结束位置
val endLatLng = mCoordinatesLatLng[mCoordinatesLatLng.size - 1]
val calculateDistance = CoordinateUtils.calculateLineDistance(
endLatLng.latitude, endLatLng.longitude,
currentLatLng.latitude, currentLatLng.longitude
)
CallerLogger.d(
SceneConstant.M_MAP + TAG,
"calculateDistance=$calculateDistance"
)
if (calculateDistance <= 5) {
clearPolyline()
mCoordinatesLatLng.clear()
}
}
val cameraPosition: CameraPosition =
CameraPosition.Builder()
.target(mCarMarker!!.position)
.tilt(0f)
.bearing(bearing)
.zoom(zoomLevel.toFloat())
.build()
mAMap?.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
}
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
@@ -348,7 +347,7 @@ class SmallMapView @JvmOverloads constructor(
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
CallerPlanningRottingListenerManager.removeListener(TAG)
CallerAutoPilotStatusListenerManager.removeListener(TAG)
}

View File

@@ -24,7 +24,7 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Liste
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.api.v2x.IFuncBizProvider
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.getGlobalPath
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.function.call.biz.CallerFuncBizListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.showVideoDialog
@@ -146,7 +146,7 @@ class OverMapView @JvmOverloads constructor(
CallerPlanningRottingListenerManager.addListener(TAG, moGoAutopilotPlanningListener)
initAMapView(context)
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
//设置全览模式
overLayerView?.setOnClickListener { displayCustomOverView() }
}
@@ -372,7 +372,7 @@ class OverMapView @JvmOverloads constructor(
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
// 注册定位监听
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
CallerPlanningRottingListenerManager.removeListener(TAG)
}

View File

@@ -40,32 +40,20 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation rootProject.ext.dependencies.androidxccorektx
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.arouter
implementation project(path: ':foudations:mogo-commons')
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.android_start_up
implementation rootProject.ext.dependencies.mogocustommap
implementation rootProject.ext.dependencies.thread_opt
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_res
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_api
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.crashreport
implementation rootProject.ext.dependencies.mogomap
implementation rootProject.ext.dependencies.mogomapapi
} else {
implementation project(':core:mogo-core-res')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-api')
implementation project(':core:mogo-core-function-call')
implementation project(":test:crashreport")
implementation project(':libraries:mogo-map')
implementation project(":libraries:mogo-map-api")
}
implementation project(':foudations:mogo-commons')
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -1,18 +0,0 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.mogo.eagle.core.function.startup;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.mogo.eagle.core.function.startup";
/**
* @deprecated APPLICATION_ID is misleading in libraries. For the library package name use LIBRARY_PACKAGE_NAME
*/
@Deprecated
public static final String APPLICATION_ID = "com.mogo.eagle.core.function.startup";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "";
}

View File

@@ -1,18 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.mogo.eagle.core.function.startup.MogoStartUpProvider;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Group$$start_up implements IRouteGroup {
@Override
public void loadInto(Map<String, RouteMeta> atlas) {
atlas.put("/start_up/api", RouteMeta.build(RouteType.PROVIDER, MogoStartUpProvider.class, "/start_up/api", "start_up", null, -1, -2147483648));
}
}

View File

@@ -1,18 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProviderGroup;
import com.mogo.eagle.core.function.startup.MogoStartUpProvider;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Providers$$mogocorefunctionstartup implements IProviderGroup {
@Override
public void loadInto(Map<String, RouteMeta> providers) {
providers.put("com.mogo.eagle.core.function.api.startup.IStartUpProvider", RouteMeta.build(RouteType.PROVIDER, MogoStartUpProvider.class, "/start_up/api", "start_up", null, -1, -2147483648));
}
}

View File

@@ -1,17 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.alibaba.android.arouter.facade.template.IRouteRoot;
import java.lang.Class;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Root$$mogocorefunctionstartup implements IRouteRoot {
@Override
public void loadInto(Map<String, Class<? extends IRouteGroup>> routes) {
routes.put("start_up", ARouter$$Group$$start_up.class);
}
}

View File

@@ -31,10 +31,9 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LO
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
@@ -146,7 +145,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
return HttpDnsSimpleLocation(envConfig.cityCode, envConfig.lat, envConfig.lon)
}
var mogoLocation: MogoLocation? = null
val locationClient = CallerMapLocationListenerManager.getCurrentLocation()
val locationClient = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
if (locationClient != null) {
mogoLocation = locationClient
}
@@ -289,7 +288,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
context?.let {
MogoLocationInfoServices.getInstance().init(it)
MogoLocationInfoServices.getInstance().start()
CallerChassisLocationGCJ20ListenerManager.addListener(
CallerChassisLocationGCJ02ListenerManager.addListener(
TAG,
object : IMoGoChassisLocationGCJ02Listener {
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
@@ -305,7 +304,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
private fun startSocketService() {
CallerLogger.d(SceneConstant.M_MAIN + TAG, "startSocketService")
val location = CallerMapLocationListenerManager.getCurrentLocation()
val location = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
// 关闭长链服务
MogoAiCloudSocketManager.getInstance(context).destroy()
MogoAiCloudSocketManager.getInstance(context)

View File

@@ -62,7 +62,6 @@ dependencies {
implementation rootProject.ext.dependencies.localbroadcastmanager
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.flexbox
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.protobuf_java
implementation rootProject.ext.dependencies.protobuf_java_util
@@ -71,19 +70,14 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.mogo_core_data
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogo_core_function_call
implementation rootProject.ext.dependencies.mogo_core_res
compileOnly rootProject.ext.dependencies.mogomap
} else {
implementation project(":foudations:mogo-commons")
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
implementation project(':core:mogo-core-function-call')
implementation project(':core:mogo-core-res')
implementation project(':libraries:mogo-adas')
compileOnly project(':libraries:mogo-map')
}
}

View File

@@ -29,9 +29,8 @@ import com.mogo.eagle.core.data.traffic.TrafficData
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Default
@@ -115,25 +114,26 @@ object V2XEventManager : IMoGoChassisLocationGCJ02Listener, IMoGoTokenCallback,
private fun registerListener() {
V2XManager.addCallback(this)
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this)
}
private fun unRegisterListener() {
V2XManager.removeCallback(this)
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
CallerChassisLocationGCJ02ListenerManager.removeListener(TAG)
mogoMarkersHandler.unregisterMarkerClickListener(CARD_TYPE_ROAD_CONDITION)
}
override fun onChassisLocationGCJ02(gnssInfo: MogoLocation?) {
val location = CallerMapLocationListenerManager.getCurrentLocation() ?: return
BridgeApi.location.set(location)
if (V2XManager.hasInit()) {
V2XManager.onLocationChanged(
longitude = location.longitude,
latitude = location.latitude
)
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
BridgeApi.location.set(mogoLocation)
mogoLocation?.let {
if (V2XManager.hasInit()) {
V2XManager.onLocationChanged(
longitude = it.longitude,
latitude = mogoLocation.latitude
)
}
refreshCarState(mogoLocation)
}
refreshCarState(location)
}
private fun refreshCarState(location: MogoLocation) {

View File

@@ -37,7 +37,7 @@ public class V2XAlarmServer {
CopyOnWriteArrayList<V2XRoadEventEntity> v2XRoadEventEntityList,
MogoLocation currentLocation) {
try {
Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
//Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
if (!showedEvents.isEmpty()) {
Iterator<V2XRoadEventEntity> iterator = showedEvents.iterator();
while (iterator.hasNext()) {
@@ -54,18 +54,18 @@ public class V2XAlarmServer {
}
}
}
Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
//Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
if (currentLocation != null && v2XRoadEventEntityList != null) {
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
// 0、道路事件必须有朝向角度>=0;
Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
//Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
// 计算车辆距离指定气泡的距离
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
// 1、判断是否到达了触发距离,20 ~ 500,
double distance = v2XRoadEventEntity.getDistance();
Logger.d(TAG, "distance:" + distance);
//Logger.d(TAG, "distance:" + distance);
if (distance <= 500) {
if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
if (distance > 25) {
@@ -76,7 +76,7 @@ public class V2XAlarmServer {
double carBearing = currentLocation.getHeading();
double eventBearing = eventLocation.getAngle();
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
//Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
if (diffAngle <= 20) {
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度保证道路事件在车辆前方
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
@@ -87,12 +87,12 @@ public class V2XAlarmServer {
(int) currentLocation.getHeading()
);
Logger.d(TAG, "eventAngle:" + eventAngle);
//Logger.d(TAG, "eventAngle:" + eventAngle);
if (0 <= eventAngle && eventAngle <= 20) {
if (showedEvents.contains(v2XRoadEventEntity)) {
return null;
}
Logger.d(TAG, "showed---");
//Logger.d(TAG, "showed---");
showedEvents.add(v2XRoadEventEntity);
return v2XRoadEventEntity;
}

View File

@@ -55,7 +55,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan
options.add(locations.get(i));
}
// 绘制线的对象
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
if (overlay != null) {
mMogoPolyline = overlay.addPolyline(options);
mMogoPolyline.setTransparency(0.5f);

View File

@@ -54,7 +54,7 @@ public class MoGoStopPolylineManager implements IMoGoStopPolylineManager {
options.add(locations.get(i));
}
// 绘制线的对象
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
if (overlay != null) {
mMogoPolyline = overlay.addPolyline(options);
}

View File

@@ -2,7 +2,9 @@ package com.mogo.eagle.core.function.v2x.events.manager.impl;
import static com.mogo.commons.module.ServiceConst.CARD_TYPE_NOVELTY;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.cloud.commons.utils.CoordinateUtils;
import com.mogo.eagle.core.data.enums.EventTypeEnumNew;
@@ -12,7 +14,7 @@ import com.mogo.eagle.core.data.map.entity.MarkerExploreWay;
import com.mogo.eagle.core.data.map.entity.MarkerLocation;
import com.mogo.eagle.core.data.map.entity.MarkerShowEntity;
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity;
import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager;
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
import com.mogo.eagle.core.function.v2x.events.consts.MoGoV2XServicePaths;
import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XMarkerManager;
@@ -26,6 +28,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.MogoMarkerOptions;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -52,7 +55,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
public CopyOnWriteArrayList<V2XRoadEventEntity> getV2XRoadEventEntityList() {
CopyOnWriteArrayList<V2XRoadEventEntity> roadEventEntities = new CopyOnWriteArrayList<>();
// 当前车辆数据
MogoLocation currentLocation = CallerMapLocationListenerManager.INSTANCE.getCurrentLocation();
MogoLocation currentLocation = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02();
if (currentLocation != null) {
// 重新计算距离
for (V2XRoadEventEntity v2XRoadEventEntity : mV2XRoadEventEntityArrayList) {

View File

@@ -62,7 +62,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
}
// 绘制线的对象
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
if (overlay != null) {
mMogoPolyline = overlay.addPolyline(options);
}

View File

@@ -5,7 +5,7 @@ import android.os.HandlerThread
import android.util.Log
import com.mogo.cloud.commons.utils.CoordinateUtils
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
import com.mogo.map.marker.IMogoMarker
@@ -90,7 +90,7 @@ object MarkerRemoveManager {
if (carLoc.get() == null) {
carLoc.set(if (marker.coordinateType == 0) {
//高德坐标
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
} else {
//高精坐标
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
@@ -150,7 +150,7 @@ object MarkerRemoveManager {
if (carLoc.get() == null) {
carLoc.set(if (marker.coordinateType == 0) {
//高德坐标
CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
} else {
//高精坐标
CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
@@ -170,7 +170,7 @@ object MarkerRemoveManager {
} catch (t: Throwable) {
t.printStackTrace()
} finally {
val gcInfo = CallerChassisLocationGCJ20ListenerManager.getChassisLocationGCJ02()
val gcInfo = CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
lastCarLocation.set((gcInfo?.longitude ?: 0.0) to (gcInfo?.latitude ?: 0.0))
val wgsInfo = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
lastGpsLocation.set((wgsInfo?.longitude ?: 0.0) to (wgsInfo?.latitude ?: 0.0))

View File

@@ -39,9 +39,7 @@ class AiRoadMarker {
private val marker by lazy { AtomicReference<Marker>() }
private val overlayManager by lazy {
CallerMapUIServiceManager.getOverlayManager(
AbsMogoApplication.getApp()
)
CallerMapUIServiceManager.getOverlayManager()
}
private val START_COLOR = Color.parseColor("#002ABAD9")

View File

@@ -1,18 +1,18 @@
package com.mogo.eagle.core.function.v2x.events.scenario.scene.road
import android.graphics.*
import android.graphics.Color
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.map.*
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xMarker
import com.mogo.eagle.core.function.v2x.events.remove.MarkerWrapper
import com.mogo.map.*
import com.mogo.map.marker.*
import com.mogo.map.overlay.*
import java.util.concurrent.atomic.*
import kotlin.Pair
import kotlin.collections.ArrayList
import com.mogo.map.marker.IMogoMarker
import com.mogo.map.overlay.IMogoPolyline
import com.mogo.map.overlay.MogoPolylineOptions
import java.util.concurrent.atomic.AtomicReference
class V2XAiRoadEventMarker {
@@ -20,7 +20,7 @@ class V2XAiRoadEventMarker {
private val v2xLocation = AtomicReference<MogoLocation>()
private val overlayManager by lazy { MogoOverlayManager.getInstance() }
private val overlayManager by lazy { CallerMapUIServiceManager.getOverlayManager() }
fun drawMarkers(entity: V2XRoadEventEntity, wrapper: MarkerWrapper) {
val extra = entity.noveltyInfo.extras["polygon"]
@@ -68,9 +68,9 @@ class V2XAiRoadEventMarker {
options.width(5f)
options.zIndex(75000f)
options.maxIndex(800000f)
val line = overlayManager.addPolyline(options)
current.set(Pair(line, wrapper.markers))
if (line != null) {
val line = overlayManager?.addPolyline(options)
line?.let {
current.set(Pair(line, wrapper.markers))
line.isVisible = true
wrapper.addLine(line)
}

View File

@@ -209,7 +209,7 @@ object V2XManager {
if (!started.get()) {
return
}
V2XLogger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]")
//V2XLogger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]")
realLongitude.set(longitude)
realLatitude.set(latitude)
val oldLon = lastLongitude.get()

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.data.config
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
/**
* @author xiaoyuzhou
* @date 2021/8/24 8:59 下午
@@ -26,6 +28,13 @@ object HmiBuildConfig {
@Volatile
var isShowSnBindingView = true
/**
* 是否展示 引导线动态效果
*/
@JvmField
@Volatile
var isShowRouteStrategy = !AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)
/**
* 是否展示obu的弱势交通
*/

View File

@@ -15,9 +15,4 @@ public class MoGoFragmentPaths {
@Deprecated
public static final String PATH_FRAGMENT_SMP = "/smp_ui/";
/**
* 全览模式地图 Fragment
*/
@Keep
public static final String PATH_FRAGMENT_OVERVIEW = "/overview_ui/";
}

View File

@@ -205,6 +205,19 @@ public class MogoLocation implements Cloneable {
}
}
public double getYawRate() {
if (gnssInfo != null) {
return gnssInfo.getYawRate();
}
return 0;
}
public void setYawRate(double yawRate) {
if (gnssInfo != null) {
gnssInfo = gnssInfo.toBuilder().setYawRate(yawRate).build();
}
}
public String getAddress() {
return address;
}

View File

@@ -51,7 +51,7 @@ dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
implementation rootProject.ext.dependencies.mogo_core_data
implementation project(path: ':libraries:mogo-adas')
compileOnly project(path: ':libraries:mogo-adas')
compileOnly rootProject.ext.dependencies.mogomapapi
} else {
implementation project(':core:mogo-core-data')

View File

@@ -22,6 +22,8 @@ interface IDevaToolsProvider : IProvider {
*/
fun initBiz()
fun checkMonitorDb()
/**
* 开始抓取日志默认10min
*/
@@ -160,4 +162,14 @@ interface IDevaToolsProvider : IProvider {
fun queryAppUpgrade()
fun getEnvConfig(): EnvConfig?
fun getEnvCityName():String
fun getEnvNetMode():String
fun envConfigReset()
fun envConfigChange(cityCode: String, netMode: Int)
fun dockerVersion(dockerVersion: String?)
}

View File

@@ -40,10 +40,9 @@ public interface IMogoMapService extends IProvider {
/**
* 覆盖物操作
*
* @param context
* @return
*/
IMogoOverlayManager getOverlayManager(Context context);
IMogoOverlayManager getOverlayManager();
/**
* 获取高德定位服务

View File

@@ -59,11 +59,10 @@ dependencies {
implementation rootProject.ext.dependencies.mogo_core_utils
implementation rootProject.ext.dependencies.mogocommons
} else {
implementation project(':core:mogo-core-utils')
implementation project(':foudations:mogo-commons')
implementation project(':libraries:mogo-adas')
api project(':libraries:mogo-map-api')
implementation project(':foudations:mogo-commons')
implementation project(':core:mogo-core-data')
implementation project(':core:mogo-core-utils')
api project(':core:mogo-core-function-api')
}
}

Some files were not shown because too many files have changed in this diff Show More