Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
89179927
Unverified
Commit
89179927
authored
Jul 14, 2019
by
Philip Gladstone
Committed by
GitHub
Jul 14, 2019
Browse files
Merge pull request #2832 from HHHartmann/ws2812-buffer-mix
fix rounding in ws2812:buffer:mix Looks good to me.
parents
a0d06822
bd0549ac
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/ws2812.c
View file @
89179927
...
...
@@ -425,6 +425,7 @@ static int ws2812_buffer_mix(lua_State* L) {
val
+=
(
int32_t
)(
source
[
src
].
values
[
i
]
*
source
[
src
].
factor
);
}
val
+=
128
;
// rounding istead of floor
val
>>=
8
;
if
(
val
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment