Battery function detection method