diff -ur rockbox-bleeding-old\apps\main.c rockbox-bleeding\apps\main.c --- rockbox-bleeding-old\apps\main.c Fri Aug 10 04:40:48 2007 +++ rockbox-bleeding\apps\main.c Fri Aug 24 13:48:27 2007 @@ -407,6 +407,10 @@ if (rc == 1) /* charger removed */ power_off(); /* "On" pressed or USB connected: proceed */ +#if defined(ARCHOS_RECORDERV2) || defined(ARCHOS_FMRECORDER) + /* ata_init() won't turn on IDE power so do it here */ + ide_power_enable(true); +#endif show_logo(); /* again, to provide better visual feedback */ } #endif diff -ur rockbox-bleeding-old\apps\screens.c rockbox-bleeding\apps\screens.c --- rockbox-bleeding-old\apps\screens.c Sat Aug 18 08:37:02 2007 +++ rockbox-bleeding\apps\screens.c Fri Aug 24 13:55:40 2007 @@ -189,16 +189,17 @@ unsigned i; char buf[32]; (void)buf; + int battv; -#ifdef NEED_ATA_POWER_BATT_MEASURE - if (ide_powered()) /* FM and V2 can only measure when ATA power is on */ +#ifndef NEED_ATA_POWER_BATT_MEASURE + /* FM and V2 can only measure when ATA power is on and they can't tell + * if ATA power is on + */ + int battv = battery_voltage(); + snprintf(buf, 32, " Batt: %d.%02dV %d%% ", battv / 1000, + (battv % 1000) / 10, battery_level()); + lcd_puts(0, 7, buf); #endif - { - int battv = battery_voltage(); - snprintf(buf, 32, " Batt: %d.%02dV %d%% ", battv / 1000, - (battv % 1000) / 10, battery_level()); - lcd_puts(0, 7, buf); - } #if CONFIG_CHARGING == CHARGING_CONTROL diff -ur rockbox-bleeding-old\firmware\powermgmt.c rockbox-bleeding\firmware\powermgmt.c --- rockbox-bleeding-old\firmware\powermgmt.c Fri Aug 17 02:46:08 2007 +++ rockbox-bleeding\firmware\powermgmt.c Fri Aug 24 13:52:55 2007 @@ -483,14 +483,20 @@ * Inhibit shutdown as long as the charger is plugged in. If it is * unplugged, wait for a timeout period and then shut down. */ - if(charger_input_state == CHARGER || audio_stat == AUDIO_STATUS_PLAY) { + if(charger_input_state == CHARGER || charger_input_state == CHARGER_PLUGGED + || audio_stat == AUDIO_STATUS_PLAY) { last_event_tick = current_tick; } #endif #ifndef NO_LOW_BATTERY_SHUTDOWN /* switch off unit if battery level is too low for reliable operation */ - if(battery_millivolts < battery_level_shutoff[battery_type]) { + if(battery_millivolts < battery_level_shutoff[battery_type] +#ifdef NEED_ATA_POWER_BATT_MEASURE + && charger_input_state != CHARGER + && charger_input_state != CHARGER_PLUGGED +#endif + ) { if(!shutdown_timeout) { backlight_on(); sys_poweroff();