...
This commit is contained in:
parent
c514d4adcc
commit
9066b3f091
@ -1086,34 +1086,6 @@ protected:
|
||||
err = vc.error();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// auto vc = input_msg.template paramValue<MccCelestialPoint>(0); // is it set operation?
|
||||
// if (vc) { // coordinates are given - set
|
||||
// operation
|
||||
// auto m_err = mount_ptr->setPointingTarget(vc.value());
|
||||
// if (m_err) {
|
||||
// if (m_err) {
|
||||
// err = mcc_deduce_error_code(m_err,
|
||||
// MccGenericMountNetworkServerErrorCode::ERROR_MOUNT_SET_TARGET);
|
||||
// }
|
||||
// } else {
|
||||
// output_msg.construct(MCC_COMMPROTO_KEYWORD_SERVER_ACK_STR, input_msg.byteRepr());
|
||||
// }
|
||||
// } else {
|
||||
// auto vp = input_msg.template paramValue<MccCoordPairKind>(0);
|
||||
// if (vp) { // coordinate pair kind is given
|
||||
// cp.pair_kind = vp.value();
|
||||
// err = coordsFromTelemetryData(*mount_ptr, true, cp);
|
||||
// if (!err) {
|
||||
// output_msg.construct(MCC_COMMPROTO_KEYWORD_SERVER_ACK_STR,
|
||||
// MCC_COMMPROTO_KEYWORD_TARGET_STR,
|
||||
// _coordFormat, _coordPrec, cp);
|
||||
// }
|
||||
// } else { // invalid command!!!
|
||||
// err = vp.error();
|
||||
// }
|
||||
// }
|
||||
} else { // get operation
|
||||
err = coordsFromTelemetryData(*mount_ptr, true, cp);
|
||||
if (!err) {
|
||||
|
||||
@ -115,7 +115,9 @@ public:
|
||||
|
||||
template <mcc_all_controls_c CONTROLS_T, mcc_logger_c LoggerT = MccNullLogger>
|
||||
MccSimpleTrackingModel(CONTROLS_T* controls, LoggerT logger)
|
||||
: _stopTracking(new std::atomic_bool()), _currentParamsMutex(new std::mutex())
|
||||
: _stopTracking(new std::atomic_bool()),
|
||||
_currentParamsMutex(new std::mutex()),
|
||||
_lastError(MccSimpleTrackingModelErrorCode::ERROR_OK)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << std::this_thread::get_id();
|
||||
@ -465,6 +467,10 @@ public:
|
||||
return _currentParams;
|
||||
}
|
||||
|
||||
error_t trackinLastError() const
|
||||
{
|
||||
return _lastError;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::function<error_t()> _trackingFunc{};
|
||||
@ -472,6 +478,8 @@ protected:
|
||||
|
||||
tracking_params_t _currentParams{};
|
||||
std::unique_ptr<std::mutex> _currentParamsMutex{};
|
||||
|
||||
error_t _lastError;
|
||||
};
|
||||
|
||||
} // namespace mcc
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user