-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP: prototype: add static image transferring #1
Draft
kienvo
wants to merge
1
commit into
fossasia:main
Choose a base branch
from
kienvo:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Reviewer's Guide by SourceryThis pull request introduces a prototype for static image transfer to an e-paper display. It includes platform-specific code for Windows, Linux, and mobile, as well as core Dart logic for image processing and NFC communication. Sequence diagram for static image transfer processsequenceDiagram
participant User
participant App
participant ImageUtils
participant NFC
participant EPaper
User->>App: Select image
App->>ImageUtils: Process image
ImageUtils->>ImageUtils: Convert to EPD format
Note over ImageUtils: Convert to black/red pixels
ImageUtils->>ImageUtils: Divide into chunks
App->>NFC: Write chunks
loop For each chunk
NFC->>EPaper: Transfer chunk
EPaper-->>NFC: Acknowledge
end
NFC->>EPaper: Refresh display
EPaper-->>User: Display image
Class diagram for image handling componentsclassDiagram
class ImageUtils {
+originalHeight: double
+originalWidth: double
+picture: Picture
+convert2DListToUint8List(List<List<int>>)
+generateByteData(String)
+convertBitmapToByteData(String)
+convertBitmapToByteDataBiColor(String)
+divideUint8List(Uint8List, int)
-_loadSVG(String)
-_scaleSVG(Image, double, double)
-_convertImageToByteArray(Image)
-_convertUint8ListTo2DList(Uint8List, int, int)
-_convertPixelsToEpdBytes(List<List<int>>)
-_convertImageArrayToEpdBytes(Uint8List)
}
class MagicEpd {
+default_req_flags: int
+write_msg_cmd: int
+read_msg_cmd: int
+read_dyncfg_cmd: int
+write_dyncfg_cmd: int
+ic_mfg_code: int
+epd_cmd: int
+epd_send: int
+writeChunk(List<Uint8List>, List<Uint8List>)
-_transceive(int, Uint8List, Uint8List)
-_writeMsg(Uint8List, Uint8List)
-_readMsg(Uint8List)
-_readDynCfg(Uint8List, int)
-_writeDynCfg(Uint8List, int, int)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
This is a prototype for testing the firmware so still messy.
Summary by Sourcery
Add initial support for static image transfer to the e-paper display.
New Features:
Tests: