Merge remote-tracking branch 'origin/demo/shunyi_v2v_merge' into demo/shunyi_v2v_merge

# Conflicts:
#	modules/mogo-module-authorize/src/main/java/com/mogo/module/authorize/authprovider/launcher/MogoMainAuthorize.kt
#	modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java
#	services/mogo-service-api/src/main/java/com/mogo/service/IMogoServiceApis.java
#	services/mogo-service-api/src/main/java/com/mogo/service/MogoServicePaths.java
#	services/mogo-service/src/main/java/com/mogo/service/impl/MogoServiceApis.java
This commit is contained in:
wangcongtao
2020-09-10 16:32:43 +08:00
41 changed files with 2275 additions and 52 deletions

View File

@@ -8,6 +8,7 @@ import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
@@ -64,8 +65,10 @@ import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
import com.zhidao.manager.ts.TsThreshold;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
@@ -122,6 +125,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
private TextView mMsgCounter;
private ImageView mUserHeadImg;
private View thresholdSetContainer;
private EditText topEditC, frontLeftEditC, frontRightEditC, backLeftEditC, backRightEditC,
bottomEditC;
private EditText topEditS, frontLeftEditS, frontRightEditS, backLeftEditS, backRightEditS,
bottomEditS;
/**
* 搜索莫模块
@@ -320,6 +328,67 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
dealWeatherContainer();
debugTopView();
debugCrashWarn();
}
private void debugCrashWarn(){
thresholdSetContainer = findViewById(R.id.thresholdSetContainer);
topEditC = findViewById(R.id.etTopC);
frontLeftEditC = findViewById(R.id.etFrontLeftC);
backLeftEditC = findViewById(R.id.etBackLeftC);
frontRightEditC = findViewById(R.id.etFrontRightC);
backRightEditC = findViewById(R.id.etBackRightC);
bottomEditC = findViewById(R.id.etBottomC);
topEditS = findViewById(R.id.etTopS);
frontLeftEditS = findViewById(R.id.etFrontLeftS);
backLeftEditS = findViewById(R.id.etBackLeftS);
frontRightEditS = findViewById(R.id.etFrontRightS);
backRightEditS = findViewById(R.id.etBackRightS);
bottomEditS = findViewById(R.id.etBottomS);
findViewById(R.id.btnClose).setOnClickListener(view -> {
thresholdSetContainer.setVisibility(View.GONE);
mApis.getAdasControllerApi().showADAS();
});
mUploadRoadCondition.setOnLongClickListener(v -> {
mApis.getAdasControllerApi().closeADAS();
thresholdSetContainer.setVisibility(View.VISIBLE);
TsThreshold threshold = mApis.getCrashWarnProvider().getCurrentCrashThreshold();
topEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC5()));
topEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS5()));
bottomEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC6()));
bottomEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS6()));
frontLeftEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC4()));
frontLeftEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS4()));
backLeftEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC3()));
backLeftEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS3()));
frontRightEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC1()));
frontRightEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS1()));
backRightEditC.setText(String.format(Locale.CHINA, "%d", threshold.getC2()));
backRightEditS.setText(String.format(Locale.CHINA, "%d", threshold.getS2()));
return true;
});
findViewById(R.id.btnSet).setOnClickListener(view -> {
// 设置阈值
TsThreshold threshold = new TsThreshold(
Integer.parseInt(frontRightEditC.getText().toString()),
Integer.parseInt(frontRightEditS.getText().toString()),
Integer.parseInt(backRightEditC.getText().toString()),
Integer.parseInt(backRightEditS.getText().toString()),
Integer.parseInt(backLeftEditC.getText().toString()),
Integer.parseInt(backLeftEditS.getText().toString()),
Integer.parseInt(frontLeftEditC.getText().toString()),
Integer.parseInt(frontLeftEditS.getText().toString()),
Integer.parseInt(topEditC.getText().toString()),
Integer.parseInt(topEditS.getText().toString()),
Integer.parseInt(bottomEditC.getText().toString()),
Integer.parseInt(bottomEditS.getText().toString())
);
mApis.getCrashWarnProvider().setCrashThreshold(threshold);
thresholdSetContainer.setVisibility(View.GONE);
mApis.getAdasControllerApi().showADAS();
});
}
/**