diff --git a/src/calc.cpp b/src/calc.cpp index 0eca4f3..7e44264 100644 --- a/src/calc.cpp +++ b/src/calc.cpp @@ -99,10 +99,10 @@ int createFormula(RawFormulaData &fd, char *formulaBuffer, // If the deviation is more than 2 degress we mark it as failed. if (dev * 1000 > myAdvancedConfig.getMaxFormulaCreationDeviation()) { char s[120]; - snprintf( - &s[0], sizeof(s), - "CALC: Validation failed on angle %f, deviation too large %.8f, formula order %d", - fd.a[i], dev, order); + snprintf(&s[0], sizeof(s), + "CALC: Validation failed on angle %f, deviation too large " + "%.8f, formula order %d", + fd.a[i], dev, order); ErrorFileLog errLog; errLog.addEntry(&s[0]); valid = false; diff --git a/src/config.hpp b/src/config.hpp index 5f9b26d..35ab386 100644 --- a/src/config.hpp +++ b/src/config.hpp @@ -54,10 +54,10 @@ struct RawFormulaData { class AdvancedConfig { private: - int _wifiPortalTimeout = 120; // seconds - int _wifiConnectTimeout = 20; // seconds - float _maxFormulaCreationDeviation = 1.6; // SG - float _defaultCalibrationTemp = 20.0; // C + int _wifiPortalTimeout = 120; // seconds + int _wifiConnectTimeout = 20; // seconds + float _maxFormulaCreationDeviation = 3; // SG + float _defaultCalibrationTemp = 20.0; // C int _gyroSensorMovingThreashold = 500; int _tempSensorResolution = 9; // bits int _gyroReadCount = 50; diff --git a/src/webserver.cpp b/src/webserver.cpp index 310b74c..2b2821c 100644 --- a/src/webserver.cpp +++ b/src/webserver.cpp @@ -789,10 +789,13 @@ void WebServerHandler::webHandleFormulaRead() { doc[PARAM_ERROR] = "Internal error creating formula."; break; case ERR_FORMULA_NOTENOUGHVALUES: - doc[PARAM_ERROR] = "Not enough values to create formula."; + doc[PARAM_ERROR] = + "Not enough values to create formula, need at least 3 angles."; break; case ERR_FORMULA_UNABLETOFFIND: - doc[PARAM_ERROR] = "Unable to find an accurate formula based on input."; + doc[PARAM_ERROR] = + "Unable to find an accurate formula based on input, check error log " + "and graph below."; break; default: doc[PARAM_GRAVITY_FORMULA] = myConfig.getGravityFormula();