Minor update
This commit is contained in:
parent
7ab5f451f5
commit
4c789a8b37
@ -248,17 +248,18 @@ bool loopReadGravity() {
|
||||
angle, tempC, gravity, corrGravity);
|
||||
#endif
|
||||
|
||||
LOG_PERF_START("loop-push");
|
||||
bool pushExpired = (abs((int32_t)(millis() - pushMillis)) >
|
||||
(myConfig.getSleepInterval() * 1000));
|
||||
|
||||
if (pushExpired || runMode == RunMode::gravityMode) {
|
||||
pushMillis = millis();
|
||||
LOG_PERF_START("loop-push");
|
||||
PushTarget push;
|
||||
push.send(angle, gravitySG, corrGravitySG, tempC,
|
||||
(millis() - runtimeMillis) / 1000);
|
||||
LOG_PERF_STOP("loop-push");
|
||||
LOG_PERF_PUSH();
|
||||
}
|
||||
LOG_PERF_STOP("loop-push");
|
||||
return true;
|
||||
} else {
|
||||
Log.error(F("MAIN: No gyro value found, the device might be moving."));
|
||||
|
@ -75,8 +75,6 @@ void PushTarget::send(float angle, float gravitySG, float corrGravitySG,
|
||||
sendMqtt(engine, myConfig.isMqttSSL());
|
||||
LOG_PERF_STOP("push-mqtt");
|
||||
}
|
||||
|
||||
LOG_PERF_PUSH();
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user