This commit is contained in:
2025-08-06 02:06:20 +03:00
parent 138e4bf84d
commit 6315d5e18e
15 changed files with 630 additions and 152 deletions

View File

@@ -100,19 +100,26 @@ AsibFM700Hardware::error_t AsibFM700Hardware::setPos(AsibFM700Hardware::axes_pos
double tp = std::chrono::duration<double>(pos.time_point.time_since_epoch()).count();
coordval_pair_t hw_posval{.X{.val = pos.x, .t = tp}, .Y{.val = pos.y, .t = tp}};
//
// WARNING: The LibSidservo API was chagned! hw_pos is endpoint where mount must
// go "after" slewing
//
switch (pos.moving_type) {
case hw_moving_type_t::HW_MOVE_SLEWING: // slew mount
if (pos.moveAndStop) {
err = static_cast<AsibFM700HardwareErrorCode>(Mount.moveTo(&hw_pos));
// err = static_cast<AsibFM700HardwareErrorCode>(Mount.moveTo(&hw_pos));
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval, &hw_pos));
} else {
err = static_cast<AsibFM700HardwareErrorCode>(Mount.slewTo(&hw_pos, pos.flags));
// err = static_cast<AsibFM700HardwareErrorCode>(Mount.slewTo(&hw_pos, pos.flags));
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval, &hw_pos));
}
break;
case hw_moving_type_t::HW_MOVE_ADJUSTING: // corrections at the end of slewing
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval));
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval, &hw_pos));
break;
case hw_moving_type_t::HW_MOVE_GUIDING: // interpretate as guiding correction
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval));
err = static_cast<AsibFM700HardwareErrorCode>(Mount.correctTo(&hw_posval, &hw_pos));
break;
default:
break;