From c43019b28b473a97b74ab9d920cfda7f2e107a64 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 3 Jan 2023 08:28:33 +0100 Subject: [PATCH] Disabled chime on departure. --- elevator/elevator-controller.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elevator/elevator-controller.lua b/elevator/elevator-controller.lua index a895568..53d948a 100644 --- a/elevator/elevator-controller.lua +++ b/elevator/elevator-controller.lua @@ -202,10 +202,12 @@ local function goToFloor(floorLabel) local distance = math.abs(targetFloor.height - currentFloor.height) - 1 local motionKeyframes = computeLinearMotion(distance) - playChime(currentFloor) + --playChime(currentFloor) closeDoor(currentFloor) local audioFile = "audio/going-up.pcm" if rpmDir == -1 then audioFile = "audio/going-down.pcm" end + local speaker = peripheral.wrap(currentFloor.speaker) + pcm.playFile(speaker, audioFile) for _, frame in pairs(motionKeyframes) do local sleepTime = math.floor((frame.duration - 0.05) * 20) / 20 -- Make sure we round down to safely arrive before the detector. if frame.rpm == CONTROL_MAX_RPM then