刹车 油门视图呈现,无优先级,谁有返回值替换成谁

This commit is contained in:
liujing
2022-07-27 14:57:29 +08:00
parent 6717ca1c33
commit e21a4953ba
6 changed files with 60 additions and 1 deletions

View File

@@ -1959,7 +1959,21 @@ class DebugSettingView @JvmOverloads constructor(
* 车辆加速度
*/
override fun onAutopilotAcc(carAcc: Float) {
TODO("Not yet implemented")
}
/**
* 油门
*/
override fun onAutopilotThrottle(throttle: Float) {
}
/**
* 刹车
*/
override fun onAutopilotBrake(brake: Float) {
}
/**

View File

@@ -158,6 +158,22 @@ public class SteeringWheelView extends ConstraintLayout {
private final IMoGoAutopilotVehicleStateListener mIMoGoAutopilotVehicleStateListener = new IMoGoAutopilotVehicleStateListener() {
/**
* @param brake 刹车
*/
@Override
public void onAutopilotBrake(float brake) {
}
/**
* @param throttle 油门
*/
@Override
public void onAutopilotThrottle(float throttle) {
}
/**
* 车辆转向灯
* @param lightSwitch

View File

@@ -145,11 +145,13 @@ public class TrafficDataView extends ConstraintLayout {
@Override
public void onAutopilotBrake(float brake) {
Log.d(TAG, "刹车:" + String.valueOf(brake));
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
}
@Override
public void onAutopilotThrottle(float throttle) {
Log.d(TAG, "油门:" + String.valueOf(throttle));
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
}
};