Solve warnings
This commit is contained in:
@@ -21,6 +21,14 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
/*Check dependencies*/
|
||||
#if LV_OBJ_FREE_P == 0
|
||||
#error "lv_app: Free pointer is required for application. Enable it lv_conf.h: LV_OBJ_FREE_P 1"
|
||||
#endif
|
||||
|
||||
#if DM_CUSTOM == 0 && DM_MEM_SIZE < (2 * 1024)
|
||||
#error "lv_app: not enough dynamic memory. Increase it in misc_conf.h: DM_MEM_SIZE"
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_app_fsel.h"
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_FSEL != 0
|
||||
|
||||
#include <stdio.h>
|
||||
#include "lv_app_notice.h"
|
||||
@@ -15,9 +15,6 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
#define LV_APP_FSEL_FN_MAX_LEN 128
|
||||
#define LV_APP_FSEL_PATH_MAX_LEN 256
|
||||
#define LV_APP_FSEL_PAGE_SIZE 8
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
||||
@@ -10,11 +10,24 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_app.h"
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_FSEL != 0
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
/*Add the required configurations*/
|
||||
#ifndef LV_APP_FSEL_FN_MAX_LEN
|
||||
#define LV_APP_FSEL_FN_MAX_LEN 128
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_FSEL_PATH_MAX_LEN
|
||||
#define LV_APP_FSEL_PATH_MAX_LEN 256
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_FSEL_PAGE_SIZE
|
||||
#define LV_APP_FSEL_PAGE_SIZE 8
|
||||
#endif
|
||||
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_app_kb.h"
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_KB != 0
|
||||
|
||||
#include "lvgl/lv_objx/lv_btnm.h"
|
||||
#include "lvgl/lv_objx/lv_ta.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "../lv_app.h"
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_KB != 0
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_app_notice.h"
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_NOTICE != 0
|
||||
|
||||
#include <lvgl/lv_objx/lv_cont.h>
|
||||
#include "lvgl/lv_objx/lv_label.h"
|
||||
@@ -18,23 +18,6 @@
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
/*Add the required configurations*/
|
||||
#ifndef LV_APP_NOTICE_SHOW_TIME
|
||||
#define LV_APP_NOTICE_SHOW_TIME 4000
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_NOTICE_CLOSE_ANIM_TIME
|
||||
#define LV_APP_NOTICE_CLOSE_ANIM_TIME 300
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef LV_APP_NOTICE_MAX_NUM
|
||||
#define LV_APP_NOTICE_MAX_NUM 6
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_NOTICE_MAX_LEN
|
||||
#define LV_APP_NOTICE_MAX_LEN 256
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
||||
@@ -11,11 +11,28 @@
|
||||
*********************/
|
||||
#include "../lv_app.h"
|
||||
#include <stdarg.h>
|
||||
#if LV_APP_ENABLE != 0
|
||||
#if USE_LV_APP_NOTICE != 0
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
/*Add the required configurations*/
|
||||
#ifndef LV_APP_NOTICE_SHOW_TIME
|
||||
#define LV_APP_NOTICE_SHOW_TIME 4000
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_NOTICE_CLOSE_ANIM_TIME
|
||||
#define LV_APP_NOTICE_CLOSE_ANIM_TIME 300
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_NOTICE_MAX_NUM
|
||||
#define LV_APP_NOTICE_MAX_NUM 6
|
||||
#endif
|
||||
|
||||
#ifndef LV_APP_NOTICE_MAX_LEN
|
||||
#define LV_APP_NOTICE_MAX_LEN 256
|
||||
#endif
|
||||
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
|
||||
@@ -283,7 +283,7 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p, const lv_style_
|
||||
if(txt[i] == ' ') {
|
||||
/*Get the parameter*/
|
||||
if(i - par_start == LABEL_RECOLOR_PAR_LENGTH) {
|
||||
char buf[LABEL_RECOLOR_PAR_LENGTH];
|
||||
char buf[LABEL_RECOLOR_PAR_LENGTH + 1];
|
||||
memcpy(buf, &txt[par_start], LABEL_RECOLOR_PAR_LENGTH);
|
||||
buf[LABEL_RECOLOR_PAR_LENGTH] = '\0';
|
||||
int r,g,b;
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include <lv_conf.h>
|
||||
#include <lvgl/lv_draw/lv_draw.h>
|
||||
#include <misc/gfx/anim.h>
|
||||
#include <lvgl/lv_obj/lv_dispi.h>
|
||||
#include <lvgl/lv_obj/lv_obj.h>
|
||||
#include <lvgl/lv_obj/lv_refr.h>
|
||||
#include "lv_conf.h"
|
||||
#include "lvgl/lv_draw/lv_draw.h"
|
||||
#include "lvgl/lv_obj/lv_dispi.h"
|
||||
#include "lvgl/lv_obj/lv_obj.h"
|
||||
#include "lvgl/lv_obj/lv_refr.h"
|
||||
#include "lvgl/lv_app/lv_app.h"
|
||||
#include "lvgl/lv_draw/lv_draw_rbasic.h"
|
||||
#include "misc/gfx/anim.h"
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
@@ -138,7 +139,9 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
|
||||
lv_obj_set_design_f(new_obj, lv_obj_design);
|
||||
|
||||
/*Set free data*/
|
||||
#if LV_OBJ_FREE_NUM != 0
|
||||
new_obj->free_num = 0;
|
||||
#endif
|
||||
#if LV_OBJ_FREE_P != 0
|
||||
new_obj->free_p = NULL;
|
||||
#endif
|
||||
@@ -179,7 +182,9 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
|
||||
lv_obj_set_design_f(new_obj, lv_obj_design);
|
||||
|
||||
/*Set free data*/
|
||||
#if LV_OBJ_FREE_NUM != 0
|
||||
new_obj->free_num = 0;
|
||||
#endif
|
||||
#if LV_OBJ_FREE_P != 0
|
||||
new_obj->free_p = NULL;
|
||||
#endif
|
||||
@@ -202,7 +207,9 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
|
||||
new_obj->ext_size = copy->ext_size;
|
||||
|
||||
/*Set free data*/
|
||||
#if LV_OBJ_FREE_NUM != 0
|
||||
new_obj->free_num = copy->free_num;
|
||||
#endif
|
||||
#if LV_OBJ_FREE_P != 0
|
||||
new_obj->free_p = copy->free_p;
|
||||
#endif
|
||||
|
||||
@@ -602,7 +602,7 @@ static void lv_label_refr_text(lv_obj_t * label)
|
||||
ext->dot_tmp[i] = ext->txt[index - LV_LABEL_DOT_NUM + i];
|
||||
ext->txt[index - LV_LABEL_DOT_NUM + i] = '.';
|
||||
}
|
||||
/*The last character is '\0'*/
|
||||
/*The last character is '\0'. Save this character from the text too.*/
|
||||
ext->dot_tmp[i] = ext->txt[index];
|
||||
ext->txt[index] = '\0';
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ typedef struct
|
||||
/*New data for this type */
|
||||
char * txt; /*Text of the label*/
|
||||
lv_label_long_mode_t long_mode; /*Determinate what to do with the long texts*/
|
||||
char dot_tmp[LV_LABEL_DOT_NUM]; /*Store the character which are replaced by dots (Handled by the library)*/
|
||||
char dot_tmp[LV_LABEL_DOT_NUM + 1]; /*Store the character which are replaced by dots (Handled by the library)*/
|
||||
uint16_t dot_end; /*The text end position in dot mode (Handled by the library)*/
|
||||
uint8_t static_txt :1; /*Flag to indicate the text is static*/
|
||||
uint8_t recolor :1; /*Enable in-line letter re-coloring*/
|
||||
|
||||
@@ -428,8 +428,6 @@ void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
|
||||
cord_t scrlable_y = lv_obj_get_y(ext->scrl);
|
||||
cord_t page_h = lv_obj_get_height(page);
|
||||
|
||||
bool refr = false;
|
||||
|
||||
cord_t top_err = -(scrlable_y + obj_y);
|
||||
cord_t bot_err = scrlable_y + obj_y + obj_h - page_h;
|
||||
|
||||
@@ -440,7 +438,6 @@ void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
|
||||
/*Calculate a new position and to let scrable_rects.vpad space above*/
|
||||
scrlable_y = -(obj_y - style_scrl->vpad - style->vpad);
|
||||
scrlable_y += style_scrl->vpad;
|
||||
refr = true;
|
||||
}
|
||||
/*Out of the page on the bottom*/
|
||||
else if((obj_h <= page_h && bot_err > 0) ||
|
||||
@@ -449,7 +446,9 @@ void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
|
||||
scrlable_y = -obj_y;
|
||||
scrlable_y += page_h - obj_h;
|
||||
scrlable_y -= style_scrl->vpad;
|
||||
refr = true;
|
||||
} else {
|
||||
/*Alraedy in focus*/
|
||||
return;
|
||||
}
|
||||
|
||||
if(anim_time == 0) {
|
||||
|
||||
Reference in New Issue
Block a user