added sounder volume to config

This commit is contained in:
Mikayla Fischler
2022-12-04 14:29:39 -05:00
parent 4030fdc5c9
commit 9475700930
3 changed files with 9 additions and 3 deletions

View File

@@ -265,10 +265,12 @@ end
-- initialize the annunciator alarm system
---@param speaker table speaker peripheral
function sounder.init(speaker)
---@param volume number speaker volume
function sounder.init(speaker, volume)
alarm_ctl.speaker = speaker
alarm_ctl.speaker.stop()
alarm_ctl.volume = volume
alarm_ctl.playing = false
alarm_ctl.num_active = 0
alarm_ctl.next_block = 1