-
Notifications
You must be signed in to change notification settings - Fork 78
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
asha: import ASHA Pandora service from AOSP #309
base: main
Are you sure you want to change the base?
Conversation
uael
commented
Oct 4, 2023
•
edited
Loading
edited
- asha: import asha.proto from AOSP bt-test-interfaces#15
- pandora Pypi release
@@ -101,49 +104,59 @@ def on_audio_control_point_write(connection: Connection, value): | |||
) | |||
) | |||
|
|||
def on_read_only_properties_read(connection: Connection) -> bytes: | |||
value = ( |
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.
is this value expected to change during the lifetime of the characteristic? If not, why not construct it just once at init time?
+ bytes(AshaService.RESERVED_FOR_FUTURE_USE) | ||
+ bytes(AshaService.SUPPORTED_CODEC_ID) | ||
) | ||
self.emit("read_only_properties", connection, value) |
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.
The event name is not typical. Event names are normally nouns. The even here is that there is a read request on the characteristic. The event name should probably, then, just be 'read'.
But more important question: is this only for testing? Maybe the Attribute class itself should emit a 'read' event (like it emits a 'write' event), to make this observability more generally available?
return value | ||
|
||
def on_le_psm_out_read(connection: Connection) -> bytes: | ||
self.emit("le_psm_out", connection, self.psm) |
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.
same comment about event names as above.