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
b4c148ef
Unverified
Commit
b4c148ef
authored
Aug 30, 2020
by
galjonsfigur
Committed by
GitHub
Aug 30, 2020
Browse files
Add missing features to Travis CI PR build (#3255)
parent
d72ea91e
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/modules/wifi.c
View file @
b4c148ef
...
@@ -437,7 +437,7 @@ void wifi_pmSleep_suspend_CB(void)
...
@@ -437,7 +437,7 @@ void wifi_pmSleep_suspend_CB(void)
{
{
lua_State
*
L
=
lua_getstate
();
// Get main Lua thread pointer
lua_State
*
L
=
lua_getstate
();
// Get main Lua thread pointer
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// Push suspend callback onto stack
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// Push suspend callback onto stack
luaL_unref
(
L
,
wifi_suspend_cb_ref
);
// remove suspend callback from LUA_REGISTRY
luaL_unref
(
L
,
LUA_REGISTRYINDEX
,
wifi_suspend_cb_ref
);
// remove suspend callback from LUA_REGISTRY
wifi_suspend_cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
wifi_suspend_cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
luaL_pcallx
(
L
,
0
,
0
);
// Execute suspend callback
luaL_pcallx
(
L
,
0
,
0
);
// Execute suspend callback
}
}
...
...
app/pm/pmSleep.c
View file @
b4c148ef
...
@@ -160,7 +160,7 @@ void pmSleep_execute_lua_cb(int* cb_ref){
...
@@ -160,7 +160,7 @@ void pmSleep_execute_lua_cb(int* cb_ref){
if
(
*
cb_ref
!=
LUA_NOREF
){
if
(
*
cb_ref
!=
LUA_NOREF
){
lua_State
*
L
=
lua_getstate
();
// Get Lua main thread pointer
lua_State
*
L
=
lua_getstate
();
// Get Lua main thread pointer
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
*
cb_ref
);
// Push resume callback onto the stack
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
*
cb_ref
);
// Push resume callback onto the stack
lua_unref
(
L
,
*
cb_ref
);
// Remove resume callback from registry
lua
L
_unref
(
L
,
LUA_REGISTRYINDEX
,
*
cb_ref
);
// Remove resume callback from registry
*
cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
*
cb_ref
=
LUA_NOREF
;
// Update variable since reference is no longer valid
luaL_pcallx
(
L
,
0
,
0
);
// Execute resume callback
luaL_pcallx
(
L
,
0
,
0
);
// Execute resume callback
}
}
...
...
tools/travis/pr-build.sh
View file @
b4c148ef
...
@@ -2,28 +2,39 @@
...
@@ -2,28 +2,39 @@
set
-e
set
-e
echo
"Running PR build
(
all modules
, SSL enabled, debug
enabled
)
"
echo
"Running PR build
:
all modules
plus SSL, debug, FATFS, new I2C driver, pmSleep and SmartConfig all
enabled"
(
(
cd
"
$TRAVIS_BUILD_DIR
"
/app/include
||
exit
cd
"
$TRAVIS_BUILD_DIR
"
/app/include
||
exit
# uncomment disabled modules e.g. '//#define LUA_USE_MODULES_UCG' -> '#define LUA_USE_MODULES_UCG'
# uncomment disabled modules e.g. '//#define LUA_USE_MODULES_UCG' -> '#define LUA_USE_MODULES_UCG'
sed
-
E
-
i
.bak
's@(//.*)(#define *LUA_USE_MODULES_.*)@\2@g'
user_modules.h
sed
-
i
-
r
's@(//.*)(#define *LUA_USE_MODULES_.*)@\2@g'
user_modules.h
cat
user_modules.h
cat
user_modules.h
# enable SSL
# enable SSL
sed
-i
.bak
's@//#define CLIENT_SSL_ENABLE@#define CLIENT_SSL_ENABLE@'
user_config.h
sed
-i
's@//#define CLIENT_SSL_ENABLE@#define CLIENT_SSL_ENABLE@'
user_config.h
# enable debug
# enable debug
sed
-
E
-i
.bak
's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@'
user_config.h
sed
-
i
's@// ?#define DEVELOP_VERSION@#define DEVELOP_VERSION@'
user_config.h
# enable FATFS
# enable FATFS
sed
-i
's@//#define BUILD_FATFS@#define BUILD_FATFS@'
user_config.h
sed
-i
's@//#define BUILD_FATFS@#define BUILD_FATFS@'
user_config.h
# enable new I2C driver
sed
-i
's@#define I2C_MASTER_OLD_VERSION@//#define I2C_MASTER_OLD_VERSION@'
user_config.h
# enable pmSleep
sed
-i
's@//#define TIMER_SUSPEND_ENABLE@#define TIMER_SUSPEND_ENABLE@'
user_config.h
sed
-i
's@//#define PMSLEEP_ENABLE@#define PMSLEEP_ENABLE@'
user_config.h
# enable WiFi SmartConfig
sed
-i
's@//#define WIFI_SMART_ENABLE@#define WIFI_SMART_ENABLE@'
user_config.h
cat
user_config.h
cat
user_config.h
cd
"
$TRAVIS_BUILD_DIR
"
/ld
||
exit
cd
"
$TRAVIS_BUILD_DIR
"
/ld
||
exit
# increase irom0_0_seg size for all modules build
# increase irom0_0_seg size for all modules build
sed
-E
-i
.bak
's@(.*irom0_0_seg *:.*len *=) *[^,]*(.*)@\1 0x200000\2@'
nodemcu.ld
sed
-E
-i
.bak
's@(.*irom0_0_seg *:.*len *=) *[^,]*(.*)@\1 0x200000\2@'
nodemcu.ld
sed
-E
-i
.bak
's@(.*iram1_0_seg *:.*len *=) *[^,]*(.*)@\1 0x100000\2@'
nodemcu.ld
sed
-E
-i
.bak
's@(.*iram1_0_seg *:.*len *=) *[^,]*(.*)@\1 0x100000\2@'
nodemcu.ld
cat
nodemcu.ld
cat
nodemcu.ld
# change to "root" directory no matter where the script was started from
# change to "root" directory no matter where the script was started from
cd
"
$TRAVIS_BUILD_DIR
"
||
exit
cd
"
$TRAVIS_BUILD_DIR
"
||
exit
...
...
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