mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 20:35:17 +03:00
Fixes #3285: only first 32 input lines (out of 64) were accessible in Lua
This commit is contained in:
parent
79a5f65a2c
commit
29b8b2685c
1 changed files with 2 additions and 2 deletions
|
@ -278,7 +278,7 @@ static int luaModelResetTimer(lua_State *L)
|
||||||
|
|
||||||
static unsigned int getFirstInput(unsigned int chn)
|
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);
|
ExpoData * expo = expoAddress(i);
|
||||||
if (!expo->srcRaw || expo->chn >= chn) {
|
if (!expo->srcRaw || expo->chn >= chn) {
|
||||||
return i;
|
return i;
|
||||||
|
@ -290,7 +290,7 @@ static unsigned int getFirstInput(unsigned int chn)
|
||||||
static unsigned int getInputsCountFromFirst(unsigned int chn, unsigned int first)
|
static unsigned int getInputsCountFromFirst(unsigned int chn, unsigned int first)
|
||||||
{
|
{
|
||||||
unsigned int count = 0;
|
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);
|
ExpoData * expo = expoAddress(i);
|
||||||
if (!expo->srcRaw || expo->chn!=chn) break;
|
if (!expo->srcRaw || expo->chn!=chn) break;
|
||||||
count++;
|
count++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue