Timer and display question

75 views
Skip to first unread message

Edward

unread,
May 7, 2012, 6:56:44 PM5/7/12
to tas...@googlegroups.com
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.

Pent

unread,
May 8, 2012, 2:12:19 AM5/8/12
to Tasker
> 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

Edward

unread,
May 8, 2012, 6:55:38 PM5/8/12
to tas...@googlegroups.com

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.

Edward

unread,
May 8, 2012, 8:13:04 PM5/8/12
to tas...@googlegroups.com
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.

Pent

unread,
May 9, 2012, 1:54:03 AM5/9/12
to Tasker
> 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

Edward

unread,
May 9, 2012, 5:57:36 PM5/9/12
to tas...@googlegroups.com
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.

Pent

unread,
May 10, 2012, 2:19:28 AM5/10/12
to Tasker
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

Edward

unread,
May 10, 2012, 5:08:19 PM5/10/12
to tas...@googlegroups.com
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.

Pent

unread,
May 11, 2012, 1:58:50 AM5/11/12
to Tasker
> 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

Edward

unread,
May 12, 2012, 1:44:40 PM5/12/12
to tas...@googlegroups.com
 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.
Reply all
Reply to author
Forward
0 new messages