Battery pack capacity detection method