Re: [A89: Re: OSInitBetweenKeyDelay]


[Prev][Next][Index][Thread]

Re: [A89: Re: OSInitBetweenKeyDelay]




> I am using _rowread() to access the keyboard.  I had it set up with a
keydelay
> almost exactly like you said, with a different delay value for rotate and
> left/right, but it would miss buttons.  For example, if I hit the flip key
> twice really fast it would miss the second flip because of the delay.
>
> Did you have this problem?  I was thinking maybe I could queue up the keys
if
> they are hit during a delay... Did  you do that?

I hate to say it because you're doing this in C. . . but the correct
solution is that which TI uses, which is to put the keyreading in an
interrupt.  When both rotation keys are released or after they've been held
down for a certain amount of time, set a flag and have the program act
appropriately. . .

Of course, I am reminded by the newly updated hardware info file that you'll
have to compensate for "bouncing"; that is, when you press down a key, it
doesn't just trigger as down - there are usually a few fractions of a second
in which it will toggle between on and off several times, as the key
detection is very sensitive.

If you set this up auto-int 1, its speed of 350 Hz is sufficient to have it
only test the keyboard so often that it will not detect the bounce, but
often enough that the user can tap the key as fast as s/he likes and move it
multiple times.

On an unrelated note, I just took out my 89 after not using it in a month
and a half.  It feels really weird to use a real calc rather than an emu. .
. hmmmm. . .

    -Scott