GTIMatt Posted March 13, 2009 Report Share Posted March 13, 2009 New UI files for speed camera usage. Files in COMMON\UI - work in progress on spoken camera warnings. It seems to finally speak camera types properly, but does not pick correct speed to say... Everyone is welcome to fix Boris, not sure if you ever fixed the issue where it does not the say the correct speed, I had the same problem and think I have fixed it. I think I found 2 issues. 1. I don't think the dCurSCSpeed variable is populated when the call to the warn script gets called as my always seemed to use the the sound from the dCurSCSpeed < 9 line. I changed dCurSCSpeed to %navigation.curr_speedcam.speed_limit.value and it started calling the different sounds. 2. After making the above change it called the correct sound at 40mph but called the 70mph one at 60mph and the 80mph one at 70mph. My guess is the value of the camera speed limit is in km/h and is stored as an integer. According to google 70mph would be 112.65408km/h and round to 113. The code for 70mph does a < 113 comparison and so wouldn't be called. I changed it to < 114 and it called the 70mph sound correctly, I also changed the 60mph from < 97 to < 98 and it called the 60mph correctly. I think the other values I use would round down an be caught by the correct runif but if you use others then they may need changing. Here is my code for fixed cameras, I'm using different sounds from the original and so far I have confirmed that 40mph, 60mph and 70mph are called correctly. I've also only used speed limits that are used in the UK. ;Fixed Quote Link to post Share on other sites
BorisM Posted March 13, 2009 Author Report Share Posted March 13, 2009 Nice... I did have direct reference to %navigation.curr_speedcam.speed_limit.value but that did not seem to owqrk for me either. I'll try it again though... Quote Link to post Share on other sites
GTIMatt Posted March 14, 2009 Report Share Posted March 14, 2009 Nice... I did have direct reference to %navigation.curr_speedcam.speed_limit.value but that did not seem to owqrk for me either. I'll try it again though... I'm pretty happy with it so far, it seems to pick up the correct camera type and speed limit. I do have one issue though that I hope you may have some ideas for! I tried it on the way home with a route set and the guidance muted and the speedcam warning didn't sound (the visible warning was displayed). I'm sure with the stock system the dog barks whether the guidance is muted or not. I noticed that there is some code in the new speedcam scripts that seem to deal with if the volume is muted by unmuting and setting the volume to a predefined level. It is setting the 2 system values .sound.sound_muted and .sound.sound_volume. I'm not sure what these are set to when the guidance is muted as my buttons visibility is controlled by sound.announcer.muted. I'm also not sure whether this value has any affect on whether any sounds should play or not as it would make sense if the announcer was muted that other sounds would be heard as normal. Any ideas, or pointers? Thanks Matt. Quote Link to post Share on other sites
BorisM Posted March 14, 2009 Author Report Share Posted March 14, 2009 I'm pretty happy with it so far, it seems to pick up the correct camera type and speed limit. I do have one issue though that I hope you may have some ideas for! I tried it on the way home with a route set and the guidance muted and the speedcam warning didn't sound (the visible warning was displayed). I'm sure with the stock system the dog barks whether the guidance is muted or not. I noticed that there is some code in the new speedcam scripts that seem to deal with if the volume is muted by unmuting and setting the volume to a predefined level. It is setting the 2 system values .sound.sound_muted and .sound.sound_volume. I'm not sure what these are set to when the guidance is muted as my buttons visibility is controlled by sound.announcer.muted. I'm also not sure whether this value has any affect on whether any sounds should play or not as it would make sense if the announcer was muted that other sounds would be heard as normal. Any ideas, or pointers? Thanks Matt. Hmm, I'll need to think about it. I suppose if you want to keep audible warnings, you could just have it ignore mute settings.... I'll play with it. BTW, I got it working using the speed variable. Just needed to set it in a different script, and now it gives my MPH announcements... Quote Link to post Share on other sites
R3GUL8OR Posted March 14, 2009 Report Share Posted March 14, 2009 Hmm, I'll need to think about it. I suppose if you want to keep audible warnings, you could just have it ignore mute settings.... I'll play with it. BTW, I got it working using the speed variable. Just needed to set it in a different script, and now it gives my MPH announcements... nice! can't wait for the new version! Quote Link to post Share on other sites
BorisM Posted March 15, 2009 Author Report Share Posted March 15, 2009 nice! can't wait for the new version! It's the same as posted here, except I moved variable setting to a script closer to actual speech: Quote Link to post Share on other sites
GTIMatt Posted March 15, 2009 Report Share Posted March 15, 2009 I'm pretty happy with it so far, it seems to pick up the correct camera type and speed limit. I do have one issue though that I hope you may have some ideas for! I tried it on the way home with a route set and the guidance muted and the speedcam warning didn't sound (the visible warning was displayed). I'm sure with the stock system the dog barks whether the guidance is muted or not. I noticed that there is some code in the new speedcam scripts that seem to deal with if the volume is muted by unmuting and setting the volume to a predefined level. It is setting the 2 system values .sound.sound_muted and .sound.sound_volume. I'm not sure what these are set to when the guidance is muted as my buttons visibility is controlled by sound.announcer.muted. I'm also not sure whether this value has any affect on whether any sounds should play or not as it would make sense if the announcer was muted that other sounds would be heard as normal. Any ideas, or pointers? Thanks Matt. Hmm, I'll need to think about it. I suppose if you want to keep audible warnings, you could just have it ignore mute settings.... I'll play with it. BTW, I got it working using the speed variable. Just needed to set it in a different script, and now it gives my MPH announcements... I've been looking into this and I was driving about I noticed that the overspeed alert still sounded even when the guidance was muted. That sound is the standard !alert5.wav so I wondered if having the ! in the first character of the sound file would make this work. I renamed one of my alerts to have a ! as the first character and the speed camera I was testing last night started sounding the alert even when guidance was muted. My next plan is to rename each of the warning sounds and see if this solves my problem. Quote Link to post Share on other sites
BorisM Posted March 16, 2009 Author Report Share Posted March 16, 2009 I've been looking into this and I was driving about I noticed that the overspeed alert still sounded even when the guidance was muted. That sound is the standard !alert5.wav so I wondered if having the ! in the first character of the sound file would make this work. I renamed one of my alerts to have a ! as the first character and the speed camera I was testing last night started sounding the alert even when guidance was muted. My next plan is to rename each of the warning sounds and see if this solves my problem. Interesting find... I didn't know file name affected its mute-ability... Quote Link to post Share on other sites
GTIMatt Posted March 16, 2009 Report Share Posted March 16, 2009 I've been looking into this and I was driving about I noticed that the overspeed alert still sounded even when the guidance was muted. That sound is the standard !alert5.wav so I wondered if having the ! in the first character of the sound file would make this work. I renamed one of my alerts to have a ! as the first character and the speed camera I was testing last night started sounding the alert even when guidance was muted. My next plan is to rename each of the warning sounds and see if this solves my problem. Interesting find... I didn't know file name affected its mute-ability... Well, I'm still not sure whether it does or not! I drove to work this morning past 3 speedcams (some test, some real) with guidance muted and 2 of the 3 warnings sounded. The one that didn't sound a warning was a test cam I had put on close to a corner. I noticed that the it only sounds the warning if it thinks it's a new camera and the way it decides that is if the current distance to the cam is further than it was previously. I also noticed that when it stores the distance in the variable it adds 30 (metres, I think) to it (presumably to counter slght gps inaccuracy). This makes me wonder if the camera isn't picked up until you are quite close to it then the potential is there for you to be closer than the last time the variable was updated and therefore not be identified as a new camera and not sound the warning. I'm wondering if this is what happened on my example. It's all just guesswork really though, I wish there was a way you could debug this without having to keep loading changes to the car and trying them out! Quote Link to post Share on other sites
gnasr74 Posted March 16, 2009 Report Share Posted March 16, 2009 I would like to just use the files i need for the 3d buildings and the speedcam settings. Please let me know which files i need from those files and where i need to put them. I am having a hard time with the speedcam especially. Any help would be greatly appreciated. thank you Quote Link to post Share on other sites
BorisM Posted March 17, 2009 Author Report Share Posted March 17, 2009 Well, I'm still not sure whether it does or not! I drove to work this morning past 3 speedcams (some test, some real) with guidance muted and 2 of the 3 warnings sounded. The one that didn't sound a warning was a test cam I had put on close to a corner. I noticed that the it only sounds the warning if it thinks it's a new camera and the way it decides that is if the current distance to the cam is further than it was previously. I also noticed that when it stores the distance in the variable it adds 30 (metres, I think) to it (presumably to counter slght gps inaccuracy). This makes me wonder if the camera isn't picked up until you are quite close to it then the potential is there for you to be closer than the last time the variable was updated and therefore not be identified as a new camera and not sound the warning. I'm wondering if this is what happened on my example. It's all just guesswork really though, I wish there was a way you could debug this without having to keep loading changes to the car and trying them out! It does do something like that, and script code (which tries to minimize needless talking) works on top of some rather fancy footwork iGO does to determine when to start warning you of cameras... Too bad you can't simulate driving with speedcams... Quote Link to post Share on other sites
GTIMatt Posted March 17, 2009 Report Share Posted March 17, 2009 It does do something like that, and script code (which tries to minimize needless talking) works on top of some rather fancy footwork iGO does to determine when to start warning you of cameras... Too bad you can't simulate driving with speedcams... I think I've found out what's going on. It seems that if you are on a route and the speedcam sound warning is called when an spoken instruction is in progress or just about to start then the speedcam warning doesn't sound. I've confirmed that the code is running you just can't hear the sound. It makes no difference whether the guidance is muted or not. I don't know if there is anyway to identify that situation in the code as if there was you could hold off calling the warning until the instruction was over. I'm leaving it for now and removing my test cameras (which were the ones I noticed this on) and see how often this happens on real cameras. This means I have found that the audio filename doesn't make any difference to whether you can hear it when guidance is muted or not. Quote Link to post Share on other sites
ill.die.trying Posted March 25, 2009 Report Share Posted March 25, 2009 It does do something like that, and script code (which tries to minimize needless talking) works on top of some rather fancy footwork iGO does to determine when to start warning you of cameras... Too bad you can't simulate driving with speedcams... I think I've found out what's going on. It seems that if you are on a route and the speedcam sound warning is called when an spoken instruction is in progress or just about to start then the speedcam warning doesn't sound. I've confirmed that the code is running you just can't hear the sound. It makes no difference whether the guidance is muted or not. I don't know if there is anyway to identify that situation in the code as if there was you could hold off calling the warning until the instruction was over. I'm leaving it for now and removing my test cameras (which were the ones I noticed this on) and see how often this happens on real cameras. This means I have found that the audio filename doesn't make any difference to whether you can hear it when guidance is muted or not. any updates on this? Quote Link to post Share on other sites
BorisM Posted March 26, 2009 Author Report Share Posted March 26, 2009 Finally!... Latest revision of my DATA.ZIP is available here: http://www.megaupload.com/?d=OZQNZ7V1 All the features previously described, plus some changes to speed camera functionality: a) Added a few more speeds to select when adding/editing a camera (thanks to N-S-E-W) Warning box will show different icons depending on camera type c) Correctly working voice announcements in MPH. Installation: just copy the ZIP file, as usual. For voice announcements to work you need to have sound files (links posted here previously). Code will also work for Russian/KMH announcements if you change the call in speedcam.ui or just rename files (or references) if you want KMH announcements in a different language... Quote Link to post Share on other sites
ill.die.trying Posted March 26, 2009 Report Share Posted March 26, 2009 Finally!... Latest revision of my DATA.ZIP is available here: http://www.megaupload.com/?d=OZQNZ7V1 All the features previously described, plus some changes to speed camera functionality: a) Added a few more speeds to select when adding/editing a camera (thanks to N-S-E-W) Warning box will show different icons depending on camera type c) Correctly working voice announcements in MPH. Installation: just copy the ZIP file, as usual. For voice announcements to work you need to have sound files (links posted here previously). Code will also work for Russian/KMH announcements if you change the call in speedcam.ui or just rename files (or references) if you want KMH announcements in a different language... any known issues with this new one? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.