This commit is contained in:
Timur A. Fatkhullin
2026-02-16 22:44:29 +03:00
parent 7b110fb7ff
commit c174021c40
2 changed files with 15 additions and 7 deletions

View File

@@ -219,6 +219,14 @@ protected:
public: public:
PathFile(const std::string& filename = "") : _filename(filename), _st() {} PathFile(const std::string& filename = "") : _filename(filename), _st() {}
PathFile(const PathFile&) = delete;
PathFile(PathFile&&) = default;
~PathFile()
{
save();
}
void setFilename(const std::string& filename) void setFilename(const std::string& filename)
{ {
_filename = filename; _filename = filename;
@@ -229,11 +237,6 @@ protected:
return _filename; return _filename;
} }
~PathFile()
{
save();
}
friend PathFile& operator<<(PathFile& pf, auto&& v) friend PathFile& operator<<(PathFile& pf, auto&& v)
{ {
pf._st << std::forward<decltype(v)>(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) error_t slewToTarget(bool slew_and_stop = false)
{ {

View File

@@ -362,9 +362,10 @@ public:
// //
// Set a timeout for the telemetry receiving process // 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) { if (utils::isEqual(timeout.count(), 0.0) || timeout.count() < 0.0) {
return; return;
} }