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


C++ Timeout::started方法代码示例

本文整理汇总了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();
}
开发者ID:glueckm,项目名称:software-arm-incubation,代码行数:37,代码来源:app_main.cpp

示例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);
	}
}
开发者ID:baycom,项目名称:software-arm-incubation,代码行数:23,代码来源:app-out8-dimmer.cpp

示例3: tc_setup

static void tc_setup(void)
{
    REQUIRE(to.started() == false);
}
开发者ID:FlorianVoelzke,项目名称:software-arm-lib,代码行数:4,代码来源:timeout_test.cpp

示例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);
}
开发者ID:FlorianVoelzke,项目名称:software-arm-lib,代码行数:6,代码来源:timeout_test.cpp

示例5: _check_expired_yes

static void _check_expired_yes(void * refState)
{
	REQUIRE(to.expired() == true);
	REQUIRE(to.started() == false);
	REQUIRE(to.stopped() == true);
}
开发者ID:glueckm,项目名称:software-arm-incubation,代码行数:6,代码来源:timeout_test.cpp


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