mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-29 16:37:17 +02:00
validateChannel implementation
This commit is contained in:
@ -727,4 +727,12 @@ String Measurements::agValueTypeStr(AgValueType type) {
|
||||
};
|
||||
|
||||
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