Small changes

This commit is contained in:
Sebastiaan de Schaetzen 2024-07-14 20:04:13 +02:00
parent 26c20bcdf7
commit d28d55ab4b
3 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,6 @@ function love.mqtt.message(topic, payload)
BotState.servoBattery = tonumber(payload)
BotState.servoBatteryCorrected = BotState.servoBattery / 2
elseif topic == "telemetry/camfeed" then
print("Got camfeed")
fileData = love.filesystem.newFileData(payload, "camfeed")
BotState.camfeed = love.graphics.newImage(fileData)
elseif topic == "telemetry/pong" then

View File

@ -33,6 +33,9 @@ end
-- Receive given amount of data from network connection
function luasocket.receive(conn, size)
if math.random(0, 100) < 50 then
return nil, "timeout"
end
local ok, err = conn.sock:receive(size)
--if ok then
-- print(" luasocket.receive good:", size, #ok, require("mqtt.tools").hex(ok))

View File

@ -16,7 +16,6 @@ local function call(target, ...)
end
local function onConnect(connack)
print("On connect")
call("connect", connack)
end
@ -24,7 +23,6 @@ local function onMessage(message)
if message.topic:sub(0, 7) == "spider/" then
message.topic = message.topic:sub(8)
end
print(message.topic)
call("message2", message.topic, message.payload)
end