Ref T709, sync Qt free timestamp after parsing with swift version

This commit is contained in:
Klaus Basan
2019-07-28 00:04:58 +02:00
committed by Mat Sutcliffe
parent 04e57df5f7
commit 34aa8333cc
5 changed files with 22 additions and 0 deletions

View File

@@ -85,6 +85,11 @@ namespace BlackMisc
static const CXSwiftBusSettings s;
return s;
}
void CXSwiftBusSettings::jsonParsed()
{
m_timestampMSecsSinceEpoch = m_msSinceEpochQtFree;
}
} // ns
} // ns
} // ns

View File

@@ -79,6 +79,10 @@ namespace BlackMisc
//! Default value for settings
static const CXSwiftBusSettings &defaultValue();
protected:
//! \copydoc CXSwiftBusSettingsQtFree::jsonParsed
virtual void jsonParsed() override;
private:
BLACK_METACLASS(
CXSwiftBusSettings,

View File

@@ -72,6 +72,7 @@ namespace BlackMisc
{
m_msSinceEpochQtFree = settingsDoc[CXSwiftBusSettingsQtFree::JsonTimestamp].GetInt64(); c++;
}
this->jsonParsed(); // post processing
return c == 6;
}
@@ -120,6 +121,11 @@ namespace BlackMisc
const milliseconds ms = duration_cast<milliseconds>(system_clock::now().time_since_epoch());
m_msSinceEpochQtFree = static_cast<int64_t>(ms.count());
}
void CXSwiftBusSettingsQtFree::jsonParsed()
{
// void
}
} // ns
} // ns
} // ns

View File

@@ -82,6 +82,9 @@ namespace BlackMisc
static constexpr char JsonFollowAircraftDistanceM[] = "followAircraftDistance";
//! @}
//! Pasing completed
virtual void jsonParsed();
std::string m_dBusServerAddress { "tcp:host=127.0.0.1,port=45001" }; //!< DBus server
int m_maxPlanes = 100; //!< max. planes in XPlane
int m_followAircraftDistanceM = 200; //!< follow aircraft in distance