Added visual battery bar logic code
Added visual battery bar logic code