AtsushiSakai / PyRoombaAdapter

A Python library for Roomba Open Interface
https://atsushisakai.github.io/PyRoombaAdapter/
MIT License
77 stars 22 forks source link

implemented API to get Sensor Packets #22

Closed rforro closed 2 years ago

rforro commented 2 years ago

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

rforro commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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