diff --git a/asibfm700_mount.cpp b/asibfm700_mount.cpp index c5e0ae1..2fd92ff 100644 --- a/asibfm700_mount.cpp +++ b/asibfm700_mount.cpp @@ -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(Mount.emergStop()); - if (_lastMountError->load()) { - errorLogging("An error occured while trying emergency stop: ", _lastMountError->load()); - } + // *_lastMountError = static_cast(Mount.emergStop()); + // if (_lastMountError->load()) { + // errorLogging("An error occured while trying emergency stop: ", _lastMountError->load()); + // } } return _lastMountError->load(); diff --git a/asibfm700_netserver_main.cpp b/asibfm700_netserver_main.cpp index b491bdb..6cb19be 100644 --- a/asibfm700_netserver_main.cpp +++ b/asibfm700_netserver_main.cpp @@ -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();