Skip to content

Commit 03fce67

Browse files
authored
Merge pull request #274 from iNavFlight/development
v1.7.0
2 parents 96fd4dc + 883d8c2 commit 03fce67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1755
-697
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "\U0001F4A5 Attempt to call a nil value"
3+
about: Are you getting the message "Attempt to call a nil value"?
4+
title: ''
5+
labels: support
6+
assignees: teckel12
7+
---
8+
9+
If you're getting an `Attempt to call a nil value` error, it means you're out of memory on your transmitter. The Taranis series has very little free memory to work with for Lua scripts, so this error is quite common. But, there are a few things that typically cause this error which are listed below:
10+
11+
1) When installing Lua Telemetry, be sure to download the latest LuaTelemetry.zip linked here:
12+
13+
https://github.com/iNavFlight/LuaTelemetry/releases/latest
14+
15+
Also, please see the following instructions for correct installation:
16+
17+
https://github.com/iNavFlight/LuaTelemetry/wiki/Installation
18+
19+
2) Another possible reason for this error is that you're trying to use other Lua scripts on the same model. While you can have multiple Lua scripts for the same model, there's not much memory to work with on the Taranis transmitters. For example, if you're trying to use the Betaflight Tx lua script as well as Lua Telemetry, you'll probably run out of memory. If VTx control is desired, try using the OSD menu which allows you to change VTx settings right on the OSD.
20+
21+
3) Too many unused models. Each model slot setup in your transmitter takes up valuable memory. Many times models are backed up to tweak settings without deleting the backups when finished. By deleting unused models, memory is freed that can be used for other things, like Lua scripts.
22+
23+
As this is a common issue that I've tried to cover in the Wiki, I would appreciate if you could let me know how the instructions could be improved to avoid any confusion.
24+
25+
Thanks!

Diff for: .github/ISSUE_TEMPLATE/Bug_report.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
2-
name: "\U0001F41B Bug report"
3-
about: Report a bug or issue with Lua Telemetry
4-
2+
name: "\U0001F41B Possible bug"
3+
about: Report a possible bug or issue with Lua Telemetry
4+
title: ''
5+
labels: 'bug?'
6+
assignees: teckel12
57
---
68

79
### Describe the bug
8-
<!-- A clear and concise description of what the bug is and specify the transmitter model (ie: X9D, X7) -->
10+
<!-- A clear and concise description of the bug and specify the transmitter model (ie: X9D, X7, Horus X10S) -->
911

1012
### To reproduce
1113
<!-- Steps to reproduce the behavior, example: -->

Diff for: .github/ISSUE_TEMPLATE/Feature_request.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
name: "\U0001F680 Feature request"
33
about: Suggest an idea for Lua Telemetry
4-
4+
title: ''
5+
labels: feature request
6+
assignees: teckel12
57
---
68

7-
### Is your feature request related to a problem? Please describe.
9+
### Is your feature request related to a problem? Please describe
810
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
911

1012
### Describe the solution you'd like

Diff for: .github/ISSUE_TEMPLATE/Not_enough_memory.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
---
22
name: "\U0001F4A5 Not enough memory error"
33
about: Are you getting a "not enough memory error"?
4-
4+
title: ''
5+
labels: support
6+
assignees: teckel12
57
---
68

7-
If you're getting a `not enough memory error` it means you're out of memory on your transmitter. The Taranis series has very little free memory to work with for Lua Scripts, so this error is quite common. But, there are a few things that typically cause the error that can be avoided. These are outlined in the Lua Telemetry README file and listed below:
9+
If you're getting a `not enough memory error`, it means you're out of memory on your transmitter. The Taranis series has very little free memory to work with for Lua scripts, so this error is quite common. But, there are a few things that typically cause this error which are listed below:
810

9-
1) You must use the release ZIP file for installation and not the Lua script file in the `src` folder. The script in the `src` folder is not compiled and there's not enough memory on the Taranis transmitter to compile the script. Please see the following instructions for correct installation:
11+
1) When installing Lua Telemetry, be sure to download the latest LuaTelemetry.zip linked here:
1012

11-
https://github.com/iNavFlight/LuaTelemetry/wiki/Installation
13+
https://github.com/iNavFlight/LuaTelemetry/releases/latest
1214

13-
2) The other possible problem is that you're trying to use other Lua scripts on the same model. While you can have multiple scripts on the same model, there's not much memory to work with on the Taranis transmitters. For example, if you're trying to use the Betaflight Tx lua script as well as Lua Telemetry, you'll probably run out of memory. If VTx control is desired, use Taranis VTx from the following link which uses less memory and allows for Lua Telemetry and VTx scripts to run together:
15+
Also, please see the following instructions for correct installation:
16+
17+
https://github.com/iNavFlight/LuaTelemetry/wiki/Installation
1418

15-
https://github.com/teckel12/Taranis-VTx
19+
2) Another possible reason for this error is that you're trying to use other Lua scripts on the same model. While you can have multiple Lua scripts for the same model, there's not much memory to work with on the Taranis transmitters. For example, if you're trying to use the Betaflight Tx lua script as well as Lua Telemetry, you'll probably run out of memory. If VTx control is desired, try using the OSD menu which allows you to change VTx settings right on the OSD.
1620

1721
3) Too many unused models. Each model slot setup in your transmitter takes up valuable memory. Many times models are backed up to tweak settings without deleting the backups when finished. By deleting unused models, memory is freed that can be used for other things, like Lua scripts.
1822

19-
As this is a common issue that seems clear by the error message, is covered in the README file, and not a direct result of Lua Telemetry, I would appreciate it if you could let me know how the instructions could be improved to avoid any confusion.
23+
As this is a common issue that seems clear by the error message and covered in the Wiki, I would appreciate if you could let me know how the instructions could be improved to avoid any confusion.
2024

2125
Thanks!

Diff for: .github/ISSUE_TEMPLATE/Question.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: "\U00002753 Question"
3+
about: Ask a question about Lua Telemetry
4+
title: ''
5+
labels: question
6+
assignees: teckel12
7+
---
8+
9+
### Describe your question
10+
<!-- A clear and concise description of your question and specify the transmitter model (ie: X9D, X7, Horus X10S) -->
11+
12+
### To reproduce
13+
<!-- Steps to reproduce the behavior, example: -->
14+
1. Go to '....'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. Should it be doing this?
18+
19+
### Expected behavior
20+
<!-- A clear and concise description of what you expected to happen. -->
21+
22+
### Screenshots
23+
<!-- If applicable, add screenshots to help explain your question. -->
24+
25+
### Additional context
26+
<!-- Add any other context about the question here. -->

Diff for: .gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.vscode/
22
dist/SCRIPTS/TELEMETRY/iNav/*.lua
33
*.dat
4-
desktop.ini
4+
*.zip
5+
desktop.ini
6+
dist/THEMES/

Diff for: .travis/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ done
3232
if [[ $LAST_FAILURE -eq 0 ]]; then
3333
echo -e "\e[1m\e[39m[\e[32mTEST SUCCESSFUL\e[39m]\e[21m All lua files built successfully!"
3434
fi
35-
exit $LAST_FAILURE
35+
exit $LAST_FAILURE

Diff for: .travis/foo-scm-0.rockspec

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ package = "foo"
22
version = "scm-0"
33

44
source = {
5-
url = "" -- this is just make file
5+
url = "" -- this is just make file
66
}
77

88
description = {
9-
summary = "",
10-
homepage = "",
11-
license = "MIT/X11",
9+
summary = "",
10+
homepage = "",
11+
license = "MIT/X11",
1212
}
1313

1414
dependencies = {
15-
"lua >= 5.1",
15+
"lua >= 5.1",
1616
}
1717

1818
build = {
19-
copy_directories = {},
19+
copy_directories = {},
2020

21-
type = "builtin",
21+
type = "builtin",
2222

23-
modules = {
24-
[ "foo.core" ] = "src/foo.c";
25-
[ "foo" ] = "src/lua/foo.lua";
26-
}
27-
}
23+
modules = {
24+
[ "foo.core" ] = "src/foo.c";
25+
[ "foo" ] = "src/lua/foo.lua";
26+
}
27+
}

Diff for: .travis/platform.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
if [ -z "${PLATFORM:-}" ]; then
2-
PLATFORM=$TRAVIS_OS_NAME;
2+
PLATFORM=$TRAVIS_OS_NAME;
33
fi
44

55
if [ "$PLATFORM" == "osx" ]; then
6-
PLATFORM="macosx";
6+
PLATFORM="macosx";
77
fi
88

99
if [ -z "$PLATFORM" ]; then
10-
if [ "$(uname)" == "Linux" ]; then
11-
PLATFORM="linux";
12-
else
13-
PLATFORM="macosx";
14-
fi;
15-
fi
10+
if [ "$(uname)" == "Linux" ]; then
11+
PLATFORM="linux";
12+
else
13+
PLATFORM="macosx";
14+
fi;
15+
fi

Diff for: .travis/setenv_lua.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export PATH=${PATH}:$HOME/.lua:$HOME/.local/bin:${TRAVIS_BUILD_DIR}/install/luarocks/bin
22
bash .travis/setup_lua.sh
3-
eval `$HOME/.lua/luarocks path`
3+
eval `$HOME/.lua/luarocks path`

Diff for: .travis/setup_lua.sh

+51-51
Original file line numberDiff line numberDiff line change
@@ -22,62 +22,62 @@ mkdir $HOME/.lua
2222
LUAJIT="no"
2323

2424
if [ "$PLATFORM" == "macosx" ]; then
25-
if [ "$LUA" == "luajit" ]; then
26-
LUAJIT="yes";
27-
fi
28-
if [ "$LUA" == "luajit2.0" ]; then
29-
LUAJIT="yes";
30-
fi
31-
if [ "$LUA" == "luajit2.1" ]; then
32-
LUAJIT="yes";
33-
fi;
25+
if [ "$LUA" == "luajit" ]; then
26+
LUAJIT="yes";
27+
fi
28+
if [ "$LUA" == "luajit2.0" ]; then
29+
LUAJIT="yes";
30+
fi
31+
if [ "$LUA" == "luajit2.1" ]; then
32+
LUAJIT="yes";
33+
fi;
3434
elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then
35-
LUAJIT="yes";
35+
LUAJIT="yes";
3636
fi
3737

3838
mkdir -p "$LUA_HOME_DIR"
3939

4040
if [ "$LUAJIT" == "yes" ]; then
4141

42-
if [ "$LUA" == "luajit" ]; then
43-
curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz;
44-
else
45-
git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE;
46-
fi
42+
if [ "$LUA" == "luajit" ]; then
43+
curl --location https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz | tar xz;
44+
else
45+
git clone https://github.com/LuaJIT/LuaJIT.git $LUAJIT_BASE;
46+
fi
4747

48-
cd $LUAJIT_BASE
48+
cd $LUAJIT_BASE
4949

50-
if [ "$LUA" == "luajit2.1" ]; then
51-
git checkout v2.1;
52-
# force the INSTALL_TNAME to be luajit
53-
perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
54-
fi
50+
if [ "$LUA" == "luajit2.1" ]; then
51+
git checkout v2.1;
52+
# force the INSTALL_TNAME to be luajit
53+
perl -i -pe 's/INSTALL_TNAME=.+/INSTALL_TNAME= luajit/' Makefile
54+
fi
5555

56-
make && make install PREFIX="$LUA_HOME_DIR"
56+
make && make install PREFIX="$LUA_HOME_DIR"
5757

58-
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
59-
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;
58+
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/luajit
59+
ln -s $LUA_HOME_DIR/bin/luajit $HOME/.lua/lua;
6060

6161
else
6262

63-
if [ "$LUA" == "lua5.1" ]; then
64-
curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
65-
cd lua-5.1.5;
66-
elif [ "$LUA" == "lua5.2" ]; then
67-
curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
68-
cd lua-5.2.4;
69-
elif [ "$LUA" == "lua5.3" ]; then
70-
curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz
71-
cd lua-5.3.2;
72-
fi
73-
74-
# Build Lua without backwards compatibility for testing
75-
perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile
76-
make $PLATFORM
77-
make INSTALL_TOP="$LUA_HOME_DIR" install;
78-
79-
ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua
80-
ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac;
63+
if [ "$LUA" == "lua5.1" ]; then
64+
curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
65+
cd lua-5.1.5;
66+
elif [ "$LUA" == "lua5.2" ]; then
67+
curl http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
68+
cd lua-5.2.4;
69+
elif [ "$LUA" == "lua5.3" ]; then
70+
curl http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz
71+
cd lua-5.3.2;
72+
fi
73+
74+
# Build Lua without backwards compatibility for testing
75+
perl -i -pe 's/-DLUA_COMPAT_(ALL|5_2)//' src/Makefile
76+
make $PLATFORM
77+
make INSTALL_TOP="$LUA_HOME_DIR" install;
78+
79+
ln -s $LUA_HOME_DIR/bin/lua $HOME/.lua/lua
80+
ln -s $LUA_HOME_DIR/bin/luac $HOME/.lua/luac;
8181

8282
fi
8383

@@ -92,13 +92,13 @@ curl --location http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
9292
cd $LUAROCKS_BASE
9393

9494
if [ "$LUA" == "luajit" ]; then
95-
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
95+
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
9696
elif [ "$LUA" == "luajit2.0" ]; then
97-
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
97+
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.0" --prefix="$LR_HOME_DIR";
9898
elif [ "$LUA" == "luajit2.1" ]; then
99-
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR";
99+
./configure --lua-suffix=jit --with-lua-include="$LUA_HOME_DIR/include/luajit-2.1" --prefix="$LR_HOME_DIR";
100100
else
101-
./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR"
101+
./configure --with-lua="$LUA_HOME_DIR" --prefix="$LR_HOME_DIR"
102102
fi
103103

104104
make build && make install
@@ -112,11 +112,11 @@ luarocks --version
112112
rm -rf $LUAROCKS_BASE
113113

114114
if [ "$LUAJIT" == "yes" ]; then
115-
rm -rf $LUAJIT_BASE;
115+
rm -rf $LUAJIT_BASE;
116116
elif [ "$LUA" == "lua5.1" ]; then
117-
rm -rf lua-5.1.5;
117+
rm -rf lua-5.1.5;
118118
elif [ "$LUA" == "lua5.2" ]; then
119-
rm -rf lua-5.2.4;
119+
rm -rf lua-5.2.4;
120120
elif [ "$LUA" == "lua5.3" ]; then
121-
rm -rf lua-5.3.2;
122-
fi
121+
rm -rf lua-5.3.2;
122+
fi

0 commit comments

Comments
 (0)