Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multipass
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
multipass
Commits
0f882940
Commit
0f882940
authored
5 years ago
by
Daniel Friesel
Browse files
Options
Downloads
Patches
Plain Diff
BME680: Add .configure helper function
parent
e6a319dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/driver/bme680.h
+9
-0
9 additions, 0 deletions
include/driver/bme680.h
model/driver/bme680.dfa
+24
-0
24 additions, 0 deletions
model/driver/bme680.dfa
with
33 additions
and
0 deletions
include/driver/bme680.h
+
9
−
0
View file @
0f882940
...
...
@@ -451,6 +451,15 @@ class BME680 {
*/
int8_t
getSensorSettings
(
uint16_t
desired_settings
);
inline
void
configure
(
uint8_t
os_hum
,
uint8_t
os_pres
,
uint8_t
os_temp
,
uint8_t
run_gas
,
uint16_t
heatr_dur
,
uint16_t
heatr_temp
)
{
tph_sett
.
os_hum
=
os_hum
;
tph_sett
.
os_pres
=
os_pres
;
tph_sett
.
os_temp
=
os_temp
;
gas_sett
.
run_gas
=
run_gas
;
gas_sett
.
heatr_dur
=
heatr_dur
;
gas_sett
.
heatr_temp
=
heatr_temp
;
}
inline
void
setHumidityOversampling
(
uint8_t
os
)
{
tph_sett
.
os_hum
=
os
;
}
...
...
This diff is collapsed.
Click to expand it.
model/driver/bme680.dfa
+
24
−
0
View file @
0f882940
...
...
@@ -136,6 +136,28 @@ transition:
- name: degc
values: [100, 150, 200, 250, 300]
parameter: heater_temperature_degc
configure:
src: [SLEEP, SLEEP_PENDING_ATTR]
dst: SLEEP_PENDING_ATTR
arguments:
- name: os_hum
values: ['BME680_OS_NONE', 'BME680_OS_1X', 'BME680_OS_2X', 'BME680_OS_4X', 'BME680_OS_8X', 'BME680_OS_16X']
parameter: humidity_oversampling
- name: os_pres
values: ['BME680_OS_NONE', 'BME680_OS_1X', 'BME680_OS_2X', 'BME680_OS_4X', 'BME680_OS_8X', 'BME680_OS_16X']
parameter: pressure_oversampling
- name: os_temp
values: ['BME680_OS_NONE', 'BME680_OS_1X', 'BME680_OS_2X', 'BME680_OS_4X', 'BME680_OS_8X', 'BME680_OS_16X']
parameter: temperature_oversampling
- name: run_gas
values: ['BME680_DISABLE_GAS_MEAS', 'BME680_ENABLE_GAS_MEAS']
parameter: gas_enabled
- name: heatr_dur
values: [10, 30, 60, 100, 150, 200]
parameter: heater_duration_ms
- name: heatr_temp
values: [100, 150, 200, 250, 300]
parameter: heater_temperature_degc
setSensorSettings:
src: [SLEEP_PENDING_ATTR]
dst: SLEEP
...
...
@@ -145,6 +167,8 @@ transition:
setSensorMode:
src: [SLEEP]
dst: FORCED
codegen:
delay_after_ms: 500
getSensorData:
src: [FORCED]
dst: SLEEP
...
...
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