[shuttle]
[方向盘修改]
This commit is contained in:
@@ -19,6 +19,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isBus
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
@@ -46,10 +47,12 @@ class SteeringWheelView : ConstraintLayout, IMoGoChassisSteeringStateListener,
|
||||
|
||||
constructor(context: Context) : super(context) {}
|
||||
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
||||
if (isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
} else {
|
||||
LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this)
|
||||
when (AppIdentityModeUtils.getProduct(FunctionBuildConfig.appIdentityMode)) {
|
||||
AppIdentityModeUtils.Product.BUS -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.TAXI -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_taxi, this)
|
||||
AppIdentityModeUtils.Product.SWEEPER -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.SHUTTLE -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
AppIdentityModeUtils.Product.CHARTER -> LayoutInflater.from(context).inflate(R.layout.hmi_steering_wheel_bus, this)
|
||||
}
|
||||
initView()
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, mGoAutopilotStatusListener)
|
||||
|
||||
@@ -227,7 +227,20 @@ object AppIdentityModeUtils {
|
||||
return false
|
||||
}
|
||||
|
||||
fun getProduct(appIdentityMode: String): Product {
|
||||
val (bussness, _, _) = getInfo(appIdentityMode)
|
||||
return when (bussness) {
|
||||
TAXI -> Product.TAXI
|
||||
BUS -> Product.BUS
|
||||
SWEEPER -> Product.SWEEPER
|
||||
SHUTTLE -> Product.SHUTTLE
|
||||
CHARTER -> Product.CHARTER
|
||||
else -> Product.TAXI
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum class Product{
|
||||
BUS,TAXI,SWEEPER,SHUTTLE,CHARTER
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user