Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sensorbox Ex - Reading Data
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
Container 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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Smart Factory
Edu
DigInd
Sensorbox Ex - Reading Data
Commits
ab3d7aa9
Commit
ab3d7aa9
authored
3 years ago
by
Samuel Helbling
Browse files
Options
Downloads
Patches
Plain Diff
changed const char * to String
parent
575a12e6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.cpp
+4
-4
4 additions, 4 deletions
src/main.cpp
with
4 additions
and
4 deletions
src/main.cpp
+
4
−
4
View file @
ab3d7aa9
...
...
@@ -3,8 +3,8 @@
#include
<Arduino.h>
#include
"Sensor_LSM9DS1.h"
void
printData
(
const
XYZ
<
float
>
&
,
const
char
*
,
const
char
*
);
void
printValue
(
const
char
*
,
float
,
const
char
*
);
void
printData
(
const
XYZ
<
float
>
&
,
String
,
String
);
void
printValue
(
String
,
float
,
String
);
void
tab
();
void
newLine
();
...
...
@@ -66,7 +66,7 @@ void loop()
}
void
printData
(
const
XYZ
<
float
>
&
data
,
const
char
*
sensor
,
const
char
*
unit
)
void
printData
(
const
XYZ
<
float
>
&
data
,
String
sensor
,
String
unit
)
{
// TODO: Print the values (x,y & z) for one sensor. Show the sensor type (sensor) first,
// and use the printValue() method from below to show one value of the sensor.
...
...
@@ -75,7 +75,7 @@ void printData(const XYZ<float> & data, const char * sensor, const char * unit)
}
void
printValue
(
const
char
*
name
,
float
value
,
const
char
*
unit
)
void
printValue
(
String
name
,
float
value
,
String
unit
)
{
//TODO: Print the value according to the following format: "{name}: {value} {unit}".
// The { } just denote where you need to use the parameters of this method.
...
...
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