forked from airgradienthq/arduino
validateChannel implementation
This commit is contained in:
@ -727,4 +727,12 @@ String Measurements::agValueTypeStr(AgValueType type) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Measurements::validateChannel(int ch) {
|
||||||
|
if (ch != 1 && ch != 2) {
|
||||||
|
Serial.printf("ERROR! Channel %d is undefined. Only channel 1 or 2 is the optional value!", ch);
|
||||||
|
delay(1000);
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user