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 d0571f4 commit ca1a03c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
3 changes: 1 addition & 2 deletions source/indi-device-watchdog/device_data_persistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,4 @@ namespace device_data_persistance {
// boost::property_tree::json_parser::write_json(std::cout, rootPt);
// }

};

}
2 changes: 1 addition & 1 deletion source/indi-device-watchdog/device_data_persistance.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ namespace device_data_persistance {
std::vector<DeviceDataT> load(const std::filesystem::path & configFilePath);
void save(const std::vector<DeviceDataT> & deviceDataVec, const std::filesystem::path & configFilePath);

};
}

#endif /* SOURCE_DEVICE_DATA_PERSIST_H_ */
20 changes: 10 additions & 10 deletions source/indi-device-watchdog/indi_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,46 +59,46 @@ void IndiClientT::newSwitch(ISwitchVectorProperty* svp) {
std::string deviceName(svp->device);
std::string propertyName(svp->name);
INDI::BaseDevice* baseDevicePtr = getDevice(deviceName.c_str());
INDI::Property property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_SWITCH);
INDI::Property* property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_SWITCH);

notifyUpdateProperty(property);
notifyUpdateProperty(*property);
}

void IndiClientT::newNumber(INumberVectorProperty* nvp) {
std::string deviceName(nvp->device);
std::string propertyName(nvp->name);
INDI::BaseDevice* baseDevicePtr = getDevice(deviceName.c_str());
INDI::Property property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_NUMBER);
INDI::Property* property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_NUMBER);

notifyUpdateProperty(property);
notifyUpdateProperty(*property);
}

void IndiClientT::newText(ITextVectorProperty* tvp) {
std::string deviceName(tvp->device);
std::string propertyName(tvp->name);
INDI::BaseDevice* baseDevicePtr = getDevice(deviceName.c_str());
INDI::Property property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_TEXT);
INDI::Property* property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_TEXT);

notifyUpdateProperty(property);
notifyUpdateProperty(*property);
}

void IndiClientT::newLight(ILightVectorProperty* lvp) {
std::string deviceName(lvp->device);
std::string propertyName(lvp->name);
INDI::BaseDevice* baseDevicePtr = getDevice(deviceName.c_str());
INDI::Property property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_LIGHT);
INDI::Property* property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_LIGHT);

notifyUpdateProperty(property);
notifyUpdateProperty(*property);
}

void IndiClientT::newBLOB(IBLOB* bp) {
IBLOBVectorProperty* blobPropVec = bp->bvp;
std::string deviceName(blobPropVec->device);
std::string propertyName(blobPropVec->name);
INDI::BaseDevice* baseDevicePtr = getDevice(deviceName.c_str());
INDI::Property property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_BLOB);
INDI::Property* property = baseDevicePtr->getProperty(propertyName.c_str(), INDI_BLOB);

notifyUpdateProperty(property);
notifyUpdateProperty(*property);
}

void IndiClientT::newMessage(INDI::BaseDevice * dp, int messageID) {
Expand Down

0 comments on commit ca1a03c

Please sign in to comment.