...
This commit is contained in:
@@ -67,6 +67,9 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
|
||||
{
|
||||
std::lock_guard lock{*_mountConfigMutex};
|
||||
|
||||
logInfo("Stop telemetry data updating");
|
||||
stopInternalTelemetryDataUpdating();
|
||||
|
||||
logInfo("Init AstroSib FM-700 mount with configuration:");
|
||||
logInfo(" site latitude: {}", _mountConfig.siteLatitude().sexagesimal());
|
||||
logInfo(" site longitude: {}", _mountConfig.siteLongitude().sexagesimal());
|
||||
@@ -189,6 +192,16 @@ Asibfm700Mount::error_t Asibfm700Mount::initMount()
|
||||
|
||||
setStateERFA(std::move(ccte_state));
|
||||
|
||||
startInternalTelemetryDataUpdating();
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
bool ok = isInternalTelemetryDataUpdating();
|
||||
if (ok) {
|
||||
logInfo("Start updating telemetry data");
|
||||
} else {
|
||||
logError("Cannot update telemetry data!");
|
||||
}
|
||||
|
||||
return mcc::MccGenericMountErrorCode::ERROR_OK;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,11 @@ AsibFM700ServoController::error_t AsibFM700ServoController::hardwareGetState(har
|
||||
using secs_t = std::chrono::duration<double>;
|
||||
|
||||
secs_t secs = secs_t{mdata.encXposition.t};
|
||||
state->time_point = tp_t{std::chrono::duration_cast<tp_t::duration>(secs)};
|
||||
if (mcc::utils::isEqual(secs.count(), 0.0)) { // model mode?
|
||||
state->time_point = decltype(state->time_point)::clock::now();
|
||||
} else {
|
||||
state->time_point = tp_t{std::chrono::duration_cast<tp_t::duration>(secs)};
|
||||
}
|
||||
|
||||
// according to "SiTech protocol notes" X is DEC-axis and Y is HA-axis
|
||||
state->X = mdata.encYposition.val;
|
||||
|
||||
Reference in New Issue
Block a user