updating
This commit is contained in:
126056
external_alarm.dfpwm
Normal file
126056
external_alarm.dfpwm
Normal file
File diff suppressed because one or more lines are too long
@@ -12,13 +12,6 @@ end
|
|||||||
|
|
||||||
local function startup()
|
local function startup()
|
||||||
speakerDriver.startup()
|
speakerDriver.startup()
|
||||||
print("Testing Control Room Speakers...")
|
|
||||||
local speakerList = peripheral.find("speaker")
|
|
||||||
for index, value in ipairs(speakerList) do
|
|
||||||
print("Speaker " .. index .. ": " .. value.getName())
|
|
||||||
end
|
|
||||||
|
|
||||||
speakerDriver.playControlRoomAlarm(controlRoomSpeakers)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function run()
|
local function run()
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ local function getFileName(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function playSound(speaker, fileName)
|
local function playSound(speaker, fileName)
|
||||||
local fileStream = getFileName(fileName)
|
local fileStream = getFileName(fileName)
|
||||||
local values = io.lines(fileStream, 16 * 1024)
|
local values = io.lines(fileStream, 16 * 1024)
|
||||||
@@ -23,11 +22,14 @@ local function playSound(speaker, fileName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function playControlRoomAlarm(speakers)
|
local function playControlRoomAlarm(speakers)
|
||||||
playSound(speakers,"short_control_alarm")
|
playSound(speakers,"short_control_alarm")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function playExternalAlarm(speakers)
|
||||||
|
playSound(speakers,"external_alarm")
|
||||||
|
end
|
||||||
|
|
||||||
local function createSoundFile(fileName)
|
local function createSoundFile(fileName)
|
||||||
|
|
||||||
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
|
local baseRoute = "https://git.astrocore.space/root/NovaCorpLLC/raw/branch/main/"
|
||||||
@@ -45,7 +47,6 @@ local function createSoundFile(fileName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function addSoundFile(fileName)
|
function addSoundFile(fileName)
|
||||||
createSoundFile(fileName)
|
createSoundFile(fileName)
|
||||||
end
|
end
|
||||||
@@ -54,10 +55,10 @@ local function watch()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function startup()
|
local function startup()
|
||||||
local sounds = {
|
local sounds = {
|
||||||
{ fileName = "short_control_alarm" }
|
{ fileName = "short_control_alarm" },
|
||||||
|
{ fileName = "external_alarm" }
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, item in ipairs(sounds) do
|
for i, item in ipairs(sounds) do
|
||||||
|
|||||||
Reference in New Issue
Block a user