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)

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...


All times are GMT. The time now is 07:28.

vBulletin® Version 3.8.8