当前位置: 首页>>代码示例>>C++>>正文


C++ Tool::DisplayColdExtrudeWarning方法代码示例

本文整理汇总了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;
}
开发者ID:chrishamm,项目名称:RepRapFirmware,代码行数:75,代码来源:RepRap.cpp


注:本文中的Tool::DisplayColdExtrudeWarning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。