Browse Source

Fixed logging

QGC4.4
LM 14 years ago
parent
commit
2171748b1c
  1. 6
      src/uas/UAS.cc

6
src/uas/UAS.cc

@ -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)
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 {

Loading…
Cancel
Save