Add detect battery status
Improve battery driver code and add charge_table
CLeanup battery code
Fix battery status