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)
205
205
video_set_ctrl (video_dev , & ctrl );
206
206
}
207
207
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
+ }
212
212
213
213
#if DT_HAS_CHOSEN (zephyr_display )
214
214
const struct device * const display_dev = DEVICE_DT_GET (DT_CHOSEN (zephyr_display ));
@@ -267,11 +267,9 @@ int main(void)
267
267
LOG_DBG ("Got frame %u! size: %u; timestamp %u ms" , frame ++ , vbuf -> bytesused ,
268
268
vbuf -> timestamp );
269
269
270
- #ifdef CONFIG_TEST
271
- if (is_colorbar_ok (vbuf -> buffer , fmt )) {
270
+ if (IS_ENABLED (CONFIG_TEST ) && is_colorbar_ok (vbuf -> buffer , fmt )) {
272
271
LOG_DBG ("Pattern OK!\n" );
273
272
}
274
- #endif
275
273
276
274
#if DT_HAS_CHOSEN (zephyr_display )
277
275
video_display_frame (display_dev , vbuf , fmt );
You can’t perform that action at this time.
0 commit comments