Lithium battery pack charge and discharge detection