Ejemplo n.º 1
0
//--------------------------------------------------------------
void Surface::update(float dt)
{
    m_animationManager.M_update(dt);
	checkActivity(dt);
	

	//printf("%.3f - ", m_volumePacketsHistoryMean);
	
    if (m_isTimelineActive)
    {
        m_timeAnimation += dt;
        // printf("tAnim=%.2f / tAnimDuration=%.2f\n", m_timeAnimation, m_durationAnimation);
        
        if (m_timeAnimation>=m_durationAnimation && !m_animationManager.M_isTransiting())
        {
           m_animationManager.setAnimationTimelineNext();
            m_isAnimationTransiting = true;
            m_timeAnimation = 0.0f;
        }

        if (/*m_isAnimationTransiting && */m_animationManager.M_isTransiting() == false){
//            printf(">>> end of transition\n");
//            m_isAnimationTransiting = false;
        }
    
    }
}
Ejemplo n.º 2
0
// ClientActivityMonitor runs periodic checks if there are transfers which are expired.
// A transfer can be expired e.g. when a client has been crashed in the middle of Sync,
// Download or Upload operation or the client API isn't used properly.
//
// NOTE: This class only monitors if there are expired transfers and emit signal to indicate
// that it's cleaning time.  It is up to Transfer Engine to remoce expired ids from the
// ClientActivityMonitor instance.
ClientActivityMonitor::ClientActivityMonitor(QObject *parent)
    : QObject(parent)
    , m_timer(new QTimer(this))
{
    connect(m_timer, SIGNAL(timeout()), this, SLOT(checkActivity()));
    m_timer->start(ACTIVITY_MONITOR_TIMEOUT);
}
Ejemplo n.º 3
0
void GSwifi::loop() {
    TIMER_STOP( timeout_timer_ );

    checkActivity();

    for (uint8_t i=0; i<16; i++) {
        if (! cidIsRequest(i) &&
            TIMER_FIRED(timers_[i])) {
            TIMER_STOP(timers_[i]);

            GSLOG_PRINT("!E4 "); GSLOG_PRINTLN(i);

            // request (from us) timeout means GS is in trouble,
            // and it's easy to just rescue ourselves to reset
            wifi_hardware_reset();
            return;
        }
    }
}
Ejemplo n.º 4
0
void GSwifi::waitResponse (uint8_t timeout_second) {
    TIMER_START( timeout_timer_, timeout_second );

    while ( checkActivity() ) {
    }
}