This commit is contained in:
2026-04-02 17:58:17 +03:00
parent 9f8eca66c2
commit c49fb99667
2 changed files with 8 additions and 4 deletions

View File

@@ -39,6 +39,8 @@ Asibfm700Mount::~Asibfm700Mount()
errorLogging("an error occured while stopping mount: ", _lastMountError->load());
}
logDebug("Try to shutdown the hardware ...");
_servolController.hardwareShutdown();
logDebug("Delete Asibfm700Mount class instance ({})", this->getThreadId());
@@ -988,10 +990,10 @@ Asibfm700Mount::error_t Asibfm700Mount::stoppingImpl()
errorLogging("An error occured while stoppping mount: ", _lastMountError->load());
logError("Try to perform emergency stop!");
*_lastMountError = static_cast<AsibFM700ServoControllerErrorCode>(Mount.emergStop());
if (_lastMountError->load()) {
errorLogging("An error occured while trying emergency stop: ", _lastMountError->load());
}
// *_lastMountError = static_cast<AsibFM700ServoControllerErrorCode>(Mount.emergStop());
// if (_lastMountError->load()) {
// errorLogging("An error occured while trying emergency stop: ", _lastMountError->load());
// }
}
return _lastMountError->load();

View File

@@ -169,6 +169,8 @@ int main(int argc, char* argv[])
// pool.join();
ctx.run();
spdlog::shutdown(); // flush all messages!!!
} catch (const std::system_error& ex) {
std::cerr << "An error occured: " << ex.code().message() << "\n";
return ex.code().value();