Closed Jhalakupadhyay closed 3 weeks ago
This PR implements an Invert LED effect feature for LED badge displays. The implementation adds the ability to invert LED states (on/off) through a new boolean parameter isInverted
that flows through the message conversion pipeline. The inversion is performed by converting hex values to binary, flipping the bits, and converting back to hex.
classDiagram
class Converters {
+Future<List<String>> messageTohex(String message, bool isInverted)
+static String invertHex(String hex)
}
note for Converters "Added isInverted parameter to messageTohex and invertHex method"
classDiagram
class AnimationBadgeProvider {
+void badgeAnimation(String message, Converters converters, bool isInverted)
}
note for AnimationBadgeProvider "Added isInverted parameter to badgeAnimation method"
classDiagram
class SavedBadgeProvider {
+Future<Data> getBadgeData(String text, bool flash, bool marq, bool isInverted, Speed speed, Mode mode)
}
note for SavedBadgeProvider "Added isInverted parameter to getBadgeData method"
Change | Details | Files |
---|---|---|
Added hex inversion functionality for LED display |
|
lib/bademagic_module/utils/converters.dart |
Updated providers to support LED inversion |
|
lib/providers/badge_message_provider.dart lib/providers/animation_badge_provider.dart lib/providers/saved_badge_provider.dart |
Integrated invert LED effect into UI components |
|
lib/view/widgets/effects_container.dart lib/view/homescreen.dart lib/view/widgets/save_badge_card.dart lib/badge_effect/invert_led_effect.dart |
1064
Summary by Sourcery
Add an invert LED effect feature to the badge message system, enabling the inversion of message hex values for display on LED badges. This includes updates to the message conversion process and integration with the badge animation and effect systems.
New Features:
Enhancements: