examples/foc: print aling results only when verbose output enabled

it is a costly operation that takes a lot of time and is not of much value
This commit is contained in:
raiden00pl
2024-10-12 17:36:35 +02:00
committed by Xiang Xiao
parent 103bf83608
commit 1aacc99491
2 changed files with 6 additions and 6 deletions

View File

@@ -121,11 +121,11 @@ static int foc_motor_align(FAR struct foc_motor_b16_s *motor, FAR bool *done)
goto errout;
}
PRINTF("Aling results:\n");
PRINTFV("Aling results:\n");
#ifdef CONFIG_INDUSTRY_FOC_ALIGN_DIR
PRINTF(" dir = %.2f\n", b16tof(final.dir));
PRINTFV(" dir = %.2f\n", b16tof(final.dir));
#endif
PRINTF(" offset = %.2f\n", b16tof(final.offset));
PRINTFV(" offset = %.2f\n", b16tof(final.offset));
*done = true;
}

View File

@@ -121,11 +121,11 @@ static int foc_motor_align(FAR struct foc_motor_f32_s *motor, FAR bool *done)
goto errout;
}
PRINTF("Aling results:\n");
PRINTFV("Aling results:\n");
#ifdef CONFIG_INDUSTRY_FOC_ALIGN_DIR
PRINTF(" dir = %.2f\n", final.dir);
PRINTFV(" dir = %.2f\n", final.dir);
#endif
PRINTF(" offset = %.2f\n", final.offset);
PRINTFV(" offset = %.2f\n", final.offset);
*done = true;
}