Fix runtime error, occuring when top of a TA5 heat exchanger is removed
This commit is contained in:
parent
1e007f2f0e
commit
6a92a72e14
@ -24,7 +24,7 @@ local power = networks.power
|
||||
local control = networks.control
|
||||
|
||||
local CYCLE_TIME = 2
|
||||
local STANDBY_TICKS = 0
|
||||
local STANDBY_TICKS = 1
|
||||
local COUNTDOWN_TICKS = 1
|
||||
local PWR_NEEDED = 400
|
||||
local EXPECTED_PLASMA_NUM = 56
|
||||
|
@ -94,6 +94,9 @@ sched.register(tSched, CALL_RATE1, 1, function(pos)
|
||||
end)
|
||||
sched.register(tSched, CALL_RATE1, 2, function(pos)
|
||||
local resp = heatexchanger1_cmnd(pos, "test_pipe_blue")
|
||||
if type(resp) ~= "table" then
|
||||
return DESCRIPTION .. S(" Error!")
|
||||
end
|
||||
local cnt = count_trues(resp)
|
||||
if cnt ~= EXPECT_BLUE then
|
||||
return S("Blue pipe connection error\n(@1 found / @2 expected)", cnt, EXPECT_BLUE)
|
||||
@ -183,7 +186,7 @@ local State = techage.NodeStates:new({
|
||||
node_name_passive = "techage:ta5_heatexchanger2",
|
||||
cycle_time = CYCLE_TIME,
|
||||
infotext_name = DESCRIPTION,
|
||||
standby_ticks = 0,
|
||||
standby_ticks = 1,
|
||||
can_start = can_start,
|
||||
start_node = start_node,
|
||||
stop_node = stop_node,
|
||||
|
Loading…
Reference in New Issue
Block a user