-
Notifications
You must be signed in to change notification settings - Fork 15
feat: added 3.1 inch ePaper Display 320x240 UC8253 SPI E Ink screen, GDEQ031T10 . #121
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9be6050
feat: added gdeq031t10 display.
Dhruv1797 ab7b1db
fix: update methods as per black white.
Dhruv1797 0311f1e
Merge remote-tracking branch 'upstream/main' into add-displays
Dhruv1797 7b091a9
fix: dart format after merge.
Dhruv1797 5630ebe
Merge remote-tracking branch 'upstream/main' into add-displays
Dhruv1797 d996cd7
fix: fix merge conflicts and change image orientation.
Dhruv1797 9102bfd
Merge remote-tracking branch 'upstream/main' into add-displays
Dhruv1797 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,38 @@ | ||||||||||
import 'package:flutter/material.dart'; | ||||||||||
import 'package:magicepaperapp/constants/asset_paths.dart'; | ||||||||||
import 'package:magicepaperapp/util/epd/driver/uc8253.dart'; | ||||||||||
import 'package:magicepaperapp/util/image_processing/image_processing.dart'; | ||||||||||
import 'package:image/image.dart' as img; | ||||||||||
import 'driver/driver.dart'; | ||||||||||
import 'epd.dart'; | ||||||||||
|
||||||||||
class GDEQ031T10 extends Epd { | ||||||||||
@override | ||||||||||
get width => 320; | ||||||||||
Dhruv1797 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
@override | ||||||||||
get height => 240; | ||||||||||
|
||||||||||
@override | ||||||||||
String get name => 'E-Paper 3.1"'; | ||||||||||
@override | ||||||||||
String get modelId => 'GDEQ031T10'; | ||||||||||
@override | ||||||||||
String get imgPath => ImageAssets.GDEQ031T10Display; | ||||||||||
|
||||||||||
@override | ||||||||||
get colors => [Colors.white, Colors.black]; | ||||||||||
|
||||||||||
@override | ||||||||||
get controller => Uc8253() as Driver; | ||||||||||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Avoid unnecessary type casting if Uc8253 already implements Driver. The explicit cast can be removed for cleaner code and to prevent issues if the class hierarchy changes.
Suggested change
|
||||||||||
|
||||||||||
@override | ||||||||||
List<img.Image Function(img.Image)> get processingMethods => [ | ||||||||||
ImageProcessing.bwFloydSteinbergDither, | ||||||||||
ImageProcessing.bwFalseFloydSteinbergDither, | ||||||||||
ImageProcessing.bwStuckiDither, | ||||||||||
ImageProcessing.bwAtkinsonDither, | ||||||||||
ImageProcessing.bwHalftoneDither, | ||||||||||
ImageProcessing.bwThreshold, | ||||||||||
]; | ||||||||||
} |
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
Oops, something went wrong.
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.
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.
suggestion: Maintain consistent naming conventions for asset constants.
Consider renaming 'GDEQ031T10Display' to 'gdeq031t10Display' to match the existing lowerCamelCase convention and Dart guidelines.
Suggested implementation:
If
GDEQ031T10Display
is referenced elsewhere in your codebase, update those references to usegdeq031t10Display
for consistency.