Function to get battery charger status
Function to read mode switch
line sonsor function corrected