Commit Graph
579 Commits
Author SHA1 Message Date
3djcandGitHub 8ee73a5800 fix(lua): Remove faulty carryTrim, replace with trimSource (#2995)
* Fix carryTrim in LUA

* Remove carryTrim
2023-01-15 11:54:57 +10:00
Alessandro ApostoliandGitHub ea162d2158 fix(lua): fix drawHudRectangle for roll = 0 (#2978)
- fixed an extra line at the bottom of the hud rectangle
- fixed overflowing hud rectangle for horizon outside viewport (pitch > 0)
2023-01-15 11:50:44 +10:00
philmozandGitHub 1bffd260a0 fix(lua): Add missing switch and countdownStart properties (#2979)
Add the switch and countdownStart properties to the getTimer and setTimer Lua functions.
2023-01-08 11:02:55 +10:00
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 8d83487ceb fix(lua): Do not push long enter key press on touch (#2782)
Relates to #2736
2022-11-23 20:32:33 +10:00
Raphael CoefficandGitHub 5958930136 fix(lua): [page down long] translation to [page up] (#2668)
Suppress `EVT_KEY_BREAK(KEY_PGDN)` after `EVT_KEY_LONG(KEY_PGDN)` on targets which don't have a physical `KEY_PGUP`.

This way, the sequence is now clean: no more `EVT_VIRTUAL_NEXT_PAGE` emitted after `EVT_VIRTUAL_PREV_PAGE` on these targets.
2022-11-03 21:16:59 +10:00
Raphael CoefficandGitHub 6763c97934 fix(lua): re-implement LUA "tap" events (#2646)
Fixes #2617
2022-10-31 11:22:29 +10:00
Raphael CoefficandGitHub 4c1cebe0f7 fix(lua): send EVT_VIRTUAL_EXIT only on short EXIT press (#2573)
Fixes #2436
2022-10-17 22:11:56 +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
Malte LangermannandGitHub 248c160dbf fix(color): Lua vertical font alignment corrections (#2371) 2022-09-27 13:01:12 +10:00
Gábor BányászandGitHub 8ad390d59b fix(lua): lcd.drawGauge wide gauge error (#2375) 2022-09-27 12:03:53 +10:00
Raphael CoefficandGitHub c2451085ec fix(lua): handle ENTER_LONG properly (#2353)
Fixes #2267
2022-09-26 09:49:51 +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
David PHAM-VANandGitHub 4ed4f218b4 feat: Allow Lua widget translations (#2275) 2022-09-07 21:18:50 +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
Peter FeerickandPeter Feerick 9e23561184 fix: Reset file permissions
Git is stupid and doesn't let you lock them
2022-07-20 13:01:31 +10:00
3djcandPeter Feerick 6010eff024 TX12MK2 initial (external issue with MPM) 2022-07-20 13:01:31 +10:00
Raphael CoefficandRaphael Coeffic f1f8249205 lua events: fixed includes 2022-06-25 16:09:04 +02:00
Raphael CoefficandRaphael Coeffic 0b8d93ca88 WiP: support for LSM6DSxx 2022-06-25 16:09:04 +02:00
Raphael Coeffic 2e9fde7ed4 LUA events: fixed memclear() size in luaNextEvent() 2022-06-21 06:47:01 +02:00
Raphael CoefficandRaphael Coeffic f6988c0870 The return of XXL font 2022-06-14 22:58:15 +02:00
Raphael CoefficandRaphael Coeffic 7e5d8ee7ac Fixed compilation on non-touch targets 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic acbf916652 Removed unused LUA themes 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic a3424d5bc0 Support for touch/key events in LUA widgets 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 4c8bb99e73 Replaced focus handling with LVGL groups 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 873b8468bd translations: re-added CJK fonts for CN and TW translations 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 12f51350ce Scrolling is now handled 100% by LVGL 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 99270482dc Removed backup buffer & some LUA fixes 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
Raphael CoefficandRaphael Coeffic 86d1ca4364 Reorganize module type/subType/rfProtocol 2022-03-24 10:40:17 +01:00
WilhelmandGitHub c14417a325 Try to fix use of unterminated strings in mixer setup (#1317) (#1338)
* fixes the non-terminated fixed-string problem in lua-mixer-script
added some useful info to the script-line
make the popup menu to delete a script

* removed unneccessary comments

* intermediate fix

* tried to obey all comments to the code
and to eliminate further potential buffer-overflows

* fixed typo

* fixed async loading of lua scripts and update of widget
cleanup

* removed GCC pragmas (clang warn about them)
remove constexpr qualification (gcc accepts them because gcc-builtins are already constexpr, clang still warns about them)

* removed merge marker
2022-03-23 12:40:06 +01: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
Peter FeerickandGitHub 2929f1aca9 fix: Disable LUA GV funcs if GVARS=NO build (#1645)
Compile option breakage from #1602
2022-03-01 08:38:20 +10:00
Jesper FrickmannandGitHub 0391174e06 fix: Lua get/setGlobalVariable not honoring flight mode setting (#1602)
When GV was set to e.g. `FM0` , `setGlobalVariable` would change it to own value. Now it works as it should
2022-02-27 08:46:37 +10:00
Hans Christian OlaussenandGitHub 279c308da4 fix: lua error message not always shown (#1604) 2022-02-26 19:18:35 +10:00
5a4c6df594 fix: OSK DEF button was not setting Value inputs of mixer scripts correctly (#1536)
* The set/reset switches for a logical switch are only processed if the are valid.

* Revert "The set/reset switches for a logical switch are only processed if the are valid."

This reverts commit c238108415aec39f64ba6bae4c86cfb3ea4713bc.

* fix handling of default values in mixer scripts

* revised the use of default value to be consistent to the past usage

* Limited autoformatting

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-02-04 21:53:14 +10:00
Jesper FrickmannandGitHub b91be18414 feat: Increase resources for Lua widgets (#1498) 2022-02-01 11:37:11 +10:00