本文整理汇总了C++中GrillPid::setPidOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ GrillPid::setPidOutput方法的具体用法?C++ GrillPid::setPidOutput怎么用?C++ GrillPid::setPidOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrillPid
的用法示例。
在下文中一共展示了GrillPid::setPidOutput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: storeSetPoint
void storeSetPoint(int sp)
{
// If the setpoint is >0 that's an actual setpoint.
// 0 or less is a manual fan speed
boolean isManualMode;
if (sp > 0)
{
config_store_word(setPoint, sp);
pid.setSetPoint(sp);
isManualMode = false;
}
else
{
pid.setPidOutput(-sp);
isManualMode = true;
}
config_store_byte(manualMode, isManualMode);
}
示例2: eepromLoadBaseConfig
static void eepromLoadBaseConfig(unsigned char forceDefault)
{
// The compiler likes to join eepromLoadBaseConfig and eepromLoadProbeConfig s
// this union saves stack space by reusing the same memory area for both structs
union {
struct __eeprom_data base;
struct __eeprom_probe probe;
} config;
econfig_read_block(&config.base, 0, sizeof(__eeprom_data));
forceDefault = forceDefault || config.base.magic != EEPROM_MAGIC;
if (forceDefault != 0)
{
memcpy_P(&config.base, &DEFAULT_CONFIG[forceDefault - 1], sizeof(__eeprom_data));
econfig_write_block(&config.base, 0, sizeof(__eeprom_data));
}
pid.setSetPoint(config.base.setPoint);
pid.LidOpenOffset = config.base.lidOpenOffset;
pid.setLidOpenDuration(config.base.lidOpenDuration);
memcpy(pid.Pid, config.base.pidConstants, sizeof(config.base.pidConstants));
if (config.base.manualMode)
pid.setPidOutput(0);
setLcdBacklight(config.base.lcdBacklight);
#ifdef HEATERMETER_RFM12
memcpy(rfMap, config.base.rfMap, sizeof(rfMap));
#endif
pid.setUnits(config.base.pidUnits == 'C' ? 'C' : 'F');
pid.setFanMinSpeed(config.base.fanMinSpeed);
pid.setFanMaxSpeed(config.base.fanMaxSpeed);
pid.setFanActiveFloor(config.base.fanActiveFloor);
pid.setFanMaxStartupSpeed(config.base.fanMaxStartupSpeed);
pid.setOutputFlags(config.base.pidOutputFlags);
g_HomeDisplayMode = config.base.homeDisplayMode;
pid.setServoMinPos(config.base.servoMinPos);
pid.setServoMaxPos(config.base.servoMaxPos);
pid.setServoActiveCeil(config.base.servoActiveCeil);
for (unsigned char led = 0; led<LED_COUNT; ++led)
ledmanager.setAssignment(led, config.base.ledConf[led]);
}