Countdown timer doesn't beep at 00:00 ?

More
27 Nov 2012 15:27 - 27 Nov 2012 15:29 #3309 by suvsuv
Replied by suvsuv on topic Countdown timer doesn't beep at 00:00 ?

PhracturedBlue wrote: one thing I saw is that the code may not trigger if the timer doesn't fire at exactly '0' msec. since we only update it every 100msec, it is possible that it doesn't fire on the '0' tick. in that case the behavior may not be consistent. I didn't write the beep logic, but I'll dig into it and see if I can figure out what is wrong.

That is what I thought, there is no guarantee that the clock can always be triggered exactly at 0, so my previous fix gave the timer 1second lead time to make sure it can always beep at 00:00.
the way to verify the fix is to set a breakpoint insid the TIMER_update() when the timer is near 00:00, to on purposely let the emulator lose the 00:00, then you will see the timer won't beep until next interval cycle
Last edit: 27 Nov 2012 15:29 by suvsuv.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:29 #3310 by vlad_vy
Replied by vlad_vy on topic Countdown timer doesn't beep at 00:00 ?
I forget to mention that I start timer by throttle. If I set swith to 'None' and start timer manually (touch screen), I have double beep at 00:00 -> -00:00.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:33 #3311 by suvsuv
Replied by suvsuv on topic Countdown timer doesn't beep at 00:00 ?

vlad_vy wrote: I forget to mention that I start timer by throttle. If I set swith to 'None' and start timer manually (touch screen), I have double beep at 00:00 -> -00:00.

Ok, you point out the reproduce step.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:37 #3312 by vlad_vy
Replied by vlad_vy on topic Countdown timer doesn't beep at 00:00 ?
Any other switch do the same = no beep at 00:00 -> -00:00.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:40 #3313 by FDR
Replied by FDR on topic Countdown timer doesn't beep at 00:00 ?
Not necessarily.
I've just tried in both emulators to start the timers with the throttle stick and ch3 as the switch, and both worked fine. OK sometimes there was a slight delay in the last single beep at 0, but it beeped...

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:43 #3314 by FDR
Replied by FDR on topic Countdown timer doesn't beep at 00:00 ?
How fast PC you run the emulators on? Is it slower than avarage?
I'm trying it on an XP with i7 2.6GHz.
I will try it at home on a slower notebook under Vista later tonight...

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:46 #3315 by vlad_vy
Replied by vlad_vy on topic Countdown timer doesn't beep at 00:00 ?
Win XP i5 3.00GHz

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:46 #3316 by suvsuv
Replied by suvsuv on topic Countdown timer doesn't beep at 00:00 ?

FDR wrote: Not necessarily.
I've just tried in both emulators to start the timers with the throttle stick and ch3 as the switch, and both worked fine. OK sometimes there was a slight delay in the last single beep at 0, but it beeped...

forget the emulator, there are many bugs can't reproduce in emulator.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 15:51 #3317 by FDR
Replied by FDR on topic Countdown timer doesn't beep at 00:00 ?

suvsuv wrote:

FDR wrote: Not necessarily.
I've just tried in both emulators to start the timers with the throttle stick and ch3 as the switch, and both worked fine. OK sometimes there was a slight delay in the last single beep at 0, but it beeped...

forget the emulator, there are many bugs can't reproduce in emulator.

Yep, but Vlad got this error in the emulators too.
Besides I don't have the tx at work... ;)

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 16:09 - 27 Nov 2012 16:10 #3319 by vlad_vy
Replied by vlad_vy on topic Countdown timer doesn't beep at 00:00 ?
Yes, I got identical results with Devo8 and emu_devo8.
Start timer from throttle (or any switch) = no double beep at 00:00 -> -00:00.
Start timer manually (touch screen) = double beep at 00:00 -> -00:00.
Last edit: 27 Nov 2012 16:10 by vlad_vy.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 17:42 - 27 Nov 2012 17:44 #3322 by PhracturedBlue
Replied by PhracturedBlue on topic Countdown timer doesn't beep at 00:00 ?
I spent some time on it. my guess above was correct, but reversed. If the timer hits exactly 0msec, the music wouldn't fire. This means it was somewhat random depending when interrupts occur as to whether it would cause an issue or not. I have fixed the bug and checked it in.
Please confirm.
Last edit: 27 Nov 2012 17:44 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 19:19 #3324 by FDR
Replied by FDR on topic Countdown timer doesn't beep at 00:00 ?
The emu_devo8 v2.0 on my home notebook (Vista on a CoreDuo 2.26GHz) behaves like Vlad's: beeps at zero if there is no switch, and miss a beep if there is one. The actual DEVO 8 is the same with the v2.0.

With the 738b8ff both the emulator and the tx beep at zero even if there is a timer switch configured, so it solves the problem.

However I think it wasn't random at all. On the same platform it always behaved the same...

Please Log in or Create an account to join the conversation.

More
27 Nov 2012 19:23 #3325 by FDR
Replied by FDR on topic Countdown timer doesn't beep at 00:00 ?
BTW the timer value is not properly displayed on the actual tx either for the first time. After a model save it is there...

Please Log in or Create an account to join the conversation.

More
28 Nov 2012 02:03 - 28 Nov 2012 02:03 #3329 by PhracturedBlue
Replied by PhracturedBlue on topic Countdown timer doesn't beep at 00:00 ?
Thanks for verifying the timer. I actually was able to reproduce it about 1 in 20 times on the emulator (I printed the timer so I could see what was going on). Then I forced thetimer to always count be exactly 100ms and was able to consistently cause the missing beep. Anyhow, all fixed now.

FDR wrote: BTW the timer value is not properly displayed on the actual tx either for the first time. After a model save it is there...

I have just committed a fix for that too
Last edit: 28 Nov 2012 02:03 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum