Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qthing
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
Container Registry
Model registry
Operate
Environments
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
Jens Nolte
qthing
Commits
65ff0453
Commit
65ff0453
authored
6 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
make measure-period configurable
parent
17bd5f6e
No related branches found
No related tags found
2 merge requests
!8
Updating bme280-qthing
,
!5
Measured: A measuring daemon
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/measured.cpp
+9
-0
9 additions, 0 deletions
main/measured.cpp
main/measured.h
+2
-0
2 additions, 0 deletions
main/measured.h
with
11 additions
and
0 deletions
main/measured.cpp
+
9
−
0
View file @
65ff0453
...
...
@@ -92,6 +92,10 @@ void qthing::measured::Measured::registerBackend(qthing::measured::backend_t new
};
}
void
qthing
::
measured
::
Measured
::
set_measure_period
(
uint16_t
period
)
{
this
->
measure_period
=
period
;
}
/*
* Global default instance
...
...
@@ -115,6 +119,11 @@ void qthing::measured::registerBackend(qthing::measured::backend_t new_backend)
md
->
registerBackend
(
new_backend
);
}
void
qthing
::
measured
::
set_measure_period
(
uint16_t
period
)
{
start_measured
();
md
->
set_measure_period
(
period
);
}
/*
* Predefined backends
...
...
This diff is collapsed.
Click to expand it.
main/measured.h
+
2
−
0
View file @
65ff0453
...
...
@@ -27,6 +27,7 @@ namespace qthing {
void
registerBackend
(
backend_t
new_backend
);
void
registerSensor
(
std
::
string
name
,
std
::
string
type
,
std
::
string
unit
,
sensor_t
sensor
);
void
set_measure_period
(
uint16_t
period
);
class
Measured
{
...
...
@@ -41,6 +42,7 @@ namespace qthing {
Measured
();
void
registerBackend
(
backend_t
new_backend
);
void
registerSensor
(
std
::
string
name
,
std
::
string
type
,
std
::
string
unit
,
sensor_t
sensor
);
void
set_measure_period
(
uint16_t
period
);
private
:
std
::
vector
<
sensor_config_t
>
sensors
;
...
...
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