Disabled chime on departure.
This commit is contained in:
parent
0f204f5fbf
commit
c43019b28b
|
@ -202,10 +202,12 @@ local function goToFloor(floorLabel)
|
||||||
|
|
||||||
local distance = math.abs(targetFloor.height - currentFloor.height) - 1
|
local distance = math.abs(targetFloor.height - currentFloor.height) - 1
|
||||||
local motionKeyframes = computeLinearMotion(distance)
|
local motionKeyframes = computeLinearMotion(distance)
|
||||||
playChime(currentFloor)
|
--playChime(currentFloor)
|
||||||
closeDoor(currentFloor)
|
closeDoor(currentFloor)
|
||||||
local audioFile = "audio/going-up.pcm"
|
local audioFile = "audio/going-up.pcm"
|
||||||
if rpmDir == -1 then audioFile = "audio/going-down.pcm" end
|
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
|
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.
|
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
|
if frame.rpm == CONTROL_MAX_RPM then
|
||||||
|
|
Loading…
Reference in New Issue