|
Rockbox mail archiveSubject: Re: AJB wake up in car applicationRe: AJB wake up in car application
From: Brian Wolven <brian.wolven_at_verizon.net>
Date: Wed, 21 Apr 2004 14:38:54 -0400 Matthias.Klumpp_at_gmx.de wrote: > Hi all, > > as there was unfortunately no further answer to my last e-mail, I was just > testing the daily build 21.04.2004 to find out if that "car adapter mode > wake-up" feature maybe is already included. > > At least in the menu I was finding nothing. > > I would apreciate any information about the progress on that feature or some > help in case it's included but I'm handling it the wrong way. I'm currently running the April 13 daily build. If I do F1->General Settings->System I see a "car Adapter Mode" as the next-to-last entry on that screen. This code is also in CVS ATM, so it sure seems like it ought to be there and working: void set_car_adapter_mode(bool setting) { car_adapter_mode_enabled = setting; } static void car_adapter_mode_processing(void) { static bool charger_power_is_on = false; static bool waiting_to_resume_play = false; static long play_resume_time; if (car_adapter_mode_enabled) { if (waiting_to_resume_play) { if (TIME_AFTER(current_tick, play_resume_time)) { if (mpeg_status() & MPEG_STATUS_PAUSE) { mpeg_resume(); } waiting_to_resume_play = false; } } else { if (charger_power_is_on) { /* if external power was turned off */ if (!charger_inserted()) { charger_power_is_on = false; /* if playing */ if ((mpeg_status() & MPEG_STATUS_PLAY) && !(mpeg_status() & MPEG_STATUS_PAUSE)) { mpeg_pause(); } } } else { /* if external power was turned on */ if (charger_inserted()) { charger_power_is_on = true; /* if paused */ if (mpeg_status() & MPEG_STATUS_PAUSE) { /* delay resume a bit while the engine is cranking */ play_resume_time = current_tick + HZ*5; waiting_to_resume_play = true; } } } } } } _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockbox Received on 2004-04-21 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |