Merge with latest 2.3
This commit is contained in:
@@ -88,7 +88,11 @@ def main():
|
||||
cmake_options["PCB"] = "X9LITE"
|
||||
firmware_options = options_taranis_x9lite
|
||||
maxsize = 65536 * 8
|
||||
elif board_name == "x7":
|
||||
elif board_name == "x9lites":
|
||||
cmake_options["PCB"] = "X9LITES"
|
||||
firmware_options = options_taranis_x9lite
|
||||
maxsize = 65536 * 8
|
||||
elif options[optcount] == "x7":
|
||||
cmake_options["PCB"] = "X7"
|
||||
firmware_options = options_taranis_x9dp
|
||||
maxsize = 65536 * 8
|
||||
@@ -135,6 +139,11 @@ def main():
|
||||
cmake_options["PCBREV"] = "T12"
|
||||
firmware_options = options_taranis_x9dp
|
||||
maxsize = 65536 * 8
|
||||
elif board_name == "t16":
|
||||
cmake_options["PCB"] = "X10"
|
||||
cmake_options["PCBREV"] = "T16"
|
||||
firmware_options = options_jumper_t16
|
||||
maxsize = 2 * 1024 * 1024
|
||||
else:
|
||||
exit(INVALID_BOARD)
|
||||
|
||||
|
||||
@@ -198,3 +198,17 @@ options_horus_x10express = {
|
||||
"eu": ("MODULE_PROTOCOL_D8", "NO", "YES"),
|
||||
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None)
|
||||
}
|
||||
|
||||
options_jumper_t16 = {
|
||||
"noheli": ("HELI", "NO", "YES"),
|
||||
"ppmus": ("PPM_UNIT", "US", "PERCENT_PREC1"),
|
||||
"lua": ("LUA", "YES", "NO_MODEL_SCRIPTS"),
|
||||
"nogvars": ("GVARS", "NO", "YES"),
|
||||
"faimode": ("FAI", "YES", None),
|
||||
"faichoice": ("FAI", "CHOICE", None),
|
||||
"nooverridech": ("OVERRIDE_CHANNEL_FUNCTION", "NO", "YES"),
|
||||
"eu": ("MODULE_PROTOCOL_D8", "NO", "YES"),
|
||||
"flexr9m": ("MODULE_PROTOCOL_FLEX", "YES", None),
|
||||
"internalmulti": ("INTERNAL_MODULE_MULTI", "YES", "NO"),
|
||||
"bluetooth": ("BLUETOOTH", "YES", "NO"),
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
local toolName = "TNS|LUA event tests|TNE"
|
||||
---- #########################################################################
|
||||
---- # #
|
||||
---- # 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 virtual_next = 0
|
||||
local virtual_prev = 0
|
||||
local virtual_inc = 0
|
||||
local virtual_dec = 0
|
||||
local virtual_next_rept = 0
|
||||
local virtual_prev_rept = 0
|
||||
local virtual_page_next = 0
|
||||
local virtual_page_prev = 0
|
||||
local virtual_enter = 0
|
||||
local virtual_enter_long = 0
|
||||
local virtual_menu = 0
|
||||
local virtual_menu_long = 0
|
||||
|
||||
-- Init
|
||||
local function init()
|
||||
|
||||
end
|
||||
|
||||
-- Main
|
||||
local function run(event)
|
||||
if event == nil then
|
||||
error("Cannot be run as a model script!")
|
||||
return 2
|
||||
end
|
||||
if event == EVT_VIRTUAL_EXIT then
|
||||
return 2
|
||||
end
|
||||
if event == EVT_VIRTUAL_NEXT then
|
||||
virtual_next = virtual_next + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_PREV then
|
||||
virtual_prev = virtual_prev + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_INC then
|
||||
virtual_inc = virtual_inc + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_DEC then
|
||||
virtual_dec = virtual_dec + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_NEXT_REPT then
|
||||
virtual_next_rept = virtual_next_rept + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_PREV_REPT then
|
||||
virtual_prev_rept = virtual_prev_rept + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_NEXT_PAGE then
|
||||
virtual_page_next = virtual_page_next +1
|
||||
end
|
||||
if event == EVT_VIRTUAL_PREV_PAGE then
|
||||
virtual_page_prev = virtual_page_prev + 1
|
||||
killEvents(event);
|
||||
end
|
||||
if event == EVT_VIRTUAL_ENTER then
|
||||
virtual_enter = virtual_enter + 1
|
||||
end
|
||||
if event == EVT_VIRTUAL_MENU then
|
||||
virtual_menu = virtual_menu + 1
|
||||
end
|
||||
|
||||
lcd.clear()
|
||||
lcd.drawScreenTitle("LUA EVENT TEST", 0, 0)
|
||||
lcd.drawText(1, 10, "PREV:"..virtual_prev)
|
||||
lcd.drawText(LCD_W/2, 10, "NEXT: "..virtual_next)
|
||||
lcd.drawText(1, 20, "DEC:"..virtual_dec)
|
||||
lcd.drawText(LCD_W/2, 20, "INC:"..virtual_inc)
|
||||
lcd.drawText(1, 30, "NXT PAGE: "..virtual_page_next)
|
||||
lcd.drawText(LCD_W/2, 30, "PRV PAGE: "..virtual_page_prev)
|
||||
lcd.drawText(1, 50, "ENTER: "..virtual_enter)
|
||||
lcd.drawText(LCD_W/2, 50, "MENU: "..virtual_menu)
|
||||
return 0
|
||||
end
|
||||
|
||||
return { init=init, run=run }
|
||||
|
||||
Executable
+74
@@ -0,0 +1,74 @@
|
||||
local toolName = "TNS|LUA event tests|TNE"
|
||||
---- #########################################################################
|
||||
---- # #
|
||||
---- # 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 virtual_next = 0
|
||||
local virtual_previous = 0
|
||||
local virtual_next_rept = 0
|
||||
local virtual_previous_rept = 0
|
||||
local virtual_page_next = 0
|
||||
local virtual_page_previous = 0
|
||||
local virtual_enter = 0
|
||||
local virtual_enter_long = 0
|
||||
local virtual_menu = 0
|
||||
local virtual_menu_long = 0
|
||||
|
||||
-- Init
|
||||
local function init()
|
||||
|
||||
end
|
||||
|
||||
-- Main
|
||||
local function run(event)
|
||||
if event == nil then
|
||||
error("Cannot be run as a model script!")
|
||||
return 2
|
||||
elseif event == EVT_VIRTUAL_EXIT then
|
||||
return 2
|
||||
elseif event == EVT_PLUS_FIRST then
|
||||
virtual_next = virtual_next + 1
|
||||
elseif event == EVT_MINUS_FIRST then
|
||||
virtual_previous = virtual_previous + 1
|
||||
elseif event == EVT_PLUS_REPT then
|
||||
virtual_next_rept = virtual_next_rept + 1
|
||||
elseif event == EVT_MINUS_REPT then
|
||||
virtual_previous_rept = virtual_previous_rept + 1
|
||||
elseif event == EVT_PAGE_BREAK then
|
||||
virtual_page_next = virtual_page_next +1
|
||||
elseif event == EVT_PAGE_LONG then
|
||||
virtual_page_previous = virtual_page_previous + 1
|
||||
killEvents(event);
|
||||
elseif event == EVT_ENTER_BREAK then
|
||||
virtual_enter = virtual_enter + 1
|
||||
elseif event == EVT_MENU_BREAK then
|
||||
virtual_menu = virtual_menu + 1
|
||||
end
|
||||
|
||||
lcd.clear()
|
||||
lcd.drawScreenTitle("LUA EVENT TEST", 0, 0)
|
||||
lcd.drawText(1, 10, "PLUS: "..virtual_next)
|
||||
lcd.drawText(1, 20, "MINUS: "..virtual_previous)
|
||||
lcd.drawText(1, 40, "PLUS_REPT: "..virtual_next_rept)
|
||||
lcd.drawText(1, 50, "MINUS_REPT: "..virtual_previous_rept)
|
||||
lcd.drawText(LCD_W/2, 10, "ENTER: "..virtual_enter)
|
||||
lcd.drawText(LCD_W/2, 20, "MENU: "..virtual_menu)
|
||||
lcd.drawText(LCD_W/2, 40, "NEXT_PAGE: "..virtual_page_next)
|
||||
lcd.drawText(LCD_W/2, 50, "PREVIOUS_PAGE: "..virtual_page_previous)
|
||||
return 0
|
||||
end
|
||||
|
||||
return { init=init, run=run }
|
||||
+30
-7
@@ -37,12 +37,12 @@ for i, (s, f) in enumerate([("volt", "volt0"),
|
||||
("radiante", "rad0"), ("radianti", "rad1"),
|
||||
("millilitro", "m10"), ("millilitri", "m11"),
|
||||
("oncia fluida", "founce0"), ("once fluide", "founce1"),
|
||||
("milliliter per minute", "mlpm0"), ("milliliters per minute", "mlpm1"),
|
||||
("millilitro per minuto", "mlpm0"), ("millilitri per minuto", "mlpm1"),
|
||||
("ora", "hour0"), ("ore", "hour1"),
|
||||
("minuto", "minute0"), ("minuti", "minute1"),
|
||||
("secondo", "second0"), ("secondi", "second1"),
|
||||
]):
|
||||
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 113 + i)))
|
||||
systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 116 + i)))
|
||||
for s, f, a in [("radio inattiva controllare", "inactiv", 486),
|
||||
("batteria della radio scarica", "lowbatt", 485),
|
||||
("controllo motore non in posizione, verificare", "thralert", 481),
|
||||
@@ -71,6 +71,9 @@ for s, f, a in [("radio inattiva controllare", "inactiv", 486),
|
||||
("Problema all'antenna della radio", "swr_red", NO_ALTERNATE),
|
||||
("Telemetria assente", "telemko", NO_ALTERNATE),
|
||||
("Telemetria disponibile", "telemok", NO_ALTERNATE),
|
||||
("Segnale trainer perso", "trainko", NO_ALTERNATE),
|
||||
("Segnale trainer disponibile", "trainok", NO_ALTERNATE),
|
||||
("Sensore perso", "sensorko", NO_ALTERNATE),
|
||||
("sovraccarico servo", "servoko", NO_ALTERNATE),
|
||||
("sovraccarico di alimentazione", "rxko", NO_ALTERNATE),
|
||||
("ricevente ancora connessa", "modelpwr", NO_ALTERNATE),
|
||||
@@ -80,11 +83,13 @@ for i, s in enumerate(["timer", "", "tensione", "tensione", "trasmissione", "ric
|
||||
"carburante", "temperatura", "temperatura", "velocità", "distanza", "altitudine", "cella lipo",
|
||||
"totale lipo", "tensione", "corrente", "consumo", "potenza", "accelerazione X", "accelerazione Y", "accelerazione Z",
|
||||
"direzione", "variometro", "minimo", "massimo"]):
|
||||
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 135 + i)))
|
||||
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE + 155 + i)))
|
||||
for i, (s, f) in enumerate([("carrello chiuso", "gearup"),
|
||||
("carrello aperto", "geardn"),
|
||||
("flap rientrati", "flapup"),
|
||||
("flap estesi", "flapdn"),
|
||||
("spoiler su", "splrup"),
|
||||
("spoiler giù", "splrdn"),
|
||||
("atterraggio", "attero"),
|
||||
("modalità maestro attiva", "trnon"),
|
||||
("modalità maestro disattiva", "trnoff"),
|
||||
@@ -92,11 +97,15 @@ for i, (s, f) in enumerate([("carrello chiuso", "gearup"),
|
||||
("troppo alto", "tohigh"),
|
||||
("troppo basso", "tolow"),
|
||||
("batteria scarica", "lowbat"),
|
||||
("crow on", "crowon"),
|
||||
("crow off", "crowof"),
|
||||
("crow attivato", "crowon"),
|
||||
("crow disattivato", "crowof"),
|
||||
("segnale radio basso", "siglow"),
|
||||
("segnale radio critico", "sigcrt"),
|
||||
("modo velocità", "spdmod"),
|
||||
("modo termica", "thmmod"),
|
||||
("modo volo normale", "nrmmod"),
|
||||
("modo atterraggio", "lnding"),
|
||||
("modo acro", "acro"),
|
||||
("fase di volo 1", "fltmd1"),
|
||||
("fase di volo 2", "fltmd2"),
|
||||
("fase di volo 3", "fltmd3"),
|
||||
@@ -104,7 +113,21 @@ for i, (s, f) in enumerate([("carrello chiuso", "gearup"),
|
||||
("fase di volo 5", "fltmd5"),
|
||||
("fase di volo 6", "fltmd6"),
|
||||
("fase di volo 7", "fltmd7"),
|
||||
("fase di volo 8", "fltmd8"),
|
||||
("fase di volo 9", "fltmd9"),
|
||||
("variometro attivato", "vrion"),
|
||||
("variometro disabilitato", "vrioff"),
|
||||
("fase di volo power", "fm-pwr"),
|
||||
("fase di volo land", "fm-lnd"),
|
||||
("fase di volo planata", "fm-flt"),
|
||||
("fase di volo velocità", "fm-spd"),
|
||||
("fase di volo veloce", "fm-fst"),
|
||||
("fase di volo normale", "fm-nrm"),
|
||||
("fase di volo cruise", "fm-crs"),
|
||||
("fase di volo acro", "fm-acr"),
|
||||
("fase di volo race", "fm-rce"),
|
||||
("fase di volo lancio", "fm-lch"),
|
||||
("fase di volo ping", "fm-png"),
|
||||
("fase di volo termica", "fm-thm"),
|
||||
("fase di volo termica sinistra", "fm-thl"),
|
||||
("fase di volo termica destra", "fm-thr"),
|
||||
]):
|
||||
sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i)))
|
||||
|
||||
Reference in New Issue
Block a user