fix: restore speaker peripheral detection
Re-add speaker discovery during peripheral init so installed speakers are available for playback and log the detected count at startup.
This commit is contained in:
@@ -120,6 +120,7 @@ function Peripherals.init()
|
||||
State.hasPrimaryMonitor = false
|
||||
end
|
||||
|
||||
Peripherals.speakers = { peripheral.find("speaker") }
|
||||
|
||||
Peripherals.createTarget = peripheral.find("create_target")
|
||||
if Peripherals.createTarget then
|
||||
@@ -2971,6 +2972,11 @@ if Peripherals.primaryMonitor then
|
||||
else
|
||||
Utils.log("WARN", "No monitor detected; running in terminal-only mode")
|
||||
end
|
||||
if Peripherals.speakers and #Peripherals.speakers > 0 then
|
||||
Utils.log("INFO", "Speaker detected x" .. tostring(#Peripherals.speakers))
|
||||
else
|
||||
Utils.log("WARN", "No speaker detected")
|
||||
end
|
||||
|
||||
parallel.waitForAny(
|
||||
function()
|
||||
|
||||
Reference in New Issue
Block a user