Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
772d1fd9
Verified
Commit
772d1fd9
authored
Aug 22, 2019
by
Rahix
Browse files
fix(bme680): Deinit only after initialization
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
e08ab5df
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/bme680.c
View file @
772d1fd9
...
...
@@ -89,12 +89,14 @@ int epic_bme680_init()
int
epic_bme680_deinit
()
{
int8_t
result
=
BME680_OK
;
result
=
bme680_soft_reset
(
&
bme
);
if
(
result
!=
BME680_OK
)
{
LOG_ERR
(
"bme680"
,
"bme680_soft_reset error: %d
\n
"
,
result
);
return
-
convert_error
(
result
);
if
(
initialized
)
{
int8_t
result
=
bme680_soft_reset
(
&
bme
);
if
(
result
!=
BME680_OK
)
{
LOG_ERR
(
"bme680"
,
"bme680_soft_reset error: %d
\n
"
,
result
);
return
-
convert_error
(
result
);
}
}
initialized
=
false
;
...
...
Write
Preview
Supports
Markdown
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