本文整理汇总了C++中Tool::DisplayColdExtrudeWarning方法的典型用法代码示例。如果您正苦于以下问题:C++ Tool::DisplayColdExtrudeWarning方法的具体用法?C++ Tool::DisplayColdExtrudeWarning怎么用?C++ Tool::DisplayColdExtrudeWarning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tool
的用法示例。
在下文中一共展示了Tool::DisplayColdExtrudeWarning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Spin
void RepRap::Spin()
{
if(!active)
return;
spinningModule = modulePlatform;
ticksInSpinState = 0;
platform->Spin();
spinningModule = moduleNetwork;
ticksInSpinState = 0;
network->Spin(true);
spinningModule = moduleWebserver;
ticksInSpinState = 0;
webserver->Spin();
spinningModule = moduleGcodes;
ticksInSpinState = 0;
gCodes->Spin();
spinningModule = moduleMove;
ticksInSpinState = 0;
move->Spin();
spinningModule = moduleHeat;
ticksInSpinState = 0;
heat->Spin();
#if SUPPORT_ROLAND
spinningModule = moduleRoland;
ticksInSpinState = 0;
roland->Spin();
#endif
#if SUPPORT_SCANNER
spinningModule = moduleScanner;
ticksInSpinState = 0;
scanner->Spin();
#endif
spinningModule = modulePrintMonitor;
ticksInSpinState = 0;
printMonitor->Spin();
spinningModule = noModule;
ticksInSpinState = 0;
// Check if we need to display a cold extrusion warning
const uint32_t now = millis();
if (now - lastWarningMillis >= MinimumWarningInterval)
{
for (Tool *t = toolList; t != nullptr; t = t->Next())
{
if (t->DisplayColdExtrudeWarning())
{
platform->MessageF(GENERIC_MESSAGE, "Warning: Tool %d was not driven because its heater temperatures were not high enough or it has a heater fault\n", t->myNumber);
lastWarningMillis = now;
}
}
}
// Keep track of the loop time
const float t = platform->Time();
const float dt = t - lastTime;
if (dt < fastLoop)
{
fastLoop = dt;
}
if (dt > slowLoop)
{
slowLoop = dt;
}
lastTime = t;
}