14-Jun-2021, 09:35 AM (This post was last modified: 14-Jun-2021, 09:36 AM by Trial4life42.)
(12-Jun-2021, 12:33 AM)kafie1980 Wrote: I have a copy of the script from about 2 years ago. I am not sure if this is the latest or if anything has changed.
Run the lua script attached but please make a proper backup of your radio before you proceed to do anything. You need to be careful and know what you are doing.
Copy it to notepad and save it as "ISRM mode.lua" and follow the instructions at https://blog.seidel-philipp.de/change-fr...lua-script
Else simply email FrSKY and ask them for a copy of their latest script.Code:---- #########################################################################
---- # #
---- # Copyright (C) OpenTX #
-----# #
---- # License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html #
---- # #
---- # This program is free software; you can redistribute it and/or modify #
---- # it under the terms of the GNU General Public License version 2 as #
---- # published by the Free Software Foundation. #
---- # #
---- # This program is distributed in the hope that it will be useful #
---- # but WITHOUT ANY WARRANTY; without even the implied warranty of #
---- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
---- # GNU General Public License for more details. #
---- # #
---- #########################################################################
--local mode = -1
local EU = Bitmap.open("ISRM/img/eu.png")
local FCC = Bitmap.open("ISRM/img/fcc.png")
local function redrawPage()
lcd.clear()
lcd.drawFilledRectangle(0, 0, LCD_W, 40, TITLE_BGCOLOR)
lcd.drawText(1, 5," ISRM MODE", MENU_TITLE_COLOR + MIDSIZE)
lcd.drawText(130, 130, "EU-LBT", CENTER)
lcd.drawText(350, 130, "FCC", CENTER)
if mode == 0 then
lcd.drawFilledRectangle(30, 70, 200, 145, TITLE_BGCOLOR)
lcd.drawRectangle(30, 70, 200, 145, 0 )
lcd.drawText(130, 130, "EU-LBT", MENU_TITLE_COLOR + CENTER)
else
lcd.drawRectangle(30, 70, 200, 145, 0 )
end
if mode == 1 then
lcd.drawFilledRectangle(250, 70, 200, 145, TITLE_BGCOLOR)
lcd.drawRectangle(250, 70, 200, 145, 0);
lcd.drawText(350, 130, "FCC", MENU_TITLE_COLOR + CENTER)
else
lcd.drawRectangle(250, 70, 200, 145, 0);
end
if mode == -1 then
lcd.drawText(LCD_W/2, LCD_H - 30, "READING MODE", CENTER)
else
lcd.drawText(LCD_W/2, LCD_H - 30, "CHECK YOUR COUNTRY LAW!", CENTER)
end
end
local function modeRead()
return accessTelemetryPush(0, 0, 0x17, 0x30, 0x0C40, 0xA0AA5555)
end
local function modeWrite(value)
if 0 == value then
command = 0xA0AA5555
else
command = 0xA1AA5555
end
return accessTelemetryPush(0, 0, 0x17, 0x31, 0x0C40, command)
end
local function telemetryPop()
physicalId, primId, dataId, value = sportTelemetryPop()
if primId == 0x32 and dataId >= 0X0C40 and dataId <= 0X0C4F then
mode = math.floor(value / 0x1000000) - 0xA0
end
end
local function runPage(event)
if event == EVT_EXIT_BREAK then
return 2
elseif event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT or event == EVT_PLUS_REPT or event == EVT_RIGHT_FIRST or event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT or event == EVT_MINUS_REPT or event == EVT_LEFT_FIRST then
local newmode
if mode == 0 then
newmode = 1
else
newmode = 0
end
mode = -1
modeWrite(newmode)
else
if mode == -1 then
modeRead()
end
telemetryPop()
end
redrawPage()
return 0
end
-- Init
local function init()
end
-- Run
local function run(event)
if event == nil then
error("Cannot run as a model script!")
return 2
end
return runPage(event)
end
return { init=init, run=run }
Updated script: I found a newer version of the script that you can download from Github: https://github.com/Hobby4life/ISRM-Mode-Changer
I own a FrSKY Xlite S myself but walked away from the FrSKY ecosystem. Why can't they provided instructions to switch from FCC to LBT or vice versa like other radio manufacturers like TBS do?
I've followed these instructions, but when I execute the script I get the message:
Code:
Reading mode...
How can I fix this issue?