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

Develop #144

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Develop #144

merged 4 commits into from
Nov 30, 2023

Conversation

mehmoodmalik
Copy link
Contributor

Hi,
I am currently developing OSDP product using your library. I faced the following issues:
1- I was unable to pass a class object to the PD callback, I noticed that instead of passing args you are just passing _ctx which doesn't make any sense to me. That is why i added the args in the set_command_callback of PD.
2- It is enough to declare _ctx = nullptr at Common class because each derived class would call the constructor of Common and it will initialize the _ctx to nullptr.
3- Exposing ISTAT and OSTAT to application level. I faced a situation where ACU need to know the default state of the PD.

Please have a look to my changes i am waiting for this to be merged so that we can utilize this code in our company.

Best regards,
Mehmood Malik.

Copy link
Member

@sidcha sidcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The C++ change looks good to me. Please drop the input/output status handling change from this PR.

src/osdp_cp.c Outdated
Comment on lines 1389 to 1394
case OSDP_CMD_OUT_STATUS:
cmd_id = CMD_OSTAT;
break;
case OSDP_CMD_INPUT_STATUS:
cmd_id = CMD_ISTAT;
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output/input status have to be handled along with case OSDP_CMD_STATUS: above to avoid having to introduced too many command types. Also I think some refactoring around this area is overdue.

Please drop this change, I will take address it shortly.

@sidcha sidcha merged commit cdfdfa8 into goToMain:master Nov 30, 2023
10 checks passed
@sidcha
Copy link
Member

sidcha commented Nov 30, 2023

Thanks for the PR. I squash merged your change to minimize git log noise.

@sidcha
Copy link
Member

sidcha commented Dec 2, 2023

@mehmoodmalik I added the status query feature that you were interested in e2d2c03.

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