fix: 合并主线代码
This commit is contained in:
parent
038947fc42
commit
8a3ccbd0f5
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,4 +14,5 @@
|
|||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
app/release/
|
app/release/
|
||||||
ocr/build
|
app/build/
|
||||||
|
ocr/build/
|
||||||
@ -105,6 +105,7 @@ import java.io.File;
|
|||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -437,36 +438,37 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
|
|
||||||
pictureResultFlowable.subscribeOn(Schedulers.io()) // 指定上游为IO线程
|
pictureResultFlowable.subscribeOn(Schedulers.io()) // 指定上游为IO线程
|
||||||
.observeOn(Schedulers.io())
|
.observeOn(Schedulers.io())
|
||||||
.doOnNext(new Consumer<Map<String, Object>>() {
|
.doOnNext(new io.reactivex.functions.Consumer<Map<String, Object>>() {
|
||||||
@Override
|
|
||||||
public void accept(Map<String, Object> map) throws Exception {
|
|
||||||
int fileIndex = (int) map.get("index");
|
|
||||||
PictureResult pictureResult = (PictureResult) map.get("picture");
|
|
||||||
// 图片和paper.txt处理
|
|
||||||
File currentFile = new File(paperFile.getParentFile().getAbsolutePath() + "/" + fileIndex + ".webp");
|
|
||||||
CameraUtils.writeToFile(pictureResult.getData(), currentFile); // 生成照片文件
|
|
||||||
// 记录当前点位信息
|
|
||||||
LocationRecorder recorder = new LocationRecorder();
|
|
||||||
recorder.setTime(System.currentTimeMillis());
|
|
||||||
// 记录主定位方式
|
|
||||||
recorder.setTencentLocationX(LocationLifeCycle.getInstance().getMainLocation().getLongitude());
|
|
||||||
recorder.setTencentLocationY(LocationLifeCycle.getInstance().getMainLocation().getLatitude());
|
|
||||||
// 记录辅助定位方式
|
|
||||||
MyLocation gpsLocation = LocationLifeCycle.getInstance().getReferenceLocation();
|
|
||||||
if (gpsLocation!=null) {
|
|
||||||
recorder.setGpsLocationX(gpsLocation.getLongitude());
|
|
||||||
recorder.setGpsLocationY(gpsLocation.getLatitude());
|
|
||||||
}
|
|
||||||
recorder.setBearing(LocationLifeCycle.getInstance().getMainLocation().getBearing());
|
|
||||||
recorder.setRssi(GPSUtils.getInstance(PicturesActivity.this).getSateliteCount());
|
|
||||||
recorder.setSatelliteCount(GPSUtils.getInstance(PicturesActivity.this).getSateliteCount());
|
|
||||||
FileUtils.writeFile(paperFile.getAbsolutePath(), recorder.toString(formatter, fileIndex), true);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
|
||||||
.doOnNext(new Consumer<Map>() {
|
|
||||||
@Override
|
@Override
|
||||||
public void accept(Map map) throws Exception {
|
public void accept(Map<String, Object> map) throws Exception {
|
||||||
|
|
||||||
|
int fileIndex = (int) map.get("index");
|
||||||
|
PictureResult pictureResult = (PictureResult) map.get("picture");
|
||||||
|
// 图片和paper.txt处理
|
||||||
|
File currentFile = new File(paperFile.getParentFile().getAbsolutePath() + "/" + fileIndex + ".webp");
|
||||||
|
CameraUtils.writeToFile(pictureResult.getData(), currentFile); // 生成照片文件
|
||||||
|
// 记录当前点位信息
|
||||||
|
LocationRecorder recorder = new LocationRecorder();
|
||||||
|
recorder.setTime(System.currentTimeMillis());
|
||||||
|
// 记录主定位方式
|
||||||
|
recorder.setTencentLocationX(LocationLifeCycle.getInstance().getMainLocation().getLongitude());
|
||||||
|
recorder.setTencentLocationY(LocationLifeCycle.getInstance().getMainLocation().getLatitude());
|
||||||
|
// 记录辅助定位方式
|
||||||
|
MyLocation gpsLocation = LocationLifeCycle.getInstance().getReferenceLocation();
|
||||||
|
if (gpsLocation!=null) {
|
||||||
|
recorder.setGpsLocationX(gpsLocation.getLongitude());
|
||||||
|
recorder.setGpsLocationY(gpsLocation.getLatitude());
|
||||||
|
}
|
||||||
|
recorder.setBearing(LocationLifeCycle.getInstance().getMainLocation().getBearing());
|
||||||
|
recorder.setRssi(GPSUtils.getInstance(PicturesActivity.this).getSateliteCount());
|
||||||
|
recorder.setSatelliteCount(GPSUtils.getInstance(PicturesActivity.this).getSateliteCount());
|
||||||
|
FileUtils.writeFile(paperFile.getAbsolutePath(), recorder.toString(formatter, fileIndex), true);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.doOnNext(new io.reactivex.functions.Consumer<Map<String, Object>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Map<String, Object> map) {
|
||||||
// 绘制图标
|
// 绘制图标
|
||||||
initMarker(booleanExtra);
|
initMarker(booleanExtra);
|
||||||
// 设置主界面拍照个数显示
|
// 设置主界面拍照个数显示
|
||||||
@ -1481,7 +1483,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
} else {
|
} else {
|
||||||
disposable = Observable.interval(1000L, TimeUnit.MILLISECONDS, Schedulers.io())
|
disposable = Observable.interval(1000L, TimeUnit.MILLISECONDS, Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<Long>() {
|
.subscribe(new io.reactivex.functions.Consumer<Long>() {
|
||||||
@Override
|
@Override
|
||||||
public void accept(Long aLong) throws Exception {
|
public void accept(Long aLong) throws Exception {
|
||||||
camera.takePictureSnapshot();
|
camera.takePictureSnapshot();
|
||||||
|
|||||||
2
ocr/.gitignore
vendored
2
ocr/.gitignore
vendored
@ -1 +1 @@
|
|||||||
/build
|
build
|
||||||
@ -1 +0,0 @@
|
|||||||
i/
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/debug
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
i/
|
|
||||||
@ -1 +0,0 @@
|
|||||||
i/
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/debug
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/debug
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/release
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/debug
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/release
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user