I'd use `BATTERY_LEN` here rather than  `sizeof`.