diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-10-15 18:18:15 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-10-15 18:18:15 +0000 |
commit | c4f96930f03db6c715f71dcf964217179cc698d4 (patch) | |
tree | e4346945c74d6ff6eb951273448983563f1dd2c0 /firmware/powermgmt.c | |
parent | a5117f0bb6cc3d41fb56c8ba17d66545d026d5f8 (diff) | |
download | rockbox-c4f96930f03db6c715f71dcf964217179cc698d4.tar.gz rockbox-c4f96930f03db6c715f71dcf964217179cc698d4.zip |
Adjusted power thread to Ondio: no charging, no car adapter mode, different current values for runtime estimation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5286 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index e4bdd5192b..9cd88819d9 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -79,7 +79,7 @@ void set_car_adapter_mode(bool setting) #else /* not SIMULATOR */ -int battery_capacity = 1500; /* only a default value */ +int battery_capacity = BATTERY_CAPACITY_MIN; /* only a default value */ int battery_level_cached = -1; /* battery level of this minute, updated once per minute */ static bool car_adapter_mode_enabled = false; @@ -368,6 +368,7 @@ void set_car_adapter_mode(bool setting) static bool charger_power_is_on; +#ifdef HAVE_CHARGING static void car_adapter_mode_processing(void) { static bool waiting_to_resume_play = false; @@ -415,6 +416,7 @@ static void car_adapter_mode_processing(void) } } } +#endif /* * This function is called to do the relativly long sleep waits from within the @@ -424,6 +426,7 @@ static void car_adapter_mode_processing(void) */ static void power_thread_sleep(int ticks) { +#ifdef HAVE_CHARGING while (ticks > 0) { int small_ticks = MIN(HZ/2, ticks); sleep(small_ticks); @@ -431,6 +434,9 @@ static void power_thread_sleep(int ticks) car_adapter_mode_processing(); } +#else + sleep(ticks); /* no fast-processing functions, sleep the whole time */ +#endif } |