# Elevation screen for RR

Show 40 post(s) from this thread on one page
Page 2 of 3 First 123 Last
• 09-07-2010, 01:08 PM
pierrotm777
Quote:

Originally Posted by JohnWPB
It is actually pretty easy, being you are using a script to calculate the slider bars already.

Put this line of code in your skin:

S,725,77,70,447,720,77,60,447,v,01,"Bar.png",60,"\$ ElevSlider\$",

Now, in your script you just need to set the limit of the \$ElevSlider\$ variable to be between 0 and 65535. For instance 32767 would be the very center, or the middle, of the slider.

Being there are 20 steps of this slider, the formula to calculate it would be

\$ElevPosition = (\$YourNumber * 65535)/20
rr.Execute ("SetVar;ElevSlider;" & ElevPosition)

Where your number is between 1 and 20. It is best to round the number up to 1 so there is no division or multiplication by 0.

To test it to see how it works, its best to put that line in a skin, and in the skin tool fire the command SetVar;ElevSlider;32650. By changing that number you will see the slider move in the skin. Once you see that, it should be fairly simple to figure it out :)

I am sorry but it is exactly that i do.

I have that the the skin file:
Code:

`S02,760,80,19,151,545,75,35,30,V,02,"",015,"\$DISTANCESLIDER\$",""`
and that into my autoit script:
Code:

```global \$distanceSlider = IniRead("Settings.ini", "Elevation", "distance", "");500 global \$multiplier = 65536/\$distanceSlider \$rr.execute("SETVAR;DISTANCESLIDER;"&\$distance * \$multiplier)```
• 09-07-2010, 01:11 PM
JohnWPB
The difference is you are using the individual images in the "DistanceSliderImages" folder:
slider_0.png
slider_1.png
slider_2.png
slider_3.png.... all the way up to 20.

With the dynamic slider line from above, all you need is a single image, the pointer.png. That single image "slides" up and down on the screen based on the variable.
• 09-08-2010, 12:51 AM
pierrotm777
Do you prefer that?
• 09-08-2010, 03:47 AM
JohnWPB
Ok, I guess I am lost here.... I thought this script was just to tell the slope that you were driving on, either going up a hill, or down a hill and how steep.

What is the distance for, and why does distance need a slider?

I was thinking the slider was for the slope itself. In the screen capture below, the red line is at 0[IMG]file:///C:/DOCUME%7E1/John/LOCALS%7E1/Temp/moz-screenshot.png[/IMG]°, this would mean that you are driving on level ground. If you go down a hill, that slider should move down the slider, depending on how steep the hill is.

I still have no idea where the 5418% is coming from.... I have the GPS sitting on the desk next to me, so it is staying level. Should this not read 0%?
• 09-08-2010, 09:39 AM
pierrotm777
I have add a slider just for to do a slider test.
It is the first time that i try to use a slider on a autoit script. The slider's setting is defined :
distance=500 .
With that setting the distance between the first point and le last point is 500m.
Also, each 500m, the script give a new slope value.

The slider give a distance, not an angle ! That would be a good idea to change that!
I don't know if I am able to do that, but i can to try .

The final script will have a specific GoogleMaps option who will give the slope of a track.

The swf additions are just for a test. As you can see , they don't run on this screen.

Can you try only on metre and say me if you have always a slope too big ? (> 45% is very dangerous !!!!)
• 09-08-2010, 12:32 PM
pierrotm777
Big update
Thanks to JohnWPB for the slope slider idea.

The vertical slider give the slope value between +45° and -45° with an alarm if the slope is higher than +-45° .:becky:
• 09-08-2010, 01:02 PM
drewbp
For slope, this would be a great indicator option, and if one had the option to replace the Jeep with their own vehicle it would be even more cool.
• 09-09-2010, 01:47 PM
pierrotm777
Version 0.4 is on the first post
• 09-09-2010, 09:08 PM
GizmoQ
Quote:

Originally Posted by drewbp
For slope, this would be a great indicator option, and if one had the option to replace the Jeep with their own vehicle it would be even more cool.

I bet Sonic could whip that up in a flash movie in a heartbeat!
• 09-10-2010, 08:08 AM
pierrotm777
Audi A4 B8 2008
Show 40 post(s) from this thread on one page
Page 2 of 3 First 123 Last