Skip to content

Commit

Permalink
Fix RGB to u32 conversion order in rmt_neopixel example (#505)
Browse files Browse the repository at this point in the history
* Update rmt_neopixel.rs

* Update rmt_neopixel.rs

* Update CHANGELOG.md
  • Loading branch information
lonesometraveler authored Jan 6, 2025
1 parent 90384c6 commit 8a11ef4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed
- Fix RGB to u32 conversion order in rmt_neopixel example (#505)

## [0.45.0] - 2025-01-02

### Deprecated
Expand Down
2 changes: 1 addition & 1 deletion examples/rmt_neopixel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ mod example {
/// 7 0 7 0 7 0
/// 00000010 00000001 00000100
fn from(rgb: Rgb) -> Self {
((rgb.r as u32) << 16) | ((rgb.g as u32) << 8) | rgb.b as u32
((rgb.g as u32) << 16) | ((rgb.r as u32) << 8) | rgb.b as u32
}
}
}

0 comments on commit 8a11ef4

Please sign in to comment.