Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
bd0549ac
Commit
bd0549ac
authored
Jul 14, 2019
by
Gregor
Browse files
fix rounding in ws2812:buffer:mix
parent
0398c336
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/ws2812.c
View file @
bd0549ac
...
...
@@ -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