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
0ff3084f
Commit
0ff3084f
authored
Jul 27, 2019
by
Gregor
Browse files
small fixes as outcome of review
parent
9eec82fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/modules/node.md
View file @
0ff3084f
...
@@ -280,20 +280,20 @@ Returns information about hardware, software version and build configuration.
...
@@ -280,20 +280,20 @@ Returns information about hardware, software version and build configuration.
#### Syntax
#### Syntax
`node.info([
kind
])`
`node.info([
group
])`
#### Parameters
#### Parameters
`
kind`
kind
of information (optional, if ommited return legacy information). May be one of
`"hw"`
,
`"sw_version"`
,
`"build_config"`
.
`
group`
group
of information (optional, if ommited return legacy information). May be one of
`"hw"`
,
`"sw_version"`
,
`"build_config"`
.
#### Returns
#### Returns
if a
`
kind
`
is given the return value will be a table containing the following elements:
if a
`
group
`
is given the return value will be a table containing the following elements:
-
for
`
kind
`
=
`"hw"`
-
for
`
group
`
=
`"hw"`
-
`chip_id`
(number)
-
`chip_id`
(number)
-
`flash_id`
(number)
-
`flash_id`
(number)
-
`flash_size`
(number)
-
`flash_size`
(number)
-
`flash_mode`
(number) QIO = 0, QOUT = 1, DIO = 2, DOUT = 15.
-
`flash_mode`
(number) QIO = 0, QOUT = 1, DIO = 2, DOUT = 15.
-
`flash_speed`
(number)
-
`flash_speed`
(number)
-
for
`
kind
`
=
`"sw_version"`
-
for
`
group
`
=
`"sw_version"`
-
`git_branch`
(string)
-
`git_branch`
(string)
-
`git_commit_id`
(string)
-
`git_commit_id`
(string)
-
`git_release`
(string) Release name +additional commits e.g. "2.0.0-master_20170202 +403"
-
`git_release`
(string) Release name +additional commits e.g. "2.0.0-master_20170202 +403"
...
@@ -301,7 +301,7 @@ Returns information about hardware, software version and build configuration.
...
@@ -301,7 +301,7 @@ Returns information about hardware, software version and build configuration.
-
`node_verion_major`
(number)
-
`node_verion_major`
(number)
-
`node_verion_minor`
(number)
-
`node_verion_minor`
(number)
-
`node_verion_revision`
(number)
-
`node_verion_revision`
(number)
-
for
`
kind
`
=
`"build_config"`
-
for
`
group
`
=
`"build_config"`
-
`ssl`
(boolean)
-
`ssl`
(boolean)
-
`lfs_size`
(number) as defined at build time
-
`lfs_size`
(number) as defined at build time
-
`modules`
(string) comma separated list
-
`modules`
(string) comma separated list
...
@@ -311,7 +311,7 @@ Returns information about hardware, software version and build configuration.
...
@@ -311,7 +311,7 @@ Returns information about hardware, software version and build configuration.
This interface is deprecated and will be removed in one of the next releases. Use the above calls instead.
This interface is deprecated and will be removed in one of the next releases. Use the above calls instead.
-
for no
`
kind
`
given: --deprecated
-
for no
`
group
`
given: --deprecated
-
`majorVer`
(number)
-
`majorVer`
(number)
-
`minorVer`
(number)
-
`minorVer`
(number)
-
`devVer`
(number)
-
`devVer`
(number)
...
...
tools/update_buildinfo.sh
View file @
0ff3084f
#!/usr/bin/env bash
#!/usr/bin/env bash
USER_MODULES_H
=
app/include/user_modules.h
USER_MODULES_H
=
app/include/user_modules.h
USER_CONFIG_H
=
app/include/user_config.h
BUILD_DATE
=
"
$(
date
"+%Y-%m-%d %H:%M"
)
"
COMMIT_ID
=
"
$(
git rev-parse HEAD
)
"
COMMIT_ID
=
"
$(
git rev-parse HEAD
)
"
BRANCH
=
"
$(
git rev-parse
--abbrev-ref
HEAD |
sed
-r
's/[\/\\]+/_/g'
)
"
BRANCH
=
"
$(
git rev-parse
--abbrev-ref
HEAD |
sed
-r
's/[\/\\]+/_/g'
)
"
RELEASE
=
"
$(
git describe
--tags
--long
|
sed
-r
's/(.*)-(.*)-.*/\1 +\2/g'
|
sed
's/ +0$//'
)
"
RELEASE
=
"
$(
git describe
--tags
--long
|
sed
-r
's/(.*)-(.*)-.*/\1 +\2/g'
|
sed
's/ +0$//'
)
"
...
@@ -42,18 +40,15 @@ cat > $TEMPFILE << EndOfMessage
...
@@ -42,18 +40,15 @@ cat > $TEMPFILE << EndOfMessage
#define BUILDINFO_BUILD_TYPE "float"
#define BUILDINFO_BUILD_TYPE "float"
#endif
#endif
EndOfMessage
#define USER_PROLOG "
$USER_PROLOG
"
#define BUILDINFO_BRANCH "
$BRANCH
"
echo
"#define USER_PROLOG
\"
"
$USER_PROLOG
"
\"
"
>>
$TEMPFILE
#define BUILDINFO_COMMIT_ID "
$COMMIT_ID
"
echo
"#define BUILDINFO_BRANCH
\"
"
$BRANCH
"
\"
"
>>
$TEMPFILE
#define BUILDINFO_RELEASE "
$RELEASE
"
echo
"#define BUILDINFO_COMMIT_ID
\"
"
$COMMIT_ID
"
\"
"
>>
$TEMPFILE
#define BUILDINFO_RELEASE_DTS "
$RELEASE_DTS
"
echo
"#define BUILDINFO_RELEASE
\"
"
$RELEASE
"
\"
"
>>
$TEMPFILE
#define BUILDINFO_MODULES "
$MODULES
"
echo
"#define BUILDINFO_RELEASE_DTS
\"
"
$RELEASE_DTS
"
\"
"
>>
$TEMPFILE
echo
"#define BUILDINFO_MODULES
\"
"
$MODULES
"
\"
"
>>
$TEMPFILE
cat
>>
$TEMPFILE
<<
EndOfMessage2
#define NODE_VERSION_LONG
\\
#define NODE_VERSION_LONG
\\
"
$
USER_PROLOG
\n
"
\\
USER_PROLOG
"
\n
"
\\
"
\t
branch: " BUILDINFO_BRANCH "
\n
"
\\
"
\t
branch: " BUILDINFO_BRANCH "
\n
"
\\
"
\t
commit: " BUILDINFO_COMMIT_ID "
\n
"
\\
"
\t
commit: " BUILDINFO_COMMIT_ID "
\n
"
\\
"
\t
release: " BUILDINFO_RELEASE "
\n
"
\\
"
\t
release: " BUILDINFO_RELEASE "
\n
"
\\
...
@@ -63,7 +58,7 @@ cat >> $TEMPFILE << EndOfMessage2
...
@@ -63,7 +58,7 @@ cat >> $TEMPFILE << EndOfMessage2
"
\t
LFS: " BUILDINFO_TO_STR(BUILDINFO_LFS) "
\n
"
\\
"
\t
LFS: " BUILDINFO_TO_STR(BUILDINFO_LFS) "
\n
"
\\
"
\t
modules: " BUILDINFO_MODULES "
\n
"
"
\t
modules: " BUILDINFO_MODULES "
\n
"
EndOfMessage
2
EndOfMessage
echo
"#endif /* __BUILDINFO_H__ */"
>>
$TEMPFILE
echo
"#endif /* __BUILDINFO_H__ */"
>>
$TEMPFILE
...
...
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