mirror of
https://github.com/jwetzell/q-sys-plugin-novastar.git
synced 2026-09-10 14:39:34 +00:00
Fix Connected callback message
This commit is contained in:
@@ -755,16 +755,15 @@ if (Controls) then
|
|||||||
NovaStar.setStatus(5,"Attempting to reconnect")
|
NovaStar.setStatus(5,"Attempting to reconnect")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
NovaStar.socket.Data = function ()
|
NovaStar.socket.Data = function ()
|
||||||
print("Reading " .. NovaStar.socket.BufferLength .. " Bytes")
|
print("Reading " .. NovaStar.socket.BufferLength .. " Bytes")
|
||||||
local data = NovaStar.socket:Read(NovaStar.socket.BufferLength);
|
local data = NovaStar.socket:Read(NovaStar.socket.BufferLength);
|
||||||
print(hex_dump(data))
|
print(hex_dump(data))
|
||||||
|
|
||||||
if data == getCmdString(NovaStar.Response.Connected) then
|
if data == getCmdString(NovaStar.Response.Connected) then
|
||||||
print("Successful Connection Response Received")
|
print("Successful Connection Response Received")
|
||||||
NovaStar.setStatus(0,"Connected - " .. Properties['IP Address'].Value)
|
NovaStar.setStatus(0,"Connected - " .. Properties['IP Address'].Value)
|
||||||
else if data == getCmdString(NovaStar.Response.ConnectedAlt)
|
elseif data == getCmdString(NovaStar.Response.ConnectedAlt) then
|
||||||
print("Successful Connection Response Received")
|
print("Successful Connection Response Received")
|
||||||
NovaStar.setStatus(0,"Connected - " .. Properties['IP Address'].Value)
|
NovaStar.setStatus(0,"Connected - " .. Properties['IP Address'].Value)
|
||||||
end
|
end
|
||||||
@@ -775,7 +774,7 @@ if (Controls) then
|
|||||||
end
|
end
|
||||||
|
|
||||||
NovaStar.socket.Error = function(sock, err)
|
NovaStar.socket.Error = function(sock, err)
|
||||||
print("TCP Socket Error: " .. err)
|
print("TCP Socket Error: ", err)
|
||||||
NovaStar.setStatus(2,"Communication error with NovaStar")
|
NovaStar.setStatus(2,"Communication error with NovaStar")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -836,4 +835,4 @@ if (Controls) then
|
|||||||
Controls['Brightness'].IsDisabled = true;
|
Controls['Brightness'].IsDisabled = true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user