mirror of
https://github.com/schoebel/mars
synced 2024-12-24 07:32:46 +00:00
infra: fix brick power override
This commit is contained in:
parent
4a7905cf8e
commit
e83aab57f7
@ -2941,9 +2941,10 @@ struct mars_brick *make_brick_all(
|
||||
// just switch the power state
|
||||
MARS_DBG("found existing brick '%s'\n", new_path);
|
||||
// highest general override
|
||||
if (mars_check_outputs(brick)) {
|
||||
if (!switch_state)
|
||||
MARS_DBG("brick '%s' override 0 -> 1\n", new_path);
|
||||
if (!switch_state &&
|
||||
brick->power.button &&
|
||||
mars_check_outputs(brick)) {
|
||||
MARS_DBG("KEEP '%s' override 0 -> 1\n", new_path);
|
||||
switch_state = true;
|
||||
}
|
||||
goto do_switch;
|
||||
|
Loading…
Reference in New Issue
Block a user