This commit is contained in:
2026-03-02 19:12:02 +03:00
parent 9f4bae7f95
commit 296f8e3b03
2 changed files with 20 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
#include <mcc/mcc_coordinate.h>
#include <mcc/mcc_pzone.h>
#include "mcc/mcc_serializer.h"
namespace asibfm700
{
@@ -363,8 +364,10 @@ Asibfm700Mount::error_t Asibfm700Mount::sendToHardware(AsibFM700ServoController:
{
auto tp = std::chrono::duration_cast<std::chrono::milliseconds>(hw_state.XY.epoch().UTC().time_since_epoch());
logDebug("Send to hardware: X = {} degs, Y = {} degs (timepoint: {})", hw_state.XY.x().degrees(),
hw_state.XY.y().degrees(), tp);
logDebug("Send to hardware: X = {} degs, Y = {} degs, sX = {}/s, sY = {}/s, STATE = {} (timepoint: {})",
hw_state.XY.x().degrees(), hw_state.XY.y().degrees(),
mcc::impl::MccAngleFancyString(hw_state.speedXY.x().degrees()),
mcc::impl::MccAngleFancyString(hw_state.speedXY.y().degrees()), hw_state.movementState, tp);
*_lastMountError = _servolController.hardwareSetState(hw_state);
@@ -799,6 +802,11 @@ Asibfm700Mount::error_t Asibfm700Mount::trackingImpl()
setPointingTarget(tdata.mountPos);
std::string s;
mcc::impl::MccSerializer<mcc::impl::MccSkyPoint> ser;
ser(s, tdata.mountPos);
logTrace("The target point is set to {}", s);
*_lastMountError = telemetryData(&tdata);
if (_lastMountError->load()) {
@@ -824,6 +832,8 @@ Asibfm700Mount::error_t Asibfm700Mount::trackingImpl()
hw_state.movementState = hardware_t::hardware_movement_state_t::HW_MOVE_TRACKING;
logTrace("Start main tracking cycle ...");
while (!_stopMovementRequest->load()) {
*_lastMountError = telemetryData(&tdata);