From 19d69394b61ed9370d79c5efbd1b23fb8c5eac6a Mon Sep 17 00:00:00 2001 From: cheapie Date: Wed, 17 Apr 2024 17:56:01 -0500 Subject: Allow changing destination in-flight This allows new calls entered while the car is moving to be serviced before the original destination, provided they are in the correct direction, will be reached before the original destination, and the car can stop soon enough. --- drive_null.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'drive_null.lua') diff --git a/drive_null.lua b/drive_null.lua index 1a98970..eaf1515 100644 --- a/drive_null.lua +++ b/drive_null.lua @@ -222,6 +222,7 @@ function celevator.drives.null.getstatus(pos,call2) ret.vel = tonumber(meta:get_string("vel")) or 0 ret.maxvel = tonumber(meta:get_string("maxvel")) or 0.2 ret.doorstate = meta:get_string("doorstate") + ret.neareststop = ret.apos+(ret.vel*2) return ret end end -- cgit v1.2.3