Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SmartHome
NodeManager_GasSensor
Commits
8dc5c706
Commit
8dc5c706
authored
Oct 29, 2017
by
Reinhold Kainhofer
Browse files
Fix some more compiler warnings (missing return value)
parent
a554214b
Changes
1
Hide whitespace changes
Inline
Side-by-side
NodeManager.cpp
View file @
8dc5c706
...
...
@@ -3350,7 +3350,7 @@ int NodeManager::registerSensor(int sensor_type, int pin, int child_id) {
// attach a built-in or custom sensor to this manager
int
NodeManager
::
registerSensor
(
Sensor
*
sensor
)
{
if
(
sensor
->
getChildId
()
>
MAX_SENSORS
)
return
;
if
(
sensor
->
getChildId
()
>
MAX_SENSORS
)
return
-
1
;
#if DEBUG == 1
Serial
.
print
(
F
(
"REG I="
));
Serial
.
print
(
sensor
->
getChildId
());
...
...
@@ -3390,7 +3390,7 @@ Sensor* NodeManager::getSensor(int child_id) {
// assign a different child id to a sensor'
bool
NodeManager
::
renameSensor
(
int
old_child_id
,
int
new_child_id
)
{
if
(
old_child_id
>
MAX_SENSORS
||
new_child_id
>
MAX_SENSORS
)
return
;
if
(
old_child_id
>
MAX_SENSORS
||
new_child_id
>
MAX_SENSORS
)
return
false
;
// ensure the old id exists and the new is available
if
(
_sensors
[
old_child_id
]
==
0
||
_sensors
[
new_child_id
]
!=
0
)
return
false
;
// assign the sensor to new id
...
...
Write
Preview
Supports
Markdown
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