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
1915714b
Commit
1915714b
authored
May 07, 2017
by
devsaurus
Browse files
update ws2812_compat.lua
parent
2acfa53e
Changes
1
Hide whitespace changes
Inline
Side-by-side
lua_compat/ws2812_compat.lua
View file @
1915714b
...
...
@@ -23,10 +23,6 @@ local _ws2812
-- Implement esp8266 compatability API
--
function
M
.
init
(
mode
)
if
_pin_strip1
==
nil
then
error
(
"gpio for data1 undefined"
)
end
if
_pin_strip2
==
nil
and
mode
==
M
.
MODE_DUAL
then
error
(
"gpio for data2 undefined"
)
end
...
...
@@ -66,9 +62,8 @@ return function (pin_strip1, pin_strip2)
M
.
SHIFT_LOGICAL
=
_ws2812
.
SHIFT_LOGICAL
M
.
SHIFT_CIRCULAR
=
_ws2812
.
SHIFT_CIRCULAR
_pin_strip1
=
pin_strip1
_pin_strip1
=
pin_strip1
or
error
(
"pin_strip1 not defined"
)
_pin_strip2
=
pin_strip2
return
M
end
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