app/src/main/java/safeluck/drive/evaluation/adapter/SimpleFragmentAdapter.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/app.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/FtpConfigFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/fragment/RTKConfigFragment.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/layout_rtk_setting.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/build.gradle | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/native-lib.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/test_items/park_bottom.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/test_items/park_edge.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/src/main/cpp/test_items/turn_a90.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
app/src/main/java/safeluck/drive/evaluation/adapter/SimpleFragmentAdapter.java
@@ -9,7 +9,7 @@ import me.yokeyword.fragmentation.SupportFragment; import safeluck.drive.evaluation.fragment.BaseDatasFragment; import safeluck.drive.evaluation.fragment.FtpConfigFragment; import safeluck.drive.evaluation.fragment.RTKConfigFragment; import safeluck.drive.evaluation.fragment.JiaXiaoFragment; @@ -34,7 +34,7 @@ supportFragment = BaseDatasFragment.newInstance(); break; case 1: supportFragment = FtpConfigFragment.newInstance(); supportFragment = RTKConfigFragment.newInstance(); //ftp break; case 2: app/src/main/java/safeluck/drive/evaluation/app.java
@@ -18,8 +18,12 @@ import com.google.gson.Gson; import org.json.JSONException; import org.json.JSONObject; import safeluck.drive.evaluation.DB.failitems.FailedProj; import safeluck.drive.evaluation.DB.failitems.FailedProjRepository; import safeluck.drive.evaluation.bean.RTKConfig; import safeluck.drive.evaluation.cEventCenter.CEventCenter; import safeluck.drive.evaluation.util.FileUtil; import safeluck.drive.evaluation.util.SystemUtil; @@ -34,7 +38,7 @@ private static final String TAG = "app"; private Gson gson; RTKConfig rtkConfig; @Override public void onCreate() { super.onCreate(); @@ -56,6 +60,18 @@ Log.i(TAG, "onCreate: "); MyLog.createIfNotExist(); Stetho.initializeWithDefaults(this); //RTK配置信息 rtkConfig = new RTKConfig(); rtkConfig.setCity(12); rtkConfig.setImei("460123874561"); rtkConfig.setInterval(1); rtkConfig.setIp("47.93.80.84"); rtkConfig.setModel("123"); rtkConfig.setPhone("2019101500000001"); rtkConfig.setPort(12125); rtkConfig.setProvince(23); rtkConfig.setSn("2019101500000001"); } } @@ -80,10 +96,25 @@ case Constant.NDK_START: Toast.makeText(this, "NDK start", Toast.LENGTH_SHORT).show(); break; case Constant.RTK_PLATFORM_REGISTER_STATUS: try { JSONObject jsonObject = new JSONObject(); int reg_code = jsonObject.getInt("register_code"); String rtkLoginPwd = jsonObject.getString("password"); rtkConfig.setPassword(rtkLoginPwd); rtkConfig.setRegistered(reg_code); } catch (JSONException e) { e.printStackTrace(); } break; case Constant.RTK_PLATFORM_REGISTER_RESULT: break; case Constant.FETCH_RTK_PLATFORM_INFO: StringBuffer stringBuffer = FileUtil.readAssetTxtFile(getApplicationContext(),Constant.RTK_CONFIG_JSON); MyLog.i(TAG, "RTK配置信息:"+stringBuffer.toString()); AYSdk.getInstance().sendCmd(Constant.PUSH_RTK_PLATFORM_INFO,stringBuffer.toString()); if (gson == null){ gson = new Gson(); } MyLog.i(TAG, "RTK配置信息:"+gson.toJson(rtkConfig)); AYSdk.getInstance().sendCmd(Constant.PUSH_RTK_PLATFORM_INFO,gson.toJson(rtkConfig)); break; case Constant.JUDGE_INFO: FailedProjRepository failedProjRepository = new FailedProjRepository(this); app/src/main/java/safeluck/drive/evaluation/fragment/FtpConfigFragment.java
File was deleted app/src/main/java/safeluck/drive/evaluation/fragment/RTKConfigFragment.java
New file @@ -0,0 +1,56 @@ package safeluck.drive.evaluation.fragment; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import com.google.gson.Gson; import me.yokeyword.fragmentation.SupportFragment; import safeluck.drive.evaluation.R; import safeluck.drive.evaluation.bean.RTKConfig; /**FTP配置UI * MyApplication2 * Created by lzw on 2019/3/20. 11:22:39 * 邮箱:632393724@qq.com * All Rights Saved! Chongqing AnYun Tech co. LTD */ public class RTKConfigFragment extends SupportFragment implements View.OnClickListener { private static final String TAG = "RTKConfigFragment"; private EditText et_ip,et_port,et_city_id,et_city_province,et_phone; public static SupportFragment newInstance(){ return new RTKConfigFragment(); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.layout_rtk_setting,container,false); initView(view); return view; } private void initView(View view) { view.findViewById(R.id.btn_save_rtk).setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.btn_save_rtk: Gson gson = new Gson(); String rtkConfigjson = gson.toJson(RTKConfig.class); break; } } } app/src/main/res/layout/layout_rtk_setting.xml
File was renamed from app/src/main/res/layout/layout_ftp_setting.xml @@ -78,6 +78,18 @@ android:text="192" android:inputType="numberDecimal" android:background="@android:drawable/editbox_background_normal"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="电话:"/> <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/et_phone" android:text="19234567894" android:inputType="numberDecimal" android:background="@android:drawable/editbox_background_normal"/> </LinearLayout> <View android:layout_width="match_parent" lib/build.gradle
@@ -14,7 +14,7 @@ externalNativeBuild { cmake { cppFlags "" cppFlags "-std=c++11 -frtti -fexceptions" } } ndk { lib/src/main/cpp/native-lib.cpp
@@ -2,6 +2,7 @@ #include <string> #include <pthread.h> #include <unistd.h> #include <cstdlib> #include "common/serial_port.h" #include "jni_log.h" #include "common/net.h" lib/src/main/cpp/test_items/park_bottom.cpp
@@ -9,6 +9,7 @@ #include "../jni_log.h" #include "../driver_test.h" #include <vector> #include <cstdlib> #define DEBUG(fmt, args...) LOGD("<park_bottom> <%s>: " fmt, __func__, ##args) lib/src/main/cpp/test_items/park_edge.cpp
@@ -9,6 +9,7 @@ #include "../native-lib.h" #include <vector> #include <cstdlib> using namespace std; lib/src/main/cpp/test_items/turn_a90.cpp
@@ -9,6 +9,7 @@ #include "../jni_log.h" #include <vector> #include <cstdlib> #define DEBUG(fmt, args...) LOGD("<turn_a90> <%s>: " fmt, __func__, ##args)