diff options
author | 2019-05-31 17:38:58 +0900 | |
---|---|---|
committer | 2019-05-31 17:38:58 +0900 | |
commit | a9c3db6bb81d56ff742fe1f40c97a0819cd2bf9a (patch) | |
tree | 67868121221645c2b40537a472e00402a8f12f62 /app | |
parent | 59403c455a7ae2a5bd8d295aaf53a203d9a926e4 (diff) |
change navigation to fullscreen
Diffstat (limited to 'app')
-rw-r--r-- | app/main.cpp | 8 | ||||
-rwxr-xr-x | app/navigation.qml | 22 |
2 files changed, 17 insertions, 13 deletions
diff --git a/app/main.cpp b/app/main.cpp index ea3c7a4..798e621 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -116,8 +116,12 @@ int main(int argc, char *argv[]) QLibHomeScreen* qhsHandler = new QLibHomeScreen(); qhsHandler->init(port, secret.toStdString().c_str()); qhsHandler->set_event_handler(QLibHomeScreen::Event_TapShortcut, [qwmHandler, myname](json_object *object){ - qDebug("Surface %s got tapShortcut\n", qPrintable(myname)); - qwmHandler->activateWindow(myname); + json_object *para, *area; + json_object_object_get_ex(object, "parameter", ¶); + json_object_object_get_ex(para, "area", &area); + const char *displayArea = json_object_get_string(area); + qDebug("Surface Navigation got tapShortcut, area: %s \n", displayArea); + qwmHandler->activateWindow(myname, QString(QLatin1String(displayArea))); }); // Load qml diff --git a/app/navigation.qml b/app/navigation.qml index fe253cf..262a1ff 100755 --- a/app/navigation.qml +++ b/app/navigation.qml @@ -104,14 +104,14 @@ ApplicationWindow { map.doPauseSimulationSlot() } else if(message_json[2].event === event_gps){ - console.log ("navi:Receive Event======event_gps") + //console.log ("navi:Receive Event======event_gps") var lat = message_json[2].data.latitude var lon = message_json[2].data.longitude - console.log ("navi:Receive Event lat====== " + lat+" "+"lon======"+lon) + //console.log ("navi:Receive Event lat====== " + lat+" "+"lon======"+lon) map.currentpostion = QtPositioning.coordinate(lat, lon); - console.log ("navi:last_car_pos_lat====== " + last_car_pos_lat+" "+"last_car_pos_lon======"+last_car_pos_lon) + //console.log ("navi:last_car_pos_lat====== " + last_car_pos_lat+" "+"last_car_pos_lon======"+last_car_pos_lon) car_driving_distance = map.calculateDistance(last_car_pos_lat,last_car_pos_lon,lat,lon) - console.log("navi:car_driving_distance ====== "+car_driving_distance) + //console.log("navi:car_driving_distance ====== "+car_driving_distance) last_car_pos_lat = lat last_car_pos_lon = lon @@ -125,7 +125,7 @@ ApplicationWindow { } else if(message_json[0] === msgid_enu.retok){ if (message_json[2].request.info === verb_getcurretpos){ - console.log("navi:Callback Response ====== verb_getcurretpos") + //console.log("navi:Callback Response ====== verb_getcurretpos") var currentlat = message_json[2].response[0].CurrentLatitude var currentlon = message_json[2].response[0].CurrentLongitude // var currentheading = message_json[2].response[0].CurrentHeading @@ -707,8 +707,8 @@ ApplicationWindow { } function updatePositon() { - console.log("navi: pathcounter = "+pathcounter+" path.length = "+routeModel.get(0).path.length) - console.log("navi: segmentcounter = "+segmentcounter+" segments.length = "+routeModel.get(0).segments.length) + //console.log("navi: pathcounter = "+pathcounter+" path.length = "+routeModel.get(0).path.length) + //console.log("navi: segmentcounter = "+segmentcounter+" segments.length = "+routeModel.get(0).segments.length) if(pathcounter <= routeModel.get(0).path.length - 1){ // calculate distance var next_distance = calculateDistance(map.currentpostion.latitude, @@ -729,7 +729,7 @@ ApplicationWindow { routeModel.get(0).segments[segmentcounter].path[0].latitude, routeModel.get(0).segments[segmentcounter].path[0].longitude); - console.log("navi:next_distance="+next_distance+" next_direction"+next_direction+" next_cross_distance"+next_cross_distance) + //console.log("navi:next_distance="+next_distance+" next_direction"+next_direction+" next_cross_distance"+next_cross_distance) // map rotateAnimation cntrol if(root.st_heading_up) { @@ -747,7 +747,7 @@ ApplicationWindow { is_rotating = 360 - is_rotating; } - console.log("navi:is_rotating========= "+ is_rotating) + //console.log("navi:is_rotating========= "+ is_rotating) // rotation angle case if(is_rotating > 180){ @@ -790,7 +790,7 @@ ApplicationWindow { { // car_accumulated_distance += next_distance // do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,car_accumulated_distance) - console.log("lqy:pathcounter ======" + pathcounter) + //("lqy:pathcounter ======" + pathcounter) // console.log("lqy:routeModel.get(0).path.length - 1 ======" + routeModel.get(0).path.length - 1) if(pathcounter < routeModel.get(0).path.length - 1){ pathcounter++ @@ -811,7 +811,7 @@ ApplicationWindow { // do_setdemorouteinfo(map.currentpostion.latitude, map.currentpostion.longitude,next_direction,car_accumulated_distance) } - console.log("navi:car_accumulated_distance======" + car_accumulated_distance) + //console.log("navi:car_accumulated_distance======" + car_accumulated_distance) car_accumulated_distance += car_driving_distance do_setdemorouteinfo(map.currentpostion.latitude,map.currentpostion.longitude,next_direction,next_cross_distance) |