2004 to 2020 Mazda 3 Forum and Mazdaspeed 3 Forums banner

1 - 20 of 30 Posts

·
Registered
Joined
·
71 Posts
Discussion Starter #1 (Edited)
Hi all,

I always hated how the navigation freaked out when you went just slightly over the speed limit. The speed limit icon would turn red/yellow and if you had audio alerts enabled, it would say you are over the speed limit. So I decided I wanted to fix this and add a tolerance. I looked into it and iGo supports speed limit tolerances, both for highway and city roads. There are 2 types of tolerances; you can add an absolute value to the speed limit or take the speed limit as a percentage (100% or more of the speed limit). I went about testing this and it works. However, I could not get the different (city vs. highway) tolerances to work simultaneously with the audio alerts; I'm just not sure how the audio alerts work with iGo and if the issue is with the iGo binary or the custom lua scripts (by JCI) used by iGo. If it is with the lua scripts, I could potentially fix it.

With an unmodified data.zip file, the speed limit icon already has tolerance code but it is essentially unused since there is no way to set the tolerance via the UI. The behavior of the icon takes absolute value tolerances and it is controlled by navigatemap.lua and navigatemap.ui in the data.zip file. So to use the absolute value tolerance, it is really easy as it requires no modification of those files. If you want to use percentage, you would have to modify them and change the sc_GetAdvancedSpeedLimitPhase function. This function could be expanded to take into account the separate tolerances (city vs. highway) and whether absolute or percentage is used. However, it would just be for the icon as the audio alerts won't work properly (as stated above) which is annoying. I thought about expanding the function but I just didn't care to at this point; I just want a tolerance to work.

So to enable an absolute value tolerance via sys.txt file (under /jci/nng/) it is very easy, just add the following:


Code:
[warning]
speedwarn_tolerance=X
speedwarn_toltype=1
speedwarn_alt_tolerance=X
speedwarn_alt_toltype=1

Where X is your speed limit tolerance in kph (not mph, convert the value to get corresponding mph). The toltype settings are the tolerance type where 0 is percentage and 1 is absolute; we are using absolute for the reasons stated above.

I was going to leave it at this but I then decided I want to at least be able to set the tolerance in the Nav UI so I modified the settings files to add an entry for the tolerance. I've attached some images so you can see the setting and how the tolerance works. Instead of the icon going red/yellow, the limit text changes to red when in the tolerance range. If you go above the tolerance, the icon will change to red/yellow and audio alerts are given. I'm also attaching the code of the settings file. I don't know if this is usable on all regional firmware versions; I did this for my firmware which is v59.00.441 NA. If you are interested in getting it to work, let me know. You don't need to set anything in sys.txt if you use my settings mod.
 

Attachments

·
Registered
Joined
·
71 Posts
Discussion Starter #3
@championway Thanks in advance for your help.

I looked at the igo9.ini file and the is_spoken setting is already set to 1. The voice warnings already work for the speed limit tolerance but only for these settings:

Code:
speedwarn_tolerance
speedwarn_toltype
When I set the above, I will not hear the voice warning until I go over the tolerance so this works as expected.

I cannot activate the secondary tolerance (highway); it seems to ignore them. When I set these settings below, the voice warning will trigger for the above settings first. The expected behavior should be that the voice warning is not heard until we exceed this secondary tolerance and not the one above.

Code:
speedwarn_alt_tolerance
speedwarn_alt_toltype
I believe you are supposed to enable this secondary tolerance with this setting:

Code:
speedwarn_alt_limit
However, the information out there is conflicting on what this setting does. Some websites indicate it is the minimum speed limit where the secondary tolerance takes over. Others indicate it is a boolean to turn on/off the secondary tolerance where the tolerance turns on when on a road classified as highway. I tried testing the setting both ways and still the voice warnings only trigger for the regular tolerance (non-alt labeled).

Do you know what activates the voice warnings? The binary (jci-linux_imx6_volans-release) or the lua scripts? Combination of the two? Anything to look at in the data.zip file or SD card? I did find the text for the voice warning on the SD card under /content/voice/Voice_TTS-nua-eng-us-lua.zip, in the file info.ini as:

Code:
overspeed="You are over the speed limit."
Any other ideas?

Thank you again!
 

·
Registered
Joined
·
306 Posts
Thank you again!
look after the code "lm_SpeedWarningsPopoverUrban" = "Within Towns" and "lm_SpeedWarningsPopoverRural" = "Outside Towns" the Im_ could be little different arrange
there are no highway warring , just as at the map code ("Within Towns" , Outside Towns" )
 

·
Registered
Joined
·
71 Posts
Discussion Starter #5
look after the code "lm_SpeedWarningsPopoverUrban" = "Within Towns" and "lm_SpeedWarningsPopoverRural" = "Outside Towns" the Im_ could be little different arrange
there are no highway warring , just as at the map code ("Within Towns" , Outside Towns" )
I can't find the code for this. After additional consideration, unless you can point me directly to the problem, I think I'll just leave my mod as is. It's good enough for me considering I drive mainly on surface (city) streets. I've been looking through more of the lua scripts and some other nav related files. I think the problem is partly with the iGo binary and how it interacts with the lua scripts; specifically how string localizations are handled. Either that or I'm missing something (very possible!). I do appreciate your comments though. Thank you!
 

·
Registered
Joined
·
317 Posts
Hi all,

I always hated how the navigation freaked out when you went just slightly over the speed limit. The speed limit icon would turn red/yellow and if you had audio alerts enabled, it would say you are over the speed limit. So I decided I wanted to fix this and add a tolerance. I looked into it and iGo supports speed limit tolerances, both for highway and city roads. There are 2 types of tolerances; you can add an absolute value to the speed limit or take the speed limit as a percentage (100% or more of the speed limit). I went about testing this and it works. However, I could not get the different (city vs. highway) tolerances to work simultaneously with the audio alerts; I'm just not sure how the audio alerts work with iGo and if the issue is with the iGo binary or the custom lua scripts (by JCI) used by iGo. If it is with the lua scripts, I could potentially fix it.

With an unmodified data.zip file, the speed limit icon already has tolerance code but it is essentially unused since there is no way to set the tolerance via the UI. The behavior of the icon takes absolute value tolerances and it is controlled by navigatemap.lua and navigatemap.ui in the data.zip file. So to use the absolute value tolerance, it is really easy as it requires no modification of those files. If you want to use percentage, you would have to modify them and change the sc_GetAdvancedSpeedLimitPhase function. This function could be expanded to take into account the separate tolerances (city vs. highway) and whether absolute or percentage is used. However, it would just be for the icon as the audio alerts won't work properly (as stated above) which is annoying. I thought about expanding the function but I just didn't care to at this point; I just want a tolerance to work.

So to enable an absolute value tolerance via sys.txt file (under /jci/nng/) it is very easy, just add the following:


Code:
[warning]
speedwarn_tolerance=X
speedwarn_toltype=1
speedwarn_alt_tolerance=X
speedwarn_alt_toltype=1

Where X is your speed limit tolerance in kph (not mph, convert the value to get corresponding mph). The toltype settings are the tolerance type where 0 is percentage and 1 is absolute; we are using absolute for the reasons stated above.

I was going to leave it at this but I then decided I want to at least be able to set the tolerance in the Nav UI so I modified the settings files to add an entry for the tolerance. I've attached some images so you can see the setting and how the tolerance works. Instead of the icon going red/yellow, the limit text changes to red when in the tolerance range. If you go above the tolerance, the icon will change to red/yellow and audio alerts are given. I'm also attaching the code of the settings file. I don't know if this is usable on all regional firmware versions; I did this for my firmware which is v59.00.441 NA. If you are interested in getting it to work, let me know. You don't need to set anything in sys.txt if you use my settings mod.
Can you write a guide "How to use this Mod"?

Thank a lot!
 

·
Registered
Joined
·
306 Posts
I can't find the code .. I do appreciate your comments though. Thank you!
Ohhh yes, i read the setting lua and ini they just ignore them funny of NNG, however the Binary read them ( lm_SpeedWarningsPopoverUrban" / "lm_SpeedWarningsPopoverRural") as thy are code part listed in "MAP .fbl" you can take the code from other "IGO PRIMO 2.4" or later like "IGONEXTGEN" and add them to yours mode.

or back to your points : here are the sys.txt which can do the mode too need to try:
Code:
speedlimit_warning_visual=1 ,      speedlimit_warning_voice=1  ,     speedlimit_warning=1  ,   speedwarn_alt_builtup_based=1 , speedwarn_alt_limit=1   speedwarn_alt_tolerance=0 ,  speedwarn_alt_toltype=0  ,   speedwarn_tolerance=[B]110[/B] ,  speedwarn_toltype=0   [B]110 = 110%[/B]
or this from save profile IGO PRIMO
Code:
speedwarn_alt_tolerance="110" 
speedwarn_tolerance="105"

 

·
Registered
Joined
·
49 Posts
Hi! you just have to add this zip file to the nng folder? Or edit the data.zip and add this values?
Thanks again
 

·
Registered
Joined
·
71 Posts
Discussion Starter #9


or back to your points : here are the sys.txt which can do the mode too need to try:
Code:
speedlimit_warning_visual=1 ,      speedlimit_warning_voice=1  ,     speedlimit_warning=1  ,   speedwarn_alt_builtup_based=1 , speedwarn_alt_limit=1   speedwarn_alt_tolerance=0 ,  speedwarn_alt_toltype=0  ,   speedwarn_tolerance=[B]110[/B] ,  speedwarn_toltype=0   [B]110 = 110%[/B]
or this from save profile IGO PRIMO
Code:
speedwarn_alt_tolerance="110" 
speedwarn_tolerance="105"

Yeah, I tried that and it did not work. My original tests tried the following in the sys.txt file:

Code:
speedwarn_alt_builtup_based=1
speedwarn_tolerance=8 ;5 mph
speedwarn_alt_tolerance=16 ;10 mph
speedwarn_toltype=1
speedwarn_alt_toltype=1
speedwarn_alt_limit=X where X I tried as 1 for enabled and then 90 for a 90 kph threshold
The other settings were already set in the profile configuration files; I just double checked to make sure. The voice warning always activated when I exceeded the first tolerance, no matter what I set in speedwarn_alt_limit. For testing purposes, I enabled them when I had to recently drive to the next city over from where I live; I tried it as a boolean on the way over and then a speed limit threshold on the way back. I was driving on a highway and the speed limit was 105 kph so I'm not sure what the issue is. If that setting is just a boolean, it is possible the highway was not classified as a highway in the map files, which I would not be surprised at.

As I previously said, I'm OK with my mod as is. If you can figure it out easily, great but don't worry about it too much. Thanks again!
 

·
Registered
Joined
·
71 Posts
Discussion Starter #10 (Edited)
Hi! you just have to add this zip file to the nng folder? Or edit the data.zip and add this values?
Thanks again
Yes, you have to add them to the data.zip file (under /jci/nng/). If you have the speedcam patch or other nav mods, you will want to ensure you are using your modified data.zip file. Open the file with an appropriate archive program that supports legacy compression, such as old versions of Winrar. I believe you should be able to use normal Windows zip support too. Only 2 files need to be copied; the settings.lua and settings.ui file. The settings.luad file is the uncompiled/source lua file. The files replace the existing files under /ui_jci_mazda/common/ui/. Once updated, copy the file back to your CMU and reboot the CMU (leave the SD card out when copying the file over).

Depending on your firmware version and region, you might want to compare your corresponding setting files to the attached unmodified files from v59.00.441 NA. I also verified these files are the same for v59.00.443 EU. If your files don't match, you will need to make your own modifications or ask nicely. :smile2:
 

·
Registered
Joined
·
71 Posts
Discussion Starter #12 (Edited)
I've updated my original mod and added the option to select either absolute or percent based tolerance and then set the corresponding value for the tolerance. I also had to update the navigatemap.lua file to auto toggle between the different tolerance types. I need to test it (with a drive) but I'm pretty sure it will work. I will post the code and files once I confirm it's working as intended.

UPDATE: Sadly I don't think I'll be posting the code publicly after AIO got hit with a DMCA takedown from NNG. The letter made mention of illegal copies of NNG code and data which my posts could fall under. That being said, I have already removed the files from my posts.
 

·
Registered
Joined
·
71 Posts
Discussion Starter #13 (Edited)
I did my test drive today and it worked. I did note that the audio alerts got triggered once before the speed limit icon went over the tolerance range; this happened when I set the tolerance to percent. This happened right when I was on the edge of the tolerance range. I imagine this is due to the fact the percent tolerance can result in decimal values and how the values are rounded. I might need to add rounding (most likely round down) to the speed limit icon function if it becomes something I notice a lot but for now I'm leaving it as is because it appears to be minor.

I am posting the code but I will be taking it down by end of the week.
 

Attachments

·
Registered
Joined
·
26 Posts
Extremely interesting! I just downloaded the zip before it vanishes ;)

Could you write a small HOW-TO guide with infos on how to install this? Is it working with FW 59xxxx EU?
 

·
Registered
Joined
·
71 Posts
Discussion Starter #15
Extremely interesting! I just downloaded the zip before it vanishes ;)

Could you write a small HOW-TO guide with infos on how to install this? Is it working with FW 59xxxx EU?
This should be compatible with v59 EU; I believe all the files are the same. You have to add them to the data.zip file (under /jci/nng/). If you have the speedcam patch or other nav mods, you will want to ensure you are using your modified data.zip file (from your CMU). Open the file with an appropriate archive program that supports legacy compression, such as old versions of Winrar. Normal Windows zip support works too. Four files need to be copied: settings.lua, settings.ui, navigatemap.lua and navigatemap.ui. The *.luad files are the uncompiled/source lua files. The files replace the existing files under /ui_jci_mazda/common/ui/ in data.zip. Once updated, copy the file back to your CMU and reboot the CMU (leave the SD card out when copying the file over).
 

·
Registered
Joined
·
2 Posts
Many thanks for the files. :)

Is there a possibility to get it working with my 56.00.511 EU? With your files it hangs at "loading navigation".
 

·
Registered
Joined
·
71 Posts
Discussion Starter #19
Many thanks for the files. :)

Is there a possibility to get it working with my 56.00.511 EU? With your files it hangs at "loading navigation".
Did you repack the zip file correctly? To add the files, you either have to use an old version of WinRar or use native zip support in Windows. The nav app will hang if the data.zip file is not packed correctly.

If you did that correctly, there could be some differences with the data.zip file that could cause issues. I don't have time to work on this for you but I can give you advice on how to implement it. First off, get the base settings and navigatemap files (.ui and .lua) from the data.zip file from firmware version 59.00.441 NA (what I used). Decompile the settings.lua and navigatemap.lua files using iGoLua (you search for it on the forums or you should be able to find it through Google). You can use those base files to compare to my mod to see what I actually changed. Then, get the settings and navigatemap files from your data.zip file. Decompile the .lua files and compare those base .lua and .ui files to the base files from firmware version 59.00.441 NA. This will let you see the differences between the firmware versions. Then you will need to update the .lua and .ui files from your data.zip file with the changes, potentially making additional changes if necessary. Recompile (build) the .lua files and then copy the updated .lua and .ui files into the data.zip file.

This might be over your head but I just don't have time to work on this. Sorry. Good luck.
 
1 - 20 of 30 Posts
Top