From 4297a26b948c2bdaa128fb2bc52447ca2de50f33 Mon Sep 17 00:00:00 2001 From: Aleksandr Kutuzov Date: Wed, 17 Apr 2024 22:11:14 +0900 Subject: [PATCH] Examples: cleanup example_adc a little bit --- applications/examples/example_adc/example_adc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/applications/examples/example_adc/example_adc.c b/applications/examples/example_adc/example_adc.c index 8674b9ccc37..53f8d5c12d4 100644 --- a/applications/examples/example_adc/example_adc.c +++ b/applications/examples/example_adc/example_adc.c @@ -157,10 +157,8 @@ int32_t example_adc_main(void* p) { } } else { for(size_t i = 0; i < data.count; i++) { - if(data.items[i].converter) { - data.items[i].value = data.items[i].converter( - adc_handle, furi_hal_adc_read(adc_handle, data.items[i].pin->channel)); - } + data.items[i].value = data.items[i].converter( + adc_handle, furi_hal_adc_read(adc_handle, data.items[i].pin->channel)); } view_port_update(view_port); }