This commit is contained in:
2025-11-18 18:51:01 +03:00
parent 14e583a244
commit 273f239abb
5 changed files with 93 additions and 15 deletions

View File

@@ -111,6 +111,7 @@ public:
MccTelemetry(CONTROLS_T* controls)
: _isDataUpdated(new std::atomic_bool()),
_data(),
_userTarget(),
_internalUpdating(new std::atomic_bool),
_currentUpdateInterval(defaultUpdateInterval),
_currentUpdateIntervalMutex(new std::mutex),
@@ -647,6 +648,9 @@ public:
std::lock_guard lock{*_updateMutex};
mcc_copy_celestial_point(pt, &_userTarget);
_data.target.pair_kind = pt.pair_kind;
if (pt.pair_kind == MccCoordPairKind::COORDS_KIND_AZALT) {
_data.target.AZ = pt.X;
@@ -725,6 +729,8 @@ protected:
std::unique_ptr<std::atomic_bool> _isDataUpdated;
MccTelemetryData _data;
MccCelestialPoint _userTarget{};
std::unique_ptr<std::atomic_bool> _internalUpdating;
std::chrono::nanoseconds _currentUpdateInterval{std::chrono::milliseconds(100)};
std::unique_ptr<std::mutex> _currentUpdateIntervalMutex;