Skip to content

Commit 5cbceba

Browse files
committed
Cleanup
1 parent 6bd5a4a commit 5cbceba

File tree

12 files changed

+85
-166
lines changed

12 files changed

+85
-166
lines changed

.github/stale.yml

+17-33
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,31 @@
1-
# Configuration for probot-stale - https://github.com/probot/stale
2-
3-
# Number of days of inactivity before an Issue or Pull Request becomes stale
4-
daysUntilStale: 30
5-
6-
# Number of days of inactivity before a stale Issue or Pull Request is closed.
7-
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 120
3+
# Number of days of inactivity before a stale issue is closed
84
daysUntilClose: 7
9-
10-
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
5+
# Issues with these labels will never be considered stale
116
exemptLabels:
12-
- BUG
13-
- Feature Request
14-
- Pinned
15-
7+
- pinned
8+
- security
169
# Set to true to ignore issues in a project (defaults to false)
1710
exemptProjects: false
18-
1911
# Set to true to ignore issues in a milestone (defaults to false)
20-
exemptMilestones: true
21-
22-
# Label to use when marking as stale
23-
staleLabel: Inactive
24-
25-
# Comment to post when marking as stale. Set to `false` to disable
12+
exemptMilestones: false
13+
# Label to use when marking an issue as stale
14+
staleLabel: wontfix
15+
# Comment to post when marking an issue as stale. Set to `false` to disable
2616
markComment: >
27-
This issue / pull request has been automatically marked as stale because it
28-
has not had recent activity. It will be closed if no further activity occurs
29-
within a week.
30-
17+
This issue has been automatically marked as stale because it has not had
18+
recent activity. It will be closed if no further activity occurs. Thank you
19+
for your contributions.
3120
# Comment to post when removing the stale label.
3221
# unmarkComment: >
3322
# Your comment here.
34-
35-
# Comment to post when closing a stale Issue or Pull Request.
36-
closeComment: >
37-
Automatically closing as inactive.
38-
23+
# Comment to post when closing a stale issue. Set to `false` to disable
24+
closeComment: false
3925
# Limit the number of actions per hour, from 1-30. Default is 30
40-
limitPerRun: 30
41-
26+
limitPerRun: 1
4227
# Limit to only `issues` or `pulls`
43-
# only: issues
44-
28+
only: issues
4529
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
4630
# pulls:
4731
# daysUntilStale: 30

.gitignore

+2-47
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,2 @@
1-
# Compiled Lua sources
2-
luac.out
3-
4-
# luarocks build files
5-
*.src.rock
6-
*.zip
7-
*.tar.gz
8-
9-
# Object files
10-
*.o
11-
*.os
12-
*.ko
13-
*.obj
14-
*.elf
15-
16-
# Precompiled Headers
17-
*.gch
18-
*.pch
19-
20-
# Libraries
21-
*.lib
22-
*.a
23-
*.la
24-
*.lo
25-
*.def
26-
*.exp
27-
28-
# Shared objects (inc. Windows DLLs)
29-
*.dll
30-
*.so
31-
*.so.*
32-
*.dylib
33-
34-
# Executables
35-
*.exe
36-
*.out
37-
*.app
38-
*.i*86
39-
*.x86_64
40-
*.hex
41-
42-
# Eclipse
43-
.project
44-
45-
#directories
46-
tmp
47-
obj
1+
.vscode/
2+
desktop.ini

README.md

+3-51
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,5 @@
1-
# betaflight-tx-lua-scripts
1+
# Taranis VTx Lua Script
22

3-
### Important:
3+
This stripped-down fork of [betaflight-tx-lua-scripts](https://github.com/betaflight/betaflight-tx-lua-scripts) includes only VTx configuration for Taranis transmitters only. Taranis VTx was created to save memory on your transmitter so other Lua scripts (for example [Lua Telemetry](https://github.com/iNavFlight/LuaTelemetry)) can run on the same model. This script should work with [Betaflight](https://github.com/betaflight/betaflight) as well as [INAV](https://github.com/iNavFlight/inav).
44

5-
Some changes in the recently released OpenTX 2.2.1 cause this version to have less RAM available for lua scripts than previous versions. This often leads to problems when using the Betaflight TX lua scripts on the Taranis X9D. A discussion of these problems can be found [here](https://github.com/betaflight/betaflight-tx-lua-scripts/issues/97).
6-
A potential fix to increase the amount of RAM available has been identified: (https://github.com/opentx/opentx/pull/5579).
7-
For now, the recommendation is for users wanting to update OpenTX from 2.2.0 to 2.2.1 on a Taranis X9D (and keep using the Betaflight TX lua scripts) to hold on and monitor the situation, in the hope that OpenTX will release a version with this bugfix in the near future.
8-
9-
### How to download the scripts
10-
11-
Please visit the [releases page](https://github.com/betaflight/betaflight-tx-lua-scripts/releases) to download a zip file containing latest version.
12-
13-
## Firmware Considerations
14-
- Betaflight - As a best practice, it is recommended to use the most recent stable release of Betaflight to obtain the best possible results.
15-
- Crossfire - v2.11 or greater
16-
- FrSky - While most receivers work fine, it's recommended to update the XSR family of receivers to their most recent firmware version to correct any known bugs in SmartPort telemetry.
17-
18-
## Installing
19-
20-
!! IMPORTANT: DON'T COPY THE CONTENTS OF THIS REPOSITORY ONTO YOUR SDCARD !!
21-
22-
Unzip the files from the link above and drag the contents to your radio. If you do this correctly, the SCRIPTS directory will merge with your existing directories, placing the scripts in their appropriate paths. You will know if you did this correctly if the bf.lua file shows up in your /SCRIPTS/TELEMETRY directory.
23-
24-
The src directory is not required for use and is only available for maintenance of the code. While it may work to use this directory, you may encounter memory issues on your transmitter.
25-
26-
How to install:
27-
28-
Bootloader Method
29-
1. Power off your transmitter and power it back on in boot loader mode.
30-
2. Connect a USB cable and open the SD card drive on your computer.
31-
3. Unzip the file and copy the scripts to the root of the SD card.
32-
4. Unplug the USB cable and power cycle your transmitter.
33-
34-
Manual method (varies, based on the model of your transmitter)
35-
1. Power off your transmitter.
36-
2. Remove the SD card and plug it into a computer
37-
3. Unzip the file and copy the scripts to the root of the SD card.
38-
4. Reinsert your SD card into the transmitter
39-
5. Power up your transmitter.
40-
41-
If you copied the files correctly, you can now go into the telemetry screen setup page and set up the script as telemetry page.
42-
43-
## Adding the script as a telemetry page
44-
Setting up the script as a telemetry page will enable access at the press of a button. (For now, this only applies to the Taranis X9D series).
45-
1. Hit the [MENU] button and select the model for which you would like to enable the script.
46-
2. While on the [MODEL SELECTION] screen, long-press the [PAGE] button to navigate to the [DISPLAY] page.
47-
3. Use the [-] button to move the cursor down to [Screen 1] and hit [ENT].
48-
4. Use the [+] or [-] buttons to select the [Script] option and press [ENT].
49-
5. Press [-] to move the cursor to the script selection field and hit [ENT].
50-
6. Select 'bf' and hit [ENT].
51-
7. Long-press [EXIT] to return to your model screen.
52-
53-
To invoke the script, simply long-press the [PAGE] button from the model screen.
5+
_TODO: Installation instructions..._

SCRIPTS/TELEMETRY/VTx.lua

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
SCRIPT_HOME = "/SCRIPTS/TELEMETRY/VTx"
22

3-
PageFiles = {
4-
"vtx.lua"
5-
}
6-
73
MenuBox = { x=15, y=12, w=100, x_offset=36, h_line=8, h_offset=3 }
84
SaveBox = { x=15, y=12, w=100, x_offset=4, h=30, h_offset=5 }
95
NoTelem = { 30, 55, "No Telemetry", BLINK }

SCRIPTS/TELEMETRY/VTx.luac

-44 Bytes
Binary file not shown.

SCRIPTS/TELEMETRY/VTx/events.lua

-29
This file was deleted.

SCRIPTS/TELEMETRY/VTx/events.luac

-861 Bytes
Binary file not shown.

SCRIPTS/TELEMETRY/VTx/ui.lua

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
local userEvent = assert(loadScript(SCRIPT_HOME.."/events.lua"))()
1+
local userEvent = {
2+
press = {
3+
minus = EVT_MINUS_FIRST,
4+
plus = EVT_PLUS_FIRST,
5+
pageDown = EVT_PAGEDN_FIRST,
6+
pageUp = EVT_PAGEUP_FIRST or EVT_LEFT_BREAK
7+
},
8+
longPress = {
9+
enter = EVT_ENTER_LONG,
10+
menu = EVT_MENU_LONG or EVT_RIGHT_LONG
11+
},
12+
repeatPress = {
13+
minus = EVT_MINUS_REPT,
14+
plus = EVT_PLUS_REPT
15+
},
16+
release = {
17+
enter = EVT_ENTER_BREAK,
18+
exit = EVT_EXIT_BREAK,
19+
menu = EVT_MENU_BREAK or EVT_RIGHT_BREAK,
20+
minus = EVT_MINUS_BREAK,
21+
plus = EVT_PLUS_BREAK
22+
},
23+
dial = {
24+
left = EVT_ROT_LEFT or EVT_UP_BREAK,
25+
right = EVT_ROT_RIGHT or EVT_DOWN_BREAK
26+
}
27+
}
228

329
local pageStatus =
430
{

SCRIPTS/TELEMETRY/VTx/ui.luac

696 Bytes
Binary file not shown.

SCRIPTS/TELEMETRY/VTx/vtx.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ return {
44
write = 89, -- MSP_VTX_SET_CONFIG
55
eepromWrite = true,
66
reboot = false,
7-
title = "VTX",
7+
title = "Taranis VTX",
88
minBytes = 5,
99
prevBandVal = 0,
1010
prevChanVal = 0,

SCRIPTS/TELEMETRY/VTx/vtx.luac

8 Bytes
Binary file not shown.

bin/build.sh

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
if [ -d obj ]; then
4+
rm -fR obj/*
5+
else
6+
mkdir obj
7+
fi
8+
9+
cp -fR src/* obj
10+
11+
MANIFEST=(`find obj/ -name *.lua -type f`);
12+
LAST_FAILURE=0
13+
14+
if [ ${#MANIFEST[@]} -eq 0 ]; then
15+
echo -e "\e[1m\e[39m[\e[31mTEST FAILED\e[39m]\e[21m No scripts could be found!."
16+
exit 1
17+
fi
18+
19+
for f in ${MANIFEST[@]};
20+
do
21+
SRC_NAME=$f
22+
OBJ_NAME=$(dirname ${f})/$(basename ${f} .lua).luac
23+
echo -e "Compiling file \e[1m${SRC_NAME}\e[21m..."
24+
luac -s -o ${OBJ_NAME} ${SRC_NAME}
25+
_fail=$?
26+
if [[ $_fail -ne 0 ]]; then
27+
LAST_FAILURE=$_fail
28+
echo -e "\e[1m\e[39m[\e[31mBUILD FAILED\e[39m]\e[21m Compilation error in file ${SRC_NAME}\e[1m"
29+
fi
30+
done
31+
32+
if [[ $LAST_FAILURE -eq 0 ]]; then
33+
echo -e "\e[1m\e[39m[\e[32mTEST SUCCESSFUL\e[39m]\e[21m All lua files built successfully!"
34+
fi
35+
exit $LAST_FAILURE

0 commit comments

Comments
 (0)