Skip to content

Commit cdbe98a

Browse files
authored
Merge pull request #42 from biomurph/master
fixed bug so functions return things
2 parents 94a697c + a0ac973 commit cdbe98a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=PulseSensor Playground
2-
version=1.4.4
2+
version=1.4.5
33
author=Joel Murphy, Yury Gitman, Brad Needham
44
maintainer=Joel Murphy, Yury Gitman
55
sentence=Support at PulseSensor.com

src/PulseSensorPlayground.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void PulseSensorPlayground::setOutputType(byte outputType) {
191191

192192
void PulseSensorPlayground::setThreshold(int threshold, int sensorIndex) {
193193
if (sensorIndex != constrain(sensorIndex, 0, SensorCount)) {
194-
return; // out of range.
194+
return -1; // out of range.
195195
}
196196
Sensors[sensorIndex].setThreshold(threshold);
197197
}
@@ -210,14 +210,14 @@ void PulseSensorPlayground::outputToSerial(char s, int d) {
210210

211211
int PulseSensorPlayground::getPulseAmplitude(int sensorIndex) {
212212
if (sensorIndex != constrain(sensorIndex, 0, SensorCount)) {
213-
return; // out of range.
213+
return -1; // out of range.
214214
}
215215
return Sensors[sensorIndex].getPulseAmplitude();
216216
}
217217

218218
unsigned long PulseSensorPlayground::getLastBeatTime(int sensorIndex) {
219219
if (sensorIndex != constrain(sensorIndex, 0, SensorCount)) {
220-
return; // out of range.
220+
return -1; // out of range.
221221
}
222222
return Sensors[sensorIndex].getLastBeatTime();
223223
}

0 commit comments

Comments
 (0)