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
1b29843b
Commit
1b29843b
authored
Oct 22, 2020
by
Lukáš Voborský
Committed by
Marcel Stör
Nov 07, 2020
Browse files
wiegand Lua 5.3 fix
parent
5ee658e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/wiegand.c
View file @
1b29843b
...
...
@@ -184,7 +184,7 @@ static int lwiegand_create(lua_State* L)
unsigned
pinD1
=
luaL_checkinteger
(
L
,
2
);
luaL_argcheck
(
L
,
platform_gpio_exists
(
pinD0
)
&&
pinD0
>
0
,
1
,
"Invalid pin for D0"
);
luaL_argcheck
(
L
,
platform_gpio_exists
(
pinD1
)
&&
pinD1
>
0
&&
pinD0
!=
pinD1
,
2
,
"Invalid pin for D1"
);
luaL_check
function
(
L
,
3
);
luaL_check
type
(
L
,
3
,
LUA_TFUNCTION
);
if
(
pins_to_wiegand_state
[
pin_num
[
pinD0
]]
||
pins_to_wiegand_state
[
pin_num
[
pinD1
]])
return
luaL_error
(
L
,
"pin already in use"
);
...
...
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