Update battery.c

Fix overflow since autosample_wait is only 5 bits.