#545 #544 added cc graphics and peripheral classes

This commit is contained in:
Mikayla Fischler
2024-09-14 22:16:12 -04:00
parent 85fc8d2920
commit ec2921e393
13 changed files with 95 additions and 30 deletions

View File

@@ -9,7 +9,7 @@ local log = require("scada-common.log")
local sounder = {}
local alarm_ctl = {
speaker = nil,
speaker = nil, ---@type Speaker
volume = 0.5,
stream = audio.new_stream()
}
@@ -24,7 +24,7 @@ local function play()
end
-- initialize the annunciator alarm system
---@param speaker table speaker peripheral
---@param speaker Speaker speaker peripheral
---@param volume number speaker volume
function sounder.init(speaker, volume)
alarm_ctl.speaker = speaker
@@ -36,7 +36,7 @@ function sounder.init(speaker, volume)
end
-- reconnect the speaker peripheral
---@param speaker table speaker peripheral
---@param speaker Speaker speaker peripheral
function sounder.reconnect(speaker)
alarm_ctl.speaker = speaker
alarm_ctl.playing = false