Skip to content
Snippets Groups Projects
Commit de5d5410 authored by Tuxilio's avatar Tuxilio
Browse files

Fix name

parent 5afe1fed
No related branches found
No related tags found
No related merge requests found
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
local HTTPApiTable = core.request_http_api() local HTTPApiTable = core.request_http_api()
local data = { local data = {
url = "wss://mqtt.felix-zauberer.de:443", url = "https://mqtt.felix-zauberer.de:443",
clientId = "ledtree_luanti", clientId = "ledtree_luanti",
username = "kalle1", username = "kalle1",
token = "eZcKn1zBE6KtbeFnZ33lV1EKnr9Bcn8B", token = "eZcKn1zBE6KtbeFnZ33lV1EKnr9Bcn8B",
} }
change_color = function(led_id) change_color = function(led_id)
local resquest = { local request = {
url = data.url, url = data.url,
method = 'POST', method = 'POST',
timeout = 15, timeout = 15,
...@@ -32,10 +32,10 @@ change_color = function(led_id) ...@@ -32,10 +32,10 @@ change_color = function(led_id)
end) end)
end end
for i=1, 10, 1 do for id=1, 10, 1 do
core.register_node("ledtree:led"..i, { core.register_node("ledtree:led"..id, {
description = "LED"..i, description = "LED"..id,
--tiles = "", --tiles = "",
on_rightclick = change_color(i), on_rightclick = change_color(id),
}) })
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment