Jump to content
AVIC411.com

Bug - Speed Limit when displaying KM/H (Calling Canadians!)


Recommended Posts

so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

 

Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter...

 

added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

Link to post
Share on other sites
  • Replies 39
  • Created
  • Last Reply

Top Posters In This Topic

so i'll declare that in model_variables.ui?

and in the scrip how should it look like? should i just change the speedlimitcustvar to vSeedlimitCustomDisp.set?

 

Aha. Since the new variable isn't a model, you could declare in in navigatemap itself, doesn't really matter...

 

added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

 

I wouldn't the first line looks fine, I have code running that's formatted that way.

Link to post
Share on other sites
added this variable to navigatemap,ui

and then changed this

 

runif %navigation.current_speed_limit.value < 30 'vSeedlimitCustomDisp.set "30"'

 

end result, still the same

 

should i replace the code from above to this?

 

runif %speedlimitcustvar.value< 30 'vSeedlimitCustomDisp.set "30"'

 

Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

Link to post
Share on other sites
Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

 

OK, fixed! :)

 

Here's the deal:

 

in model_variables:


vSpeedLimit.valuemodel "navigation.current_speed_limit.value"
vSpeedLimit.onchange "sc_SpeedLimit"

 

In navigatemap.ui in :

 

And in the st_NavigateMap somewhere add a script with something like this:


 

Obviously adjust speeds and what you want to show...

 

And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like


 

Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there.

Link to post
Share on other sites
Strange... May bew remove the '%'? I'll try a few things in the meanwhile...

 

OK, fixed! :)

 

Here's the deal:

 

in model_variables:


vSpeedLimit.valuemodel "navigation.current_speed_limit.value"
vSpeedLimit.onchange "sc_SpeedLimit"

 

In navigatemap.ui in :

 

And in the st_NavigateMap somewhere add a script with something like this:


 

Obviously adjust speeds and what you want to show...

 

And finally in navigatemap_800_480.ui find the text element that shows the speed and do something like


 

Never mind fonts and all -- I was testing this on an HP IPAQ emulator for the PC, and it does work there.

 

one last thing, why is it that there's two text elements in the code above?

Link to post
Share on other sites
got everything set up but still not able to get it to display the the new assigned value,

 

Strange... Can you put something in the onchange script that you would immediately notice?

 

something like?

 

maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running.

Link to post
Share on other sites
maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running.

 

Indeed. This code does work on other iGo incarnations, and ours does appear to have OnChange, so I'd try debugging it piece by piece to see which piece does not work.

 

Also, for giggles, may be add a button on screen that will call sc_SpeedLimit script directly. If that does update speed limit display, this will narrow the field down quite a bit...

Link to post
Share on other sites
maybe hide one of your buttons? I'm guessing Boris is just trying to make sure your onchange script is actually running so if the first thing you do in the script is hide a button then if that button disappears you will at least know the script is running.

 

Indeed. This code does work on other iGo incarnations, and ours does appear to have OnChange, so I'd try debugging it piece by piece to see which piece does not work.

 

Also, for giggles, may be add a button on screen that will call sc_SpeedLimit script directly. If that does update speed limit display, this will narrow the field down quite a bit...

 

added a button to run the script but it still does nothing,

Link to post
Share on other sites
added a button to run the script but it still does nothing,

 

Hmmm... This tells me that the script is not setting something correctly.

 

Try doing this: since the button is initially defined as unknown, have the first statement of the script setting it to something else:

tMySpeedLimit.text "Testing 1,2,3"

 

Then run all the statements that set speed limit sign to something else. Manually setting text value of a text element should always work, regardless of anything models, OnChange etc. do. I just tried it in the emulator, and it works here, too...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...



×
×
  • Create New...