perf: reduce RCON polling in move/explore loops from 0.1s to 0.3s
This commit is contained in:
@@ -161,7 +161,7 @@ class ActionExecutor:
|
||||
|
||||
stuck_count, last_pos = 0, None
|
||||
for step in range(max_steps):
|
||||
time.sleep(0.1)
|
||||
time.sleep(0.3)
|
||||
if step % 20 == 0:
|
||||
result = self.rcon.lua(P + wanted_lua + """
|
||||
local ok, data = pcall(function()
|
||||
@@ -301,7 +301,7 @@ rcon.print("WALK:" .. string.format("%.1f", dist))
|
||||
if stuck_count > 30:
|
||||
self.rcon.lua(P + "p.walking_state = {walking = false, direction = defines.direction.north}")
|
||||
return False, f"({x},{y}) 장애물 (거리: {last_dist:.0f})"
|
||||
time.sleep(0.1)
|
||||
time.sleep(0.3)
|
||||
self.rcon.lua(P + "p.walking_state = {walking = false, direction = defines.direction.north}")
|
||||
return False, f"({x},{y}) 시간초과 (거리: {last_dist:.0f})"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user