samples: drivers: video: capture: logging improvements

Remove trailing spaces at the end of log string.
Move arguments on the next line for readability.
Align arguments to first line.

Signed-off-by: Josuah Demangeon <me@josuah.net>
This commit is contained in:
Josuah Demangeon 2025-05-18 15:26:33 +00:00 committed by Benjamin Cabé
commit b95d7e2a94

View file

@ -37,10 +37,10 @@ static inline int display_setup(const struct device *const display_dev, const ui
LOG_INF("- Capabilities:");
LOG_INF(" x_resolution = %u, y_resolution = %u, supported_pixel_formats = %u"
" current_pixel_format = %u, current_orientation = %u",
capabilities.x_resolution, capabilities.y_resolution,
capabilities.supported_pixel_formats, capabilities.current_pixel_format,
capabilities.current_orientation);
" current_pixel_format = %u, current_orientation = %u",
capabilities.x_resolution, capabilities.y_resolution,
capabilities.supported_pixel_formats, capabilities.current_pixel_format,
capabilities.current_orientation);
/* Set display pixel format to match the one in use by the camera */
switch (pixfmt) {
@ -138,9 +138,9 @@ int main(void)
const struct video_format_cap *fcap = &caps.format_caps[i];
/* fourcc to string */
LOG_INF(" %s width [%u; %u; %u] height [%u; %u; %u]",
VIDEO_FOURCC_TO_STR(fcap->pixelformat),
fcap->width_min, fcap->width_max, fcap->width_step,
fcap->height_min, fcap->height_max, fcap->height_step);
VIDEO_FOURCC_TO_STR(fcap->pixelformat),
fcap->width_min, fcap->width_max, fcap->width_step,
fcap->height_min, fcap->height_max, fcap->height_step);
i++;
}
@ -173,7 +173,7 @@ int main(void)
if (!video_get_frmival(video_dev, &frmival)) {
LOG_INF("- Default frame rate : %f fps",
1.0 * frmival.denominator / frmival.numerator);
1.0 * frmival.denominator / frmival.numerator);
}
LOG_INF("- Supported frame intervals for the default format:");
@ -181,12 +181,12 @@ int main(void)
fie.format = &fmt;
while (video_enum_frmival(video_dev, &fie) == 0) {
if (fie.type == VIDEO_FRMIVAL_TYPE_DISCRETE) {
LOG_INF(" %u/%u ", fie.discrete.numerator, fie.discrete.denominator);
LOG_INF(" %u/%u", fie.discrete.numerator, fie.discrete.denominator);
} else {
LOG_INF(" [min = %u/%u; max = %u/%u; step = %u/%u]",
fie.stepwise.min.numerator, fie.stepwise.min.denominator,
fie.stepwise.max.numerator, fie.stepwise.max.denominator,
fie.stepwise.step.numerator, fie.stepwise.step.denominator);
fie.stepwise.min.numerator, fie.stepwise.min.denominator,
fie.stepwise.max.numerator, fie.stepwise.max.denominator,
fie.stepwise.step.numerator, fie.stepwise.step.denominator);
}
fie.index++;
}
@ -268,8 +268,8 @@ int main(void)
return 0;
}
LOG_DBG("Got frame %u! size: %u; timestamp %u ms", frame++, vbuf->bytesused,
vbuf->timestamp);
LOG_DBG("Got frame %u! size: %u; timestamp %u ms",
frame++, vbuf->bytesused, vbuf->timestamp);
#ifdef CONFIG_TEST
if (is_colorbar_ok(vbuf->buffer, fmt)) {