Commit 2171748b authored by LM's avatar LM

Fixed logging

parent 81356a03
...@@ -1119,7 +1119,8 @@ void UAS::startPressureCalibration() ...@@ -1119,7 +1119,8 @@ void UAS::startPressureCalibration()
quint64 UAS::getUnixTime(quint64 time) quint64 UAS::getUnixTime(quint64 time)
{ {
if (time == 0) { if (time == 0) {
return MG::TIME::getGroundTimeNow(); // qDebug() << "XNEW time:" <<QGC::groundTimeMilliseconds();
return QGC::groundTimeMilliseconds();
} }
// Check if time is smaller than 40 years, // Check if time is smaller than 40 years,
// assuming no system without Unix timestamp // assuming no system without Unix timestamp
...@@ -1143,8 +1144,9 @@ quint64 UAS::getUnixTime(quint64 time) ...@@ -1143,8 +1144,9 @@ quint64 UAS::getUnixTime(quint64 time)
else if (time < 1261440000000000) else if (time < 1261440000000000)
#endif #endif
{ {
// qDebug() << "GEN time:" << time/1000 + onboardTimeOffset;
if (onboardTimeOffset == 0) { if (onboardTimeOffset == 0) {
onboardTimeOffset = MG::TIME::getGroundTimeNow() - time/1000; onboardTimeOffset = QGC::groundTimeMilliseconds() - time/1000;
} }
return time/1000 + onboardTimeOffset; return time/1000 + onboardTimeOffset;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment