summaryrefslogtreecommitdiff
path: root/controllerfw.lua
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-04-14 15:55:08 -0500
committercheapie <no-email-for-you@example.com>2024-04-14 15:55:08 -0500
commit6152a079ab1c7583da32b71c7236cd079fe2810b (patch)
tree4986986b5f60741a646d01c3e1435a7bb510bd57 /controllerfw.lua
parent8fc57f0535946351de94066e71b02b16b2c81bf9 (diff)
downloadcelevator-6152a079ab1c7583da32b71c7236cd079fe2810b.tar
celevator-6152a079ab1c7583da32b71c7236cd079fe2810b.tar.gz
celevator-6152a079ab1c7583da32b71c7236cd079fe2810b.tar.bz2
celevator-6152a079ab1c7583da32b71c7236cd079fe2810b.tar.xz
celevator-6152a079ab1c7583da32b71c7236cd079fe2810b.zip
Add floor passing beep
Diffstat (limited to 'controllerfw.lua')
-rw-r--r--controllerfw.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/controllerfw.lua b/controllerfw.lua
index 8e5cb2d..b909a5f 100644
--- a/controllerfw.lua
+++ b/controllerfw.lua
@@ -852,6 +852,8 @@ else
mem.showrunning = false
end
+local oldpifloor = mem.pifloor
+
mem.pifloor = mem.params.floornames[getpos(true)]
local hidepi = {
bfdemand = true,
@@ -863,6 +865,11 @@ local hidepi = {
inspconflict = true,
}
if hidepi[mem.carstate] then mem.pifloor = "--" end
+
+if mem.pifloor ~= oldpifloor and mem.carstate == "normal" then
+ drivecmd({command="pibeep"})
+end
+
local arrowenabled = {
normal = true,
fs1 = true,