Fix no sensor issue

This commit is contained in:
Theo Arends 2020-07-25 17:08:11 +02:00
parent fc2d5b181c
commit 520558d381
1 changed files with 5 additions and 0 deletions

View File

@ -868,6 +868,11 @@ void XsnsSensorState(void)
bool XsnsNextCall(uint8_t Function, uint8_t &xsns_index)
{
if (0 == xsns_present) {
xsns_index = 0;
return false;
}
xsns_index++;
if (xsns_index == xsns_present) { xsns_index = 0; }