From 32c23a3653fa8260d89f39d895a570d72ed82607 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 4 Nov 2021 11:41:12 -0500 Subject: [PATCH] Fix Connected callback message --- content/novastar.qplug | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/content/novastar.qplug b/content/novastar.qplug index bb0588c..2bbf31a 100644 --- a/content/novastar.qplug +++ b/content/novastar.qplug @@ -755,16 +755,15 @@ if (Controls) then NovaStar.setStatus(5,"Attempting to reconnect") end - - NovaStar.socket.Data = function () print("Reading " .. NovaStar.socket.BufferLength .. " Bytes") local data = NovaStar.socket:Read(NovaStar.socket.BufferLength); print(hex_dump(data)) + if data == getCmdString(NovaStar.Response.Connected) then print("Successful Connection Response Received") 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") NovaStar.setStatus(0,"Connected - " .. Properties['IP Address'].Value) end @@ -775,7 +774,7 @@ if (Controls) then end NovaStar.socket.Error = function(sock, err) - print("TCP Socket Error: " .. err) + print("TCP Socket Error: ", err) NovaStar.setStatus(2,"Communication error with NovaStar") end @@ -836,4 +835,4 @@ if (Controls) then Controls['Brightness'].IsDisabled = true; end; -end +end \ No newline at end of file