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

Improve HID driver support for hasseb #146

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rohanramaswamy
Copy link

Rewrote the send and receive functions for hasseb in hid.py
Added support for firmware version reading for hasseb in hid.py
Updated examples for flash and tc for hasseb tested on actual hardware

Functioning examples for flash and tc
@@ -714,40 +723,72 @@ def __init__(self, *args, **kwargs):
self._response_available = asyncio.Event()
self._response = None

def _initialise_device(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

when is this method called ?

Copy link
Author

Choose a reason for hiding this comment

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

Line 143 self._initialise_device(), it overrides hid class method.

Copy link
Contributor

Choose a reason for hiding this comment

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

please make a call to super()._initialise_device() and don't forget to set connected

byte_a, byte_b = frame
data = struct.pack('BBBBBBBBBB', 0xAA, self._HASSEB_DALI_FRAME, self._sn,
frame_length, expect_reply,
transmitter_settling_time, send_twice,
Copy link
Contributor

Choose a reason for hiding this comment

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

how is send_twice actually sent twice !?

Copy link
Author

Choose a reason for hiding this comment

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

It needs further testing to confirm, however in my testing the device sends it when send_twice is set > 0. value of send twice is used as delay in ms between the two sends.

Copy link
Contributor

Choose a reason for hiding this comment

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

you are creating a single packet, with a format which I haven't seen documented, can you link where you saw this struct ?

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