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

Re: J5000 LCD heartbeat



On Sunday 20 March 2005 22:57, David Pye wrote:

> Well, I've had a bit of a play with this, and think I have a feel of what
> causes it.
>
> The led_LCD_driver() fires each time the tasklet decides the led statuses
> should change, but each time it only updates at best one of the four LEDs.
>
> Every time it fires, it either updates one led, or it writes the command
> register, to avoid sleeping.   This means, that it requires eight fires of
> the tasklet (and eight times of it having decided an LCD state should flip)
> before the heartbeat will be written to.  It seems to be a rare occasion
> that these all line up (most of the time the heartbeat has pulsed back to
> its previous state before the LCD panel itself gets updated.

      
It appears my hunch was correct
  /* update the LCD/LEDs */
        if (currentleds != lastleds || led_type == LED_HASLCD) {
            led_func_ptr(currentleds);
            lastleds = currentleds;
        }

If I modify the conditional as above, so it fires the led_func_ptr each time 
the tasklet fires for LCD users (even if the leds haven't nominally changed) 
my heart beats!

Admittedly, it doesn't QUITE beat right, because of the rate the tasklet 
fires, and the rate at which the heart is supposed to beat.

I'm convinced another solution, like one of the ones I mentioned earlier, is a 
better idea, of course.

I now get:

a normal double beat, followed a single beat (repeats).

Which is better than no beats at all in my book!

Cheers,

David

> Cheers,
>
> David

Attachment: pgpVz22g1hzhL.pgp
Description: PGP signature


Reply to: