1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

Fixes #3285: only first 32 input lines (out of 64) were accessible in Lua

This commit is contained in:
Damjan Adamic 2016-02-15 21:48:15 +01:00
parent 79a5f65a2c
commit 29b8b2685c

View file

@ -278,7 +278,7 @@ static int luaModelResetTimer(lua_State *L)
static unsigned int getFirstInput(unsigned int chn)
{
for (unsigned int i=0; i<MAX_INPUTS; i++) {
for (unsigned int i=0; i<MAX_EXPOS; i++) {
ExpoData * expo = expoAddress(i);
if (!expo->srcRaw || expo->chn >= chn) {
return i;
@ -290,7 +290,7 @@ static unsigned int getFirstInput(unsigned int chn)
static unsigned int getInputsCountFromFirst(unsigned int chn, unsigned int first)
{
unsigned int count = 0;
for (unsigned int i=first; i<MAX_INPUTS; i++) {
for (unsigned int i=first; i<MAX_EXPOS; i++) {
ExpoData * expo = expoAddress(i);
if (!expo->srcRaw || expo->chn!=chn) break;
count++;