File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
samples/drivers/video/capture/src Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -205,10 +205,10 @@ int main(void)
205205 video_set_ctrl (video_dev , & ctrl );
206206 }
207207
208- #ifdef CONFIG_TEST
209- ctrl .id = VIDEO_CID_TEST_PATTERN ;
210- video_set_ctrl (video_dev , & ctrl );
211- #endif
208+ if ( IS_ENABLED ( CONFIG_TEST )) {
209+ ctrl .id = VIDEO_CID_TEST_PATTERN ;
210+ video_set_ctrl (video_dev , & ctrl );
211+ }
212212
213213#if DT_HAS_CHOSEN (zephyr_display )
214214 const struct device * const display_dev = DEVICE_DT_GET (DT_CHOSEN (zephyr_display ));
@@ -267,11 +267,9 @@ int main(void)
267267 LOG_DBG ("Got frame %u! size: %u; timestamp %u ms" , frame ++ , vbuf -> bytesused ,
268268 vbuf -> timestamp );
269269
270- #ifdef CONFIG_TEST
271- if (is_colorbar_ok (vbuf -> buffer , fmt )) {
270+ if (IS_ENABLED (CONFIG_TEST ) && is_colorbar_ok (vbuf -> buffer , fmt )) {
272271 LOG_DBG ("Pattern OK!\n" );
273272 }
274- #endif
275273
276274#if DT_HAS_CHOSEN (zephyr_display )
277275 video_display_frame (display_dev , vbuf , fmt );
You can’t perform that action at this time.
0 commit comments