21 Mar 00:17
Re: J5000 LCD heartbeat
David Pye <dmp <at> davidmpye.dyndns.org>
2005-03-20 23:17:03 GMT
2005-03-20 23:17:03 GMT
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.
(Continue reading)
RSS Feed