Post Reply 
WP-34S: Stopwatch - bug, feature, or user error?
05-07-2014, 03:53 PM
Post: #1
WP-34S: Stopwatch - bug, feature, or user error?
I am running build 3575. When I start the stopwatch with CPX-R/S and then use it, everything behaves as expected. However, If I start the stopwatch and then just let it sit for a few minutes (4 to 5), the calculator looks as if it is still in stopwatch mode, but if you hit R/S to start the timer, it flashes something on the screen and immediately exits the stopwatch.
Find all posts by this user
Quote this message in a reply
05-07-2014, 06:23 PM
Post: #2
RE: WP-34S: Stopwatch - bug, feature, or user error?
This is a "bug/feature" and if I remember correctly, it has to do with the energy saving mode. After a few minutes, we loose the data structures used to keep track of the stopwatch mode.
The alternative would be to prevent the WP-34s to go into deep sleep when stopped in stopwatch mode but at the risk of eating the batteries.

Maybe there is a solution but nothing comes to mind (well, to my mind at least).
Find all posts by this user
Quote this message in a reply
05-07-2014, 07:51 PM
Post: #3
RE: WP-34S: Stopwatch - bug, feature, or user error?
I cannot reproduce your observation on the emulator using the latest build (3626). My WP 34S v3 doesn't have a quartz built in, and my WP 34S v2.2 doesn't feature STOPW yet, so I can't test your observations on the real thing. Sorry.

Can you try to update your WP 34S to said build and check if the problem persists?

d:-)

(I prepared this answer earlier today and now find Pascal has responded quicker. The 4 - 5 minutes you report obviously point to auto-power-down - as written above I have no means to verify that, however.)
Find all posts by this user
Quote this message in a reply
05-09-2014, 09:10 AM
Post: #4
RE: WP-34S: Stopwatch - bug, feature, or user error?
I have just flashed my WP34s with revision 3645 and get the behavior described by Marcel.
Find all posts by this user
Quote this message in a reply
05-09-2014, 08:38 PM
Post: #5
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 09:10 AM)Harald Wrote:  I have just flashed my WP34s with revision 3645 and get the behavior described by Marcel.
It looks like the stopwatch does not reset the idle timer. It shouldn't be too hard to fix.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
05-09-2014, 08:50 PM
Post: #6
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 08:38 PM)Marcus von Cube Wrote:  It looks like the stopwatch does not reset the idle timer. It shouldn't be too hard to fix.

As I said above, one would risk eating the battery. A cleaner solution would be to keep the stopwatch status whilst going into deep sleep but I'm not sure we have enough persistent memory to do so.
I remember this was the main issue when I implemented it: memory.
Find all posts by this user
Quote this message in a reply
05-09-2014, 09:02 PM (This post was last modified: 05-10-2014 07:09 PM by Brad Barton.)
Post: #7
RE: WP-34S: Stopwatch - bug, feature, or user error?
Would it be possible to set a flag if the stopwatch is running, and store the difference between stop watch value and the internal clock when the idle timer puts the machine to sleep? Then on wake up, check the flag and if it's set, restore the stopwatch value by adding that difference to the internal clock time, and keep the stopwatch running.

You'd only have to store 2 values: the difference in time, and the flag that says "stopwatch running". This would work even if the calculator is switched off, but I'm not sure how much persistent memory you have to work with.

Total noob here, so just wondering.
Find all posts by this user
Quote this message in a reply
05-09-2014, 09:10 PM
Post: #8
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 09:02 PM)Brad Barton Wrote:  Would it be possible to set a flag if the stop watch is running, and store the difference between stop watch value and the internal clock when the idle timer puts the machine to sleep? Then on wake up, check the flag and if it's set, restore the stop watch watch value by adding that difference to the internal clock time, and keep the stopwatch running.

Very interesting idea, thank you Brad! Smile Worthwile following IMHO if we can still afford it.

d:-)
Find all posts by this user
Quote this message in a reply
05-09-2014, 09:56 PM
Post: #9
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 09:02 PM)Brad Barton Wrote:  Would it be possible to set a flag if the stop watch is running, and store the difference between stop watch value and the internal clock when the idle timer puts the machine to sleep?
The problem is that in deep sleep the processor is shut off and so are the interrupts. The only reliable time source during deep sleep is the RTC with a resolution of a second. I'd say: forget saving battery and just disable the shutdown while the stopwatch is active. The battery consumption shouldn't be excessive anyway because the stopwatch doesn't need a lot of processing power.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
05-09-2014, 11:21 PM
Post: #10
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 09:56 PM)Marcus von Cube Wrote:  The problem is that in deep sleep the processor is shut off and so are the interrupts. The only reliable time source during deep sleep is the RTC with a resolution of a second. I'd say: forget saving battery and just disable the shutdown while the stopwatch is active. The battery consumption shouldn't be excessive anyway because the stopwatch doesn't need a lot of processing power.

I should've realized that your group would have already implemented something so simple if it was possible.

Maybe a flag setting to let the user decide if he wants to disable sleep mode if the stopwatch is running would be simpler.
Find all posts by this user
Quote this message in a reply
05-10-2014, 06:06 AM
Post: #11
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-09-2014 11:21 PM)Brad Barton Wrote:  
(05-09-2014 09:56 PM)Marcus von Cube Wrote:  The problem is that in deep sleep the processor is shut off and so are the interrupts. The only reliable time source during deep sleep is the RTC with a resolution of a second. I'd say: forget saving battery and just disable the shutdown while the stopwatch is active. The battery consumption shouldn't be excessive anyway because the stopwatch doesn't need a lot of processing power.

I should've realized that your group would have already implemented something so simple if it was possible.

Maybe a flag setting to let the user decide if he wants to disable sleep mode if the stopwatch is running would be simpler.

The ingenious ideas may just be the simple ones not seen yet. Wink

Just crossed my mind like a neutrino: Anybody running the stopwatch without displaying tenths of seconds may be
  • realistic and/or
  • not interested in short time differences (with 'short' meaning <4' Wink ).
Since displaying tenths is startup default, let me suggest: IF tenths are turned off AND the stopwatch is running THEN automatic power down shall be turned off.

d:-)
Find all posts by this user
Quote this message in a reply
05-10-2014, 07:36 AM
Post: #12
RE: WP-34S: Stopwatch - bug, feature, or user error?
When stopwatch is running, automatic power off is always ignored. Stopwatch can run for hours.
The problem occurs when stopwatch is not running, i.e. just stopped but we are still in stopwatch mode.

I had a mode detailed look at the code and in this case, stopwatch stops itself after 3 minutes, line 469 of stopwatch.c:

} else if(StopWatchKeyticks >= STOPWATCH_APD_TICKS) {
KeyCallback=(int(*)(int)) NULL;

So a solution is to increase STOPWATCH_APD_TICKS to a few hours... One can suppose that using the WP34s to measure time, stop it for hours and then restarting it is a very rare usage.
Find all posts by this user
Quote this message in a reply
05-10-2014, 01:12 PM (This post was last modified: 05-10-2014 07:07 PM by Brad Barton.)
Post: #13
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-10-2014 06:06 AM)walter b Wrote:  Since displaying tenths is startup default, let me suggest: IF tenths are turned off AND the stopwatch is running THEN automatic power down shall be turned off.

How about the following: IF tenths are turned off AND stopwatch is running, THEN automatic power down is enabled AND the time difference is carried forward to power up AND stopwatch is re-started with the time difference added.

Not sure I like it because it's error prone. Even though the user is supposedly unconcerned about the accuracy of the stopwatch in this scenario, the calculator would be showing a result with the potential inaccuracy of +/- 1 sec. This error could also increase to n*(+/-1 sec) with n power down cycles. I would tend not to trust an instrument that could return erroneous results.

I think probably Pascal's approach is the winner.
Find all posts by this user
Quote this message in a reply
05-10-2014, 02:29 PM
Post: #14
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-10-2014 01:12 PM)Brad Barton Wrote:  
(05-10-2014 06:06 AM)walter b Wrote:  Since displaying tenths is startup default, let me suggest: IF tenths are turned off AND the stopwatch is running THEN automatic power down shall be turned off.

How about the following: IF tenths are turned of AND stopwatch is running, THEN automatic power down is enabled AND the time difference is carried forward to power up AND stopwatch is re-started with the time difference added.

Not sure I like it because it's error prone. Even though the user is supposedly unconcerned about the accuracy of the stopwatch in this scenario, the calculator would be showing a result with the potential inaccuracy of +/- 1 sec. This error could also increase to n*(+/-1 sec) with n power down cycles. I would tend not to trust an instrument that could return erroneous results.

Exactly therefore I made my suggestion as I did above. Please don't propose something you already know it's worse. Perhaps my English left space for improvement, so let me rephrase my suggestion:
"IF tenths are turned off AND the stopwatch is running THEN automatic power down shall be disabled."
As Marcus indicated, the stopwatch alone won't drain the batteries quickly.

d:-)

[rant] I sometimes find me wishing some claiming their mother tongue starts with 'E' would care for the precision of their written statements half as much as most folks do whose mother tongues start with different letters. Less uncorrected typos on this forum, less grammar faults, less cryptic sentences, less decoding efforts in a foreign language, ... Perhaps those 'E' folks could also try to decode in their language what a foreigner may have meant who took the effort of expressing it in it? I faintly remember a sign a late CEO of IBM put on his desk so his visitors could read it as well: THINK! [/rant]
Find all posts by this user
Quote this message in a reply
05-10-2014, 03:56 PM
Post: #15
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-10-2014 02:29 PM)walter b Wrote:  Exactly therefore I made my suggestion as I did above. Please don't propose something you already know it's worse. Perhaps my English left space for improvement, so let me rephrase my suggestion:
"IF tenths are turned off AND the stopwatch is running THEN automatic power down shall be disabled."
As Marcus indicated, the stopwatch alone won't drain the batteries quickly.

d:-)

[rant] I sometimes find me wishing some claiming their mother tongue starts with 'E' would care for the precision of their written statements half as much as most folks do whose mother tongues start with different letters. Less uncorrected typos on this forum, less grammar faults, less cryptic sentences, less decoding efforts in a foreign language, ... Perhaps those 'E' folks could also try to decode in their language what a foreigner may have meant who took the effort of expressing it in it? I faintly remember a sign a late CEO of IBM put on his desk so his visitors could read it as well: THINK! [/rant]

My apologies Walter. I was attempting to help find a way to maintain the stopwatch's function while the calculator is in sleep mode. I thought by floating the idea, one of your team could refine it into a successful method. "THINK!"-ing is the response I was hoping to inspire.

In addition, please feel free to point out the part of my message that you found to be imprecise or misspelled. It is not my intent to be unclear, nor do I wish to offend those to whom 'E' is a 2nd (or 3rd) language.
Find all posts by this user
Quote this message in a reply
05-10-2014, 05:02 PM (This post was last modified: 05-10-2014 05:05 PM by walter b.)
Post: #16
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-10-2014 03:56 PM)Brad Barton Wrote:  I was attempting to help find a way to maintain the stopwatch's function while the calculator is in sleep mode. I thought by floating the idea, one of your team could refine it into a successful method. "THINK!"-ing is the response I was hoping to inspire.

Thinking you made us. In reaction to the observations reported in the OP, we're thinking of disabling deep sleep under these conditions. You pulled the trigger, however, when proposing something thereafter which - according to your own assessment - could return erroneous results. That finding, however, didn't keep you from posting that proposal anyway which in turn made me missing some ... hmmh ... thought. Maybe the wrong term?

Quote:In addition, please feel free to point out the part of my message that you found to be imprecise or misspelled.
Since you asked for it:
(05-10-2014 01:12 PM)Brad Barton Wrote:  How about the following: IF tenths are turned of AND stopwatch is running, ...
Contains one 'f' too less IMHO. Not dramatic (there are worse cases here, you just happened to add this drop at the wrong time) but I'd correct it if I find such stuff in my own posts. YMMV

d:-/
Find all posts by this user
Quote this message in a reply
05-10-2014, 07:07 PM (This post was last modified: 05-10-2014 07:08 PM by Brad Barton.)
Post: #17
RE: WP-34S: Stopwatch - bug, feature, or user error?
(05-10-2014 05:02 PM)walter b Wrote:  
Quote:In addition, please feel free to point out the part of my message that you found to be imprecise or misspelled.
Since you asked for it:
(05-10-2014 01:12 PM)Brad Barton Wrote:  How about the following: IF tenths are turned of AND stopwatch is running, ...
Contains one 'f' too less IMHO. Not dramatic (there are worse cases here, you just happened to add this drop at the wrong time) but I'd correct it if I find such stuff in my own posts. YMMV

dUndecided

Haha! OK you win Walter. I'll proof read a little more thoroughly going forward. All fixed up now.

Cheers,
Brad
Find all posts by this user
Quote this message in a reply
05-11-2014, 05:11 AM
Post: #18
RE: WP-34S: Stopwatch - bug, feature, or user error?
Rather than concentrating on spelling, at which Shakespeare himself wasn't too good, the difference between "less" & "fewer", or perhaps even "few" in this case, could be emphasised.
Find all posts by this user
Quote this message in a reply
05-12-2014, 08:10 AM
Post: #19
RE: WP-34S: Stopwatch - bug, feature, or user error?
Thanks, Gerald. Smile
Find all posts by this user
Quote this message in a reply
05-12-2014, 08:15 AM
Post: #20
RE: WP-34S: Stopwatch - bug, feature, or user error?
After knowing the cause for that bug - what will be the therapeutic measure to get rid of it now?

d:-?
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)