...
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "mcc_mount_concepts.h"
|
||||
|
||||
#include "mcc_slew_guiding_model_common.h"
|
||||
|
||||
namespace mcc
|
||||
{
|
||||
@@ -431,34 +432,33 @@ protected:
|
||||
// typename telemetry_t::mount_telemetry_data_t::time_point_t prev_time_point{};
|
||||
// typename telemetry_t::mount_telemetry_data_t::coord_t xrate, yrate, mount_rate2;
|
||||
|
||||
std::array<bool, Nzones> in_zone_flag;
|
||||
auto start_poll_tm = std::chrono::steady_clock::now();
|
||||
|
||||
|
||||
while (true) {
|
||||
// check prohibited zones
|
||||
res_err = check_zones(std::make_index_sequence<Nzones>{});
|
||||
if (res_err) {
|
||||
hardware.stop();
|
||||
// res_err = check_zones(std::make_index_sequence<Nzones>{});
|
||||
// if (res_err) {
|
||||
// return res_err;
|
||||
// }
|
||||
|
||||
return res_err;
|
||||
}
|
||||
t_err = mccCheckInZonePZTuple(*telemetry, p_mount_controls->prohibitedZones, in_zone_flag);
|
||||
|
||||
// it is assumed here that telemetry data is in actual state!
|
||||
// t_err = telemetry.data(t_data);
|
||||
// if (t_err) {
|
||||
// hardware.stop();
|
||||
|
||||
// if constexpr (std::same_as<decltype(t_err), error_t>) {
|
||||
// logError(
|
||||
// std::format("An telemetry error occured: code = {} ({})", t_err.value(),
|
||||
// t_err.message()));
|
||||
// return t_err;
|
||||
// } else {
|
||||
// if constexpr (traits::mcc_formattable<decltype(t_err)>) {
|
||||
// logError(std::format("An telemetry error occured: code = {}", t_err));
|
||||
// }
|
||||
// return MccSimpleSlewModelErrorCode::ERROR_TELEMETRY_DATA;
|
||||
// }
|
||||
// }
|
||||
if (t_err) {
|
||||
if constexpr (std::same_as<decltype(t_err), error_t>) {
|
||||
logError(
|
||||
std::format("An telemetry error occured: code = {} ({})", t_err.value(), t_err.message()));
|
||||
return t_err;
|
||||
} else {
|
||||
if constexpr (traits::mcc_formattable<decltype(t_err)>) {
|
||||
logError(std::format("An telemetry error occured: code = {}", t_err));
|
||||
}
|
||||
return MccSimpleSlewModelErrorCode::ERROR_TELEMETRY_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
err = hardware->getPos(ax_pos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user