Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
firmware
Commits
9e807b8d
Commit
9e807b8d
authored
4 years ago
by
schneider
Browse files
Options
Downloads
Patches
Plain Diff
feat(bsec): add option to set a static temperature offset
parent
ca0a9e0d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!380
BSEC support
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/card10-cfg.rst
+2
-0
2 additions, 0 deletions
Documentation/card10-cfg.rst
epicardium/modules/bsec.c
+9
-3
9 additions, 3 deletions
epicardium/modules/bsec.c
with
11 additions
and
3 deletions
Documentation/card10-cfg.rst
+
2
−
0
View file @
9e807b8d
...
...
@@ -60,4 +60,6 @@ Option name Type Description
``bsec_enable`` Boolean Activate the Bosch :ref:`BSEC` binary blob to compute an Indoor Air Quality indication.
------------------ ---------- -----------
``bsec_debug`` Boolean Turn on debug output of the BSEC system. Prints each meaurement on the console.
------------------ ---------- -----------
``bsec_offset`` Integer Temperature offset in .1 K. Example: Set to `-14` if temperature reads 1.4 "C" to high.
================== ========== ===========
This diff is collapsed.
Click to expand it.
epicardium/modules/bsec.c
+
9
−
3
View file @
9e807b8d
...
...
@@ -363,8 +363,6 @@ int bsec_activate(void)
float
sample_rate
=
BSEC_SAMPLE_RATE_LP
;
#endif
float
temperature_offset
=
0
.
0
;
bool
bsec_enabled
=
config_get_boolean_with_default
(
"bsec_enabled"
,
false
);
if
(
!
bsec_enabled
)
{
...
...
@@ -372,10 +370,18 @@ int bsec_activate(void)
}
debug
=
config_get_boolean_with_default
(
"bsec_debug"
,
false
);
float
temperature_offset
=
config_get_integer_with_default
(
"bsec_offset"
,
0
)
/
10
.;
if
(
temperature_offset
!=
0
.
0
)
{
printf
(
"BSEC Temp offset %d/10 K
\n
"
,
(
int
)(
temperature_offset
*
10
));
}
/* Puts AT LEAST 2 * #BSEC_MAX_PROPERTY_BLOB_SIZE = 2 * 454 = 908 bytes onto the stack */
ret
=
bsec_iot_init
(
sample_rate
,
temperature_offset
,
-
temperature_offset
,
i2c_write
,
i2c_read
,
delay
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment