本文整理汇总了C++中Timeout::started方法的典型用法代码示例。如果您正苦于以下问题:C++ Timeout::started方法的具体用法?C++ Timeout::started怎么用?C++ Timeout::started使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timeout
的用法示例。
在下文中一共展示了Timeout::started方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setup
/**
* Application setup
*/
void setup()
{
bcu.begin(4, 0x7054, 2); // We are a "Jung 2118" device, version 0.2
pinMode(PIO_LED, OUTPUT);
digitalWrite(PIO_LED, 1);
// Configure the input pins and initialize the debouncers with the current
// value of the pin.
for (int channel = 0; channel < NUM_CHANNELS; ++channel)
{
pinMode(inputPins[channel], INPUT | HYSTERESIS | PULL_UP);
inputDebouncer[channel].init(digitalRead(inputPins[channel]));
}
// Handle configured power-up delay
unsigned int startupTimeout = calculateTime
( userEeprom[EE_BUS_RETURN_DELAY_BASE] >> 4
, userEeprom[EE_BUS_RETURN_DELAY_FACT] & 0x7F
);
Timeout delay;
int debounceTime = userEeprom[EE_INPUT_DEBOUNCE_TIME] >> 1;
delay.start(startupTimeout);
while (delay.started() && !delay.expired())
{ // while we wait for the power on delay to expire we debounce the input channels
for (int channel = 0; channel < NUM_CHANNELS; ++channel)
{
inputDebouncer[channel].debounce(digitalRead(inputPins[channel]), debounceTime);
}
waitForInterrupt();
}
initApplication();
}
示例2: checkPeriodicFuntions
void checkPeriodicFuntions(void)
{
if(msTimeout.started() && msTimeout.expired()) {
msTimeout.start(1);
for (unsigned int i = 0; i < NO_OF_CHANNELS; i++)
{
// setChannelPWMRatio(i, pwm&0xffff);
// pwm+=1;
Channel * chn = channels[i];
if (chn)
chn->periodic();
}
memMapper.doFlash();
}
if(inBetriebTimeout.started() && inBetriebTimeout.expired()) {
inBetriebTimeout.start(inBetriebZeit*1000);
objectWrite(COMObj_In_Operation, inBetriebValue_0);
}
if(timeoutTest.started() && timeoutTest.expired()) {
timeoutTest.start(1000);
// objectWrite(209, inBetriebValue_0);
}
}
示例3: tc_setup
static void tc_setup(void)
{
REQUIRE(to.started() == false);
}
示例4: _check_expired_yes
static void _check_expired_yes(void * refState, unsigned int param)
{
REQUIRE(to.expired() == true);
REQUIRE(to.started() == false);
REQUIRE(to.stopped() == true);
}
示例5: _check_expired_yes
static void _check_expired_yes(void * refState)
{
REQUIRE(to.expired() == true);
REQUIRE(to.started() == false);
REQUIRE(to.stopped() == true);
}