Timer and display question

已查看 75 次
跳至第一个未读帖子

Edward

未读,
2012年5月7日 18:56:442012/5/7
收件人 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

未读,
2012年5月8日 02:12:192012/5/8
收件人 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

未读,
2012年5月8日 18:55:382012/5/8
收件人 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

未读,
2012年5月8日 20:13:042012/5/8
收件人 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

未读,
2012年5月9日 01:54:032012/5/9
收件人 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

未读,
2012年5月9日 17:57:362012/5/9
收件人 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

未读,
2012年5月10日 02:19:282012/5/10
收件人 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

未读,
2012年5月10日 17:08:192012/5/10
收件人 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

未读,
2012年5月11日 01:58:502012/5/11
收件人 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

未读,
2012年5月12日 13:44:402012/5/12
收件人 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.
回复全部
回复作者
转发
0 个新帖子