Merge branch 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0' into gradle_och
This commit is contained in:
@@ -141,6 +141,7 @@ public class BusPassengerModel {
|
||||
public void onSuccess(BusPassengerOperationStatusResponse data) {
|
||||
if (data == null || data.data == null) return;
|
||||
if (mDriverStatusCallback != null) {
|
||||
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverOperationStatus = %s", data.data.plateNumber );
|
||||
mDriverStatusCallback.changeOperationStatus(data.data.driverStatus == 1);
|
||||
mDriverStatusCallback.updatePlateNumber(data.data.plateNumber);
|
||||
}
|
||||
@@ -194,13 +195,19 @@ public class BusPassengerModel {
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String msg) {
|
||||
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg );
|
||||
if (code == 1003){
|
||||
queryDriverOperationDelay();
|
||||
}
|
||||
if (BusPassengerServiceManager.INSTANCE.getDriverAppSn().isEmpty()){
|
||||
//此处拦截是为了防止过程中乘客屏和司机端断连,拿不到司机端sn, 造成请求失败去刷新了界面
|
||||
return;
|
||||
}
|
||||
if (code == 1003){
|
||||
routesResult = null;
|
||||
startOrStopCalculateRouteInfo(false);
|
||||
queryDriverOperationDelay();
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d( M_BUS_P + TAG, "queryDriverSiteByCoordinate = %s", msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -494,7 +501,8 @@ public class BusPassengerModel {
|
||||
}else {
|
||||
lastSumLength = CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints);
|
||||
}
|
||||
double lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 ; //秒
|
||||
|
||||
double lastTime = lastSumLength / getAverageSpeed() * 3.6 ; //秒
|
||||
CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==lastSumLength = " + lastSumLength);
|
||||
if (mAutopilotPlanningCallback != null){
|
||||
mAutopilotPlanningCallback.routePlanningToNextStationChanged((long)lastSumLength,(long) lastTime);
|
||||
@@ -503,6 +511,14 @@ public class BusPassengerModel {
|
||||
}
|
||||
}
|
||||
|
||||
public int getAverageSpeed(){
|
||||
if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
return BusPassengerConst.SHUTTLE_AVERAGE_SPEED;
|
||||
}else {
|
||||
return BusPassengerConst.BUS_AVERAGE_SPEED;
|
||||
}
|
||||
}
|
||||
|
||||
public void startRemainRouteInfo() {
|
||||
//开启实时计算剩余距离,剩余时间,预计时间
|
||||
startOrStopCalculateRouteInfo(true);
|
||||
|
||||
@@ -28,7 +28,7 @@ object BusPassengerServiceManager {
|
||||
* 获取Bus司机端的sn
|
||||
* @return
|
||||
*/
|
||||
private val driverAppSn: String
|
||||
public val driverAppSn: String
|
||||
get() = getServerToken()
|
||||
|
||||
/**
|
||||
|
||||
@@ -324,6 +324,10 @@ class PM2DrivingModel private constructor() {
|
||||
}
|
||||
|
||||
override fun onFail(code: Int, msg: String?) {
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate = %s", msg)
|
||||
if (code == 1003){
|
||||
queryDriverOperationDelay()
|
||||
}
|
||||
if (PM2ServiceManager.driverAppSn.isEmpty()){
|
||||
return
|
||||
}
|
||||
@@ -331,10 +335,8 @@ class PM2DrivingModel private constructor() {
|
||||
routesResult = null
|
||||
isGoingToNextStation = false
|
||||
startOrStopCalculateRouteInfo(false)
|
||||
queryDriverOperationDelay()
|
||||
return
|
||||
}
|
||||
d(SceneConstant.M_BUS_P+TAG, "queryDriverSiteByCoordinate = %s", msg)
|
||||
}
|
||||
|
||||
})
|
||||
@@ -443,7 +445,7 @@ class PM2DrivingModel private constructor() {
|
||||
} else {
|
||||
CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints)
|
||||
}
|
||||
val lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒
|
||||
val lastTime = lastSumLength / BusPassengerConst.SHUTTLE_AVERAGE_SPEED * 3.6 //秒
|
||||
d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastSumLength = $lastSumLength")
|
||||
mDrivingInfoCallback?.updateRemainMT(
|
||||
lastSumLength.toLong(),
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.*
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.m2.p_m2_view_status_bar.view.*
|
||||
import kotlinx.coroutines.*
|
||||
@@ -84,6 +85,9 @@ class M2StatusBarView @JvmOverloads constructor(
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
val bmsSoc = states.bmsSoc
|
||||
try {
|
||||
if (oldBmsSoc != bmsSoc ) {
|
||||
|
||||
@@ -27,6 +27,8 @@ class BusPassengerConst {
|
||||
|
||||
//bus平均速度 bus的平均里程:25km/h
|
||||
const val BUS_AVERAGE_SPEED = 25
|
||||
//接驳/B2平均速度 bus的平均里程:10km/h
|
||||
const val SHUTTLE_AVERAGE_SPEED = 10
|
||||
|
||||
// 订单总里程
|
||||
const val BUS_SP_KEY_ORDER_SUM_DIS = "BUS_SP_KEY_ORDER_SUM_DIS"
|
||||
|
||||
@@ -231,16 +231,18 @@ public class OrderModel {
|
||||
CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+obj.getContext());
|
||||
List<Integer> list = obj.getScreenList();
|
||||
CallerLogger.INSTANCE.i(M_BUS + TAG,"onMsgReceived = "+GsonUtils.toJson(list));
|
||||
if ( list!= null && list.size() > 1){
|
||||
|
||||
if (list != null && list.contains(1)){ // 1司机端
|
||||
OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(DateTimeUtil.getCurrentTimeStamp(),
|
||||
obj.getContext(),OCHSocketMessageManager.OPERATION_SYSTEM);
|
||||
}
|
||||
|
||||
if (list != null && list.contains(2)){ //乘客屏
|
||||
AppConnectMsg msg = new AppConnectMsg(true,false,obj.getContext());
|
||||
CallerTelematicManager.INSTANCE.sendMsgToAllClients(OchCommonConst.BUSINESS_STRING,
|
||||
GsonUtils.toJson(msg).getBytes());
|
||||
}
|
||||
|
||||
OCHSocketMessageManager.INSTANCE.pushAppOperationalMsgBox(DateTimeUtil.getCurrentTimeStamp(),
|
||||
obj.getContext(),OCHSocketMessageManager.OPERATION_SYSTEM);
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ object CharterPassengerModel {
|
||||
ConcurrentHashMap<String, IBusPassengerControllerStatusCallback>()
|
||||
|
||||
// 当前位置坐标
|
||||
private var mLocation: MogoLocation? = null
|
||||
private var mLocationGCJ02: MogoLocation? = null
|
||||
private var mLocationWgs: MogoLocation? = null
|
||||
|
||||
// 订单信息 有订单有线路结束订单
|
||||
@@ -194,7 +194,7 @@ object CharterPassengerModel {
|
||||
object : IMoGoChassisLocationGCJ02Listener {
|
||||
override fun onChassisLocationGCJ02(mogoLocation: MogoLocation?) {
|
||||
if (null == mogoLocation) return
|
||||
mLocation = mogoLocation
|
||||
mLocationGCJ02 = mogoLocation
|
||||
for (callback in mControllerStatusCallbackMap.values) {
|
||||
callback.onCarLocationChanged(mogoLocation)
|
||||
}
|
||||
@@ -368,9 +368,7 @@ object CharterPassengerModel {
|
||||
order.wgs84Lon!!,
|
||||
order.wgs84Lat!!
|
||||
)
|
||||
order.gcj02Lon = coordinateConverterWgsToGcj.longitude
|
||||
order.gcj02Lat = coordinateConverterWgsToGcj.latitude
|
||||
this.carTypeChageListener?.setEndStationCallBack(order.siteId,order.siteName,order.gcj02Lon!!,order.gcj02Lat!!)
|
||||
this.carTypeChageListener?.setEndStationCallBack(order.siteId,order.siteName,coordinateConverterWgsToGcj.longitude,coordinateConverterWgsToGcj.latitude)
|
||||
}
|
||||
this.orderInfo?.orderNo?.let {
|
||||
if(it!=orderData.orderNo){
|
||||
@@ -389,7 +387,7 @@ object CharterPassengerModel {
|
||||
setOrderStatus(OrderStatusEnum.OrdersWithLine)
|
||||
}
|
||||
//计算终点距离
|
||||
mLocation?.let { currentInfo ->
|
||||
mLocationGCJ02?.let { currentInfo ->
|
||||
// 两点之间的距离
|
||||
val coordinateConverterWgsToGcj =
|
||||
CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(
|
||||
@@ -397,13 +395,11 @@ object CharterPassengerModel {
|
||||
order.wgs84Lon!!,
|
||||
order.wgs84Lat!!
|
||||
)
|
||||
order.gcj02Lon = coordinateConverterWgsToGcj.longitude
|
||||
order.gcj02Lat = coordinateConverterWgsToGcj.latitude
|
||||
val calculateLineDistance = CoordinateUtils.calculateLineDistance(
|
||||
currentInfo.longitude,
|
||||
currentInfo.latitude,
|
||||
order.gcj02Lon!!,
|
||||
order.gcj02Lat!!
|
||||
coordinateConverterWgsToGcj.longitude,
|
||||
coordinateConverterWgsToGcj.latitude
|
||||
)
|
||||
// 小于15m到站
|
||||
if (calculateLineDistance < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
@@ -629,36 +625,83 @@ object CharterPassengerModel {
|
||||
*/
|
||||
private fun calculateDistance() {
|
||||
//mLocation gcj坐标
|
||||
mLocation?.let {
|
||||
// 启动轨迹计算
|
||||
//当前站在轨迹中对应的点
|
||||
val currentRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(
|
||||
0, mRoutePoints, it.longitude, it.latitude
|
||||
)
|
||||
//要前往的站在轨迹中对应的点
|
||||
var nextRouteIndex: Int = mRoutePoints.size - 1
|
||||
orderInfo?.let {
|
||||
nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(
|
||||
currentRouteIndex, mRoutePoints, it.gcj02Lon!!, it.gcj02Lat!!
|
||||
)
|
||||
}
|
||||
mLocationGCJ02?.let {
|
||||
var lastSumLength = 0f
|
||||
if (currentRouteIndex < nextRouteIndex) {
|
||||
// subList 是[) 需要的是[]
|
||||
val subList = mRoutePoints.subList(currentRouteIndex, nextRouteIndex+1)
|
||||
val middlePoingDistancee =
|
||||
CoordinateCalculateRouteUtil.calculateRouteSumLength(subList)
|
||||
val lastPoints = mRoutePoints.get(currentRouteIndex)
|
||||
lastSumLength = CoordinateUtils.calculateLineDistance(
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
it.longitude, it.latitude
|
||||
) + middlePoingDistancee
|
||||
} else {
|
||||
val lastPoints = mRoutePoints.get(nextRouteIndex)
|
||||
lastSumLength = CoordinateUtils.calculateLineDistance(
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
it.longitude, it.latitude
|
||||
orderInfo?.let { order ->
|
||||
// 启动轨迹计算
|
||||
//当前站在轨迹中对应的点
|
||||
val currentRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(
|
||||
0, mRoutePoints, it.longitude, it.latitude
|
||||
)
|
||||
var nextRouteIndex: Int = mRoutePoints.size - 1
|
||||
|
||||
val orderLonLat =
|
||||
CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(
|
||||
mContext,
|
||||
order.wgs84Lon!!,
|
||||
order.wgs84Lat!!
|
||||
)
|
||||
//要前往的站在轨迹中对应的点
|
||||
nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(
|
||||
currentRouteIndex, mRoutePoints,
|
||||
orderLonLat.longitude,
|
||||
orderLonLat.latitude
|
||||
)
|
||||
// 距离站点最近的轨迹点
|
||||
val lastPoints = mRoutePoints.get(nextRouteIndex)
|
||||
// 站点距离最近点的距离
|
||||
val calculateLineDistance = CoordinateUtils.calculateLineDistance(
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
orderLonLat.longitude, orderLonLat.latitude
|
||||
)
|
||||
if (currentRouteIndex < nextRouteIndex) {
|
||||
// subList 是[) 需要的是[]
|
||||
val subList = mRoutePoints.subList(currentRouteIndex, nextRouteIndex + 1)
|
||||
// 轨迹点所有的距离
|
||||
val middlePoingDistancee =
|
||||
CoordinateCalculateRouteUtil.calculateRouteSumLength(subList)
|
||||
|
||||
// 需要加距离 和下一个轨迹点成钝角
|
||||
if (nextRouteIndex + 1 < mRoutePoints.size) {
|
||||
val lastPointsNext = mRoutePoints.get(nextRouteIndex + 1)
|
||||
val degree = CoordinateCalculateRouteUtil.getDegree(
|
||||
orderLonLat.longitude,orderLonLat.latitude,
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
lastPointsNext.longitude, lastPointsNext.latitude,
|
||||
)
|
||||
if (degree > 90) {
|
||||
lastSumLength = middlePoingDistancee + calculateLineDistance
|
||||
}
|
||||
}
|
||||
// 需要减距离 和上一个轨迹点成钝角
|
||||
if (nextRouteIndex - 1 >= 0) {
|
||||
val lastPointsPre = mRoutePoints.get(nextRouteIndex - 1)
|
||||
val degree = CoordinateCalculateRouteUtil.getDegree(
|
||||
orderLonLat.longitude,orderLonLat.latitude,
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
lastPointsPre.longitude, lastPointsPre.latitude,
|
||||
)
|
||||
if (degree > 90) {
|
||||
lastSumLength = middlePoingDistancee - calculateLineDistance
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
val lastPoints = mRoutePoints.get(nextRouteIndex)
|
||||
lastSumLength = CoordinateUtils.calculateLineDistance(
|
||||
lastPoints.longitude, lastPoints.latitude,
|
||||
it.longitude, it.latitude
|
||||
)
|
||||
}
|
||||
// 距离小于100m 直接计算当前位置距离站点的距离
|
||||
if(lastSumLength<=100){
|
||||
lastSumLength = CoordinateUtils.calculateLineDistance(
|
||||
orderLonLat.longitude,
|
||||
orderLonLat.latitude,
|
||||
it.longitude,
|
||||
it.latitude
|
||||
)
|
||||
}
|
||||
}
|
||||
val lastTime: Double = lastSumLength / Charter_AVERAGE_SPEED * 3.6 //秒
|
||||
|
||||
@@ -667,6 +710,9 @@ object CharterPassengerModel {
|
||||
"---lastSumLength: " + lastSumLength + "----lastTime : " + lastTime
|
||||
+ " thread = " + Thread.currentThread().name
|
||||
)
|
||||
if (lastSumLength < CharterPassengerConst.ARRIVE_AT_START_STATION_DISTANCE) {
|
||||
arriveDest()
|
||||
}
|
||||
iDistanceTimeCallback?.setDistancecAndTime(lastSumLength.toLong(), lastTime.toLong())
|
||||
}
|
||||
}
|
||||
@@ -696,7 +742,7 @@ object CharterPassengerModel {
|
||||
var distanceMap: MutableMap<Float, Int> = TreeMap()
|
||||
// 计算所有点的距离
|
||||
data.forEachIndexed { index, siteInfo ->
|
||||
mLocation?.let { currentInfo ->
|
||||
mLocationGCJ02?.let { currentInfo ->
|
||||
// 两点之间的距离
|
||||
val calculateLineDistance = CoordinateUtils.calculateLineDistance(
|
||||
currentInfo.longitude,
|
||||
@@ -744,7 +790,7 @@ object CharterPassengerModel {
|
||||
if(middle==0){
|
||||
return Pair(1, false)
|
||||
}
|
||||
mLocation?.let {
|
||||
mLocationGCJ02?.let {
|
||||
// 仅计算 距离最近的站点middle 附近5个坐标的夹角
|
||||
// middle middle-1
|
||||
// middle middle+1
|
||||
@@ -821,6 +867,8 @@ object CharterPassengerModel {
|
||||
broadcastList["${it}$endKey"] = true
|
||||
// 到站结束自驾
|
||||
CallerAutoPilotControlManager.cancelAutoPilot()
|
||||
// 结束路距计算
|
||||
endCalculateDistanceLoop()
|
||||
// 到站置距离位0
|
||||
iDistanceTimeCallback?.setOrderTimeCallBack(-1)
|
||||
}
|
||||
@@ -891,7 +939,7 @@ object CharterPassengerModel {
|
||||
CallerLogger.e(M_BUS_P + TAG, "no order or order is empty.")
|
||||
return null
|
||||
}
|
||||
mLocation?.let {
|
||||
mLocationGCJ02?.let {
|
||||
|
||||
}
|
||||
val parameters = AutopilotControlParameters()
|
||||
|
||||
@@ -20,12 +20,16 @@ import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener
|
||||
import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
||||
import com.mogo.och.bus.passenger.ui.MainFragment
|
||||
import com.mogo.och.common.module.bean.dpmsg.BaseDPMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPCommonOperationMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.common.socketmessage.OCHSocketMessageManager
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.OCHM1LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.NumberFormatUtil
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import io.reactivex.disposables.Disposable
|
||||
import java.util.*
|
||||
|
||||
@@ -86,21 +90,40 @@ class BusPassengerPresenter(view: MainFragment?) :
|
||||
if (type == OchCommonConst.BUSINESS_STRING) {
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
ChangeDestMsg::class.java
|
||||
) as ChangeDestMsg
|
||||
if (msg.type == DPMsgType.TYPE_OPEN_CLOSE_DOOR.type) {
|
||||
val doorStatus = OCHM1LightAirconditionDoorStatusManager.doorStatus
|
||||
if(doorStatus.isOpen){
|
||||
closeDoor()
|
||||
}else{
|
||||
openDoor()
|
||||
BaseDPMsg::class.java
|
||||
) as BaseDPMsg
|
||||
when (msg.type) {
|
||||
DPMsgType.TYPE_OPEN_CLOSE_DOOR.type -> {
|
||||
val doorStatus = OCHM1LightAirconditionDoorStatusManager.doorStatus
|
||||
if(doorStatus.isOpen){
|
||||
closeDoor()
|
||||
}else{
|
||||
openDoor()
|
||||
}
|
||||
}
|
||||
DPMsgType.TYPE_COMMON.type -> {
|
||||
val msg = GsonUtils.fromJson(
|
||||
String(byteArray),
|
||||
DPCommonOperationMsg::class.java
|
||||
) as DPCommonOperationMsg
|
||||
pushOperationalToMsgBox(DateTimeUtil.getCurrentTimeStamp(),msg.msg)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun pushOperationalToMsgBox(time : Long,content : String,type: Int = -1){
|
||||
playDI()
|
||||
OCHSocketMessageManager.pushAppOperationalMsgBox(time, content, type)
|
||||
}
|
||||
|
||||
private fun playDI(){
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
|
||||
}
|
||||
|
||||
fun openDoor() {
|
||||
val canOpenOrCloseDoor = canOpenOrCloseDoor()
|
||||
if(!canOpenOrCloseDoor.isNullOrEmpty()){
|
||||
|
||||
@@ -55,6 +55,7 @@ class M1SoftFragment :
|
||||
|
||||
private var currentTemperature: Temperature? = null
|
||||
|
||||
private var subscribeAir: Disposable? = null
|
||||
private var subscribeLightTop1: Disposable? = null
|
||||
private var subscribeLightTop2: Disposable? = null
|
||||
private var subscribeAtmosphere: Disposable? = null
|
||||
@@ -239,26 +240,27 @@ class M1SoftFragment :
|
||||
rv_aircondition_temperature.layoutManager = pickerLayoutManager
|
||||
rv_aircondition_temperature.adapter = adapter
|
||||
HorizontalDecoration.distance = SharedPrefsMgr.getInstance(requireContext()).getInt(HorizontalDecoration.distancekey,0)
|
||||
rv_aircondition_temperature.addItemDecoration(HorizontalDecoration(15,data.size-1))
|
||||
val space = AutoSizeUtils.dp2px(context, 22f)
|
||||
rv_aircondition_temperature.addItemDecoration(HorizontalDecoration(space,data.size-1))
|
||||
|
||||
pickerLayoutManager.setOnScrollStopListener { view ->
|
||||
if (view is TextView) {
|
||||
// 未拖到中点、自动滚动到中点会短时间触发两次
|
||||
if (ClickUtils.isClickTooFrequent(rv_aircondition_temperature)) {
|
||||
return@setOnScrollStopListener
|
||||
}
|
||||
val tag = view.tag
|
||||
if (tag is Temperature) {
|
||||
adapter.setCheckIndex(tag.index)
|
||||
currentTemperature = tag
|
||||
if(rv_aircondition_temperature.tag== touchTag){
|
||||
rv_aircondition_temperature.tag = null
|
||||
return@setOnScrollStopListener
|
||||
mPresenter?.disposeSubscribe(subscribeAir)
|
||||
if(tag.index==0||tag.index==adapter.data.size-1){
|
||||
subscribeAir = Observable.timer(200, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe {
|
||||
setCheckAir(adapter,tag)
|
||||
}
|
||||
}else {
|
||||
SoundPoolHelper.getSoundPoolHelper()
|
||||
.playSoundWithRedId(context, R.raw.bus_di)
|
||||
if (ClickUtils.isClickTooFrequent(rv_aircondition_temperature)) {
|
||||
return@setOnScrollStopListener
|
||||
}
|
||||
setCheckAir(adapter,tag)
|
||||
}
|
||||
openAircondition()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -269,6 +271,19 @@ class M1SoftFragment :
|
||||
}
|
||||
}
|
||||
|
||||
private fun setCheckAir(adapter:TemperatureAdapter,tag:Temperature){
|
||||
adapter.setCheckIndex(tag.index)
|
||||
currentTemperature = tag
|
||||
if (rv_aircondition_temperature.tag == touchTag) {
|
||||
rv_aircondition_temperature.tag = null
|
||||
return
|
||||
} else {
|
||||
SoundPoolHelper.getSoundPoolHelper()
|
||||
.playSoundWithRedId(context, R.raw.bus_di)
|
||||
}
|
||||
openAircondition()
|
||||
}
|
||||
|
||||
private fun getData(): MutableList<Temperature> {
|
||||
val mutableListOf = mutableListOf<Temperature>()
|
||||
mutableListOf.add(Temperature(0, 16, "16°"))
|
||||
|
||||
@@ -255,6 +255,11 @@ class LineSiteView @JvmOverloads constructor(
|
||||
TAGLINELOOP,
|
||||
LoopInfo(3, ::checkServerStatus)
|
||||
)
|
||||
RxUtils.disposeSubscribe(subscribeSelectLine)
|
||||
subscribeSelectLine= RxUtils.createSubscribe(120_000){
|
||||
ToastUtils.showShort("请联系安全员确认")
|
||||
endAni()
|
||||
}
|
||||
}
|
||||
}
|
||||
tv_site_submit.onClick {
|
||||
@@ -288,8 +293,8 @@ class LineSiteView @JvmOverloads constructor(
|
||||
TAGLINELOOP,
|
||||
LoopInfo(3, ::checkServerStatus)
|
||||
)
|
||||
RxUtils.disposeSubscribe(subscribeSelectLine)
|
||||
subscribeSelectLine= RxUtils.createSubscribe(120_1000){
|
||||
RxUtils.disposeSubscribe(subscribeSelectSite)
|
||||
subscribeSelectSite = RxUtils.createSubscribe(120_000){
|
||||
ToastUtils.showShort("请联系安全员确认")
|
||||
endAni()
|
||||
}
|
||||
@@ -323,7 +328,7 @@ class LineSiteView @JvmOverloads constructor(
|
||||
LoopInfo(3, ::checkServerStatus)
|
||||
)
|
||||
RxUtils.disposeSubscribe(subscribeSelectSite)
|
||||
subscribeSelectSite = RxUtils.createSubscribe(120_1000){
|
||||
subscribeSelectSite = RxUtils.createSubscribe(120_000){
|
||||
ToastUtils.showShort("请联系安全员确认")
|
||||
endAni()
|
||||
}
|
||||
|
||||
@@ -3,29 +3,38 @@ package com.mogo.och.bus.passenger.utils
|
||||
import android.os.Build
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager
|
||||
|
||||
object VoiceFocusManager {
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
fun getVoiceCmdCallBack():IMogoVoiceCmdCallBack{
|
||||
GSYVideoManager.onPause()
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(true)
|
||||
UiThreadHandler.post {
|
||||
GSYVideoManager.onPause()
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(true)
|
||||
}
|
||||
|
||||
return object : IMogoVoiceCmdCallBack{
|
||||
|
||||
override fun onSpeakEnd(speakText: String?) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
UiThreadHandler.post {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSpeakError(speakText: String?, errorMsg: String?) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
UiThreadHandler.post {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSpeakSelectTimeOut(speakText: String?) {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
UiThreadHandler.post {
|
||||
GSYVideoManager.instance().curPlayerManager?.setNeedMute(false)
|
||||
GSYVideoManager.onResume()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.m1.m1_statusview_datetime.view.*
|
||||
@@ -36,6 +37,8 @@ class StatusBarView @JvmOverloads constructor(
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_statusview_datetime, this, true)
|
||||
setBackgroundColor(ContextCompat.getColor(context,R.color.bus_p_m1_80ffffff))
|
||||
isClickable = true
|
||||
isFocusable = true
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
@@ -83,6 +86,9 @@ class StatusBarView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onBatteryManagementSystemStates(states: ChassisStatesOuterClass.BMSSystemStates) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return
|
||||
}
|
||||
UiThreadHandler.post {
|
||||
val bmsSoc = states.bmsSoc
|
||||
progress.progress = bmsSoc.toInt()
|
||||
|
||||
@@ -37,6 +37,20 @@
|
||||
app:layout_constraintTop_toTopOf="@+id/mapBizView"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mapBizView" />
|
||||
|
||||
<!--浓雾预警动画-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!--V2X预警红色边框-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -46,8 +46,9 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="@dimen/dp_32" />
|
||||
|
||||
<SeekBar
|
||||
<ProgressBar
|
||||
android:id="@+id/progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="@dimen/dp_115"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
@@ -57,9 +58,8 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/blueToothView"
|
||||
android:maxHeight="@dimen/dp_10"
|
||||
android:minHeight="@dimen/dp_10"
|
||||
android:splitTrack="false"
|
||||
android:progressDrawable="@drawable/taxi_video_seekbar_style"
|
||||
android:thumb="@null" />
|
||||
android:background="@null"
|
||||
android:progressDrawable="@drawable/taxi_video_seekbar_style" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_power_cos"
|
||||
|
||||
BIN
OCH/mogo-och-charter-passenger/src/m1/res/raw/m1_voice_di.mp3
Normal file
BIN
OCH/mogo-och-charter-passenger/src/m1/res/raw/m1_voice_di.mp3
Normal file
Binary file not shown.
@@ -16,10 +16,6 @@ import com.magic.mogo.och.charter.callback.DriverM1OrderCallback
|
||||
import com.magic.mogo.och.charter.callback.IDriverM1ControllerStatusCallback
|
||||
import com.magic.mogo.och.charter.constant.CharterConst
|
||||
import com.magic.mogo.och.charter.manager.CharterAnalyticsManager
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.ARRIVE_STATION
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.END_TRIP
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.START_TRIP
|
||||
import com.magic.mogo.och.charter.manager.CharterTrajectoryManager
|
||||
import com.magic.mogo.och.charter.net.DriverM1ServiceManager
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
@@ -50,6 +46,10 @@ import com.mogo.och.common.module.biz.provider.LoginService
|
||||
import com.mogo.och.common.module.callback.OchAdasStartFailureCallback
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager.startLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager.stopLoopAbnormalFactors
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.ARRIVE_STATION
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.END_TRIP
|
||||
import com.mogo.och.common.module.manager.CharterSendTripInfoManager.START_TRIP
|
||||
import com.mogo.och.common.module.manager.OCHAdasAbilityManager
|
||||
import com.mogo.och.common.module.utils.*
|
||||
import io.reactivex.exceptions.UndeliverableException
|
||||
@@ -252,9 +252,12 @@ class DriverM1Model {
|
||||
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "onMsgReceived = " + obj.context)
|
||||
|
||||
pushOperationalToMsgBox(obj.pushTimeStamp, obj.context)
|
||||
val list = obj.screenList
|
||||
if (list.size > 1){ //发送乘客屏
|
||||
d(SceneConstant.M_CHARTER_D + TAG, "onMsgReceived = " + GsonUtils.toJson(list))
|
||||
if (list != null && list.contains(1)){ // 司机端
|
||||
pushOperationalToMsgBox(obj.pushTimeStamp, obj.context)
|
||||
}
|
||||
if (list != null && list.contains(2)){ //发送乘客屏
|
||||
sendMsgToClient(DPCommonOperationMsg(obj.context))
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<!-- <string name="bus_arrive_to_end_title">去往下车地点</string>-->
|
||||
<string name="bus_arrive_to_end_start">起点:</string>
|
||||
<string name="bus_arrive_to_end_end">终点:</string>
|
||||
<string name="bus_arrive_to_current_tag">当前站点:</string>
|
||||
<string name="bus_arrive_to_current_tag">出发站点:</string>
|
||||
<string name="bus_arrive_to_next_tag1">目的站点:</string>
|
||||
<string name="bus_arrive_to_next_tag">下一站:</string>
|
||||
<string name="bus_auto_disable_tip">自动驾驶状态为0不可用</string>
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.mogo.och.common.module.biz.common.socketmessage.data
|
||||
*/
|
||||
data class SystemMsg(
|
||||
var context: String,
|
||||
var screenList: MutableList<Int>,
|
||||
var screenList: MutableList<Int>,//1:司机屏 2:乘客屏
|
||||
var pushTimeStamp: Long = System.currentTimeMillis() // 消息下发时间戳
|
||||
)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<string name="surplus5_order_en">There are 5 minutes left from the end of chartering. Please arrange your time reasonably</string>
|
||||
<string name="surplus5_order_ko">전세버스 종료 후 5분 남았습니다. 여행 시간을 합리적으로 안배해 주십시오</string>
|
||||
|
||||
<string name="end_order_zh">感谢您体验蘑菇车联自动驾驶小巴车,本次旅程已结束,我们下次乘车再见</string>
|
||||
<string name="end_order_zh">感谢您体验\'蘑菇车联\'自动驾驶小巴车,本次旅程已结束,我们下次乘车再见</string>
|
||||
<string name="end_order_en">Thank you for experiencing the self-driving minibus. See you next time</string>
|
||||
<string name="end_order_ko">자율주행 버스를 체험해 주셔서 감사합니다. 다음에 또 뵙겠습니다</string>
|
||||
</resources>
|
||||
@@ -48,5 +48,5 @@
|
||||
| 金旅小巴 | fOchBus.gradle、fOchBusPassenger.gradle、fOchShuttle.gradle、fOchShuttlePassenger.gradle | N、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| M1 | fOchBusPassengerM1.gradle | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
| M2 | fOchBusPassengerM2.gradle | N、P、R | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_P);add(chassis.Chassis.GearPosition.GEAR_R);}}' |
|
||||
| 清扫车 | fOchSweeper.gradle | N | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);}}' |
|
||||
| 清扫车 | fOchSweeper.gradle | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
| 开沃 | 暂无 | 不限制档位 | buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null' |
|
||||
|
||||
@@ -48,7 +48,7 @@ project.android.productFlavors {
|
||||
// 构建 是否支持多屏异显异交互
|
||||
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false'
|
||||
|
||||
//Bus不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'new java.util.HashSet<chassis.Chassis.GearPosition>(){{add(chassis.Chassis.GearPosition.GEAR_N);add(chassis.Chassis.GearPosition.GEAR_R);}}'
|
||||
//M1不能启动自驾的档位
|
||||
buildConfigField 'java.util.Set<chassis.Chassis.GearPosition>', 'UNABLE_LAUNCH_AUTOPILOT_GEAR', 'null'
|
||||
}
|
||||
}
|
||||
@@ -39,13 +39,13 @@
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
"shuttle_url": "https://och-a.zhidaozhixing.com",
|
||||
"passport_url": "https://och-a.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://och-hailing-eh.zhidaozhixing.com:18181/",
|
||||
"eagle_dns_url": "http://och-hailing-eh.zhidaozhixing.com:18181/"
|
||||
"och_url": "https://och-driver-eh.zhidaozhixing.com:18182",
|
||||
"shuttle_url": "https://och-driver-eh.zhidaozhixing.com:18182",
|
||||
"passport_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/passport/",
|
||||
"socket_base_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/push/",
|
||||
"socket_tech_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/",
|
||||
"eagle_mis_url": "https://och-hailing-eh.zhidaozhixing.com:18182/",
|
||||
"eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com:18182/"
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
@@ -68,13 +68,13 @@
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
"shuttle_url": "https://och-a.zhidaozhixing.com",
|
||||
"passport_url": "https://och-a.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
"och_url": "https://och-driver-yt.zhidaozhixing.com",
|
||||
"shuttle_url": "https://och-driver-yt.zhidaozhixing.com",
|
||||
"passport_url": "https://och-driver-yt.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-driver-yt.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-driver-yt.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "https://och-hailing-yt.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "https://och-hailing-yt.zhidaozhixing.com/"
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
|
||||
@@ -93,7 +93,7 @@ ext {
|
||||
|
||||
// obu sdk
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0_beta4',
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0_beta5',
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -71,20 +72,18 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* obu弱势交通控制
|
||||
* obu弱势交通控制, 默认开启
|
||||
*/
|
||||
// tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
// tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
// // 默认开启
|
||||
// HmiBuildConfig.isShowObuWeaknessTrafficView = !isChecked
|
||||
// }
|
||||
tbObuWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowObuWeaknessTrafficView
|
||||
tbObuWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
HmiBuildConfig.isShowObuWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* 云端弱势交通控制
|
||||
* 云端弱势交通控制 默认关闭
|
||||
*/
|
||||
tbCloudWeaknessTrafficSop.isChecked = HmiBuildConfig.isShowCloudWeaknessTrafficView
|
||||
tbCloudWeaknessTrafficSop.setOnCheckedChangeListener { _, isChecked ->
|
||||
// 默认关闭
|
||||
HmiBuildConfig.isShowCloudWeaknessTrafficView = isChecked
|
||||
}
|
||||
|
||||
@@ -93,7 +92,6 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
*/
|
||||
tbObuV2vView.isChecked = HmiBuildConfig.isShowObuV2vView
|
||||
tbObuV2vView.setOnCheckedChangeListener { _, isChecked ->
|
||||
// 默认关闭
|
||||
HmiBuildConfig.isShowObuV2vView = isChecked
|
||||
}
|
||||
|
||||
@@ -105,14 +103,6 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowObuV2iView = isChecked
|
||||
}
|
||||
|
||||
/**
|
||||
* obu 数据通过dc 传输V2i事件 开关 TODO pm确定下开关功能 HmiBuildConfig.isShowObuToDcV2iView
|
||||
*/
|
||||
tbObuToDcView.setOnCheckedChangeListener { _, isChecked ->
|
||||
// 默认开启
|
||||
HmiBuildConfig.isShowObuToDcV2iView = !isChecked
|
||||
}
|
||||
|
||||
//红绿灯标识
|
||||
tbTrafficLight.isChecked = HmiBuildConfig.isShowTrafficLightView
|
||||
tbTrafficLight.setOnCheckedChangeListener { _, isChecked ->
|
||||
@@ -234,29 +224,29 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
FuncBizConfig.FOUNDATION, TAG, true, this
|
||||
)
|
||||
// 开启定时查询速度
|
||||
Timer().schedule(timerTaskRefresh, Date(), 500)
|
||||
// Timer().schedule(timerTaskRefresh, Date(), 500)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 移除 业务配置监听
|
||||
CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG)
|
||||
try {
|
||||
timerTaskRefresh.cancel()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
// try {
|
||||
// timerTaskRefresh.cancel()
|
||||
// } catch (e: Exception) {
|
||||
// e.printStackTrace()
|
||||
// }
|
||||
}
|
||||
|
||||
private val timerTaskRefresh = object : TimerTask(){
|
||||
override fun run() {
|
||||
UiThreadHandler.post{
|
||||
tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// private val timerTaskRefresh = object : TimerTask(){
|
||||
// override fun run() {
|
||||
// UiThreadHandler.post{
|
||||
// tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode
|
||||
// tbRainMode.isChecked = FunctionBuildConfig.isRainMode
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
override fun updateBizView(type: String, lock: Boolean) {
|
||||
when (type) {
|
||||
|
||||
@@ -141,7 +141,12 @@ class SystemVersionView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
updateHDDataCacheStatus(CallerMapUIServiceManager.isCityDataCached())
|
||||
ThreadUtils.getIoPool().execute {
|
||||
val isCached = CallerMapUIServiceManager.isCityDataCached()
|
||||
UiThreadHandler.post {
|
||||
updateHDDataCacheStatus(isCached)
|
||||
}
|
||||
}
|
||||
|
||||
if(AdUpgradeStateHelper.isConfirmUpgrade()){
|
||||
//将角标改为“下载中”
|
||||
|
||||
@@ -163,22 +163,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
<!--这个后面产品会统一去掉-->
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbObuToDcView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OBU到工控机V2I显示"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbObuV2vView"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbObuWeaknessTrafficSop"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -324,6 +324,50 @@ public class MogoLocation implements Cloneable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public MogoLocation copy(MogoLocation lastLocation, double longitude, double latitude) {
|
||||
MogoLocation mogoLocation = new MogoLocation();
|
||||
mogoLocation.accuracy = lastLocation.accuracy;
|
||||
mogoLocation.adCode = lastLocation.adCode;
|
||||
mogoLocation.address = lastLocation.address;
|
||||
mogoLocation.aoiName = lastLocation.aoiName;
|
||||
mogoLocation.buildingId = lastLocation.buildingId;
|
||||
mogoLocation.cityCode = lastLocation.cityCode;
|
||||
mogoLocation.cityName = lastLocation.cityName;
|
||||
mogoLocation.description = lastLocation.description;
|
||||
mogoLocation.district = lastLocation.district;
|
||||
mogoLocation.errorCode = lastLocation.errorCode;
|
||||
mogoLocation.errorInfo = lastLocation.errorInfo;
|
||||
mogoLocation.floor = lastLocation.floor;
|
||||
mogoLocation.gpsAccuracyStatus = lastLocation.gpsAccuracyStatus;
|
||||
mogoLocation.lastReceiveTime = lastLocation.lastReceiveTime;
|
||||
mogoLocation.locationDetail = lastLocation.locationDetail;
|
||||
mogoLocation.locType = lastLocation.locType;
|
||||
mogoLocation.poiName = lastLocation.poiName;
|
||||
mogoLocation.provider = lastLocation.provider;
|
||||
mogoLocation.province = lastLocation.province;
|
||||
mogoLocation.satellite = lastLocation.satellite;
|
||||
mogoLocation.street = lastLocation.street;
|
||||
mogoLocation.streetNum = lastLocation.streetNum;
|
||||
|
||||
MessagePad.GnssInfo gnssInfo =
|
||||
MessagePad.GnssInfo.newBuilder()
|
||||
.setLongitude(longitude) //经度
|
||||
.setLatitude(latitude)//纬度
|
||||
.setAltitude(lastLocation.gnssInfo.getAltitude()) //海拔
|
||||
.setHeading(lastLocation.gnssInfo.getHeading()) //航向角
|
||||
.setAcceleration(lastLocation.gnssInfo.getAcceleration()) //加速度
|
||||
.setYawRate(lastLocation.gnssInfo.getYawRate()) //曲率
|
||||
.setGnssSpeed(lastLocation.gnssInfo.getGnssSpeed()) //惯导车速 m/s
|
||||
.setVehicleSpeed(lastLocation.gnssInfo.getVehicleSpeed()) //车辆车速 m/s
|
||||
.setSatelliteTime(lastLocation.gnssInfo.getSatelliteTime()) //gps时间 单位:秒s
|
||||
.setSystemTime(lastLocation.gnssInfo.getSystemTime()) //系统时间 单位:秒s
|
||||
.build();
|
||||
|
||||
mogoLocation.gnssInfo = gnssInfo;
|
||||
return mogoLocation;
|
||||
}
|
||||
|
||||
|
||||
public long getLastReceiveTime() {
|
||||
return lastReceiveTime;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
private const val TAG = "CallerChassisLocationGCJ20ListenerManager"
|
||||
|
||||
@Volatile
|
||||
private var mGnssInfo: MogoLocation? = null
|
||||
private var mGnssInfo: MogoLocation = MogoLocation()
|
||||
|
||||
/**
|
||||
* 添加监听并指定回掉频率
|
||||
@@ -36,8 +36,8 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
setListenerHz(tag, callBackHz)
|
||||
}
|
||||
|
||||
fun getChassisLocationGCJ02(): MogoLocation? {
|
||||
return mGnssInfo
|
||||
fun getChassisLocationGCJ02(): MogoLocation {
|
||||
return mGnssInfo.clone()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,46 +47,42 @@ object CallerChassisLocationGCJ02ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
@Synchronized
|
||||
fun invokeChassisLocationGCJ02(gnssInfo: MogoLocation?, sourceType: DataSourceType) {
|
||||
gnssInfo?.let {
|
||||
// 克隆定位数据,防止原数据被篡改导致位置跳变
|
||||
mGnssInfo = gnssInfo.clone()
|
||||
// 转换 WGS84-->GCJ02 坐标
|
||||
val gcj20Location =
|
||||
CoordinateTransform.WGS84ToGCJ02(gnssInfo.longitude, gnssInfo.latitude)
|
||||
mGnssInfo?.let {
|
||||
mGnssInfo!!.longitude = gcj20Location[0]
|
||||
mGnssInfo!!.latitude = gcj20Location[1]
|
||||
// 克隆定位数据,防止原数据被篡改导致位置跳变
|
||||
mGnssInfo = gnssInfo.copy(gnssInfo, gcj20Location[0], gcj20Location[1])
|
||||
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
// 获取数据监听需要的HZ
|
||||
val hz = M_LISTENERS_HZ[tag]
|
||||
if (hz != null && hz > 0) {
|
||||
val hzTime = (1.0 / hz.toDouble()) * 1000
|
||||
// 获取最后一次回调的时间
|
||||
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
|
||||
if (hzLastSendTime != null && hzLastSendTime > 0) {
|
||||
// 计算是否进入下一次回调周期
|
||||
val nowTime = TimeUtils.getNowMills()
|
||||
if (nowTime - hzLastSendTime > hzTime) {
|
||||
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
|
||||
}
|
||||
} else {
|
||||
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
|
||||
M_LISTENERS.forEach {
|
||||
val tag = it.key
|
||||
// 获取数据监听需要的HZ
|
||||
val hz = M_LISTENERS_HZ[tag]
|
||||
if (hz != null && hz > 0) {
|
||||
val hzTime = (1.0 / hz.toDouble()) * 1000
|
||||
// 获取最后一次回调的时间
|
||||
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
|
||||
if (hzLastSendTime != null && hzLastSendTime > 0) {
|
||||
// 计算是否进入下一次回调周期
|
||||
val nowTime = TimeUtils.getNowMills()
|
||||
if (nowTime - hzLastSendTime > hzTime) {
|
||||
syncLocationCallback(tag, it, mGnssInfo, sourceType)
|
||||
}
|
||||
} else {
|
||||
//Logger.d(TAG, "没设置监听频率,使用默认5HZ")
|
||||
val hzTime = (1.0 / 5) * 1000
|
||||
// 获取最后一次回调的时间
|
||||
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
|
||||
if (hzLastSendTime != null && hzLastSendTime > 0) {
|
||||
// 计算是否进入下一次回调周期
|
||||
val nowTime = TimeUtils.getNowMills()
|
||||
if (nowTime - hzLastSendTime > hzTime) {
|
||||
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
|
||||
}
|
||||
} else {
|
||||
syncLocationCallback(tag, it, mGnssInfo!!, sourceType)
|
||||
syncLocationCallback(tag, it, mGnssInfo, sourceType)
|
||||
}
|
||||
} else {
|
||||
//Logger.d(TAG, "没设置监听频率,使用默认5HZ")
|
||||
val hzTime = (1.0 / 5) * 1000
|
||||
// 获取最后一次回调的时间
|
||||
val hzLastSendTime = M_LISTENERS_HZ_LAST_SEND_TIME[tag]
|
||||
if (hzLastSendTime != null && hzLastSendTime > 0) {
|
||||
// 计算是否进入下一次回调周期
|
||||
val nowTime = TimeUtils.getNowMills()
|
||||
if (nowTime - hzLastSendTime > hzTime) {
|
||||
syncLocationCallback(tag, it, mGnssInfo, sourceType)
|
||||
}
|
||||
} else {
|
||||
syncLocationCallback(tag, it, mGnssInfo, sourceType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ object CallerChassisLocationWGS84ListenerManager : CallerBase<IMoGoChassisLocati
|
||||
private var mGnssInfo: MogoLocation = MogoLocation()
|
||||
|
||||
fun getChassisLocationWGS84(): MogoLocation {
|
||||
return mGnssInfo
|
||||
return mGnssInfo.clone()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4
|
||||
LOGLIB_VERSION=1.5.11
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.4.5.12
|
||||
MOGO_NETWORK_VERSION=1.4.6.4
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.5.12
|
||||
MOGO_PASSPORT_VERSION=1.4.6.4
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.5.12
|
||||
MOGO_SOCKET_VERSION=1.4.6.4
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.5.12
|
||||
MOGO_REALTIME_VERSION=1.4.6.4
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.5.12
|
||||
MOGO_TANLU_VERSION=1.4.6.4
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.5.12
|
||||
MOGO_LIVE_VERSION=1.4.6.4
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.5.12
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.6.4
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.5.12
|
||||
MOGO_LOCATION_VERSION=1.4.6.4
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.5.12
|
||||
MOGO_TELEMATIC_VERSION=1.4.6.4
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.10.0.9
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.MainThread;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
@@ -34,7 +33,7 @@ import com.mogo.eagle.core.data.map.CenterLine;
|
||||
import com.mogo.eagle.core.data.map.MapRoadInfo;
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng;
|
||||
import com.mogo.eagle.core.data.map.MogoLocation;
|
||||
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.map.CallerMapDataCollectorManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager;
|
||||
@@ -212,28 +211,11 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
|
||||
@Override
|
||||
public void onStopLineInfo(@androidx.annotation.Nullable StopLine stopLine) {
|
||||
MogoLocation carLoc = CallerChassisLocationGCJ02ListenerManager.INSTANCE.getChassisLocationGCJ02();
|
||||
MogoLocation carLoc = CallerChassisLocationWGS84ListenerManager.INSTANCE.getChassisLocationWGS84();
|
||||
if (stopLine != null && stopLine.road_id != null && !stopLine.road_id.isEmpty() && stopLine.points != null && stopLine.points.size() > 0) {
|
||||
ArrayList<LonLatPoint> points = stopLine.points;
|
||||
if (carLoc != null) {
|
||||
/**
|
||||
* //地图组提供的高德坐标切到WGS84坐标系
|
||||
* var cal = LonLatPoint(point!!.lon, point!!.lat)
|
||||
* if(!point!!.provider.equals(MapAutoApi.GPS_FLAG)){
|
||||
* cal = MapTools.switchLonLatWGS84(cal)
|
||||
* }
|
||||
*/
|
||||
String provider = carLoc.getProvider();
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "car_loc: " + carLoc + "");
|
||||
if (!MapAutoApi.GPS_FLAG.equals(provider)) {
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "convert before: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
LonLatPoint p = new LonLatPoint(carLoc.getLongitude(), carLoc.getLatitude());
|
||||
p = MapTools.INSTANCE.switchLonLatWGS84(p);
|
||||
carLoc.setLongitude(p.longitude);
|
||||
carLoc.setLatitude(p.latitude);
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "convert after: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
}
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo:stop_line" + stopLine + ", car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
// //CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo:stop_line" + stopLine + ", car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
MapRoadInfo.StopLine stopInfo = convert(stopLine);
|
||||
LonLatPoint p1 = points.get(0);
|
||||
LonLatPoint p2 = points.get(points.size() - 1);
|
||||
|
||||
@@ -24,7 +24,7 @@ class IFlyTekTts : IMogoTTS, InitListener {
|
||||
private var ttsEngine: SpeechSynthesizer? = null
|
||||
private var engineType = SpeechConstant.TYPE_CLOUD
|
||||
|
||||
private var voicer: String = "xiaoyan"
|
||||
private var voicer: String = "x4_lingxiaoying_en"
|
||||
private var voicerEntries: Array<String>? = null
|
||||
|
||||
// 等级由低到高为0、1、2、3,默认为-1表示没有正在tts的
|
||||
@@ -389,7 +389,7 @@ class IFlyTekTts : IMogoTTS, InitListener {
|
||||
)
|
||||
//设置合成音量
|
||||
ttsEngine?.setParameter(
|
||||
SpeechConstant.VOLUME, "50"
|
||||
SpeechConstant.VOLUME, "100"
|
||||
)
|
||||
} else {
|
||||
ttsEngine?.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_LOCAL)
|
||||
|
||||
Reference in New Issue
Block a user