...
This commit is contained in:
@@ -199,7 +199,7 @@ public:
|
||||
return mcc_deduce_error_code(hw_err, MccSimpleSlewingModelErrorCode::ERROR_HW_SETSTATE);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point start_slewing_tp, last_adjust_tp;
|
||||
// std::chrono::steady_clock::time_point start_slewing_tp, last_adjust_tp;
|
||||
// mcc_tp2tp(hw_state.time_point, start_slewing_tp); // not compiled!!
|
||||
|
||||
// double dist, dx, dy, sinY, rate2, xrate;
|
||||
@@ -210,6 +210,10 @@ public:
|
||||
bool adjust_mode = false;
|
||||
static constexpr auto sideral_rate2 = slewing_params_t::sideralRate * slewing_params_t::sideralRate;
|
||||
|
||||
std::chrono::steady_clock::time_point start_slewing_tp, last_adjust_tp;
|
||||
start_slewing_tp = std::chrono::steady_clock::now();
|
||||
last_adjust_tp = start_slewing_tp;
|
||||
|
||||
while (true) {
|
||||
// wait for updated telemetry data
|
||||
{
|
||||
@@ -231,10 +235,10 @@ public:
|
||||
// and check them for getting into the prohibited zones
|
||||
if constexpr (mccIsEquatorialMount(CONTROLS_T::mountType)) {
|
||||
cpt.X = tdata.HA + tdata.speedX * min_time_to_pzone_in_secs;
|
||||
cpt.X = tdata.DEC_APP + tdata.speedY * min_time_to_pzone_in_secs;
|
||||
cpt.Y = tdata.DEC_APP + tdata.speedY * min_time_to_pzone_in_secs;
|
||||
} else if constexpr (mccIsAltAzMount(CONTROLS_T::mountType)) {
|
||||
cpt.X = tdata.AZ + tdata.speedX * min_time_to_pzone_in_secs;
|
||||
cpt.X = tdata.ZD + tdata.speedY * min_time_to_pzone_in_secs;
|
||||
cpt.Y = tdata.ZD + tdata.speedY * min_time_to_pzone_in_secs;
|
||||
}
|
||||
mcc_tp2tp(tdata.time_point, cpt.time_point);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user