module/battery: remove unused left/right spacing options

This commit is contained in:
Daniel Eklöf 2018-12-16 19:17:14 +01:00
parent 0df1df2207
commit e186c3447d
3 changed files with 3 additions and 10 deletions

View file

@ -306,19 +306,13 @@ module_battery_from_config(const struct yml_node *node,
{
const struct yml_node *c = yml_get_value(node, "content");
const struct yml_node *poll_interval = yml_get_value(node, "poll_interval");
const struct yml_node *left_spacing = yml_get_value(node, "left_spacing");
const struct yml_node *right_spacing = yml_get_value(node, "right_spacing");
assert(yml_is_dict(c));
assert(poll_interval == NULL || yml_is_scalar(poll_interval));
assert(left_spacing == NULL || yml_is_scalar(left_spacing));
assert(right_spacing == NULL || yml_is_scalar(right_spacing));
return module_battery(
"BAT0", particle_from_config(c, parent_font),
poll_interval != NULL ? yml_value_as_int(poll_interval) : 30,
left_spacing != NULL ? yml_value_as_int(left_spacing) : 0,
right_spacing != NULL ? yml_value_as_int(right_spacing) : 0);
poll_interval != NULL ? yml_value_as_int(poll_interval) : 30);
}
struct bar *

View file

@ -255,7 +255,7 @@ run(struct module_run_context *ctx)
struct module *
module_battery(const char *battery, struct particle *label,
int poll_interval_secs, int left_spacing, int right_spacing)
int poll_interval_secs)
{
struct private *m = malloc(sizeof(*m));
m->label = label;

View file

@ -4,5 +4,4 @@
#include "../../particle.h"
struct module *module_battery(
const char *battery, struct particle *label,
int poll_interval_secs, int left_spacing, int right_spacing);
const char *battery, struct particle *label, int poll_interval_secs);