Skip to content

Commit

Permalink
Merge pull request #5995 from manup/master
Browse files Browse the repository at this point in the history
DEV poll state machine, harden "none" parse function handling
  • Loading branch information
manup authored Apr 30, 2022
2 parents ca399a5 + 7709765 commit b9e8835
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,13 @@ std::vector<DEV_PollItem> DEV_GetPollItems(Device *device)
}
}

if (ddfItem.readParameters.toMap().empty())
const auto m = ddfItem.readParameters.toMap();
if (m.empty())
{
continue;
}

if (m.contains(QLatin1String("fn")) && m.value(QLatin1String("fn")).toString() == QLatin1String("none"))
{
continue;
}
Expand Down Expand Up @@ -1797,6 +1803,8 @@ void DEV_PollNextStateHandler(Device *device, const Event &event)
{
DBG_Printf(DBG_DEV, "DEV: Poll Next no read function for item: %s / 0x%016llX\n", poll.item->descriptor().suffix, device->key());
d->pollItems.pop_back();
d->startStateTimer(5, STATE_LEVEL_POLL); // try next
return;
}

if (d->readResult.isEnqueued)
Expand Down

0 comments on commit b9e8835

Please sign in to comment.