Merge branch 'll' into dev_robotaxi-d-app-module_290_220715_2.9.0
This commit is contained in:
@@ -4,7 +4,6 @@ import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -21,8 +20,6 @@ import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import chassis.Chassis;
|
||||
|
||||
/**
|
||||
@@ -139,20 +136,29 @@ public class TrafficDataView extends ConstraintLayout {
|
||||
Log.d(TAG, "司机屏加速度:" + carAcc);
|
||||
java.text.DecimalFormat myformat = new java.text.DecimalFormat("0.00");
|
||||
String accStr = myformat.format(carAcc);
|
||||
accTextView.setText("a: " + accStr);
|
||||
accTextView.setText("a: " + String.valueOf(accStr));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotBrake(float brake) {
|
||||
Log.d(TAG, "刹车:" + String.valueOf(brake));
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
if (brake > 0){
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_brake);
|
||||
}else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotThrottle(float throttle) {
|
||||
Log.d(TAG, "油门:" + String.valueOf(throttle));
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
|
||||
if (throttle > 0){
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_accelerator);
|
||||
}else {
|
||||
brakeStatus.setImageResource(R.drawable.traffic_data_empty);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user