Skip to content

Commit

Permalink
Supporting INDI v1.8.2 which comes with Ubuntu 20.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
carsten0x51h committed Feb 24, 2024
1 parent 94b8cfb commit d0571f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/indi-device-watchdog/device_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DeviceDataT*>(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;
}
Expand Down

0 comments on commit d0571f4

Please sign in to comment.