validateChannel implementation

This commit is contained in:
samuelbles07
2024-10-14 01:54:55 +07:00
parent ac838efdb5
commit a2c19438c0

View File

@ -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);
}
}