Commit Graph
296 Commits
Author SHA1 Message Date
3djcandGitHub bc8087cbf1 feat: Add Radiomaster Boxer (#2877)
* Radiomaster Boxer

* chore: Add Build system bits

* chore: `EEPROM_VARIANT` no longer used
2022-12-31 16:45:09 +10:00
Malte LangermannandGitHub d134e1a840 chore: Fix a bunch of compile warnings (#2748)
* chore: fix warnings for simu and firmware, part 1

* chore: fix warnings
2022-12-05 20:41:42 +10:00
becbbac2cb feat(lua): Add getTrainerStatus to Lua API (#2483)
* Initial Commit

* Finished Trainer Status

* fix: Bump version number

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-11-30 20:36:58 +10:00
Raphael CoefficandGitHub 8f3dd7f72e fix(lua): Array indexes for get/setFlightMode and getCurve (#2567)
* Lua array indexes start at 1

* LUA model.setFlightMode: use array index to compute trim index

This allows for providing an incomplete table like this:
```
-- Disable T5 & T6 on FM0
modes = {}
modes[5] = 31
modes[6] = 31
t = {}
t["trimsModes"] = modes
model.setFlightMode(0, t)
```

* Remove warning & cleanup

* Fix trim value constraints in model.setFlightMode()
2022-11-30 15:57:42 +10:00
Raphael CoefficandGitHub 6f494e109c feat(telemetry): extend link quality warnings range (#2251)
* feat(telemetry): extend link quality warnings range

* Set default values to the old legacy FrSky values

* Companion support
2022-10-12 14:28:32 +10:00
Jesper FrickmannandGitHub 83fbf1a7f8 feat(lua): Add getSourceValue (#2316)
* Moved getFieldInfo and getValue up right after related functions

* Modified getValue to return a valid status, so Lua can see if it got zero because of invalid source id

* Added new getSourceValue Lua function per Issue #781
Also added alias getSourceInfo for getFieldInfo

* Updated according to comment https://github.com/EdgeTX/edgetx/pull/2175#issuecomment-1245605114

* Replaced isFresh() by !isOld() as requested in https://github.com/EdgeTX/edgetx/pull/2316#issuecomment-1246759370

* Clean up `lua_pushtablenil` - tables cannot hold nil values

* Changed isFresh() to !isOld() ... AGAIN

* Return both `!isOld()` and `isFresh()`

* Return nil for all values if the item does not exist

* Return 0 instead of pushing three nil values

* Update documentation
2022-09-28 09:42:16 +10:00
David PHAM-VANandGitHub 155a854131 feat(lua): Add several Lua API funcs and constants (#2279)
* LUA: Add Bitmap.toMask and lcd.drawBitmapPattern functions

* LUA: Add lcd.invertRect function

* LUA: Add Bitmap.resize function

* LUA: Add getOutputValue function

* LUA: Add timer showElapsed configuration

* LUA: Add model extendedLimits configuration

* LUA: Add some global constants

* Add model jitterFilter configuration

* Add model.getSwashRing and setSwashRing functions
2022-09-08 20:03:58 +10:00
4e49ac68be feat(colorlcd): Special Function to set main screen (#2160)
* Special Function to set main screen (#2135)

* chore: Add new SF to LUA constants list

* Companion support

* Formatting

* get rid of magic number

* Add function to get the number of custom screens

* Change screen numbering from 0-based to 1-based.

* Allow SetScreen custom function for Color LCD only

* add range protection

* cleanup

* yet, range protection once again

* fix: paintSpecialFunctionLine can't alter SF param data

* Fix screen initialization in companion

* move screen switching to the UI

* Trigger view change from guiMain()

* chore: Change "SET" to "Set" for consistency

* fix: Somehow missed extra comma in `TW`

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
2022-09-07 21:40:34 +10:00
zhaobingandPeter Feerick 0219426b26 Add LR3PRO as an independent target 2022-08-20 10:59:50 +10:00
XINGandPeter Feerick 299991bc11 Add iFlight Commando8
Add iFlight Commando8 ELRS radio
2022-08-16 18:44:57 +10:00
62692dba6a feat: More rotary encoder options for B&W screens (see #2045)
* First build

* Fix X9

* Update api_general.cpp

* Update translations.h

* clean up translations

* fix: B&W option handling, remove magic numbers, cleanup
- Remove references to invertRotary, change to RotEncDir or similar
- Add compatabilty importing to companion, firmware
- Rename Lua API call
- Move magic numbers to enum
- Improve B&W option handling so it doesn't apply changes while in menu

* chore: yaml regen

* fix: Add missing guards for X9D/X9D+

* fix: Wrong enum name in simu

* fix(cpn): Use correct names for UI elements

* fix: Translations

* fix: Allow `rotEncMode` in all yaml due to x9d var
Of the three X9D variants, the X9D+2019 is the only one that
has a rotary encoder as standard. However, as the base config
file is for the X9D, this meant it wasn't reading or writing the
config value. Rather than add a seperate config file for it for
a single variable, simple to just allow it across all targets.

* fix: Companion string, change colorlcd to `Choice`

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-08-04 20:06:17 +10:00
Raphael CoefficandPeter Feerick 8379b47e2b Fix compilation with MULTIMODULE=NO
And allow for Spektrum telemetry to stay enabled (needed for DSMP module).
2022-07-22 20:45:04 +10:00
3djcandPeter Feerick 6010eff024 TX12MK2 initial (external issue with MPM) 2022-07-20 13:01:31 +10:00
Raphael CoefficandRaphael Coeffic f6988c0870 The return of XXL font 2022-06-14 22:58:15 +02:00
Raphael CoefficandRaphael Coeffic 873b8468bd translations: re-added CJK fonts for CN and TW translations 2022-06-11 15:38:08 +02:00
WilhelmandGitHub 5e6cf2e79c fix: Custom stick and switch names were being mangled internally (#1770)
* followup to PR1754

* Cleanup

* Formatting

* Long comment
2022-04-01 14:16:01 +10:00
Jesper FrickmannandGitHub cdda903a25 fix: Lua - Changed getSwitch* so can also get "One" and "ON" switch positions (#1720)
Use `ModelCustomFunctionsContext` instead of `LogicalSwitchesContext` to get "One" and "ON" switch positions
2022-03-23 19:09:43 +10:00
Raphael Coeffic 9c9f77a2a9 Do not allocate memory for LUA Rx fifo from the USB ISR
Rather use explicit allocation when the serial is set as the on-demand method that was used previously.
2022-03-20 16:30:59 +01:00
Raphael Coeffic 530d395204 WiP 2022-03-20 16:22:14 +01:00
Raphael Coeffic 74f19371ae Fixes for TX16S 2022-03-20 16:22:14 +01:00
Raphael Coeffic d93cd1ea25 Moved aux serial defs to own header file 2022-03-20 16:22:14 +01:00
MichaelandGitHub 45731d8577 fix: Numerous updates and fixes for HoTT telemetry (#1617)
* transferred respective OpenTX updates to HoTT telemetry

* integrated LUA function flushAudio from OpenTx

* sensor names moved to “untranslated.h”

reverted *.h.txt to original mainline content
removed leading "Z" in sensor name defines
2022-03-18 10:06:53 +10:00
Štěpán DaleckýandPeter Feerick 8c6bc67f18 Ghost MSP support 2022-01-27 10:35:56 +10:00
Jesper FrickmannandGitHub c45b3d7114 Fix: [lua] Do not ever convert name to a number with getFieldInfo(name) (#1423)
Fix for Issue #1346
2022-01-17 10:20:40 +10:00
Peter FeerickandPeter Feerick a077f2e325 Change version references to 2.6 2022-01-04 09:51:47 +10:00
jfrickmannandPeter Feerick f2a360c9d3 Addressed the requests in issue #1285
`getfieldInfo` can now also take a source index as argument. Plus it was modified to also handle "telem1+" etc.
New functions `getSourceIndex(sourceName)` and `getSourceName(sourceIndex)` were added, which use the names shown on the
screen instead of the special names table used by `getFieldInfo` and `getValue`.
Indices are the same for all of the functions, so `getValue(sourceIndex)` also works with indices from `getSourceIndex`.
New iterator functions `sources([first[, last]])` and `switches([first[, last]])` for getting ranges of sources and switches.
`getPhysicalSwitches` was removed, as I consider the iterator function to be a better solution.
2022-01-04 09:51:47 +10:00
rotormanandRaphael Coeffic 89517d8bd8 Use ETX instead of OTX (also as a file extension). 2021-12-31 10:53:08 +01:00
3djcandRaphael Coeffic d31482c18b Introduce T-pro and function switches handling 2021-12-17 17:07:48 +01:00
3djcandRaphael Coeffic 6735a42b08 Radiomaster Zorro
Port of opentx/opentx#8791
2021-12-17 15:17:48 +01:00
jfrickmannandPeter Feerick 85bd9d16ea Added Lua constants for logical switch and special/custom functions 2021-12-15 12:24:58 +10:00
jfrickmannandRisto 14f72e1d82 Added new Lua API functions for switches
getSwitchId(positionName)
getSwitchName(switchId)
getSwitchValue(switchId)
getPhysicalSwitches()
2021-12-01 18:41:04 +01:00
Peter FeerickandPeter Feerick 9401e00253 Add missing newline at EOF 2021-11-29 12:00:50 +10:00
jfrickmannandPeter Feerick 81cb94a4bf Added string constants to the read-only tables in Lua 2021-11-29 12:00:50 +10:00
Jesper FrickmannandGitHub a09e318e64 [Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
[Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
* Adds setStickySwitch to set the value of a stick logical switch
* Adds getLogicalSwitchValue to get the value of a logical switch by index
2021-11-29 12:48:01 +11:00
Raphael CoefficandRaphael Coeffic 5e3c20b258 Push some dirty hack to give internal CRSF a higher prio
This allows for BF scripts to run on internal CRSF.
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic 043c1e6a2d Fixed pushing CRSF telem packets to internal module 2021-11-21 11:18:35 +01:00
Jesper FrickmannandGitHub 30780d82ec [lua] Add shared memory variables which can be accessed from Lua widgets and other Lua scripts (#1018)
* Issue #132
Added 16 shared memory variables which can be accessed bot from Lua widgets and other Lua scripts.

* Notice Only available on radios with color display
2021-11-13 16:10:33 +11:00
Raphael Coeffic 69c017091a More stringified values 2021-11-10 11:07:01 +01:00
Peter FeerickandGitHub 3ad98bacf4 [NV14] Use trim hats to emulate key events when standalone lua script running (#985)
* Preliminary trims as keys for lua
Largely based on open-flysky implementation

* Add `isLuaStandaloneRunning()`

* Add more virtual events

* Tweak virtual events further

* Finish remapping keys to virtual events

* Move some virtuals to right trim hat

* Add missing "defined"

* Revert to common EVT_VIRTUAL_MENU mapping

* Make keys/trims reset backlight like other radios
2021-11-09 12:50:20 +11:00
rotormanandRisto fc2142ec78 Changed uniformly to EdgeTX boiler plate (also added boiler for files that were missing it). 2021-10-02 14:22:01 +02:00
Riwan ec1c1ec345 Added LUA file system operations 2021-08-23 14:39:49 +02:00
jfrickmannandRaphael Coeffic 9d878b71ce Improved color handling in Lua
LCD flags can now hold either a theme color index or a RGB value. Hence, values from lcd.RGB() and literal colors like e.g. RED, WHITE etc. can be used interchangeably with theme colors and CUSTOM_COLOR.
Also redesigned drawText, drawNumber and drawTimer, so they now use a common function to implement the party tricks with BLINK and INVERS flags.
2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic d0e4b767d3 Converted literal colors to indices that can be used everywhere.
Also modified lcd.setColor function so it accepts either RGB or index color as new color. That way, literal colors work as before.
2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 23ee5d933c Added back Lua constants for old style them colors 2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 95b87db3e0 Did a scripted search and replace to replace 40 existing theme colors with 11 new theme colors. 2021-08-22 19:39:50 +02:00
jfrickmannandRaphael Coeffic 302fcef465 Added OS theme colors as suggested by JimB40 in #506
Amend: trying if tests will pass when I move the new color indices to then end of the enum.
2021-08-22 19:33:03 +02:00
richardclliandGitHub f12e9d4599 Merge pull request #501 from EdgeTX/main
Merge from main
2021-07-26 10:50:32 +08:00
jfrickmann da94cc64ff Merge branch 'VCENTER' into Everything 2021-07-24 17:32:48 -04:00
jfrickmann 1fc59ce31a Merged LuaScriptPreemption 2021-07-24 17:32:41 -04:00
richardclliandGitHub d9d4591008 Merge pull request #495 from EdgeTX/main
Merge from main
2021-07-24 00:23:37 +08:00