diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-17 17:56:01 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-17 17:56:01 -0500 |
commit | 19d69394b61ed9370d79c5efbd1b23fb8c5eac6a (patch) | |
tree | e6a01748e34913ea59684898f8a17d1633ad27dc /drive_null.lua | |
parent | a0f604f950742a540b1e427bf190cfc79ca977f8 (diff) | |
download | celevator-19d69394b61ed9370d79c5efbd1b23fb8c5eac6a.tar celevator-19d69394b61ed9370d79c5efbd1b23fb8c5eac6a.tar.gz celevator-19d69394b61ed9370d79c5efbd1b23fb8c5eac6a.tar.bz2 celevator-19d69394b61ed9370d79c5efbd1b23fb8c5eac6a.tar.xz celevator-19d69394b61ed9370d79c5efbd1b23fb8c5eac6a.zip |
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.
Diffstat (limited to 'drive_null.lua')
-rw-r--r-- | drive_null.lua | 1 |
1 files changed, 1 insertions, 0 deletions
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 |