本文整理汇总了C++中Pattern::Nxt方法的典型用法代码示例。如果您正苦于以下问题:C++ Pattern::Nxt方法的具体用法?C++ Pattern::Nxt怎么用?C++ Pattern::Nxt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pattern
的用法示例。
在下文中一共展示了Pattern::Nxt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
LTBDots::addPat(Pattern *pat)
{
// find end of pattern chain
if (pats == NULL)
pats = pat; // just set this as the first pat in the strip
else
{
Pattern *ptr = pats;
while (!ptr->isLast())
{
ptr = ptr->Nxt();
}
ptr->Append(pat);
}
}
示例2: while
void
LTBDots::setOnLvl(uint8_t pct)
{
// dim each pattern in strip
if (pats == NULL)
return; // empty strip, just return
else
{
Pattern *ptr = pats;
do
{
ptr->setOnLvl(pct);
ptr = ptr->Nxt();
} while (!ptr->isLast());
ptr->setOnLvl(pct); // take care of the last one
}
}
示例3: millis
void
LTBDots::showLights(bool force)
{
Pattern *ptr = pats;
bool changed = false;
uint16_t deltaMsec = millis() - lastMsec;
lastMsec = millis();
/** Loop through all pats and update timed actions **/
// while(ptr) // first loop through all patterns and update timed actions
// {
// changed = (changed || ptr->doActions(deltaMsec));
// ptr=ptr->Nxt();
// }
if (changed || force)
{
ptr = pats;
curStrip= dots;
/** Loop through all pats and light them **/
while (ptr)
{
curStrip = ptr->fillRGB(curStrip);
ptr = ptr->Nxt();
}
}
printStrip("prePaint");
sendLeader();
dp= dots;
while (dp != curStrip)
SPI.transfer(*dp++);
sendTrailer();
return;
}