Timer and display question

Showing 1-10 of 10 messages
Timer and display question Edward 5/7/12 3:56 PM
I have looked on the group here and on the wiki and I'm just not finding what I want.

I go to a local racetrack I would like to create a widget that when I press it it starts a timer then when I press it again it stops the timer and displays an average speed around the track. Is this even possible with tasker or do I just need to do it on a calculator? Any help would be appreciated.
Re: Timer and display question Pent 5/7/12 11:12 PM
> I go to a local racetrack I would like to create a widget that when I press
> it it starts a timer then when I press it again it stops the timer and
> displays an average speed around the track. Is this even possible with
> tasker or do I just need to do it on a calculator? Any help would be
> appreciated.

Here's your widget task (I would create a shortcut though, use 'Task
Cut' if on ICS)

If %StartTime Isn't Set
    Variable Set, %StartTime, %TIMES
    Alert / Flash, Timer started...
Else
    Variable Set, %tracksecs, %TIMES - %Start (Do Maths Checked)
    Alert / Flash, Seconds around track: %tracksecs
    Variable Clear, %StartTime

Be careful to follow the case of the variable names exactly.

Pent
Re: Timer and display question Edward 5/8/12 3:55 PM

Ok, I have did all this and it works great as far as a timer, the only problem is now it is like a 10 digit number that makes no since. An example of the number 1336515032. Is this in like milliseconds or something? I have done this several times and it seems the first 5 or so numbers don't change just the last few.
I know your busy so if you don't reply right away I understand, being new to tasker and only tinkered with it just a little bit this honestly has me confused even though the above makes some sense after looking at it.
Re: Timer and display question Edward 5/8/12 5:13 PM
Ok I figured that one out this line needed changed.
Variable Set, %tracksecs, %TIMES - %Start (Do Maths Checked) 
to
Variable Set, %tracksecs, %TIMES - %StartTime (Do Maths Checked)

Now all I have to figure out how to take the distance and divide it by the time.
Re: Timer and display question Pent 5/8/12 10:54 PM
> Ok I figured that one out this line needed changed.
> Variable Set, %tracksecs, %TIMES - %Start (Do Maths Checked)
> to
> Variable Set, %tracksecs, %TIMES - %StartTime (Do Maths Checked)

Sorry, havn't been sleeping well :-)

> Now all I have to figure out how to take the distance and divide it by the
> time.

You could do a Variable Query action as the first in the task and type
in the distance when the popup comes. Then at the end:

Variable Set, %tracksecs, %TIMES - %StartTime (Do Maths Checked)
Variable Set, %speed, %distance / %tracksecs (Do Matchs Checked)
Alert / Flash, Speed around track: %speed
Variable Clear, %StartTime

Pent
Re: Timer and display question Edward 5/9/12 2:57 PM
I just want to thank you very much for your time. I did as you suggested and worked like a charm. The variable set thing is very confusing untill I saw it all laid out on my screen in tasker then it all starts to make since to me. You were a great help in figuring this out for me. I had no idea this was even possible with this little app. Thank you very much with this and making tasker such the great app that it is. Maybe one day I can help someone out and return the favor you have given me.
Now go get some sleep :)
Thanks again.
Re: Timer and display question Pent 5/9/12 11:19 PM
Glad it works for you.

I guess there are several races at the same distance. If so, you could
put the distance query part under a separate widget so you don't have
to type it in each time.

Pent
Re: Timer and display question Edward 5/10/12 2:08 PM
So this will sound like a dumb question,but how would I go about putting the distance of 1/2 mile in the task or would i do that in feet which would be 2640 feet. Thats the size of the track i go to most of the time but I'd be interested in doing the ones I see on tv also.

I cloned the one you have helped me with so I can make a different widget for that one.
Re: Timer and display question Pent 5/10/12 10:58 PM
> So this will sound like a dumb question,but how would I go about putting
> the distance of 1/2 mile in the task or would i do that in feet which would
> be 2640 feet.

Whichever you like. Then use the Varaibles / Variable Convert action
to convert
it to whatever you want the answer in.

If you want to get clever and have a spare half hour:

You can create a scene with a button for each track. Whichever button
you press, it sets the distance variable to the approproate one for
that track.

Create a scene in the scenes tab. Add a button element for a track,
label it the name of
the track. Click the On Click tab, and add an action e.g. Variable
Set, %Distance, 500.
Instead of doing Variable Query to get the distance with a text box,
do Scenes / Show Scene.
Deselect Continue Task Immediately in the Show Scene action.

Be sure to look at the help text in Menu / About This Screen in each
particular editor screen.

Pent
Re: Timer and display question Edward 5/12/12 10:44 AM
 Well hopefully after making a few more tasks myself I can dabble into the scenes a little bit. I have seen some that others have created and they look simply great. They way you explain it it seems easy enough and I'll just have to give it a go sometime.
Many thanks.