From df47565bd987cc877855962dce61c3213da9a6f0 Mon Sep 17 00:00:00 2001 From: Kiss-Vamosi Gabor Date: Sun, 15 Jan 2017 21:52:21 +0100 Subject: [PATCH] lv_img, lv_gauge: test depedencies --- lv_objx/lv_gauge.h | 19 +++++++++++++++++++ lv_objx/lv_img.h | 9 ++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lv_objx/lv_gauge.h b/lv_objx/lv_gauge.h index 3fce08ac3..ed7c8531c 100644 --- a/lv_objx/lv_gauge.h +++ b/lv_objx/lv_gauge.h @@ -10,8 +10,27 @@ * INCLUDES *********************/ #include "lv_conf.h" +#include "misc_conf.h" #if USE_LV_GAUGE != 0 +/*Testing of dependencies*/ +#if USE_LV_RECT == 0 +#error "lv_gauge: lv_rect is required. Enable it in lv_conf.h (USE_LV_RECT 1) " +#endif + +#if USE_LV_LABEL == 0 +#error "lv_gauge: lv_label is required. Enable it in lv_conf.h (USE_LV_LABEL 1) " +#endif + +#if USE_LV_RECT == 0 +#error "lv_gauge: lv_line is required. Enable it in lv_conf.h (USE_LV_LINE 1) " +#endif + +#if USE_TRIGO == 0 +#error "lv_gauge: trigo is required. Enable it in misc_conf.h (USE_TRIGO 1) " +#endif + + #include "../lv_obj/lv_obj.h" #include "lv_rect.h" #include "lv_label.h" diff --git a/lv_objx/lv_img.h b/lv_objx/lv_img.h index 1efe16114..c5a8e4295 100644 --- a/lv_objx/lv_img.h +++ b/lv_objx/lv_img.h @@ -13,6 +13,14 @@ #include "misc_conf.h" #if USE_LV_IMG != 0 && USE_FSINT != 0 && USE_UFS != 0 +#if USE_FSINT == 0 +#error "lv_img: fsint is required. Enable it in misc_conf.h (USE_FSINT 1) " +#endif + +#if USE_UFS == 0 +#error "lv_img: ufs is required. Enable it in misc_conf.h (USE_UFS 1) " +#endif + #include "../lv_obj/lv_obj.h" #include "misc/fs/fsint.h" @@ -116,7 +124,6 @@ void lv_img_set_auto_size(lv_obj_t * img, bool en); /** * Enable the upscaling with LV_DOWNSCALE. - * If enabled the object size will be same as the picture size. * @param img pointer to an image * @param en true: upscale enable, false: upscale disable */