Fix no-power issue for machines

This commit is contained in:
Joachim Stolberg 2021-05-21 17:14:34 +02:00
parent dd7636744a
commit bb98cce44e

View File

@ -155,11 +155,14 @@ end
-- consumes power
function techage.needs_power(nvm)
local state = nvm.techage_state or STOPPED
return state == RUNNING or state == NOPOWER
-- "blocked" must need power, otherwise it could happen, that the node
-- is not in the power network anymore and gets not started if
-- power is turned off and on again.
return state < STANDBY or state == NOPOWER
end
function techage.needs_power2(state)
return state == RUNNING or state == NOPOWER
return state < STANDBY or state == NOPOWER
end
function techage.get_state_string(nvm)