pre-commit updates

This commit is contained in:
Magnus Persson
2022-04-04 23:16:24 +02:00
parent 2d67a44ad0
commit c779a45ea9
16 changed files with 236 additions and 208 deletions

View File

@ -65,7 +65,7 @@ Config::Config() {
//
void Config::createJson(DynamicJsonDocument& doc) {
doc[PARAM_MDNS] = getMDNS();
//doc[PARAM_CONFIG_VER] = getConfigVersion();
// doc[PARAM_CONFIG_VER] = getConfigVersion();
doc[PARAM_ID] = getID();
doc[PARAM_OTA] = getOtaURL();
doc[PARAM_SSID] = getWifiSSID();
@ -300,10 +300,11 @@ bool Config::loadFile() {
_formulaData.g[4] = doc[PARAM_FORMULA_DATA]["g5"].as<double>();
/*if( doc[PARAM_CONFIG_VER].isNull() ) {
// If this parameter is missing we need to reset the gyrocalibaration due to bug #29
_gyroCalibration.ax = _gyroCalibration.ay = _gyroCalibration.az = 0;
_gyroCalibration.gx = _gyroCalibration.gy = _gyroCalibration.gz = 0;
Log.warning(F("CFG : Old configuration format, clearing gyro calibration." CR));
// If this parameter is missing we need to reset the gyrocalibaration due to
bug #29 _gyroCalibration.ax = _gyroCalibration.ay = _gyroCalibration.az = 0;
_gyroCalibration.gx = _gyroCalibration.gy = _gyroCalibration.gz = 0;
Log.warning(F("CFG : Old configuration format, clearing gyro calibration."
CR));
}*/
_saveNeeded = false; // Reset save flag