本文整理汇总了C++中LedManager::publish方法的典型用法代码示例。如果您正苦于以下问题:C++ LedManager::publish方法的具体用法?C++ LedManager::publish怎么用?C++ LedManager::publish使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LedManager
的用法示例。
在下文中一共展示了LedManager::publish方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkAlarms
static void checkAlarms(void)
{
boolean anyRinging = false;
for (unsigned char i=0; i<TEMP_COUNT; ++i)
{
for (unsigned char j=ALARM_IDX_LOW; j<=ALARM_IDX_HIGH; ++j)
{
boolean ringing = pid.Probes[i]->Alarms.Ringing[j];
unsigned char alarmId = MAKE_ALARM_ID(i, j);
if (ringing)
{
anyRinging = true;
g_AlarmId = alarmId;
}
ledmanager.publish(LEDSTIMULUS_Alarm0L + alarmId, ringing);
}
}
ledmanager.publish(LEDSTIMULUS_AlarmAny, anyRinging);
if (anyRinging)
{
reportAlarmLimits();
Menus.setState(ST_HOME_ALARM);
}
else if (Menus.getState() == ST_HOME_ALARM)
// No alarms ringing, return to HOME
Menus.setState(ST_HOME_FOOD1);
}
示例2: newTempsAvail
static void newTempsAvail(void)
{
static unsigned char pidCycleCount;
updateDisplay();
++pidCycleCount;
if ((pidCycleCount % 0x20) == 0)
outputRfStatus();
outputCsv();
// We want to report the status before the alarm readout so
// receivers can tell what the value was that caused the alarm
checkAlarms();
if (g_LogPidInternals)
pid.pidStatus();
ledmanager.publish(LEDSTIMULUS_Off, LEDACTION_Off);
ledmanager.publish(LEDSTIMULUS_LidOpen, pid.isLidOpen());
ledmanager.publish(LEDSTIMULUS_FanOn, pid.isOutputActive());
ledmanager.publish(LEDSTIMULUS_FanMax, pid.isOutputMaxed());
ledmanager.publish(LEDSTIMULUS_PitTempReached, pid.isPitTempReached());
#ifdef HEATERMETER_RFM12
rfmanager.sendUpdate(pid.getPidOutput());
#endif
}
示例3: blinkLed
static void blinkLed(void)
{
// This function only works the first time, when all the LEDs are assigned to
// LedStimulus::Off, and OneShot turns them on for one blink
ledmanager.publish(LEDSTIMULUS_Off, LEDACTION_OneShot);
ledmanager.doWork();
}
示例4: hmcoreLoop
void hmcoreLoop(void)
{
#ifdef HEATERMETER_SERIAL
serial_doWork();
#endif /* HEATERMETER_SERIAL */
#ifdef HEATERMETER_RFM12
if (rfmanager.doWork())
ledmanager.publish(LEDSTIMULUS_RfReceive, LEDACTION_OneShot);
#endif /* HEATERMETER_RFM12 */
Menus.doWork();
if (pid.doWork())
newTempsAvail();
tone_doWork();
ledmanager.doWork();
}