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

implemented API to get Sensor Packets #22

Merged
merged 3 commits into from
Jul 15, 2022

Conversation

rforro
Copy link
Contributor

@rforro rforro commented Jul 9, 2022

Implementation of the API to get sensor value. I've done only the basics structure plus sensors which I need. Feel free to extend it.

This closes #10

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

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

Thank you so much for great PR!!. Is it possible to add manual in README.md? If it is difficult, I can do that.

@rforro
Copy link
Contributor Author

rforro commented Jul 10, 2022

I've updated the README.md, but not documentation. Should I update it as well?

Second question: How would you document which sensors can be requested? Basically content of following table:

SENSOR = {
        # "Name", (Packet ID, Data Bytes, signed)
        "Charging State": (21, 1, False),
        "Voltage": (22, 2, False),
        "Current": (23, 2, True),
        "Temperature": (24, 1, True),
        "Battery Charge": (25, 2, False),
        "Battery Capacity": (26, 2, False),
        "OI Mode": (35, 1, False)
    }

@AtsushiSakai
Copy link
Owner

AtsushiSakai commented Jul 12, 2022

but not documentation. Should I update it as well?

Thank you. Yes. If you can, please do it.

How would you document which sensors can be requested?

I think already start_data_stream doc-string explains it. Do you think it is not enough?

@rforro
Copy link
Contributor Author

rforro commented Jul 13, 2022

Docs is updated as well. You are right its enough to list all sensors inside the data_stream_start method.

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for great PR!!. I will release a new version soon.

@AtsushiSakai AtsushiSakai merged commit 325686d into AtsushiSakai:master Jul 15, 2022
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.

Implement API to get Sensor Packets
2 participants