mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user