From 9464fdde2d780206e1eddba8cafbfbd4bbff83e4 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Thu, 14 Aug 2008 22:35:00 +0000 Subject: Apply FS#9155 (Simplified battery bench). This is a simplification/rework of the current battery bench code. Battery measurements are now done simply once a minute (no more dependency on HDD specific timeouts) and are flushed to disk by using the ata_idle callback instead of polling ata_disk_is_active (this call is removed from the plugin API now) to make the plugin as unobtrusive as possible. This battery bench plugin also works for flash-based targets like sansa e200. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18281 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/plugin.c') diff --git a/apps/plugin.c b/apps/plugin.c index 24082de..6ebb6fa 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -220,6 +220,7 @@ static const struct plugin_api rockbox_api = { gui_synclist_limit_scroll, gui_synclist_do_button, gui_synclist_set_title, + gui_syncyesno_run, simplelist_info_init, simplelist_show_list, @@ -263,9 +264,12 @@ static const struct plugin_api rockbox_api = { read_line, settings_parseline, ata_sleep, - ata_disk_is_active, ata_spin, ata_spindown, +#if USING_ATA_CALLBACK + register_ata_idle_func, + unregister_ata_idle_func, +#endif /* USING_ATA_CALLBACK */ reload_directory, create_numbered_filename, file_exists, @@ -593,6 +597,7 @@ static const struct plugin_api rockbox_api = { tagcache_get_next, tagcache_retrieve, tagcache_search_finish, + tagcache_get_numeric, #endif #ifdef HAVE_ALBUMART @@ -602,11 +607,7 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ -#ifdef HAVE_TAGCACHE - tagcache_get_numeric, -#endif - gui_syncyesno_run, }; int plugin_load(const char* plugin, const void* parameter) -- cgit v1.1