aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-21 10:17:55 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2019-06-21 10:18:02 +0900
commited2c6515f302187f990bb2db287dc17d00369c44 (patch)
tree7a01b3bb9e8795058bd337cc86c3af0ad7f523cb
parent9a7c493a0b43643f9a6dfe6fbc414219c06b9f4f (diff)
moidfy bug for redmine 5134,0614:No.7 and No.8
-rw-r--r--.gitignore127
-rwxr-xr-xapp/navigation.qml82
2 files changed, 170 insertions, 39 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..121b920
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,127 @@
+# manually added:
+.DS_Store
+
+# Created by https://www.gitignore.io/api/linux,qt,c,c++
+
+### Linux ###
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+
+### Qt ###
+# C++ objects and libs
+
+*.slo
+*.lo
+*.o
+*.a
+*.la
+*.lai
+*.so
+*.dll
+*.dylib
+
+# Qt-es
+
+/.qmake.cache
+/.qmake.stash
+*.pro.user
+*.pro.user.*
+*.qbs.user
+*.qbs.user.*
+*.moc
+moc_*.cpp
+qrc_*.cpp
+ui_*.h
+Makefile*
+*build-*
+
+# QtCreator
+
+*.autosave
+
+# QtCtreator Qml
+*.qmlproject.user
+*.qmlproject.user.*
+
+# QtCtreator CMake
+CMakeLists.txt.user
+
+
+
+### C ###
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+
+
+### C++ ###
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+build/
+
+
diff --git a/app/navigation.qml b/app/navigation.qml
index ac74468..fc5ef3a 100755
--- a/app/navigation.qml
+++ b/app/navigation.qml
@@ -1011,46 +1011,48 @@ ApplicationWindow {
// map rotateAnimation cntrol
if(root.st_heading_up) {
- var is_rotating = 0;
- var cur_direction = Math.floor(map.bearing);
+ if(btn_present_position.state === "Flowing"){
+ var is_rotating = 0;
+ var cur_direction = Math.floor(map.bearing);
- // check is_rorating
- if(cur_direction > Math.floor(next_direction)){
- is_rotating = Math.floor(cur_direction - next_direction);
- }else{
- is_rotating = Math.floor(next_direction - cur_direction);
- }
+ // check is_rorating
+ if(cur_direction > Math.floor(next_direction)){
+ is_rotating = Math.floor(cur_direction - next_direction);
+ }else{
+ is_rotating = Math.floor(next_direction - cur_direction);
+ }
- if(is_rotating > 180){
- is_rotating = 360 - is_rotating;
- }
+ if(is_rotating > 180){
+ is_rotating = 360 - is_rotating;
+ }
- // rotation angle case
- if(is_rotating > 180){
- // driving stop hard turn
- root.car_moving_distance = 0;
- rot_anim.duration = 1600;
- rot_anim.easing.type = Easing.OutQuint;
- } else if(is_rotating > 90){
- // driving stop normal turn
- root.car_moving_distance = 0;
- rot_anim.duration = 800;
- rot_anim.easing.type = Easing.OutQuart;
- } else if(is_rotating > 60){
- // driving slow speed normal turn
- root.car_moving_distance = ((car_driving_speed / 3.6) / (1000/positionTimer_interval)) * 0.3;
- rot_anim.duration = 400;
- rot_anim.easing.type = Easing.OutCubic;
- } else if(is_rotating > 30){
- // driving half speed soft turn
- root.car_moving_distance = ((car_driving_speed / 3.6) / (1000/positionTimer_interval)) * 0.5;
- rot_anim.duration = 300;
- rot_anim.easing.type = Easing.OutQuad;
- } else {
- // driving nomal speed soft turn
- root.car_moving_distance = (car_driving_speed / 3.6) / (1000/positionTimer_interval);
- rot_anim.duration = 200;
- rot_anim.easing.type = Easing.OutQuad;
+ // rotation angle case
+ if(is_rotating > 180){
+ // driving stop hard turn
+ root.car_moving_distance = 0;
+ rot_anim.duration = 1600;
+ rot_anim.easing.type = Easing.OutQuint;
+ } else if(is_rotating > 90){
+ // driving stop normal turn
+ root.car_moving_distance = 0;
+ rot_anim.duration = 800;
+ rot_anim.easing.type = Easing.OutQuart;
+ } else if(is_rotating > 60){
+ // driving slow speed normal turn
+ root.car_moving_distance = ((car_driving_speed / 3.6) / (1000/positionTimer_interval)) * 0.3;
+ rot_anim.duration = 400;
+ rot_anim.easing.type = Easing.OutCubic;
+ } else if(is_rotating > 30){
+ // driving half speed soft turn
+ root.car_moving_distance = ((car_driving_speed / 3.6) / (1000/positionTimer_interval)) * 0.5;
+ rot_anim.duration = 300;
+ rot_anim.easing.type = Easing.OutQuad;
+ } else {
+ // driving nomal speed soft turn
+ root.car_moving_distance = (car_driving_speed / 3.6) / (1000/positionTimer_interval);
+ rot_anim.duration = 200;
+ rot_anim.easing.type = Easing.OutQuad;
+ }
}
}else{
// NorthUp
@@ -1075,7 +1077,7 @@ ApplicationWindow {
{
map.currentpostion = routeModel.get(0).path[pathcounter]
car_accumulated_distance += next_distance
- do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,car_accumulated_distance)
+ do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,next_cross_distance)
if(pathcounter < routeModel.get(0).path.length - 1){
pathcounter++
}
@@ -1084,13 +1086,15 @@ ApplicationWindow {
// Arrive at your destination
btn_guidance.sts_guide = 0
do_arrivedest()
+ arrived.visible = true
+ dialogtimer.start()
}
}else{
setNextCoordinate(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,root.car_moving_distance)
if(pathcounter != 0){
car_accumulated_distance += root.car_moving_distance
}
- do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,car_accumulated_distance)
+ do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,next_cross_distance)
}
if(btn_present_position.state === "Flowing")