-
Notifications
You must be signed in to change notification settings - Fork 74
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
base: master
Are you sure you want to change the base?
Conversation
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): |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 !?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ?
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