diff --git a/src/AgValue.cpp b/src/AgValue.cpp index 541edc1..38c29d1 100644 --- a/src/AgValue.cpp +++ b/src/AgValue.cpp @@ -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); + } } \ No newline at end of file