infra: power override only for on transition

This commit is contained in:
Thomas Schoebel-Theuer 2020-06-10 22:16:40 +02:00
parent 3b87d70162
commit 9bad724f50

View File

@ -2978,8 +2978,9 @@ struct mars_brick *make_brick_all(
}
MARS_DBG("------> predecessor %d path = '%s'\n", i, path);
if (!prev[i]->power.led_on) {
switch_state = false;
MARS_DBG("predecessor power is not on\n");
if (!brick || !brick->power.button)
switch_state = false;
}
}