Commit 50f4cc40b2573eba4b74ab76331462c12be077c0
1 parent
4346a31e
1 修改打点相关逻辑
Showing
4 changed files
with
7 additions
and
5 deletions
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningMapFragmentView.java
| @@ -309,8 +309,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener | @@ -309,8 +309,8 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener | ||
| 309 | private int updataCanTakePointCount() { | 309 | private int updataCanTakePointCount() { |
| 310 | //获取用户可打点的数量 | 310 | //获取用户可打点的数量 |
| 311 | int canTakePointCount = CollStepUtil.getCollImportPointSize(getContext(), CollCommonInfo.getUserId(getContext())); | 311 | int canTakePointCount = CollStepUtil.getCollImportPointSize(getContext(), CollCommonInfo.getUserId(getContext())); |
| 312 | - if (canTakePointCount < 98) { | ||
| 313 | - canTakePointCount = 98 - canTakePointCount; | 312 | + if (canTakePointCount < Constant.TAKE_POINT_MAX_SIZE) { |
| 313 | + canTakePointCount = Constant.TAKE_POINT_MAX_SIZE - canTakePointCount; | ||
| 314 | } else { | 314 | } else { |
| 315 | canTakePointCount = 0; | 315 | canTakePointCount = 0; |
| 316 | } | 316 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/utils/CollStepUtil.java
| @@ -6,6 +6,7 @@ import android.util.Log; | @@ -6,6 +6,7 @@ import android.util.Log; | ||
| 6 | 6 | ||
| 7 | import com.baidu.mapapi.model.LatLng; | 7 | import com.baidu.mapapi.model.LatLng; |
| 8 | import com.cnlive.moudle.collectionTrace.model.CollectPoint; | 8 | import com.cnlive.moudle.collectionTrace.model.CollectPoint; |
| 9 | +import com.cnlive.moudle.pedometer.model.Constant; | ||
| 9 | import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; | 10 | import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao; |
| 10 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; | 11 | import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; |
| 11 | import com.cnlive.moudle.pedometer.sql.db.DbCore; | 12 | import com.cnlive.moudle.pedometer.sql.db.DbCore; |
| @@ -190,10 +191,10 @@ public class CollStepUtil { | @@ -190,10 +191,10 @@ public class CollStepUtil { | ||
| 190 | } | 191 | } |
| 191 | } | 192 | } |
| 192 | } | 193 | } |
| 193 | - return 98; | 194 | + return Constant.TAKE_POINT_MAX_SIZE; |
| 194 | } catch (Exception e) { | 195 | } catch (Exception e) { |
| 195 | Log.e(TAG, "getCollImportPointSize: " + e.getMessage()); | 196 | Log.e(TAG, "getCollImportPointSize: " + e.getMessage()); |
| 196 | - return 98; | 197 | + return Constant.TAKE_POINT_MAX_SIZE; |
| 197 | } | 198 | } |
| 198 | 199 | ||
| 199 | } | 200 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/Constant.java
| @@ -36,4 +36,5 @@ public class Constant { | @@ -36,4 +36,5 @@ public class Constant { | ||
| 36 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 | 36 | public static final int LOCA_START_POINT_ACCURACY = 20;//起点位置比较精度 |
| 37 | public static final int FENCE_OFFSET = 70;//围栏偏离距离 | 37 | public static final int FENCE_OFFSET = 70;//围栏偏离距离 |
| 38 | public static final int FENCE_DENOISE = 70;//围栏去噪精度 | 38 | public static final int FENCE_DENOISE = 70;//围栏去噪精度 |
| 39 | + public static final int TAKE_POINT_MAX_SIZE = 100;//最大打点数量 | ||
| 39 | } | 40 | } |