Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor - use PropertyView/WidgetView #1774

Merged
merged 5 commits into from
Dec 22, 2022
Merged

Refactor - use PropertyView/WidgetView #1774

merged 5 commits into from
Dec 22, 2022

Conversation

pawel-soja
Copy link
Contributor

The main goal is to get rid of the use of direct access to fields defined in indiapi.h and the use of getters/setters via PropertyView/WidgetView.
It will also make it easier to switch to high-level INDI::PropertyXXX.

In addition, I added typedefs to make the names friendlier, and in the future, it could be easily replaced with full-fledged classes.

typedef PropertyView<IText> PropertyViewText;
typedef PropertyView<INumber> PropertyViewNumber;
typedef PropertyView<ISwitch> PropertyViewSwitch;
typedef PropertyView<ILight> PropertyViewLight;
typedef PropertyView<IBLOB> PropertyViewBlob;
typedef WidgetView<IText> WidgetViewText;
typedef WidgetView<INumber> WidgetViewNumber;
typedef WidgetView<ISwitch> WidgetViewSwitch;
typedef WidgetView<ILight> WidgetViewLight;
typedef WidgetView<IBLOB> WidgetViewBlob;

@pawel-soja pawel-soja requested a review from knro December 15, 2022 14:46
@knro
Copy link
Contributor

knro commented Dec 22, 2022

Quite impressive!! I applaud you for taking the time to do this. I think from now on, I will not accept MRs for new drivers that use the old-style INDI properties.

@knro knro merged commit 060d7c2 into master Dec 22, 2022
@knro knro deleted the refactor/propertyview branch December 22, 2022 04:23
@pawel-soja
Copy link
Contributor Author

Hey thanks! Finally, I want to mark a couple of methods as deprecated and that there will be no warnings related to this in this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants