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
547ebdf3
Commit
547ebdf3
authored
Jan 05, 2016
by
Johny Mattsson
Browse files
Merge pull request #896 from dnc40085/dev_node_dsleep_fix
Fix for node.dsleep to increase maximum sleep time
parents
2f655dee
cb0a982d
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/node.c
View file @
547ebdf3
...
...
@@ -39,7 +39,8 @@ static int node_restart( lua_State* L )
// Lua: dsleep( us, option )
static
int
node_deepsleep
(
lua_State
*
L
)
{
s32
us
,
option
;
uint32
us
;
uint8
option
;
//us = luaL_checkinteger( L, 1 );
// Set deleep option, skip if nil
if
(
lua_isnumber
(
L
,
2
)
)
...
...
@@ -53,7 +54,7 @@ static int node_deepsleep( lua_State* L )
// Set deleep time, skip if nil
if
(
lua_isnumber
(
L
,
1
)
)
{
us
=
lua
_tointeg
er
(
L
,
1
);
us
=
lua
L_checknumb
er
(
L
,
1
);
// if ( us <= 0 )
if
(
us
<
0
)
return
luaL_error
(
L
,
"wrong arg range"
);
...
...
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