Adding moving info on html

This commit is contained in:
Magnus Persson
2022-02-14 21:48:34 +01:00
parent b43874d151
commit 10ce1fc245
3 changed files with 22 additions and 9 deletions

View File

@ -78,7 +78,11 @@ void WebServerHandler::webHandleConfig() {
doc[PARAM_PASS] = ""; // dont show the wifi password
double angle = myGyro.getAngle();
double angle = 0;
if (myGyro.hasValue())
angle = myGyro.getAngle();
double tempC = myTempSensor.getTempC(myConfig.isGyroTemp());
double gravity = calculateGravity(angle, tempC);