feat(farming_database): changed channels

This commit is contained in:
2025-05-13 21:58:03 +02:00
parent 650aad0713
commit f99df4bf86

View File

@@ -3,6 +3,8 @@ if (databaseStorage.isDiskPresent() == false or databaseStorage.getDiskLabel() ~
local databasePath = databaseStorage.getMountPath() local databasePath = databaseStorage.getMountPath()
local databaseModem = peripheral.find("modem") or error("No modem attached", 0) local databaseModem = peripheral.find("modem") or error("No modem attached", 0)
local networkChannel = 420 local fieldDataChannel = 420 -- Request Field Data Channel
if (databaseModem.isOpen(networkChannel)) then databaseModem.close(networkChannel) end local setupFieldChannel = 421 -- Setup Field Channel
databaseModem.open(networkChannel) if (databaseModem.isOpen(fieldDataChannel) or databaseModem.isOpen(setupFieldChannel)) then databaseModem.closeAll() end
databaseModem.open(fieldDataChannel)
databaseModem.open(setupFieldChannel)