Adjusted error handling and formula deviation

This commit is contained in:
Magnus Persson
2022-07-27 07:52:03 +02:00
parent 51e7ee6867
commit 8ee882c522
3 changed files with 13 additions and 10 deletions

View File

@ -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;