diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2017-01-30 17:11:58 +0100 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2017-01-30 17:11:58 +0100 |
commit | 18c7c66f46f9a3a0e40b1a55113ae7283d4ea2ff (patch) | |
tree | e22a7db650a41100b4f40e68fed4a1aebb327468 | |
parent | 428cbc4d65b30a9f28017021f78d2b2d4c905a29 (diff) | |
download | navigation-18c7c66f46f9a3a0e40b1a55113ae7283d4ea2ff.tar.gz |
some improvement of the HMI and bug fixed, add a reference HMI
23 files changed, 166 insertions, 790 deletions
diff --git a/doc/fuel-stop-advisor/menu.md b/doc/fuel-stop-advisor/menu.md index 72808fe..b52879b 100644 --- a/doc/fuel-stop-advisor/menu.md +++ b/doc/fuel-stop-advisor/menu.md @@ -58,6 +58,7 @@ BACK --> back to NavigationAppSearch ###NavigationAppSettingsLanguageAndUnits ![NavigationAppSettingsLanguageAndUnits](NavigationAppSettingsLanguageAndUnits.png) +Rationale: To select language and units Actions: LANG --> select the language @@ -66,6 +67,7 @@ BACK --> back to NavigationAppSettings ###NavigationAppSettingsPreferences ![NavigationAppSettingsPreferences](NavigationAppSettingsPreferences.png) +Rationale: To select preferences for route calculation Actions: COST --> select cost model @@ -74,6 +76,7 @@ BACK --> back to NavigationAppSettings ###NavigationAppSearch ![NavigationAppSearch](NavigationAppSearch.png) +Rationale: To enter a location by a keyboard To launch a route calculation To launch a guidance and go to the map viewer menu @@ -91,8 +94,24 @@ BACK --> back to NavigationAppMain ###NavigationAppBrowseMap ![NavigationAppBrowseMap](NavigationAppBrowseMap.png) +Rationale: +Actions: ![NavigationAppBrowseMap_Settings](NavigationAppBrowseMap_Settings.png) +Rationale: +To configure 2D/3D mode +Actions: +N/W/S/E --> change direction of the map view +2D/3D --> toggle between 2D and 3D map view +N/D --> toggle between night and day map view +TILTP/TILTM --> change tilt in 3D mode +HEIGHTP/HEIGHTM --> change height in 3D mode +DISTP/DISTM --> change distance of view in 3D mode +BACK --> hide the map view settings ![NavigationAppBrowseMapManeuvers](NavigationAppBrowseMapManeuvers.png) - +Rationale: +To display the next maneuvers on the route ahead +Actions: +ROLL --> navigate into the list +BACK --> hide the list of maneuvers
\ No newline at end of file diff --git a/src/build.sh b/src/build.sh index 550ab65..fbdff34 100755 --- a/src/build.sh +++ b/src/build.sh @@ -144,6 +144,7 @@ if [ "$theme" = 1 ] then echo 'generate the hmi for gdp theme' cd script + ./prepare.sh -c ./prepare.sh -i ../hmi/qml/Core/gimp/gdp-theme/800x480 cd ../ fi diff --git a/src/fuel-stop-advisor/fuel-stop-advisor.cpp b/src/fuel-stop-advisor/fuel-stop-advisor.cpp index 0a41286..60e244e 100644 --- a/src/fuel-stop-advisor/fuel-stop-advisor.cpp +++ b/src/fuel-stop-advisor/fuel-stop-advisor.cpp @@ -350,7 +350,7 @@ class FuelStopAdvisor return distance/1000+(remaining > 0 ? remaining:0); } - void update_data() + void updateData() { tripComputerInput_t tripComputerInput; DBus::Variant variant; @@ -506,10 +506,18 @@ static gboolean update_data(gpointer user_data) { FuelStopAdvisor *tc=(FuelStopAdvisor *)user_data; - tc->update_data(); + tc->updateData(); return TRUE; } +static gboolean +update_enhanced_distance(gpointer user_data) +{ + FuelStopAdvisor *tc=(FuelStopAdvisor *)user_data; + tc->updateEnhancedDistance(); + return TRUE; +} + int main(int argc, char **argv) { loop=g_main_loop_new(NULL, false); @@ -521,5 +529,6 @@ int main(int argc, char **argv) server=new FuelStopAdvisor(*conn); g_timeout_add(CTripComputer::SAMPLING_TIME*CTripComputer::CONVERT_SECOND_IN_MILLISECOND, update_data, server); - g_main_loop_run(loop); + g_timeout_add(CTripComputer::TANK_DISTANCE_REFRESH_TIME*CTripComputer::CONVERT_SECOND_IN_MILLISECOND, update_enhanced_distance, server); + g_main_loop_run(loop); } diff --git a/src/hmi/qml/Core/HMIBgImage.qml b/src/hmi/qml/Core/HMIBgImage.qml deleted file mode 100644 index 260f8ee..0000000 --- a/src/hmi/qml/Core/HMIBgImage.qml +++ /dev/null @@ -1,34 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file HMIBgImage.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller <martin.schaller@it-schaller.de> -* \author Philippe Colliot <philippe.colliot@mpsa.com> -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-05-08, Philippe Colliot, use of css file so change path of the image -* <date>, <name>, <description of change> -* -* @licence end@ -*/ -import QtQuick 2.1 - -BorderImage { - property string image; - source:"../"+image; - anchors { fill: parent; topMargin: parent.headlineHeight} -} diff --git a/src/hmi/qml/Core/HMIList.qml b/src/hmi/qml/Core/HMIList.qml deleted file mode 100644 index 30c21a8..0000000 --- a/src/hmi/qml/Core/HMIList.qml +++ /dev/null @@ -1,120 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file HMIList.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller <martin.schaller@it-schaller.de> -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* <date>, <name>, <description of change> -* -* @licence end@ -*/ -import QtQuick 2.1 - -Rectangle { - id:rectangle - property alias delegate: view.delegate - property alias model: view.model - property alias next: view.next - property alias prev: view.prev - signal selected(variant what) - color: "#141414" - - function takeFocus(dir) { - view.takeFocus(dir); - } - - ListView { - id:view - property Item prev - property Item next - property Item prevsave - property Item nextsave - highlightFollowsCurrentItem:false - property bool hasFocus:false - // interactive:false - signal mclicked() - anchors.fill: parent - model: ListModel{} - highlight: Rectangle { color: "lightsteelblue"; radius: 5 } - clip: true - - onMclicked: { - rectangle.selected(view.currentItem); - } - MouseArea { - anchors.fill: parent - onPressed: { - view.highlightFollowsCurrentItem=true; - view.currentIndex=view.indexAt(view.contentX+mouse.x,view.contentY+mouse.y); - } - onCanceled: { - view.currentIndex=-1; - } - onClicked: { - view.currentIndex=view.indexAt(view.contentX+mouse.x,view.contentY+mouse.y); - rectangle.selected(view.currentItem); - } - } - function takeFocus(dir) { - var max=view.model.count-1; - if (!hasFocus) { - forceActiveFocus(); - hasFocus=true; - nextsave=next; - prevsave=prev; - next=view; - prev=view; - highlightFollowsCurrentItem=true; - if (dir > 0) { - view.positionViewAtBeginning(); - currentIndex=0; - } else { - view.positionViewAtEnd(); - currentIndex=max; - } - return; - } - prev=view; - next=view; - if (dir > 0) { - if (currentIndex < max) { - currentIndex++; - return; - } - } else { - if (currentIndex > 0) { - currentIndex--; - return; - } - } - hasFocus=false; - highlightFollowsCurrentItem=false; - next=nextsave; - prev=prevsave; - if (dir > 0) - menu.focus_next(); - else - menu.focus_prev(); - } - - function giveFocus() { - currentIndex=-1; - } - } -} - diff --git a/src/hmi/qml/Core/HMIMenu.qml b/src/hmi/qml/Core/HMIMenu.qml deleted file mode 100644 index a1c23ca..0000000 --- a/src/hmi/qml/Core/HMIMenu.qml +++ /dev/null @@ -1,194 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file HMIMenu.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller <martin.schaller@it-schaller.de> -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* <date>, <name>, <description of change> -* -* @licence end@ -*/ -import QtQuick 2.1 -import "genivi.js" as Genivi; -import "style-sheets/style-constants.js" as Constants; -import lbs.plugin.wheelarea 1.0 - -Rectangle { - id: menu - property alias loader: pageLoader - property string pageBack - property Item next - property Item prev - color: "transparent" - focus: true - anchors.fill: parent - - KeyNavigation.tab:next - KeyNavigation.backtab:prev - - MouseArea { - acceptedButtons: Qt.MiddleButton - anchors.fill: parent - onClicked: { - var focus=find_focus(menu); - focus.mclicked(focus); - } - - } - - function focus_next() - { - var focus=find_focus(menu); - if (focus.next != focus && focus.giveFocus) - focus.giveFocus(); - do { - focus=focus.next; - } while (focus.disabled); - if (focus.takeFocus) { - focus.takeFocus(1); - } else { - focus.forceActiveFocus(); - } - } - - function focus_prev() - { - var focus=find_focus(menu); - if (focus.prev != focus && focus.giveFocus) - focus.giveFocus(); - do { - focus=focus.prev; - } while (focus.disabled); - if (focus.takeFocus) { - focus.takeFocus(-1); - } else { - focus.forceActiveFocus(); - } - } - - Keys.onBacktabPressed:{focus_prev();} - - Keys.onTabPressed:{focus_next();} - - WheelArea { - property real deltasum; - property real step: 120; - property real dir: 1; - anchors.fill: parent - onWheel: { - deltasum+=delta*dir; - //console.log(delta); - while (deltasum >= step) { - focus_next(); - deltasum-=step; - } - while (deltasum <= -step) { - focus_prev(); - deltasum+=step; - } - } - } - - property real wspc: 60 - property real hspc: 60 - - function w(cols) { - return ((menu.width - (cols+1)*wspc) / cols); - } - - function h(rows) { - return ((menu.height - (rows+1)*hspc) / rows); - } - - function find_focus(it) { - //console.log("testing "+it); - if (it.focus && it.next && it.prev) - return it; - for (var i = 0 ; i < it.children.length ; i++) { - var ret=find_focus(it.children[i]); - if (ret) - return ret; - } - //console.log("no focus found"); - return null; - } - - - Loader { - id: pageLoader - states: State { - name: "visible" - PropertyChanges { target: pageLoader; opacity: 1 } - } - transitions: Transition { - NumberAnimation { properties: "scale"; easing.type: "OutExpo"; duration: 200 } - NumberAnimation { properties: "opacity"; easing.type: "InQuad"; duration: 200 } - } - } - - function entryMenu(inmenu,outmenu) - { - Genivi.entrybackheapsize += 1; - Genivi.entryback[Genivi.entrybackheapsize] = outmenu.pagefile; - outmenu.state = "hidden"; - container.load(inmenu); - } - - function leaveMenu() - { - var outmenu=Genivi.entryback[Genivi.entrybackheapsize]; - Genivi.entrybackheapsize -= 1; - menu.state="hidden"; - container.load(outmenu); - } - - function routeMenu() - { //location entered, go to route menu and reinit the heap - menu.state="hidden"; - Genivi.entrybackheapsize = 1; - Genivi.entryback[Genivi.entrybackheapsize] = "MainMenu"; - container.load("NavigationRoute"); - } - - function mapMenu() - { //go to map view menu and reinit the heap - menu.state="hidden"; - Genivi.entrybackheapsize = 1; - Genivi.entryback[Genivi.entrybackheapsize] = "MainMenu"; - container.load("NavigationBrowseMap"); - } - - - function pageOpen(command) { - menu.state="hidden"; - container.load(command); - } - - states: State { - name: "hidden" - PropertyChanges { target: parent; opacity: 0 } - } - transitions: Transition { - NumberAnimation { properties: "scale"; easing.type: "OutExpo"; duration: 200 } - NumberAnimation { properties: "opacity"; easing.type: "InQuad"; duration: 200 } - } - - Component.onCompleted: { - console.log("Level: ",Genivi.entrybackheapsize," Menu: ",pagefile); - } -} diff --git a/src/hmi/qml/Core/NavigationAppHMIBgImage.qml b/src/hmi/qml/Core/NavigationAppHMIBgImage.qml index 260f8ee..d896a0c 100644 --- a/src/hmi/qml/Core/NavigationAppHMIBgImage.qml +++ b/src/hmi/qml/Core/NavigationAppHMIBgImage.qml @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MPL-2.0 * * -* \file HMIBgImage.qml +* \file NavigationAppHMIBgImage.qml * * \brief This file is part of the navigation hmi. * diff --git a/src/hmi/qml/Core/NavigationAppHMIList.qml b/src/hmi/qml/Core/NavigationAppHMIList.qml index 30c21a8..7460042 100644 --- a/src/hmi/qml/Core/NavigationAppHMIList.qml +++ b/src/hmi/qml/Core/NavigationAppHMIList.qml @@ -3,7 +3,7 @@ * SPDX-License-Identifier: MPL-2.0 * * -* \file HMIList.qml +* \file NavigationAppHMIList.qml * * \brief This file is part of the navigation hmi. * diff --git a/src/hmi/qml/Core/NavigationAppHMIMenu.qml b/src/hmi/qml/Core/NavigationAppHMIMenu.qml index 2ba3388..f47eae9 100644 --- a/src/hmi/qml/Core/NavigationAppHMIMenu.qml +++ b/src/hmi/qml/Core/NavigationAppHMIMenu.qml @@ -146,6 +146,7 @@ Rectangle { Genivi.entrybackheapsize += 1; Genivi.entryback[Genivi.entrybackheapsize] = outmenu.pagefile; outmenu.state = "hidden"; + Genivi.hookContext(); container.load(inmenu); } @@ -154,11 +155,14 @@ Rectangle { var outmenu=Genivi.entryback[Genivi.entrybackheapsize]; Genivi.entrybackheapsize -= 1; menu.state="hidden"; + Genivi.hookContext(); container.load(outmenu); } function pageOpen(command) { - menu.state="hidden"; + console.log("page open") + menu.state="hidden"; + Genivi.hookContext(); container.load(command); } diff --git a/src/hmi/qml/Core/StdButton.qml b/src/hmi/qml/Core/StdButton.qml index de8a629..724f6a0 100644 --- a/src/hmi/qml/Core/StdButton.qml +++ b/src/hmi/qml/Core/StdButton.qml @@ -31,12 +31,6 @@ import QtQuick 2.1 Button { width: content.w height: content.h - source:"images/button-keyboard.png"; - property string page + source:"images/button-keyboard.png"; //needed to avoid crash in dynamic creation of button in NavigationSettingsPreferences (to be fixed) explode: false - onClicked: { - if (page) { - pageOpen(page); - } - } } diff --git a/src/hmi/qml/Core/genivi-capi.js b/src/hmi/qml/Core/genivi-capi.js index 16bdf43..549ddfb 100644 --- a/src/hmi/qml/Core/genivi-capi.js +++ b/src/hmi/qml/Core/genivi-capi.js @@ -41,8 +41,9 @@ var g_poisearch_handle=["uint32",0]; var g_lang; var data=new Array; -data['destination']=new Array; -data['position']=new Array; +data['destination']=new Array; //the destination +data['position']=new Array; //a position +data['current_position']=new Array; //the current position var poi_data=new Array; var poi_id; @@ -52,9 +53,9 @@ var categoriesIdNameList; var translations=new Array; -var simulationPanelOnMapview=true;// simulation panel on map view by default +var simulationMode=true;// simulation mode on by default -var guidance_activated=false; //used by the HMI to directly go to map when guidance is on (reroute use case) +var guidance_activated=false; var route_calculated=false; var entryback = new Array; @@ -160,6 +161,11 @@ function dump(prefix,args) dump2(prefix,"",args); } +function hookContext() +{ + console.log("Routing: ",route_calculated," Guidance: ",guidance_activated); +} + //Manage the historyOfLastEnteredLocation function updateHistoryOfLastEnteredLocation(enteredLocation,enteredLat,enteredLon) { @@ -224,6 +230,11 @@ function gettext(arg) //----------------- Management of the DBus messages ----------------- +function hookMethod(arg) +{ + console.log("Method: ",arg); +} + // Send a dbus message to layer manager function lm_message(par, func, args) { @@ -234,28 +245,28 @@ function lm_message(par, func, args) // Send a message to navigationcore (basic) function navigationcore_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.navigation.navigationcore."+iface+".v4_0_"+iface,"/"+iface,"org.genivi.navigation.navigationcore."+iface+".v4_0", func, args); } // Send a message to mapviewer (basic) function mapviewer_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.navigation.mapviewer."+iface+".v4_0_"+iface,"/"+iface,"org.genivi.navigation.mapviewer."+iface+".v4_0", func, args); } // Send a message to poiservice (basic) function poi_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.navigation.poiservice."+iface+".v4_0_"+iface,"/"+iface,"org.genivi.navigation.poiservice."+iface+".v4_0", func, args); } // Send a message to demonstrator (basic) function demonstrator_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.demonstrator."+iface+".v1_0_"+iface,"/"+iface,"org.genivi.demonstrator."+iface+".v1_0", func, args); } diff --git a/src/hmi/qml/Core/genivi-origin.js b/src/hmi/qml/Core/genivi-origin.js index 348fa77..f632396 100644 --- a/src/hmi/qml/Core/genivi-origin.js +++ b/src/hmi/qml/Core/genivi-origin.js @@ -41,8 +41,9 @@ var g_poisearch_handle=["uint32",0]; var g_lang; var data=new Array; -data['destination']=new Array; -data['position']=new Array; +data['destination']=new Array; //the destination +data['position']=new Array; //a position +data['current_position']=new Array; //the current position var poi_data=new Array; var poi_id; @@ -52,9 +53,9 @@ var categoriesIdNameList; var translations=new Array; -var simulationPanelOnMapview=true;// simulation panel on map view by default +var simulationMode=true;// simulation mode on by default -var guidance_activated=false; //used by the HMI to directly go to map when guidance is on (reroute use case) +var guidance_activated=false; var route_calculated=false; var entryback = new Array; @@ -160,6 +161,11 @@ function dump(prefix,args) dump2(prefix,"",args); } +function hookContext() +{ + console.log("Routing: ",route_calculated," Guidance: ",guidance_activated); +} + //Manage the historyOfLastEnteredLocation function updateHistoryOfLastEnteredLocation(enteredLocation,enteredLat,enteredLon) { @@ -224,6 +230,11 @@ function gettext(arg) //----------------- Management of the DBus messages ----------------- +function hookMethod(arg) +{ + console.log("Method: ",arg); +} + // Send a dbus message to layer manager function lm_message(par, func, args) { @@ -234,28 +245,28 @@ function lm_message(par, func, args) // Send a message to navigationcore (basic) function navigationcore_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.navigationcore."+iface,"/org/genivi/navigationcore","org.genivi.navigationcore."+iface, func, args); } // Send a message to mapviewer (basic) function mapviewer_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.mapviewer."+iface,"/org/genivi/mapviewer","org.genivi.mapviewer."+iface, func, args); } // Send a message to poiservice (basic) function poi_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.poiservice."+iface,"/org/genivi/poiservice/"+iface,"org.genivi.poiservice."+iface, func, args); } // Send a message to demonstrator (basic) function demonstrator_message(par, iface, func, args) { - console.log("Method: ",func); + hookMethod(func); return par.message("org.genivi.demonstrator."+iface,"/org/genivi/demonstrator/"+iface,"org.genivi.demonstrator."+iface, func, args); } diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf Binary files differindex b76582b..b4184c0 100644 --- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf +++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf diff --git a/src/hmi/qml/Core/referenceHMI.tar.gz b/src/hmi/qml/Core/referenceHMI.tar.gz Binary files differnew file mode 100644 index 0000000..d4e01bd --- /dev/null +++ b/src/hmi/qml/Core/referenceHMI.tar.gz diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index e0d82cd..09f3861 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -40,7 +40,7 @@ import "Core/style-sheets/NavigationAppBrowseMapSettings-css.js" as StyleSheetSe import lbs.plugin.dbusif 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppBrowseMap" next: scrollup @@ -136,6 +136,18 @@ HMIMenu { for (var i=0;i<res[3].length;i+=4){ if (res[3][i+1]== Genivi.NAVIGATIONCORE_SPEED){ vehicleSpeedValue.text=res[3][i+3][3][1]; + } else { + if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LATITUDE) && (res[3][i+3][3][1] != 0)){ + Genivi.data['current_position']['lat']=res[3][i+3][3][1]; + } else { + if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LONGITUDE) && (res[3][i+3][3][1] != 0)){ + Genivi.data['current_position']['lon']=res[3][i+3][3][1]; + } else { + if (res[3][i+1]== Genivi.NAVIGATIONCORE_ALTITUDE){ + Genivi.data['current_position']['alt']=res[3][i+3][3][1]; + } + } + } } } } @@ -217,13 +229,16 @@ HMIMenu { Genivi.hookSignal("fuelStopAdvisorWarning"); if (args[1] == 1) { + fsamessageText.visible=true; fsamessageText.text=Genivi.gettext("FSAWarning"); select_search_for_refill_in_top.visible=true; + select_search_for_refill_in_top.disabled=false; } else { - fsamessageText.text=" "; + fsamessageText.visible=false; select_search_for_refill_in_top.visible=false; + select_search_for_refill_in_top.disabled=true; } } @@ -841,6 +856,9 @@ HMIMenu { function hideGuidance() { guidance.visible=false; + fsamessageText.visible=false; + select_search_for_refill_in_top.visible=false; + select_search_for_refill_in_top.disabled=true; } function showRoute() @@ -874,7 +892,7 @@ HMIMenu { height: StyleSheetTop.navigation_app_browse_map_top_background[Constants.HEIGHT] x: StyleSheetMap.top_area[Constants.X] y: StyleSheetMap.top_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: top opacity: 0.8 image:StyleSheetTop.navigation_app_browse_map_top_background[Constants.SOURCE]; @@ -941,7 +959,7 @@ HMIMenu { height: StyleSheetBottom.navigation_app_browse_map_bottom_background[Constants.HEIGHT] x: StyleSheetMap.bottom_area[Constants.X] y: StyleSheetMap.bottom_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: bottom opacity: 0.8 image:StyleSheetBottom.navigation_app_browse_map_bottom_background[Constants.SOURCE]; @@ -1056,7 +1074,7 @@ HMIMenu { height: StyleSheetRoute.navigation_app_browse_map_route_background[Constants.HEIGHT] x: StyleSheetMap.route_area[Constants.X] y: StyleSheetMap.route_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: route opacity: 0.8 image:StyleSheetRoute.navigation_app_browse_map_route_background[Constants.SOURCE] @@ -1097,7 +1115,7 @@ HMIMenu { height: StyleSheetGuidance.navigation_app_browse_map_guidance_background[Constants.HEIGHT] x: StyleSheetMap.guidance_area[Constants.X] y: StyleSheetMap.guidance_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: guidance opacity: 0.8 image:StyleSheetGuidance.navigation_app_browse_map_guidance_background[Constants.SOURCE] @@ -1143,7 +1161,7 @@ HMIMenu { height: StyleSheetScroll.navigation_app_browse_map_scroll_background[Constants.HEIGHT] x: StyleSheetMap.scroll_area[Constants.X] y: StyleSheetMap.scroll_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { opacity: 0.8 property real panX: 40 //delta in pixel for x panning property real panY: 40 //delta in pixel for y panning @@ -1187,7 +1205,7 @@ HMIMenu { height: StyleSheetSimulation.navigation_app_browse_map_simulation_background[Constants.HEIGHT] x: StyleSheetMap.simulation_area[Constants.X] y: StyleSheetMap.simulation_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: simulation opacity: 0.8 image:StyleSheetSimulation.navigation_app_browse_map_simulation_background[Constants.SOURCE]; @@ -1314,7 +1332,7 @@ HMIMenu { height: StyleSheetManeuver.navigation_app_browse_map_maneuver_background[Constants.HEIGHT] x: StyleSheetManeuver.maneuver_area[Constants.X] y: StyleSheetManeuver.maneuver_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: maneuver opacity: 0.8 visible: (displayManeuvers) @@ -1335,7 +1353,7 @@ HMIMenu { smooth: true } } - HMIList { + NavigationAppHMIList { property real selectedEntry x:StyleSheetManeuver.maneuver_area[Constants.X]; y:StyleSheetManeuver.maneuver_area[Constants.Y]; width:StyleSheetManeuver.maneuver_area[Constants.WIDTH]; height:StyleSheetManeuver.maneuver_area[Constants.HEIGHT]; id:maneuverArea @@ -1352,7 +1370,7 @@ HMIMenu { height: StyleSheetSettings.navigation_app_browse_map_settings_background[Constants.HEIGHT] x: StyleSheetMap.settings_area[Constants.X] y: StyleSheetMap.settings_area[Constants.Y] - HMIBgImage { + NavigationAppHMIBgImage { id: mapSettings opacity: 0.8 image:StyleSheetSettings.navigation_app_browse_map_settings_background[Constants.SOURCE]; @@ -1486,6 +1504,7 @@ HMIMenu { var res=Genivi.routing_GetRouteBoundingBox(dbusIf,Genivi.data['zoom_route_handle']); Genivi.mapviewer_SetMapViewBoundingBox(dbusIf,res); Genivi.mapviewer_DisplayRoute(dbusIf,Genivi.data['show_route_handle'],false); + Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,1,50); //activate advisor mode hideGuidance(); hideRoute(); hideSimulation(); @@ -1496,13 +1515,14 @@ HMIMenu { if (Genivi.data['display_on_map']==='show_current_position') { Genivi.mapviewer_SetFollowCarMode(dbusIf,true); Genivi.mapviewer_SetMapViewScale(dbusIf,Genivi.zoom_guidance); - Genivi.mapviewer_SetTargetPoint(dbusIf,Genivi.data['position']['lat'],Genivi.data['position']['lon'],Genivi.data['position']['alt']); + Genivi.mapviewer_SetTargetPoint(dbusIf,Genivi.data['current_position']['lat'],Genivi.data['current_position']['lon'],Genivi.data['current_position']['alt']); if(Genivi.guidance_activated) { Genivi.mapviewer_DisplayRoute(dbusIf,Genivi.data['show_route_handle'],false); + Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,1,50); //activate advisor mode showGuidance(); showRoute(); updateGuidance(); - if (Genivi.simulationPanelOnMapview===true) + if (Genivi.simulationMode===true) { showSimulation(); updateSimulation(); @@ -1510,6 +1530,7 @@ HMIMenu { hideSimulation(); } } else { + Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,0,50); //no advisor mode hideGuidance(); hideRoute(); hideSimulation(); @@ -1520,6 +1541,7 @@ HMIMenu { if (Genivi.data['display_on_map']==='show_position') { Genivi.mapviewer_SetFollowCarMode(dbusIf,false); Genivi.mapviewer_SetTargetPoint(dbusIf,Genivi.data['position']['lat'],Genivi.data['position']['lon'],Genivi.data['position']['alt']); + Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,0,50); //no advisor mode hideGuidance(); hideRoute(); hideSimulation(); diff --git a/src/hmi/qml/NavigationAppMain.qml b/src/hmi/qml/NavigationAppMain.qml index d99e1f9..25adf06 100644 --- a/src/hmi/qml/NavigationAppMain.qml +++ b/src/hmi/qml/NavigationAppMain.qml @@ -31,7 +31,7 @@ import "Core/style-sheets/style-constants.js" as Constants; import "Core/style-sheets/NavigationAppMain-css.js" as StyleSheet; import lbs.plugin.dbusif 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppMain" pageBack: Genivi.entryback[Genivi.entrybackheapsize] @@ -41,7 +41,7 @@ HMIMenu { id:dbusIf; } - HMIBgImage { + NavigationAppHMIBgImage { image:StyleSheet.navigation_app_main_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight} diff --git a/src/hmi/qml/NavigationAppPOI.qml b/src/hmi/qml/NavigationAppPOI.qml index a87f547..e816767 100644 --- a/src/hmi/qml/NavigationAppPOI.qml +++ b/src/hmi/qml/NavigationAppPOI.qml @@ -83,7 +83,7 @@ NavigationAppHMIMenu { } } - HMIBgImage { + NavigationAppHMIBgImage { image:StyleSheet.navigation_app_poi_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight } @@ -167,7 +167,7 @@ NavigationAppHMIMenu { smooth: true } } - HMIList { + NavigationAppHMIList { x:StyleSheet.searchResultList[Constants.X]; y:StyleSheet.searchResultList[Constants.Y]; width:StyleSheet.searchResultList[Constants.WIDTH]; height:StyleSheet.searchResultList[Constants.HEIGHT]; property real selectedEntry id:view diff --git a/src/hmi/qml/NavigationAppSearch.qml b/src/hmi/qml/NavigationAppSearch.qml index 87ac8c3..e3be24e 100644 --- a/src/hmi/qml/NavigationAppSearch.qml +++ b/src/hmi/qml/NavigationAppSearch.qml @@ -61,7 +61,7 @@ NavigationAppHMIMenu { if(args[1]===Genivi.NAVIGATIONCORE_ACTIVE) { Genivi.guidance_activated = true; - if(Genivi.simulationPanelOnMapview){ + if(Genivi.simulationMode){ Genivi.mapmatchedposition_SetSimulationMode(dbusIf,true); } //Guidance active, so inform the trip computer (refresh) @@ -407,15 +407,14 @@ NavigationAppHMIMenu { for (var i=0;i<res[3].length;i+=4){ if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LATITUDE) && (res[3][i+3][3][1] != 0)){ oklat=1; - Genivi.data['position']['lat']=res[3][i+3][3][1]; + Genivi.data['current_position']['lat']=res[3][i+3][3][1]; } else { if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LONGITUDE) && (res[3][i+3][3][1] != 0)){ oklong=1; - Genivi.data['position']['lon']=res[3][i+3][3][1]; + Genivi.data['current_position']['lon']=res[3][i+3][3][1]; } else { - if ((res[3][i+1]== Genivi.NAVIGATIONCORE_ALTITUDE) && (res[3][i+3][3][1] != 0)){ - oklong=1; - Genivi.data['position']['alt']=res[3][i+3][3][1]; + if (res[3][i+1]== Genivi.NAVIGATIONCORE_ALTITUDE){ + Genivi.data['current_position']['alt']=res[3][i+3][3][1]; } } } @@ -900,7 +899,7 @@ NavigationAppHMIMenu { } } - HMIList { + NavigationAppHMIList { property real selectedEntry x:StyleSheet.routeArea[Constants.X]; y:StyleSheet.routeArea[Constants.Y]; width:StyleSheet.routeArea[Constants.WIDTH]; height:StyleSheet.routeArea[Constants.HEIGHT]; id:routeArea diff --git a/src/hmi/qml/NavigationAppSettings.qml b/src/hmi/qml/NavigationAppSettings.qml index f9b3f6c..3b0a26c 100644 --- a/src/hmi/qml/NavigationAppSettings.qml +++ b/src/hmi/qml/NavigationAppSettings.qml @@ -33,11 +33,9 @@ import "Core/style-sheets/style-constants.js" as Constants; import "Core/style-sheets/NavigationAppSettings-css.js" as StyleSheet; import lbs.plugin.dbusif 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppSettings" - property Item simulationStatusChangedSignal; - property Item simulationSpeedChangedSignal; next: back prev: back @@ -45,204 +43,7 @@ HMIMenu { id:dbusIf; } - property int speedValueSent: 0; - - function simulationSpeedChanged(args) - { - Genivi.hookSignal("simulationSpeedChanged"); - var speedFactor=args[1]; - if (speedFactor == 0) { - speedValue.text="0"; - speedValueSent=0; - } - if (speedFactor == 1) { - speedValue.text="1/4"; - speedValueSent=1; - } - if (speedFactor == 2) { - speedValue.text="1/2"; - speedValueSent=2; - } - if (speedFactor == 4) { - speedValue.text="1"; - speedValueSent=3; - } - if (speedFactor == 8) { - speedValue.text="2"; - speedValueSent=4; - } - if (speedFactor == 16) { - speedValue.text="4"; - speedValueSent=5; - } - if (speedFactor == 32) { - speedValue.text="8"; - speedValueSent=6; - } - if (speedFactor == 64) { - speedValue.text="16"; - speedValueSent=7; - } - } - - function simulationStatusChanged(args) - { - Genivi.hookSignal("simulationStatusChanged"); - var simulationStatus=args[1]; - if (simulationStatus != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION) - { - on_off.setState("ON"); - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION) - { - simu_mode.setState("PAUSE"); - } - else - { - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING) - { - simu_mode.setState("PLAY"); - } - } - } - else - { - on_off.setState("OFF"); - simu_mode.setState("FREE"); - } - } - - function connectSignals() - { - simulationStatusChangedSignal=Genivi.connect_simulationStatusChangedSignal(dbusIf,menu); - simulationSpeedChangedSignal=Genivi.connect_simulationSpeedChangedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - simulationStatusChangedSignal.destroy(); - simulationSpeedChangedSignal.destroy(); - } - - - function getDBusSpeedValue(value) - { - var returnValue; - switch (value) - { - case 0: - returnValue = 0; - break; - case 1: - returnValue = 1; - break; - case 2: - returnValue = 2; - break; - case 3: - returnValue = 4; - break; - case 4: - returnValue = 8; - break; - case 5: - returnValue = 16; - break; - case 6: - returnValue = 32; - break; - case 7: - returnValue = 64; - break; - default: - returnValue = 0; - break; - } - return returnValue; - } - - function updateSimulation() - { - var res=Genivi.mapmatchedposition_GetSimulationStatus(dbusIf); - var simulationStatus=res[1]; - if (simulationStatus != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION) - { - on_off.setState("ON"); - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION) - { - simu_mode.setState("PAUSE"); - } - else - { - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING) - { - simu_mode.setState("PLAY"); - } - } - } - else - { - on_off.setState("OFF"); - simu_mode.setState("FREE"); - } - - var res1=Genivi.mapmatchedposition_GetSimulationSpeed(dbusIf); - var speedFactor=res1[1]; - if (speedFactor == 0) { - speedValue.text="0"; - speedValueSent=0; - } - if (speedFactor == 1) { - speedValue.text="1/4"; - speedValueSent=1; - } - if (speedFactor == 2) { - speedValue.text="1/2"; - speedValueSent=2; - } - if (speedFactor == 4) { - speedValue.text="1"; - speedValueSent=3; - } - if (speedFactor == 8) { - speedValue.text="2"; - speedValueSent=4; - } - if (speedFactor == 16) { - speedValue.text="4"; - speedValueSent=5; - } - if (speedFactor == 32) { - speedValue.text="8"; - speedValueSent=6; - } - if (speedFactor == 64) { - speedValue.text="16"; - speedValueSent=7; - } - } - - function leave() - { - disconnectSignals(); - } - - function showSimulation() - { - speed_down.disabled=false; - speed_up.disabled=false; - on_off.disabled=false; - simu_mode.disabled=false; - } - - function hideSimulation() - { - speed_down.disabled=true; - speed_up.disabled=true; - on_off.disabled=true; - simu_mode.disabled=true; - } - - HMIBgImage { + NavigationAppHMIBgImage { id: content image:StyleSheet.navigation_app_settings_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight} @@ -255,148 +56,46 @@ HMIMenu { text: Genivi.gettext("Simulation") } - Text { - x:StyleSheet.speedTitle[Constants.X]; y:StyleSheet.speedTitle[Constants.Y]; width:StyleSheet.speedTitle[Constants.WIDTH]; height:StyleSheet.speedTitle[Constants.HEIGHT];color:StyleSheet.speedTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.speedTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.speedTitle[Constants.PIXELSIZE]; - id:speedTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Speed") - } - - Text { - x:StyleSheet.speedValue[Constants.X]; y:StyleSheet.speedValue[Constants.Y]; width:StyleSheet.speedValue[Constants.WIDTH]; height:StyleSheet.speedValue[Constants.HEIGHT];color:StyleSheet.speedValue[Constants.TEXTCOLOR];styleColor:StyleSheet.speedValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.speedValue[Constants.PIXELSIZE]; - id:speedValue - style: Text.Sunken; - smooth: true - text: "" - } - StdButton { - source:StyleSheet.speed_down[Constants.SOURCE]; x:StyleSheet.speed_down[Constants.X]; y:StyleSheet.speed_down[Constants.Y]; width:StyleSheet.speed_down[Constants.WIDTH]; height:StyleSheet.speed_down[Constants.HEIGHT]; - id:speed_down; disabled:false; next:back; prev:back; - onClicked: - { - if (speedValueSent > 0) + x:StyleSheet.simu_mode_enable[Constants.X]; y:StyleSheet.simu_mode_enable[Constants.Y]; width:StyleSheet.simu_mode_enable[Constants.WIDTH]; height:StyleSheet.simu_mode_enable[Constants.HEIGHT]; + id:simu_mode; next:back; prev:preferences; disabled:false; + source: + { + if (Genivi.simulationMode==true) { - speedValueSent = speedValueSent-1; + source=StyleSheet.simu_mode_enable[Constants.SOURCE]; } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - - StdButton { - source:StyleSheet.speed_up[Constants.SOURCE]; x:StyleSheet.speed_up[Constants.X]; y:StyleSheet.speed_up[Constants.Y]; width:StyleSheet.speed_up[Constants.WIDTH]; height:StyleSheet.speed_up[Constants.HEIGHT]; - id:speed_up; disabled:false; next:back; prev:back; - onClicked: - { - if (speedValueSent < 7) + else { - speedValueSent = speedValueSent+1; + source=StyleSheet.simu_mode_disable[Constants.SOURCE]; } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - - Text { - x:StyleSheet.modeTitle[Constants.X]; y:StyleSheet.modeTitle[Constants.Y]; width:StyleSheet.modeTitle[Constants.WIDTH]; height:StyleSheet.modeTitle[Constants.HEIGHT];color:StyleSheet.modeTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.modeTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.modeTitle[Constants.PIXELSIZE]; - id:modeTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Mode") - } - - Text { - x:StyleSheet.onmapviewTitle[Constants.X]; y:StyleSheet.onmapviewTitle[Constants.Y]; width:StyleSheet.onmapviewTitle[Constants.WIDTH]; height:StyleSheet.onmapviewTitle[Constants.HEIGHT];color:StyleSheet.onmapviewTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.onmapviewTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.onmapviewTitle[Constants.PIXELSIZE]; - id:onmapviewTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("OnMapView") - } - - StdButton { - x:StyleSheet.simulation_on[Constants.X]; y:StyleSheet.simulation_on[Constants.Y]; width:StyleSheet.simulation_on[Constants.WIDTH]; height:StyleSheet.simulation_on[Constants.HEIGHT]; - id:on_off; next:back; prev:back; disabled:false; - property int status: 0; - function setState(name) - { - if (name=="ON") - { - status=1; - source=StyleSheet.simulation_off[Constants.SOURCE]; - } - else - { - status=0; - source=StyleSheet.simulation_on[Constants.SOURCE]; - } } - onClicked: - { - switch (status) - { - case 0: //enable the simulation mode and set it to pause - Genivi.mapmatchedposition_SetSimulationMode(dbusIf,true); - Genivi.mapmatchedposition_PauseSimulation(dbusIf); - break; - case 1: //disable the simulation mode - Genivi.mapmatchedposition_SetSimulationMode(dbusIf,false); - break; - default: - break; - } - } - } - StdButton { - x:StyleSheet.play[Constants.X]; y:StyleSheet.play[Constants.Y]; width:StyleSheet.play[Constants.WIDTH]; height:StyleSheet.play[Constants.HEIGHT]; - id:simu_mode; next:back; prev:back; disabled:false; - property int status: 0; - function setState(name) - { - if (name=="FREE") - { - status=0; - source=StyleSheet.play[Constants.SOURCE]; - disabled=true; - } - else - { - if (name=="PLAY") - { - status=1; - source=StyleSheet.pause[Constants.SOURCE]; - enabled=true; - disabled=false; - } - else - { - if (name=="PAUSE") - { - status=2; - source=StyleSheet.play[Constants.SOURCE]; - enabled=true; - disabled=false; - } - } - } + function setState(name) + { + if (name=="ENABLE") + { + source=StyleSheet.simu_mode_enable[Constants.SOURCE]; + } + else + { + source=StyleSheet.simu_mode_disable[Constants.SOURCE]; + } } - onClicked: - { - switch (status) - { - case 2: //pause - //pause to resume - Genivi.mapmatchedposition_StartSimulation(dbusIf); - break; - case 1: //play - //play to pause - Genivi.mapmatchedposition_PauseSimulation(dbusIf); - break; - default: - break; - } + onClicked: + { + if (Genivi.simulationMode==true) + { //hide the panel + Genivi.simulationMode=false; + simu_mode.setState("DISABLE"); + } + else + { //show the panel + Genivi.simulationMode=true; + simu_mode.setState("ENABLE"); + } } - } + } StdButton { source:StyleSheet.preferences[Constants.SOURCE]; x:StyleSheet.preferences[Constants.X]; y:StyleSheet.preferences[Constants.Y]; width:StyleSheet.preferences[Constants.WIDTH]; height:StyleSheet.preferences[Constants.HEIGHT];textColor:StyleSheet.preferencesText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.preferencesText[Constants.PIXELSIZE]; @@ -416,58 +115,12 @@ HMIMenu { StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); disabled:false; next:onmapview_enable; prev:languageAndUnit; - onClicked:{leave(); leaveMenu();} - } - - StdButton { - x:StyleSheet.onmapview_enable[Constants.X]; y:StyleSheet.onmapview_enable[Constants.Y]; width:StyleSheet.onmapview_enable[Constants.WIDTH]; height:StyleSheet.onmapview_enable[Constants.HEIGHT]; - id:onmapview_enable; next:back; prev:preferences; disabled:false; - source: - { - if (Genivi.simulationPanelOnMapview==true) - { - source=StyleSheet.onmapview_enable[Constants.SOURCE]; - } - else - { - source=StyleSheet.onmapview_disable[Constants.SOURCE]; - } - } - - function setState(name) - { - if (name=="ENABLE") - { - source=StyleSheet.onmapview_enable[Constants.SOURCE]; - } - else - { - source=StyleSheet.onmapview_disable[Constants.SOURCE]; - } - } - onClicked: - { - if (Genivi.simulationPanelOnMapview==true) - { //hide the panel - Genivi.simulationPanelOnMapview=false; - onmapview_enable.setState("DISABLE"); - hideSimulation(); - } - else - { //show the panel - Genivi.simulationPanelOnMapview=true; - onmapview_enable.setState("ENABLE"); - showSimulation(); - updateSimulation(); - } - } + id:back; text: Genivi.gettext("Back"); disabled:false; next:simu_mode; prev:languageAndUnit; + onClicked:{leaveMenu();} } } Component.onCompleted: { - connectSignals(); - updateSimulation(); } } diff --git a/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml b/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml index 44ab207..75b6ca0 100644 --- a/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml +++ b/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml @@ -33,7 +33,7 @@ import "Core/style-sheets/style-constants.js" as Constants; import "Core/style-sheets/NavigationAppSettingsSettingsLanguageAndUnits-css.js" as StyleSheet; import lbs.plugin.dbusif 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppSettingsLanguageAndUnits" property Item configurationChangedSignal; @@ -135,7 +135,7 @@ HMIMenu { update(); } - HMIBgImage { + NavigationAppHMIBgImage { id: content image:StyleSheet.navigation_app_settings_language_and_units_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight} diff --git a/src/hmi/qml/NavigationAppSettingsPreferences.qml b/src/hmi/qml/NavigationAppSettingsPreferences.qml index e66bde7..0f06564 100644 --- a/src/hmi/qml/NavigationAppSettingsPreferences.qml +++ b/src/hmi/qml/NavigationAppSettingsPreferences.qml @@ -34,7 +34,7 @@ import "Core/style-sheets/NavigationAppSettingsPreference-css.js" as StyleSheet; import lbs.plugin.dbusif 1.0 import lbs.plugin.preference 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppSettingsPreferences" @@ -130,7 +130,7 @@ HMIMenu { update(); } - HMIBgImage { + NavigationAppHMIBgImage { id: content image:StyleSheet.navigation_app_settings_preference_background[Constants.SOURCE]; anchors { fill: parent; topMargin: parent.headlineHeight} diff --git a/src/hmi/qml/NavigationAppTripComputer.qml b/src/hmi/qml/NavigationAppTripComputer.qml index b6add7b..99b4d22 100644 --- a/src/hmi/qml/NavigationAppTripComputer.qml +++ b/src/hmi/qml/NavigationAppTripComputer.qml @@ -31,7 +31,7 @@ import "Core/style-sheets/style-constants.js" as Constants; import "Core/style-sheets/NavigationAppTripComputer-css.js" as StyleSheet; import lbs.plugin.dbusif 1.0 -HMIMenu { +NavigationAppHMIMenu { id: menu property string pagefile:"NavigationAppTripComputer" property Item tripDataUpdatedSignal; @@ -218,7 +218,7 @@ HMIMenu { disconnectSignals(); } - HMIBgImage { + NavigationAppHMIBgImage { id:content image: { diff --git a/src/tripcomputer/ctripcomputer.h b/src/tripcomputer/ctripcomputer.h index 62747c7..77821f4 100644 --- a/src/tripcomputer/ctripcomputer.h +++ b/src/tripcomputer/ctripcomputer.h @@ -53,6 +53,7 @@ public: TRIP_NUMBER = 2, TRIP_NUMBER_1 = 0, SAMPLING_TIME = 1, /*!< Sampling time of 1 sec. */ + TANK_DISTANCE_REFRESH_TIME = 5, /*!< Refresh time of 5 sec. */ INSTANT_FUEL_CONSUMPTION_COEFFICIENT = 10/SAMPLING_TIME, /*!< Time constant for the instant fuel consumption. */ LAST_QUARTER_FUEL_CONSUMPTION_COEFFICIENT = 90/SAMPLING_TIME, /*!< Time constant for the last quarter fuel consumption. */ DISTANCE_THRESHOLD = 40000, /*!< Threshold for trip data calculation in cm. */ |