BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
9ad76fa7
Commit
9ad76fa7
authored
Apr 08, 2019
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hard code BSEC config used in YellowSensorToCloud
parent
eb37cdd5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
component.c
apps/YellowSensorToCloud/components/sensors/bsec/component.c
+13
-6
No files found.
apps/YellowSensorToCloud/components/sensors/bsec/component.c
View file @
9ad76fa7
...
...
@@ -9,6 +9,7 @@
"\"co2EquivalentAccuracy\":1,\"breathVocValue\":1,\"breathVocAccuracy\":1,"\
"\"pressure\":1,\"temperature\":1,\"humidity\":1 }"
#ifdef BME680_DHUB_CONFIG
static
void
BmeConfigPushHandler
(
double
timestamp
,
const
char
*
jsonStr
,
void
*
context
)
{
/*
...
...
@@ -84,6 +85,7 @@ static void BmeConfigPushHandler(double timestamp, const char *jsonStr, void *co
cleanup:
json_decref
(
json
);
}
#endif // BME680_DHUB_CONFIG
static
void
SensorReadingHandler
...
...
@@ -162,14 +164,19 @@ COMPONENT_INIT
// le_sig_Block(SIGTERM);
// le_sig_SetEventHandler(SIGTERM, actuator_SigTermHandler);
le_result_t
res
=
io_CreateOutput
(
RES_PATH_CONFIG
,
IO_DATA_TYPE_JSON
,
""
);
LE_FATAL_IF
(
res
!=
LE_OK
&&
res
!=
LE_DUPLICATE
,
"Couldn't create config data hub output - %s"
,
LE_RESULT_TXT
(
res
));
io_MarkOptional
(
RES_PATH_CONFIG
);
io_AddJsonPushHandler
(
RES_PATH_CONFIG
,
BmeConfigPushHandler
,
NULL
);
LE_ASSERT_OK
(
io_CreateInput
(
RES_PATH_VALUE
,
IO_DATA_TYPE_JSON
,
""
));
io_SetJsonExample
(
RES_PATH_VALUE
,
VALUE_EXAMPLE
);
mangOH_bme680_AddSensorReadingHandler
(
SensorReadingHandler
,
NULL
);
#ifdef BME680_DHUB_CONFIG
le_result_t
res
=
io_CreateOutput
(
RES_PATH_CONFIG
,
IO_DATA_TYPE_JSON
,
""
);
LE_FATAL_IF
(
res
!=
LE_OK
&&
res
!=
LE_DUPLICATE
,
"Couldn't create config data hub output - %s"
,
LE_RESULT_TXT
(
res
));
io_MarkOptional
(
RES_PATH_CONFIG
);
io_AddJsonPushHandler
(
RES_PATH_CONFIG
,
BmeConfigPushHandler
,
NULL
);
#else
LE_ASSERT_OK
(
mangOH_bme680_Configure
(
MANGOH_BME680_SAMPLING_RATE_LP
,
true
,
true
,
true
,
true
,
true
,
true
));
#endif // BME680_DHUB_CONFIG
}
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