Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
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
Service Desk
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
cm-projects
RIOT
Commits
1f7ec9b2
Unverified
Commit
1f7ec9b2
authored
6 years ago
by
Sebastian Meiling
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #10334 from maribu/saul_rssi
{drivers/saul,sys/phydat}: Added RSSI sensor and dBm unit
parents
00b6e46a
3cc6c7f4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
drivers/include/saul.h
+1
-0
1 addition, 0 deletions
drivers/include/saul.h
drivers/saul/saul_str.c
+1
-0
1 addition, 0 deletions
drivers/saul/saul_str.c
sys/include/phydat.h
+1
-0
1 addition, 0 deletions
sys/include/phydat.h
sys/phydat/phydat_str.c
+2
-0
2 additions, 0 deletions
sys/phydat/phydat_str.c
with
5 additions
and
0 deletions
drivers/include/saul.h
+
1
−
0
View file @
1f7ec9b2
...
...
@@ -98,6 +98,7 @@ enum {
SAUL_SENSE_TVOC
=
0x90
,
/**< sensor: TVOC Gas */
SAUL_SENSE_OCCUP
=
0x91
,
/**< sensor: occupancy */
SAUL_SENSE_PROXIMITY
=
0x92
,
/**< sensor: proximity */
SAUL_SENSE_RSSI
=
0x93
,
/**< sensor: RSSI */
SAUL_CLASS_ANY
=
0xff
/**< any device - wildcard */
/* extend this list as needed... */
};
...
...
This diff is collapsed.
Click to expand it.
drivers/saul/saul_str.c
+
1
−
0
View file @
1f7ec9b2
...
...
@@ -54,6 +54,7 @@ const char *saul_class_to_str(const uint8_t class_id)
case
SAUL_SENSE_CO2
:
return
"SENSE_CO2"
;
case
SAUL_SENSE_TVOC
:
return
"SENSE_TVOC"
;
case
SAUL_SENSE_PROXIMITY
:
return
"SENSE_PROXIMITY"
;
case
SAUL_SENSE_RSSI
:
return
"SENSE_RSSI"
;
case
SAUL_CLASS_ANY
:
return
"CLASS_ANY"
;
case
SAUL_SENSE_OCCUP
:
return
"SENSE_OCCUP"
;
default:
return
"CLASS_UNKNOWN"
;
...
...
This diff is collapsed.
Click to expand it.
sys/include/phydat.h
+
1
−
0
View file @
1f7ec9b2
...
...
@@ -94,6 +94,7 @@ enum {
UNIT_A
,
/**< Ampere */
UNIT_V
,
/**< Volts */
UNIT_GS
,
/**< gauss */
UNIT_DBM
,
/**< decibel-milliwatts */
/* pressure */
UNIT_BAR
,
/**< Beer? */
UNIT_PA
,
/**< Pascal */
...
...
This diff is collapsed.
Click to expand it.
sys/phydat/phydat_str.c
+
2
−
0
View file @
1f7ec9b2
...
...
@@ -42,6 +42,7 @@ void phydat_dump(phydat_t *data, uint8_t dim)
case
UNIT_PERCENT
:
case
UNIT_TEMP_C
:
case
UNIT_TEMP_F
:
case
UNIT_DBM
:
/* no string conversion */
scale_prefix
=
'\0'
;
break
;
...
...
@@ -91,6 +92,7 @@ const char *phydat_unit_to_str(uint8_t unit)
case
UNIT_GR
:
return
"G"
;
case
UNIT_A
:
return
"A"
;
case
UNIT_V
:
return
"V"
;
case
UNIT_DBM
:
return
"dBm"
;
case
UNIT_GS
:
return
"Gs"
;
case
UNIT_BAR
:
return
"Bar"
;
case
UNIT_PA
:
return
"Pa"
;
...
...
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