scripts update

This commit is contained in:
3djc
2019-08-29 18:07:06 +02:00
parent c7977f7cc7
commit 4e83ec450e
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -320,7 +320,7 @@ local function fieldCommandLoad(field, data, offset)
field.status = data[offset]
field.timeout = data[offset+1]
field.info, offset = fieldGetString(data, offset+2)
if field.status < 2 or field.status > 3 then
if field.status == 0 then
fieldPopup = nil
end
end
@@ -407,7 +407,7 @@ local function refreshNext()
if fieldPopup then
if time > fieldTimeout then
local frame = { deviceId, 0xEA, fieldPopup.id }
crossfireTelemetryPush(0x2D, frame)
crossfireTelemetryPush(0x2D, { deviceId, 0xEA, fieldPopup.id, 6 })
fieldTimeout = time + fieldPopup.timeout
end
elseif time > fieldTimeout and not edit then
@@ -315,7 +315,7 @@ local function fieldCommandLoad(field, data, offset)
field.status = data[offset]
field.timeout = data[offset+1]
field.info, offset = fieldGetString(data, offset+2)
if field.status < 2 or field.status > 3 then
if field.status == 0 then
fieldPopup = nil
end
end
@@ -402,7 +402,7 @@ local function refreshNext()
if fieldPopup then
if time > fieldTimeout then
local frame = { deviceId, 0xEA, fieldPopup.id }
crossfireTelemetryPush(0x2D, frame)
crossfireTelemetryPush(0x2D, { deviceId, 0xEA, fieldPopup.id, 6 })
fieldTimeout = time + fieldPopup.timeout
end
elseif time > fieldTimeout and not edit then
@@ -315,7 +315,7 @@ local function fieldCommandLoad(field, data, offset)
field.status = data[offset]
field.timeout = data[offset+1]
field.info, offset = fieldGetString(data, offset+2)
if field.status < 2 or field.status > 3 then
if field.status == 0 then
fieldPopup = nil
end
end
@@ -402,7 +402,7 @@ local function refreshNext()
if fieldPopup then
if time > fieldTimeout then
local frame = { deviceId, 0xEA, fieldPopup.id }
crossfireTelemetryPush(0x2D, frame)
crossfireTelemetryPush(0x2D, { deviceId, 0xEA, fieldPopup.id, 6 })
fieldTimeout = time + fieldPopup.timeout
end
elseif time > fieldTimeout and not edit then