docs: add an example for the streaming feature#99
Merged
mariobehling merged 1 commit intofossasia:masterfrom Jul 21, 2025
Merged
docs: add an example for the streaming feature#99mariobehling merged 1 commit intofossasia:masterfrom
mariobehling merged 1 commit intofossasia:masterfrom
Conversation
Contributor
Reviewer's GuideThis PR enhances the streaming feature by fixing its data length limitation, adding an automated expect-based example script, and documenting its usage in the Markdown reference. Sequence diagram for the streaming feature test script interactionsequenceDiagram
actor User
participant Script
participant Bluetoothctl
participant Badge
User->>Script: Run streaming.sh
Script->>Bluetoothctl: Start bluetoothctl
Script->>Bluetoothctl: Scan for device
Bluetoothctl->>Script: Device found
Script->>Bluetoothctl: Connect to device
Bluetoothctl->>Badge: Establish BLE connection
Bluetoothctl->>Script: Connection successful
Script->>Bluetoothctl: Select GATT attribute
Script->>Bluetoothctl: Enter streaming mode (gatt.write '02 00')
Bluetoothctl->>Badge: Enter streaming mode
Script->>Bluetoothctl: Write bitmap content (gatt.write '03 ...')
Bluetoothctl->>Badge: Update display
Script->>Bluetoothctl: Exit streaming mode (gatt.write '02 01')
Bluetoothctl->>Badge: Exit streaming mode
Script->>Bluetoothctl: Exit
Bluetoothctl->>Script: EOF
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @kienvo - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `example/streaming.sh:36` </location>
<code_context>
+sleep 5
+
+# Write an entire screen with increment values
+send -- "gatt.write '03 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 \
+22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 \
+48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 \
</code_context>
<issue_to_address>
Long gatt.write command is split across multiple lines using backslashes, which may not be portable.
Backslash line continuations in expect scripts can be unreliable across environments. Use a single long string or concatenate strings in a way that's compatible with expect.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
send -- "gatt.write '03 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 \
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 \
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 \
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88'\r"
=======
send -- "gatt.write '03 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88'\r"
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Member
Author
|
The CI build failed because the toolchain link was changed in the MounRiver site. |
mariobehling
approved these changes
Jul 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #98
Changes:
expectandbluezSummary by Sourcery
Provide an end-to-end example script and documentation for the BLE streaming feature and fix its column limit
New Features:
Bug Fixes:
Documentation:
Tests: