#63 tilt validation

This commit is contained in:
Magnus Persson
2022-05-01 18:07:16 +02:00
parent 7ede9a6d19
commit a3cd3217ab
13 changed files with 126 additions and 57 deletions

View File

@ -275,6 +275,11 @@ bool loopReadGravity() {
bool pushExpired = (abs((int32_t)(millis() - pushMillis)) >
(myConfig.getSleepInterval() * 1000));
if (myAdvancedConfig.isIgnoreLowAnges() && (angle < myConfig.getFormulaData().a[0]) ) {
Log.warning(F("Main: Angle is lower than water, so we regard this as faulty and dont send any data." CR));
pushExpired = false;
}
if (pushExpired || runMode == RunMode::gravityMode) {
pushMillis = millis();
LOG_PERF_START("loop-push");