testing/irtest: Fix issue of failure to open multiple IR devices
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
parent
ce7c9ae65b
commit
068905d07b
@ -189,11 +189,13 @@ CMD1(open_device, const char *, file_name)
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (; index < CONFIG_TESTING_IRTEST_MAX_NIRDEV &&
|
||||
g_irdevs[index] == -1; index++)
|
||||
for (; index < CONFIG_TESTING_IRTEST_MAX_NIRDEV; index++)
|
||||
{
|
||||
g_irdevs[index] = irdev;
|
||||
break;
|
||||
if (g_irdevs[index] == -1)
|
||||
{
|
||||
g_irdevs[index] = irdev;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index == CONFIG_TESTING_IRTEST_MAX_NIRDEV)
|
||||
|
Loading…
x
Reference in New Issue
Block a user