油门刹车数据获取供bus使用

This commit is contained in:
liujing
2022-07-27 11:47:02 +08:00
parent bfe95019a4
commit 6717ca1c33
4 changed files with 43 additions and 1 deletions

View File

@@ -118,7 +118,7 @@ public class MoGoHandAdasMsgManager implements
if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示
if (gnssInfo != null) {
//设置刹车信息
if (gnssInfo.getAcceleration() < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD,-2.5F)) {
if (gnssInfo.getAcceleration() < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5F)) {
brakeLight = 1;
} else {
brakeLight = 0;
@@ -132,6 +132,7 @@ public class MoGoHandAdasMsgManager implements
/**
* 车辆方向盘转向角回调
*
* @param steering 方向盘转向角
*/
@Override
@@ -141,6 +142,7 @@ public class MoGoHandAdasMsgManager implements
/**
* 车辆挂挡档位
*
* @param gear 档位
*/
@Override

View File

@@ -141,6 +141,16 @@ public class TrafficDataView extends ConstraintLayout {
String accStr = myformat.format(carAcc);
accTextView.setText("a: " + accStr);
}
@Override
public void onAutopilotBrake(float brake) {
Log.d(TAG, "刹车:" + String.valueOf(brake));
}
@Override
public void onAutopilotThrottle(float throttle) {
Log.d(TAG, "油门:" + String.valueOf(throttle));
}
};
/**