From d0571f4dbae0e57a3fcfa97864617ab3bbff508c Mon Sep 17 00:00:00 2001 From: Carsten Schmitt Date: Sat, 24 Feb 2024 23:36:13 +0100 Subject: [PATCH] Supporting INDI v1.8.2 which comes with Ubuntu 20.04. --- source/indi-device-watchdog/device_data.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/indi-device-watchdog/device_data.cpp b/source/indi-device-watchdog/device_data.cpp index 6bd1315..d9ca56a 100644 --- a/source/indi-device-watchdog/device_data.cpp +++ b/source/indi-device-watchdog/device_data.cpp @@ -81,10 +81,13 @@ void DeviceDataT::setEnableAutoConnect(bool enableAutoConnect) { std::ostream & DeviceDataT::print(std::ostream &os) const { + // NOTE: In older INDI versions getDeviceName() does not have a const qualifier. + const char * indiDeviceName = const_cast(this)->indiBaseDevice_.getDeviceName(); + os << "Device name: " << indiDeviceName_ << ", linux device: " << linuxDeviceName_ << ", INDI driver: " << indiDeviceDriverName_ - << ", INDI device: " << (indiBaseDevice_.getDeviceName() != nullptr ? indiBaseDevice_.getDeviceName() : "NOT SET"); + << ", INDI device: " << (indiDeviceName != nullptr ? indiDeviceName : "NOT SET"); return os; }