maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps (https://talk.maemo.org/showthread.php?t=85353)

WhitP 2012-07-19 22:32

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by rainisto (Post 1239980)
Yes I can confirm this bug, unstable fails day/night mode for me too.

I've seen the same behaviour with the 'unstable' patch when exiting settings. You can get the map back without restarting by for example going into 'set destination' and going back. It seems to be specific to 'settings'

WhitP 2012-07-19 22:41

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by Arie (Post 1239897)
No they aren't the Nokia Drive team...

As funny as this sounds it can all be done, it just has to have work done to make it work, the good news is that ovi maps/drive is not closed source on our N9's :)

Many thanks also to the original Nokia Drive team. Obviously they wrote much of the code but weren't given the chance to implement it fully. Extra thanks to sony123 and others for extending this beyond the original code.

It makes you wonder if some of this stuff might miraculously start working if a PR1.4 update is ever released.

WhitP 2012-07-19 22:46

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1239983)
If it is indeed the right setting (I am waiting on others to confirm this), it should be possible to integrate it into the UI. Probably no further artwork would be needed for this, just an entry "Preferred Route" or so along the other routing options (like ferry etc.) with the three sub-option "shortest, fastest and optimized". Just wondering how translations should be done for that.

Exactly what I was thinking - pity I can't code to save my life!

I'd help test out your mod but I live so close to work that there aren't many choices and no traffic (I know - not exactly a recipe for personal commuting hardship but I'd like to see these features introduced)

I hope you get enough feedback - maybe I'll go for a drive over the weekend... :D

Schturman 2012-07-20 14:50

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Guys, tell me please if this normal :

http://img4.imageshack.us/img4/6329/20120720173928.png

After all this updates, it's looks like no space for "km/h" ? Or font need to be a little small..

How to fix this ? Which file exactly and which lines ?
Thanks

jimthefly 2012-07-20 15:01

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
you should install the last unstable patch.

http://talk.maemo.org/showpost.php?p...&postcount=130


Quote:

Originally Posted by Schturman (Post 1240313)
Guys, tell me please if this normal :

http://img4.imageshack.us/img4/6329/20120720173928.png

After all this updates, it's looks like no space for "km/h" ? Or font need to be a little small..

How to fix this ? Which file exactly and which lines ?
Thanks


Schturman 2012-07-20 15:30

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Thanks, but i prefer to know which lines and which file..

godofwar424 2012-07-20 15:32

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by Schturman (Post 1240341)
Thanks, but i prefer to know which lines and which file..

go through the patch in a text editor like WordPad

Then work out what to add and remove :D

Took about 15 minutes.

Schturman 2012-07-20 16:20

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Thanks, i know this method, But I thought, that someone can point me to the specific line/file.. :)
Anyway, thanks..

godofwar424 2012-07-20 16:32

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by Schturman (Post 1240363)
Thanks, i know this method, But I thought, that someone can point me to the specific line/file.. :)
Anyway, thanks..

Yeah I was making a little list of changes, but there's a lot of added functions so it was quite tedious to explain the line numbers ect.

solstice88 2012-07-20 18:22

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by Schturman (Post 1240363)
Thanks, i know this method, But I thought, that someone can point me to the specific line/file.. :)
Anyway, thanks..

if you mean the area that you have circled in red in your pic.
using the latest patch

Try looking in guidancePage.qml:
Functions:
getDestinationDistance () and getTTD()
approx around lines 620 - 655

or

in Dashboard.qml
approx lines 10 -20
approx lines 130 -150 around the function AssitanceItem

I had similar issues mine wasn't showing at all and now i can actually toggle between the two.
Hope this helps, and backup... Not responsible if anything goes wrong.

Wallace 2012-07-21 09:12

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Little ot but I just wonder is there similar hidden features for traffic cams?

xcatch22x 2012-07-21 15:46

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Guys, what am I missing here?

I am using the all in one patch from the other thread and everything goes smooth and then I get the follwoing message

sh: patch: patch not found

I have saved the patch as a diff file and it resides in /home/user/MyDocs/Downloads. I have updated the code to include the location but it still says not found

An ideas?

phamgia 2012-07-21 16:27

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by xcatch22x (Post 1240853)
Guys, what am I missing here?

I am using the all in one patch from the other thread and everything goes smooth and then I get the follwoing message

sh: patch: patch not found

I have saved the patch as a diff file and it resides in /home/user/MyDocs/Downloads. I have updated the code to include the location but it still says not found

An ideas?

How did you download the patch (.diff file)?

somedude 2012-07-21 16:57

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by xcatch22x (Post 1240853)
Guys, what am I missing here?

I am using the all in one patch from the other thread and everything goes smooth and then I get the follwoing message

sh: patch: patch not found

I have saved the patch as a diff file and it resides in /home/user/MyDocs/Downloads. I have updated the code to include the location but it still says not found

An ideas?

you need to download and install the .deb patch from first page first.

somedude 2012-07-21 16:59

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by phamgia (Post 1240874)
How did you download the patch (.diff file)?

on windows right click the .diff file and hit save as,to your n9 it will be saver as a .txt file then just redo the extension and send it to your n9

somedude 2012-07-21 17:00

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Using the unstable patch, i do not get time to arrival. When i click on the speed box all i get is -h, nothing else.

xcatch22x 2012-07-21 17:32

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
To be honest Im not sure how to download the diff files. I used opera to open and then save the diff file. I assume there is a correct way of doing this, if so then please let me know.

sillieidiot 2012-07-21 18:55

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
went through the whole thread and i guess no one has this problem or has not even used their nokia drive for navigation yet. but i used it after applying the automatic colors and traffic and when navigating it shows a crazy route.

basically somewhere in the middle of the route it'll do some crazy like star pattern route, then like a mile after that it's back on track (does it every few miles). also when showing a street where you have to go straight for awhile then the same street starts turning, the blue line doesn't stay on the road all the time. sometimes, it's a perfectly straight line that cuts across when the street curves.

what's weird about it is that when you look at the overview of the route it's perfect, it's when you drive it starts telling to turn left when there's no exit and then you see that crazy line it wants you to follow.

sorry i couldn't provide screen shots. after this, i decided to delete my map data and re-download them to see if it will help. i haven't used it to navigate anything thus far.

xcatch22x 2012-07-21 19:04

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by somedude (Post 1240888)
you need to download and install the .deb patch from first page first.

Yep, that did the trick.

So I installed the patch by changing to the directory where it was

/home/user/MyDocs/Downloads/

then dpkg -i patchname

THEN the code from colin.stephane's post for the installation of the all in one patch.

All done.

jimthefly 2012-07-21 19:52

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
i found a error in the Time To Destination function. Then the time is more than a hour it only shows a "-" line and not the time. Then the time is less than a hour everthing is fine.

sony123 2012-07-22 04:09

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by jimthefly (Post 1240954)
i found a error in the Time To Destination function. Then the time is more than a hour it only shows a "-" line and not the time. Then the time is less than a hour everthing is fine.

Ouch, you're right. Thanks for catching this bug.

I found that the return value of Units.getReadableTime(duration) can be in "hr:min" format. This confuses the if (readableDuration.value > 0) loop. Commenting out the sanity checking makes the time display correctly. Please verify this solution if you can, if it doesn't introduce new bug, then I think this is an easy fix and can be pushed to unstable patch.

sony123 2012-07-22 06:52

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Did some experiments with loading the trafficDetailsPage. Calling the page was done by:
Code:

windows.push("trafficDetailsPage.qml")'
Also, need to make "TrafficEventHeader" visible by adding the following line in components/qmldir
Code:

TrafficEventHeader 1.0 TrafficEventHeader.qml

For testing, I put this into the onMenuButtonClicked() signal in guidancePage.Dashboard. The traffic detail page (tdPage) did show up, but there were no information available. Taking a deeper look at tdPage, it seemed to me that a traffic event in the trafficModel needs to be selected first in order for tdPage to load the info. Unfortunately, I didn't find anywhere in the source code for selecting the traffic event.

EDIT:
Also, the object 'TrafficViewHelper' used in tdPage doesn't have associated qml file.

So this feature will take more efforts if someone ever tries to make it work.

colin.stephane 2012-07-22 07:27

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sony123 (Post 1241060)
Ouch, you're right. Thanks for catching this bug.

I found that the return value of Units.getReadableTime(duration) can be in "hr:min" format. This confuses the if (readableDuration.value > 0) loop. Commenting out the sanity checking makes the time display correctly. Please verify this solution if you can, if it doesn't introduce new bug, then I think this is an easy fix and can be pushed to unstable patch.

Hi sony123 !!!

I have updated my full patch with your latest discover in section Unstable ;-)

That came at the right time, Thursday 26 July I go holidays to the south west of France, the travel is 776 Km long ...

A++

Morpog 2012-07-22 09:33

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by colin.stephane (Post 1241099)
That came at the right time, Thursday 26 July I go holidays to the south west of France, the travel is 776 Km long ...

LOL world is small. I am also starting my vacations on 26th, I got to drive to Lago Di Garda in Italy. Travel is 587 Km long....

WhitP 2012-07-22 13:52

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by colin.stephane (Post 1241099)
Hi sony123 !!!

I have updated my full patch with your latest discover in section Unstable ;-)

A++

Hi colin.stephane

I think you got carried away with the commenting! :)

The unstable patch as-is doesn't work. You commented out the definition for the variable distTime at the same time as the 'sanity-check'. If that is left in there it seems to work - at least trying to navigate 700km on my sofa! :D

mbanck 2012-07-22 14:40

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sony123 (Post 1241060)
Ouch, you're right. Thanks for catching this bug.

I found that the return value of Units.getReadableTime(duration) can be in "hr:min" format. This confuses the if (readableDuration.value > 0) loop. Commenting out the sanity checking makes the time display correctly.

Using duration (the raw ttd in seconds) instead of readableDuration.value works as well, and still displays "-" if there is e.g. no GPS lock, as is shows for distance (otherwise you get "-" for distance and "-1" or "0" for ttd, which looks odd).

Patch: http://paste.debian.net/180207/

colin.stephane 2012-07-22 15:45

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by WhitP (Post 1241234)
Hi colin.stephane

I think you got carried away with the commenting! :)

The unstable patch as-is doesn't work. You commented out the definition for the variable distTime at the same time as the 'sanity-check'. If that is left in there it seems to work - at least trying to navigate 700km on my sofa! :D

WOOPS !!!

Sorry for MY mistake ...

Well this forced me to reread the thread and find also the fix for the blank map, by reverting a mbanck patch ...

Anyhow, as usual, I have modified my full patch with mbanck patch revert on post #198 and added also the fix he provided on post #226 in the Unstable patch section.

A++

Schturman 2012-07-22 16:36

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
All this on unstable?

wout.martens 2012-07-22 16:40

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
When performing the patch i got this result:

Get: 1 https://downloads.maemo.nokia.com ./ nokia-drive-qml 2.0.8+0m8 [1,817kB]
Fetched 1,817kB in 1s (1,141kB/s)
(Reading database ... 37617 files and directories currently installed.)
Preparing to replace nokia-drive-qml 2.0.8+0m8 (using .../nokia-drive-qml_2.0.8+0m8_armel.deb) ...
Unpacking replacement nokia-drive-qml ...
aegis-installing nokia-drive-qml (from 'com.nokia.maemo')
Processing triggers for desktop-file-utils ...
Processing triggers for applauncherd-launcher ...
Setting up nokia-drive-qml (2.0.8+0m8) ...
Updating desktop entries... Done
-sh: patch: Operation not permitted

So all done except for the patch part...

----------------
edit:

Reinstalled via the same code in terminal and now everything is working fine. So no clue what has happened the first time.

Thanks a lot for these great mods!
Keep on modding !

Morpog 2012-07-22 16:54

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Did you install patch (it's an application)?
Did you insert the right destination to your diff file?
Put your diff file in MyDocs or any subfolder (like Documents or Downloads), but not above MyDocs.

Edit: seen your last edit too late...

Arthuro_Adam 2012-07-22 18:23

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Thanks for your work, it's a great achivement.

Is it possible to add settings to define which route (quickest, shortest, etc.) do you prefer?

sony123 2012-07-23 08:33

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by Arthuro_Adam (Post 1241325)
Thanks for your work, it's a great achivement.

Is it possible to add settings to define which route (quickest, shortest, etc.) do you prefer?

Adding the option somewhere isn't difficult, but do those settings work reliably enough? The earlier feedback I read seems to be optimal isn't, shortest and fastest are. Is that the consensus?

sony123 2012-07-23 08:36

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1241246)
Using duration (the raw ttd in seconds) instead of readableDuration.value works as well, and still displays "-" if there is e.g. no GPS lock, as is shows for distance (otherwise you get "-" for distance and "-1" or "0" for ttd, which looks odd).

Patch: http://paste.debian.net/180207/

Thanks a lot! I should have tested more thoroughly to see why you added the sanity checking.

mbanck 2012-07-23 11:06

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sillieidiot (Post 1240934)
went through the whole thread and i guess no one has this problem or has not even used their nokia drive for navigation yet. but i used it after applying the automatic colors and traffic and when navigating it shows a crazy route.

basically somewhere in the middle of the route it'll do some crazy like star pattern route, then like a mile after that it's back on track (does it every few miles). also when showing a street where you have to go straight for awhile then the same street starts turning, the blue line doesn't stay on the road all the time. sometimes, it's a perfectly straight line that cuts across when the street curves.

what's weird about it is that when you look at the overview of the route it's perfect, it's when you drive it starts telling to turn left when there's no exit and then you see that crazy line it wants you to follow.

sorry i couldn't provide screen shots. after this, i decided to delete my map data and re-download them to see if it will help. i haven't used it to navigate anything thus far.

Hrm, did you also apply the "optimized route" patch from http://talk.maemo.org/showpost.php?p...&postcount=189 ?

Would be usefule to know whether the behaviour you saw was possibly because of the patch and route option.

mbanck 2012-07-23 11:11

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sony123 (Post 1241507)
Adding the option somewhere isn't difficult, but do those settings work reliably enough? The earlier feedback I read seems to be optimal isn't, shortest and fastest are. Is that the consensus?

I went through the thread again, and the only possible feedback I saw was the post from sillieidiot I just replied to.

As the optimized-route patch is not included in colin.stephane's UNSTABLE patch, I guess not many tried it yet.

colin.stephane 2012-07-23 13:58

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1241562)
I went through the thread again, and the only possible feedback I saw was the post from sillieidiot I just replied to.

As the optimized-route patch is not included in colin.stephane's UNSTABLE patch, I guess not many tried it yet.

Hi mbanck,

True, after reading your explanations, I decided to not include this patch even in the Unstable branch because there is no easy UI to change options of routing, and we all know how newbies tend to ask many questions if they have to go console to edit and change something ...

A++

WhitP 2012-07-23 17:25

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
I'm giving the optimized route patch a go but I don't do much heavy duty navigating during rush hour so my feedback won't be as useful as some. However, no weirdness happening yet!

solstice88 2012-07-23 19:40

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
3 Attachment(s)
happy to report some feedback mbanck.

I got a chance to test the optimal route. I picked two random routes that had heavy traffic to commute to. Using the patch you provided and changing the routeOptionType values. Here is one of the routes.
Hope this helps you out.

taviman 2012-07-23 21:10

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
I constantly get this error:

apt-get install -y --reinstall nokia-drive-qml && sync && patch -p0 -i /home/user
/MyDocs/Patch-to-enable-traffic-*.diff
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
nokia-drive-qml
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0B/1,817kB of archives.
After this operation, 0B of additional disk space will be used.
(Reading database ... 57983 files and directories currently installed.)
Preparing to replace nokia-drive-qml 2.0.8+0m8 (using .../nokia-drive-qml_2.0.8+0m8_armel.deb) ...
Unpacking replacement nokia-drive-qml ...
aegis-installing nokia-drive-qml (from 'com.nokia.maemo')
Processing triggers for desktop-file-utils ...
Processing triggers for applauncherd-launcher ...
Setting up nokia-drive-qml (2.0.8+0m8) ...
Updating desktop entries... Done
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/components/InfoDistance.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/components/Dashboard.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/guidancePage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/guidanceMenuPage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/assistancePage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/settings/mapModeSettingsPage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/settings/assistanceModeSettingsPage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/views/settings/settingsPage.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/models/AppSettingsModel.qml
(Stripping trailing CRs from patch.)
patching file /usr/lib/drive-qml/models/MapSettingsModel.qml
patch unexpectedly ends in middle of line
Hunk #5 FAILED at 158.
1 out of 5 hunks FAILED -- saving rejects to file /usr/lib/drive-qml/models/MapSettingsModel.qml.rej
~ #



For me the mod doesn't work, Drive hangs while calculating the route.
The only working mod was the solution provided by jd400.

Have I made any mistakes?

oh, have to mention I tried with both stable and unstable versions.

thedead1440 2012-07-24 02:29

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
taviman, simply edit the files manually on your desktop and then transfer them over...


All times are GMT. The time now is 12:09.

vBulletin® Version 3.8.8