diff --git a/modules/battery.c b/modules/battery.c index 6d6c52b..6564af0 100644 --- a/modules/battery.c +++ b/modules/battery.c @@ -332,9 +332,17 @@ battery_new(const char *battery, struct particle *label, int poll_interval_secs) m->label = label; m->poll_interval = poll_interval_secs; m->battery = strdup(battery); + m->manufacturer = NULL; m->model = NULL; + m->energy_full_design = 0; + m->energy_full = 0; + m->state = STATE_DISCHARGING; + m->capacity = 0; + m->energy = 0; + m->power = 0; + struct module *mod = module_common_new(); mod->private = m; mod->run = &run;