Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeManager_BMP280_Stamp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SmartHome
NodeManager_BMP280_Stamp
Commits
b6401a26
Commit
b6401a26
authored
8 years ago
by
user2684
Browse files
Options
Downloads
Patches
Plain Diff
SensorThermistor class is limited int value #64
parent
dcc7e621
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NodeManager.cpp
+2
-2
2 additions, 2 deletions
NodeManager.cpp
NodeManager.h
+4
-4
4 additions, 4 deletions
NodeManager.h
with
6 additions
and
6 deletions
NodeManager.cpp
+
2
−
2
View file @
b6401a26
...
@@ -394,7 +394,7 @@ SensorThermistor::SensorThermistor(int child_id, int pin): Sensor(child_id, pin)
...
@@ -394,7 +394,7 @@ SensorThermistor::SensorThermistor(int child_id, int pin): Sensor(child_id, pin)
}
}
// setter/getter
// setter/getter
void
SensorThermistor
::
setNominalResistor
(
int
value
)
{
void
SensorThermistor
::
setNominalResistor
(
long
value
)
{
_nominal_resistor
=
value
;
_nominal_resistor
=
value
;
}
}
void
SensorThermistor
::
setNominalTemperature
(
int
value
)
{
void
SensorThermistor
::
setNominalTemperature
(
int
value
)
{
...
@@ -403,7 +403,7 @@ void SensorThermistor::setNominalTemperature(int value) {
...
@@ -403,7 +403,7 @@ void SensorThermistor::setNominalTemperature(int value) {
void
SensorThermistor
::
setBCoefficient
(
int
value
)
{
void
SensorThermistor
::
setBCoefficient
(
int
value
)
{
_b_coefficient
=
value
;
_b_coefficient
=
value
;
}
}
void
SensorThermistor
::
setSeriesResistor
(
int
value
)
{
void
SensorThermistor
::
setSeriesResistor
(
long
value
)
{
_series_resistor
=
value
;
_series_resistor
=
value
;
}
}
void
SensorThermistor
::
setOffset
(
float
value
)
{
void
SensorThermistor
::
setOffset
(
float
value
)
{
...
...
This diff is collapsed.
Click to expand it.
NodeManager.h
+
4
−
4
View file @
b6401a26
...
@@ -387,13 +387,13 @@ class SensorThermistor: public Sensor {
...
@@ -387,13 +387,13 @@ class SensorThermistor: public Sensor {
public:
public:
SensorThermistor
(
int
child_id
,
int
pin
);
SensorThermistor
(
int
child_id
,
int
pin
);
// resistance at 25 degrees C (default: 10000)
// resistance at 25 degrees C (default: 10000)
void
setNominalResistor
(
int
value
);
void
setNominalResistor
(
long
value
);
// temperature for nominal resistance (default: 25)
// temperature for nominal resistance (default: 25)
void
setNominalTemperature
(
int
value
);
void
setNominalTemperature
(
int
value
);
// The beta coefficient of the thermistor (default: 3950)
// The beta coefficient of the thermistor (default: 3950)
void
setBCoefficient
(
int
value
);
void
setBCoefficient
(
int
value
);
// the value of the resistor in series with the thermistor (default: 10000)
// the value of the resistor in series with the thermistor (default: 10000)
void
setSeriesResistor
(
int
value
);
void
setSeriesResistor
(
long
value
);
// set a temperature offset
// set a temperature offset
void
setOffset
(
float
value
);
void
setOffset
(
float
value
);
// define what to do at each stage of the sketch
// define what to do at each stage of the sketch
...
@@ -402,10 +402,10 @@ class SensorThermistor: public Sensor {
...
@@ -402,10 +402,10 @@ class SensorThermistor: public Sensor {
void
onLoop
();
void
onLoop
();
void
onReceive
(
const
MyMessage
&
message
);
void
onReceive
(
const
MyMessage
&
message
);
protected:
protected:
int
_nominal_resistor
=
10000
;
long
_nominal_resistor
=
10000
;
int
_nominal_temperature
=
25
;
int
_nominal_temperature
=
25
;
int
_b_coefficient
=
3950
;
int
_b_coefficient
=
3950
;
int
_series_resistor
=
10000
;
long
_series_resistor
=
10000
;
float
_offset
=
0
;
float
_offset
=
0
;
};
};
...
...
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