dragonpilot - 基於 openpilot 的開源駕駛輔助系統
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
513 B

#include "request_repeater.h"
RequestRepeater::RequestRepeater(QObject *parent, const QString &requestURL, const QString &cacheKey,
int period) : HttpRequest(parent, requestURL, cacheKey) {
timer = new QTimer(this);
timer->setTimerType(Qt::VeryCoarseTimer);
QObject::connect(timer, &QTimer::timeout, [=](){
if (!QUIState::ui_state.scene.started && QUIState::ui_state.awake && reply == NULL) {
sendRequest(requestURL);
}
});
timer->start(period * 1000);
}