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)

boudjere 2012-07-10 09:44

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Thanks! Very nice! Maybe I should search all qml files in /usr/lib for "// TODO" :).

jd4200 2012-07-10 10:01

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

Originally Posted by boudjere (Post 1235126)
Thanks! Very nice! Maybe I should search all qml files in /usr/lib for "// TODO" :).

grep "TODO" /usr/lib/* -r

Seems like they had a lot todo. :D

nieldk 2012-07-10 10:03

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

Originally Posted by boudjere (Post 1235126)
Thanks! Very nice! Maybe I should search all qml files in /usr/lib for "// TODO" :).

:) At least I noticed a non implemented automatic switch between night/day mode (missing a plugin to actually work from what I saw) so - happy discovery browsing :)

Morpog 2012-07-10 11:27

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

Originally Posted by nieldk (Post 1235137)
:) At least I noticed a non implemented automatic switch between night/day mode (missing a plugin to actually work from what I saw) so - happy discovery browsing :)

Damn, thats one of the things I'm missing.

godofwar424 2012-07-10 11:56

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Hey, what about speed cameras? Any chance that this is also hidden in the files somewhere as its in the other platforms Drive Apps??

isfr21 2012-07-10 11:58

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Wow thanks a lot it works!

Hopefully they'll bring that feature that lets you reroute based on traffic congestion to really put some good use to this mod.

Also like to say that we really have the best community here at TMO. Always can find just about anyone here willing to help. Well appreciated by us all!

godofwar424 2012-07-10 12:08

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

Originally Posted by isfr21 (Post 1235215)
Wow thanks a lot it works!

Hopefully they'll bring that feature that lets you reroute based on traffic congestion to really put some good use to this mod.

Also like to say that we really have the best community here at TMO. Always can find just about anyone here willing to help. Well appreciated by us all!

Second that! I would find that feature incredibly useful!

Also as stated before, proper speed camera alerts instead of the useless speed alerts implemented atm.

biatch0 2012-07-10 16:10

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

Originally Posted by drvar (Post 1235022)
Can you check for Slovenia if possible?
(I like to know if it's worth the trouble..)

Sorry, doesn't look like there's any traffic info for Slovenia either (Google doesn't have any traffic info for Slovenia either if that's any consolation).

alephito 2012-07-10 16:28

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
What about Argentina?

Google provides traffic information for Buenos Aires. It would be great if Nokia does too.

Arie 2012-07-10 17:22

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

Originally Posted by nieldk (Post 1235137)
:) At least I noticed a non implemented automatic switch between night/day mode (missing a plugin to actually work from what I saw) so - happy discovery browsing :)

Did you try to activate that?

mbanck 2012-07-10 18:33

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by jd4200 (Post 1234481)
Thanks sony123, a real nice find.

Anyway, here's a patch to take away the tedious work. Tested and works fine.

Automatic method:
Download this shell script, rename it to maps.sh

The shell script is missing a "apt-get update" if the SDK isn't setup yet.

minimos 2012-07-10 19:11

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
By the way, any idea *why* the functionality is hidden?

mbanck 2012-07-10 19:18

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

Originally Posted by minimos (Post 1235511)
By the way, any idea *why* the functionality is hidden?

The comments say "TODO: change back when management makes up their minds", so guess...

nieldk 2012-07-10 19:33

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

Originally Posted by Arie (Post 1235430)
Did you try to activate that?

no, didnt try, reading the devs comments seems like a plugin for this is not finished atm.

almamo 2012-07-10 19:48

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Thank you guys! It also worked for me, very happy about that.

Arie 2012-07-10 19:49

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

Originally Posted by nieldk (Post 1235524)
no, didnt try, reading the devs comments seems like a plugin for this is not finished atm.

Are you keen to test it or would you like me to?

nieldk 2012-07-10 19:57

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

Originally Posted by Arie (Post 1235534)
Are you keen to test it or would you like me to?

Did the changes, and got the choice Available in map colours (day /night /automatic)
However, colour doesn't change
Perhaps we can find the plug in and actually locate the problem :)

Arie 2012-07-10 20:01

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

Originally Posted by nieldk (Post 1235541)
Did the changes, and got the choice Available in map colours (day /night /automatic)
However, colour doesn't change
Perhaps we can find the plug in and actually locate the problem :)

I assume for automatic, it would have to be at night for it to change, did you test it at night?

jd4200 2012-07-10 20:05

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by mbanck (Post 1235475)
The shell script is missing a "apt-get update" if the SDK isn't setup yet.

Thanks. Updated.

nieldk 2012-07-10 20:17

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

Originally Posted by Arie (Post 1235544)
I assume for automatic, it would have to be at night for it to change, did you test it at night?

Yes, it is evening here, also tried manual time setting

Button needs to be enabled in
/usr/lib/drive-qml/views/settings/mapModeSettingsPage.qml

Comments needs to be removed from
/usr/lib/drive-qml/models/MapSettingsModel.qml

Arie 2012-07-10 20:20

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

Originally Posted by nieldk (Post 1235559)
Yes, it is evening here, also tried manual time setting

Button needs to be enabled in
/usr/lib/drive-qml/views/settings/mapModeSettingsPage.qml

Comments needs to be removed from
/usr/lib/drive-qml/models/MapSettingsModel.qml

Ah ok, so we're missing the plugin... Do you happen to have the lines for that?

I could change them and test them here too :)

nieldk 2012-07-10 20:25

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

Originally Posted by Arie (Post 1235560)
Ah ok, so we're missing the plugin... Do you happen to have the lines for that?

I could change them and test them here too :)

:) search for auto, Was doing the changes in phone terminal LOL so I need to reinstall the Application to give a full diff

There are only 2 lines in the first file /* + */ that encapsulated the button
And likewise in the second file, but 2 places

EDIT
In MapSettingsModel.qml

If you out comment function isNight at the button it seems to actually work

Arie 2012-07-10 20:38

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

Originally Posted by nieldk (Post 1235567)
:) search for auto, Was doing the changes in phone terminal LOL so I need to reinstall the Application to give a full diff

There are only 2 lines in the first file /* + */ that encapsulated the button
And likewise in the second file, but 2 places

I got it working :)

in /usr/lib/drive-qml/models/MapSettingsModel.qml

There is a line:

/*
if (newvalue === "auto") {
setNightMode(isNight());
}
else*/ {
setNightMode(newvalue === "night");

Should be changed to:

if (newvalue === "auto") {
setNightMode(isNight());
}
else {
setNightMode(newvalue === "night");

It will start up in night mode, then choose automatic, it will set itself up and run as it should :)

nieldk 2012-07-10 20:43

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

Originally Posted by Arie (Post 1235575)
I got it working :)

in /usr/lib/drive-qml/models/MapSettingsModel.qml

There is a line:

/*
if (newvalue === "auto") {
setNightMode(isNight());
}
else*/ {
setNightMode(newvalue === "night");

Should be changed to:

if (newvalue === "auto") {
setNightMode(isNight());
}
else {
setNightMode(newvalue === "night");

It will start up in night mode, then choose automatic, it will set itself up and run as it should :)

Don't forget to outcomment the function isNight at the end of that file :)

HtheB 2012-07-10 20:44

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Works great, thansk for this discover!

Maybe this can be add to N9 QTweak for people that doesn't have xterm experience at all

Arie 2012-07-10 20:46

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

Originally Posted by nieldk (Post 1235579)
Don't forget to outcomment the function isNight at the end of that file :)

console.log("Sunset:" + sunset);
console.log("Sunrise:" + sunrise);

var t = today.getHours() + today.getMinutes()/60;
console.log("NOW: "+t);
if (t >= sunrise && t < sunset) {
return false;
}
return true;
}

function onDayNightSwitch() {
console.log("onDayNightSwitch");
if (dayNightMode === "auto") {
console.log("Change map mode to: "+!nightMode);
setNightMode(isNight());
}
}

Are you referring to the bold?

Edit: and why?

nieldk 2012-07-10 20:49

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

Originally Posted by Arie (Post 1235583)
console.log("Sunset:" + sunset);
console.log("Sunrise:" + sunrise);

var t = today.getHours() + today.getMinutes()/60;
console.log("NOW: "+t);
if (t >= sunrise && t < sunset) {
return false;
}
return true;
}

function onDayNightSwitch() {
console.log("onDayNightSwitch");
if (dayNightMode === "auto") {
console.log("Change map mode to: "+!nightMode);
setNightMode(isNight());
}
}

Are you referring to the bold?

Edit: and why?

No, the entire function is commented out by embraced /* */

Arie 2012-07-10 20:50

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

Originally Posted by nieldk (Post 1235587)
No, the entire function is commented out by embraced /* */

Oh, nvm, that's not an issue, already done :)

Edit: for those that don't want to do the changes nieldk and I did (includes traffic changes in Drive and Auto mode for day/night:

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

Follow that :)

nieldk 2012-07-10 20:56

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

Originally Posted by Arie (Post 1235589)
Oh, nvm, that's not an issue, already done :)

Edit: for those that don't want to do the changes nieldk and I did (includes traffic changes in Drive and Auto mode for day/night:

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

Follow that :)

Thanks :)
That's good team work!

Arie 2012-07-10 21:00

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

Originally Posted by nieldk (Post 1235594)
Thanks :)
That's good team work!

Yes sir, I am always willing to help keep the Harmattan Community alive :)

Morpog 2012-07-10 21:02

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Could you do a second diff patch to add this functionality? I don't feel like adding Aries files, as they seem to be from PR1.2s Drive.

Or at least do a summary what to do.

Thanks!

nieldk 2012-07-10 21:06

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

Originally Posted by HtheB (Post 1235581)
Works great, thansk for this discover!

Maybe this can be add to N9 QTweak for people that doesn't have xterm experience at all

Good idea and probably doable with the diff files and patch

nieldk 2012-07-10 21:09

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

Originally Posted by Morpog (Post 1235603)
Could you do a second diff patch to add this functionality? I don't feel like adding Aries files, as they seem to be from PR1.2s Drive.

Or at least do a summary what to do.

Thanks!

Probably best with diff files also for copyright reasons
If Arie can beat me to it as I am not near a computer hehe it's slow to do that on the device

solstice88 2012-07-10 21:11

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Thanks again Arie and especially props to nieldk. Great team work for the both of you for figuring it out so quickly. Now lets see if i understood all of it and try to outcomment them myself.

godofwar424 2012-07-10 21:13

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

Originally Posted by Arie (Post 1235599)
Yes sir, I am always willing to help keep the Harmattan Community alive :)

Well thats awesome!

Now lets see what else we can uncover from Nokia's lazy management errors!

jd4200 2012-07-10 21:19

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Would you guys mind posting all the changes you've made in one post, I'll get another diff patch on the go and incorporate it with the shell script from earlier, unless either of you two are on the job.

Oh, and thanks. Another nice find. :)

nieldk 2012-07-10 21:24

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

Originally Posted by jd4200 (Post 1235616)
Would you guys mind posting all the changes you've made in one post, I'll get another diff patch on the go and incorporate it with the shell script from earlier, unless either of you two are on the job.

Oh, and thanks. Another nice find. :)

I will certainly do so tomorrow if Arie doesn't do it before, like I wrote, atm I'm not near a computer

Morpog 2012-07-10 21:26

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Last missing item would be the ability to touch the "distance left" to switch it to "time left". Symbians drive had that.

And traffic rerouting of course, but I doubt this is hidden in there....

jflatt 2012-07-10 21:31

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

Originally Posted by Arie (Post 1235583)
console.log("Sunset:" + sunset);
console.log("Sunrise:" + sunrise);

Why wouldn't they use the ALS?

solstice88 2012-07-10 21:38

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Here is what i understood:

views\settings\mapModeSettingsPage.qml


uncomment the lines between 38 - 47

models\MapSettingsModel.qml


uncomment the lines between 88 - 91 and 129 - 163

views\assistancePage.qml

uncomment the lines between 100 - 105

sections of code that should have the /*, */ syntax removed.


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8