diff options
Diffstat (limited to 'firmware/target/coldfire/iaudio')
-rw-r--r-- | firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c index 939f7347c4..9940017dd9 100644 --- a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c +++ b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | |||
@@ -18,8 +18,9 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | 19 | #include "config.h" |
20 | #include "system.h" | 20 | #include "system.h" |
21 | #include "kernel.h" | 21 | #include "file.h" |
22 | #include "lcd-remote.h" | 22 | #include "lcd-remote.h" |
23 | #include "scroll_engine.h" | ||
23 | 24 | ||
24 | /* The LCD in the iAudio M3/M5/X5 remote control is a Tomato LSI 0350 */ | 25 | /* The LCD in the iAudio M3/M5/X5 remote control is a Tomato LSI 0350 */ |
25 | 26 | ||
@@ -397,7 +398,6 @@ static void remote_tick(void) | |||
397 | { | 398 | { |
398 | static bool last_status = false; | 399 | static bool last_status = false; |
399 | static int countdown = 0; | 400 | static int countdown = 0; |
400 | static int init_delay = 0; | ||
401 | bool current_status; | 401 | bool current_status; |
402 | 402 | ||
403 | current_status = remote_detect(); | 403 | current_status = remote_detect(); |
@@ -416,20 +416,16 @@ static void remote_tick(void) | |||
416 | 416 | ||
417 | if (current_status) | 417 | if (current_status) |
418 | { | 418 | { |
419 | if (!(countdown % 8)) | 419 | if (!(countdown % 48)) |
420 | { | 420 | { |
421 | if (--init_delay <= 0) | 421 | queue_broadcast(SYS_REMOTE_PLUGGED, 0); |
422 | { | ||
423 | queue_post(&remote_scroll_queue, REMOTE_INIT_LCD, 0); | ||
424 | init_delay = 6; | ||
425 | } | ||
426 | } | 422 | } |
427 | } | 423 | } |
428 | else | 424 | else |
429 | { | 425 | { |
430 | if (countdown == 0) | 426 | if (countdown == 0) |
431 | { | 427 | { |
432 | queue_post(&remote_scroll_queue, REMOTE_DEINIT_LCD, 0); | 428 | queue_broadcast(SYS_REMOTE_UNPLUGGED, 0); |
433 | } | 429 | } |
434 | } | 430 | } |
435 | } | 431 | } |