From ed2c6515f302187f990bb2db287dc17d00369c44 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Fri, 21 Jun 2019 10:17:55 +0900 Subject: moidfy bug for redmine 5134,0614:No.7 and No.8 --- .gitignore | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++ app/navigation.qml | 82 ++++++++++++++++++---------------- 2 files changed, 170 insertions(+), 39 deletions(-) create mode 100644 .gitignore 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") -- cgit 1.2.3-korg