Compare commits
4 Commits
26011e7630
...
c174021c40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c174021c40 | ||
|
|
7b110fb7ff | ||
|
|
dff70225ef | ||
|
|
452bd1c3e4 |
@@ -219,6 +219,14 @@ protected:
|
||||
public:
|
||||
PathFile(const std::string& filename = "") : _filename(filename), _st() {}
|
||||
|
||||
PathFile(const PathFile&) = delete;
|
||||
PathFile(PathFile&&) = default;
|
||||
|
||||
~PathFile()
|
||||
{
|
||||
save();
|
||||
}
|
||||
|
||||
void setFilename(const std::string& filename)
|
||||
{
|
||||
_filename = filename;
|
||||
@@ -229,11 +237,6 @@ protected:
|
||||
return _filename;
|
||||
}
|
||||
|
||||
~PathFile()
|
||||
{
|
||||
save();
|
||||
}
|
||||
|
||||
friend PathFile& operator<<(PathFile& pf, auto&& v)
|
||||
{
|
||||
pf._st << std::forward<decltype(v)>(v);
|
||||
@@ -715,6 +718,10 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
virtual ~MccSimpleMovementControls() = default;
|
||||
|
||||
MccSimpleMovementControls(const MccSimpleMovementControls&) = delete;
|
||||
MccSimpleMovementControls(MccSimpleMovementControls&&) = default;
|
||||
|
||||
error_t slewToTarget(bool slew_and_stop = false)
|
||||
{
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
// to be computed as observed celestial X and Y cordinate according to mount type (HA-DEC or AZ-ZD)
|
||||
double x, y;
|
||||
|
||||
auto getXY = [&, this](auto& cp) {
|
||||
auto getXY = [&, this](auto& cp) -> error_t {
|
||||
auto err = obs_skycoord.toAtSameEpoch(cp);
|
||||
if (err) {
|
||||
return mcc_deduced_err(err, MccDefaultPCMErrorCode::ERROR_CCTE);
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
return _inZoneFunc.size();
|
||||
}
|
||||
|
||||
void clearZones()
|
||||
void clearPZones()
|
||||
{
|
||||
_inZoneFunc.clear();
|
||||
_timeToZoneFunc.clear();
|
||||
|
||||
@@ -104,12 +104,12 @@ inline std::error_code make_error_code(MccTelemetryErrorCode ec)
|
||||
|
||||
|
||||
template <mcc_hardware_c HARDWARE_T>
|
||||
class MccTelemetry
|
||||
class MccTelemetry : public mcc_telemetry_interface_t<MccError>
|
||||
{
|
||||
public:
|
||||
typedef HARDWARE_T hardware_t;
|
||||
|
||||
typedef std::error_code error_t;
|
||||
typedef MccError error_t;
|
||||
|
||||
|
||||
struct telemetry_data_t {
|
||||
@@ -265,11 +265,12 @@ public:
|
||||
|
||||
// calculate reverse PCM corrections for the current target position and
|
||||
// its encoder XY
|
||||
auto pcm_err = pcm_ptr->pcmReverseCorrection(
|
||||
_tdataPtr->targetPos, &_tdataPtr->pcmReverseCorrection,
|
||||
&_tdataPtr->targetXY);
|
||||
auto pcm_err = pcm_ptr->computeInversePCM(_tdataPtr->targetPos,
|
||||
&_tdataPtr->pcmReverseCorrection,
|
||||
&_tdataPtr->targetXY);
|
||||
if (pcm_err) {
|
||||
return mcc_deduced_err(pcm_err, MccTelemetryErrorCode::ERROR_PCM_COMP);
|
||||
_lastUpdateError =
|
||||
mcc_deduced_err(pcm_err, MccTelemetryErrorCode::ERROR_PCM_COMP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,9 +362,10 @@ public:
|
||||
//
|
||||
// Set a timeout for the telemetry receiving process
|
||||
//
|
||||
void setTelemetryDataTimeout(traits::mcc_time_duration_c auto const& timeout)
|
||||
template <traits::mcc_time_duration_c DT>
|
||||
void setTelemetryDataTimeout(DT const& timeout)
|
||||
{
|
||||
if constexpr (std::floating_point<typename decltype(timeout)::rep>) {
|
||||
if constexpr (std::floating_point<typename DT::rep>) {
|
||||
if (utils::isEqual(timeout.count(), 0.0) || timeout.count() < 0.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user