QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleClockFactGroup.cc
Go to the documentation of this file.
2#include "QGCApplication.h"
3
5 : FactGroup(1000, QStringLiteral(":/json/Vehicle/ClockFact.json"), parent)
6{
7 _addFact(&_currentTimeFact);
8 _addFact(&_currentUTCTimeFact);
9 _addFact(&_currentDateFact);
10
11 _currentTimeFact.setRawValue(QTime().toString());
12 _currentUTCTimeFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
13 _currentDateFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
14}
15
17{
18 currentTime()->setRawValue(QTime::currentTime().toString());
19 currentUTCTime()->setRawValue(QDateTime::currentDateTimeUtc().time().toString());
20 currentDate()->setRawValue(QDateTime::currentDateTime().toString(qgcApp()->getCurrentLanguage().dateFormat(QLocale::ShortFormat)));
21
23
25}
#define qgcApp()
virtual void _updateAllValues()
Definition FactGroup.cc:151
void _setTelemetryAvailable(bool telemetryAvailable)
Definition FactGroup.cc:181
FactGroup(int updateRateMsecs, const QString &metaDataFile, QObject *parent=nullptr, bool ignoreCamelCase=false)
< false: No telemetry for these values has been received
Definition FactGroup.cc:10
void _addFact(Fact *fact, const QString &name)
Definition FactGroup.cc:122
void setRawValue(const QVariant &value)
Definition Fact.cc:135
VehicleClockFactGroup(QObject *parent=nullptr)