BigW Consortium Gitlab

Unverified Commit a55d02dd by Gabor Kiss-Vamosi Committed by GitHub

Merge pull request #158 from Zaltora/patch-1

Non constant declaration
parents 13351c00 02d318e6
......@@ -18,34 +18,32 @@ Homepage: https://littlevgl.com
## Key features
* Powerful building blocks buttons, charts, lists, sliders, images etc
* Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
* Various input devices touch pad, mouse, keyboard, encoder etc
* Various input devices touch pad, mouse, keyboard, encoder, buttons etc
* Multi language support with UTF-8 decoding
* Fully customizable graphical elements
* Hardware independent to use with any microcontroller or display
* Scalable to operate with few memory (80 kB Flash, 10 kB RAM)
* Scalable to operate with few memory (50 kB Flash, 10 kB RAM)
* OS, External memory and GPU supported but not required
* Single frame buffer operation even with advances graphical effects
* Written in C for maximal compatibility
* Simulator to develop on PC without embedded hardware
* Tutorials, examples, themes for rapid development
* Advanced support and professional GUI development service
* Documentation and API references online
* Free and open-source under MIT licence
## Porting
In the most sime case you need 4 things:
1. Call `lv_tick_inc(1)` in every millisecods in a Timer or Task
2. Register a function which can **copy a pixel array** to an area of the screen
2. Register a function which can **copy a pixel array** to an area of the screen.
3. Register a function which can **read an input device**. (E.g. touch pad)
4. Call `lv_task_handler()` periodically in every few milliseconds ()
4. Call `lv_task_handler()` periodically in every few milliseconds
For more information visit https://littlevgl.com/porting
Or check the [Porting tutorial](https://github.com/littlevgl/lv_examples/blob/master/lv_tutorial/0_porting/lv_tutorial_porting.c)
## Project set-up
1. **Clone** or download the lvgl repository: `git clone https://github.com/littlevgl/lvgl.git`
1. **Clone** or [Download](https://littlevgl.com/download) the lvgl repository: `git clone https://github.com/littlevgl/lvgl.git`
2. **Create project** with your prefered IDE and add the *lvgl* folder
3. Copy **lvgl/lv_conf_templ.h** as **lv_conf.h** next to the *lvgl* folder
4. In the *_conf.h files delete the first `#if 0` and its `#endif`. Let the default configurations at first.
4. In the lv_conf.h delete the first `#if 0` and its `#endif`. Let the default configurations at first.
5. In your *main.c*: #include "lvgl/lvgl.h"
6. In your *main function*:
* lvgl_init();
......@@ -71,5 +69,4 @@ See [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIB
## Donate
If you are pleased with the graphics library, found it useful or be happy with the support you got, please help its further development:
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GJV3SC5EHDANS)
[![Donate](https://littlevgl.com/donate_dir/donate_btn.png)](https://littlevgl.com/donate)
......@@ -4,20 +4,16 @@ Major versions released typically when API changes are required
## Contributing
Please create an issue to suggest a new feature instead of adding pull request to this file.
## v6 (released at: in progrss)
- [ ] Add the basic functions (e.g. lv_obj_set_width) to every object type as inline
- [ ] Image storage with header (#65)
- [ ] Font anti-alias: use 1 bit and grayscale fonts too (better result then downscaling)
- [ ] LV_ANTIALIAS_FONT removal (use other font instead)
- [ ] Store image anti-alias in header
- [ ] lv_img_upscale removal (generate image with anti-alias flag instead)
- [ ] LV_ANTIALIAS_LINE
- [ ] LV_ANTIALAIS_RADIUS
- [ ] LV_ANTIALIAS removal (use other specific anti-alias options)
- [ ] web based image converter
- [ ] web based font converter
## v6 (released on: in progrss)
- [ ] lv_img_upscale removal (generate image with with opacity instead)
- [ ] disp_map and disp_fill removal
- [ ] disp_flush, mem_blend, mem_fill rework: usea lv_area_t as parameter an GPU support 2D area
- [ ] disp_flush: not const color map
- [ ] ext size removal, enable drawing on full parent.
- [ ] multiple display support
- [ ] lv_ufs removal (was required only in the the old image system)
## v5 (released at: 20.12.2017)
## v5 (released on: 20.12.2017)
**Architectural changes**
- [x] Rename repository from *proj_pc* to *pc_simulator*
- [x] Integrate *hal* in LittlevGL as a normal folder
......
......@@ -13,22 +13,43 @@ Here are ideas which are not assigned to a minor version yet:
- lv_inlist: new object type, inline drop down list (a button wich opens a list in place)
- lv_char: new_object type: characteristic set (like chart with draggable points)
- lv_vol: new_object type: volume meter (like a bar with segments)
- anim. paths: monentum (tnh(x)), curve (exp), shake
- hover, hover_lost signals
- Anim. paths: monentum (tnh(x)), curve (exp), shake
- Hover, hover_lost signals
- Detached area (for video rendering where LittlevGL don't put pixels)
- lv_ta: add placeholder text
- image rotate
## v5.1 (released at: in progress)
- [x] LV_INV_FULL_ROW and LV_INV_FULL_COL to force full row or column invalidation (refresh)
## v5.2 (in progress)
- [ ] Lua interface to craete GUI with script
- [ ] Font handling extension for effective Chiese font handling (cutsom read functions)
- [ ] lv_group: different default style_mod function with LV_COLOR_DEPTH 1
- [ ] lv_img_set_data() for const. image data instead of file system usage
- [ ] Arabic glyph convert (based on letter position)
- [ ] Right-to-left write support
- [ ] Detached area (for video rendering where LittlevGL don't put pixels)
- [ ] lv_ta: add placeholder text
- [ ] lv_ibtn: new object type: an image wich acts as a button (different image for different states)
- [ ] Bit based VDB: 1, 2 or 4 bit
- [ ] lv_icon: new object type: an image wich acts as a button
- [ ] lv_table: new object type: a table with rows and colums
- [ ] triangle drawing
- [ ] user defined error callback
- [ ] Support more character coding (e.g. UTF8, UTF16 etc)
## v5.1 (released on: 09.03.2018)
- [x] lv_refr_set_roundig_callback: set a function to modify the invalidated area for special display controllers
- [x] lv_group_set_focus_callback: set function to call when a new object is focused #94
- [x] lv_obj_get_type() return string, e.g. "lv_slider", "lv_btn" etc #91
- [x] Font handling extension for effective Chiese font handling (cutsom read functions)
- [x] Remove LV_FONT_ANTIALIAS and add fonts with BPP (bit-per-pixel): 1, 2, 4 and 8
- [x] lv_img: add pixel level opacity option (ARGB8888 or ARGB8565) (make image upscale pointless)
- [x] LV_ANTIALIAS rework: meaning anti-alias lines and curves
- [x] Merge symbol fonts (basic, file and feedback) into one font
- [x] lv_group: different default style_mod function with LV_COLOR_DEPTH 1
- [x] lv_img_set_src() to handle file path, symbols and const variables with one function
- [x] LV_PROTECT_PRESS_LOST: prevent the input devices to NOT find new object when the object's pressing is lost
- [x] lv_label: draw style.body.padding.hor/ver greater body if body_draw is enabled
- [x] LV_LAYOUT_PRETTY: in one row align obeóject vertically to middle
- [x] Add user data option to lv_indev_drv_t and pass it with lv_indev_data_t to the read function. #115
- [x] LV_GROUP_KEY_ENTER_LONG: sent by the library on long press of LV_GROUP_KEY_ENTER to trigger long press of the object #113
- [x] LV_INDEV_TYPE_BUTTON: for a hatdware buttons which press a point on a screen
## v5.0 (released at: 20.12.2017)
## v5.0 (released on: 20.12.2017)
- [x] UTF-8 support
- [x] lv_tabview: new object type to organise content with tabs
- [x] lv_sw: new object type, switch, turn on/off by tap (a little slider)
......@@ -39,7 +60,7 @@ Here are ideas which are not assigned to a minor version yet:
- [x] add themes with predefined styles
- [x] partial border draw in styles
## v4.2 (released at: 17.08.2017)
## v4.2 (released on: 17.08.2017)
- [x] Double VDB support: one for rendering, another to transfer former rendered image to frame buffer in the background (e.g. with DMA) [#15](https://github.com/littlevgl/lvgl/issues/15)
- [x] lv_group: to control without touch pad. Issue [#14](https://github.com/littlevgl/lvgl/issues/14)
- [x] lv_page: scrl def fit modification: hor:false, ver:true, and always set width to parent width
......
# TODOs for patch versions
Patch versions (x.y.1, x.y.2) contain bugfixes without changing the API but they can apppear in minor (x.1.0, x.2.0) or major (1.0.0, 2.0.0) versions too.
Bugfixes are done in `bugfix` branche.
The bugfixes of the still not released version are in `beta` branche.
## Contributing
Please create an issue to introduce a bug instead of adding pull request to this file.
## v5.0.2 (released at: 19.01.2018)
## v5.1.1 (in progress)
- [ ] lv_line: set line.width ext. size to not trim parts on x = 0, y = 0 coordinates
## v5.0.3 (released on: 09.03.2018)
- [x] lv_chart: Fix the use of point_num more then 256 (Thanks to upbeat27)
- [x] lv_label: fix 'offset' with LV_ANTIALIAS (LV_LABEL_LONG_ROLL was effected)
- [x] lv_label: anim. time wasn't allyed for LV_LABEL_LONG_ROLL
- [x] lv_txt_ut8_size fiy for 4 byte characters
- [x] lv_slider: fix knob_in with not zero min value
- [x] lv_area_is_on: handled some cases wrong
- [x] lv_indev: buffered indevs (return *true* in indev_read) was handled as non-buffered
- [x] drag: don't invalidate if the object wasn't moved
## v5.0.2 (released on: 19.01.2018)
- [x] Fix dependencied (Thanks to Zaltora)
- [x] lv_group: fix memory leak (Thanks to BenQoo)
- [x] LV_INDEV_READ_PERIOD 0 build bugfix
......@@ -17,21 +28,21 @@ Please create an issue to introduce a bug instead of adding pull request to this
- [x] lv_roller: add missing action handling
- [x] Set 24 bit colors upper byte (alpha) to 0xFF
## v5.0.1 (released at: 02.01.2018)
## v5.0.1 (released on: 02.01.2018)
- [x] lv_list: fixed when mouse and keyboard used together
- [x] lv_btnm: fix bottom border visibility
- [x] theme updates
- [x] line width fix width anti-aliasing
- [x] lv_conf_templ.h add more info
## v5.0 (released at: 21.12.2017)
## v5.0 (released on: 21.12.2017)
- [x] lv_btnm: check hide code (\177) at 0. byte position too (if width is not specified)
- [x] lv_img: define *lv_img_raw_header* in *lv_draw.h* because now lv_img can't be disabled
- [x] lv_list: ignore image related things when *lv_img* is not enebled
- [x] lv_ta: fix hegiht if *one_line* and *FONT_ANTIALIAS*
- [x] lv_obj_set_style: fix to update self style too (not only children)
## v4.2 (released at: 17.08.2017)
## v4.2 (released on: 17.08.2017)
- [x] lv_slider: don't let indicator or bar to disappear because of hpad/vpad
- [x] lv_ta: memory leak if deleted in password mode
- [x] lv_list: work without *lv_img* by ignore the image file name parameter of *lv_list_add()*
......@@ -28,7 +28,7 @@
/**********************
* STATIC VARIABLES
**********************/
static lv_color_t letter_bg_color = LV_COLOR_WHITE;
static lv_color_t letter_bg_color;
/**********************
* MACROS
......
......@@ -276,7 +276,13 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
for(col = col_start; col < col_end; col ++) {
letter_px = (*map_p & mask) >> (8 - col_bit - bpp);
if(letter_px != 0) {
*vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, bpp == 8 ? letter_px : bpp_opa_table[letter_px]);
if(opa == LV_OPA_COVER) {
*vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, bpp == 8 ? letter_px : bpp_opa_table[letter_px]);
} else {
*vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, bpp == 8 ?
(uint16_t)((uint16_t)letter_px * opa) >> 8 :
(uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8);
}
}
vdb_buf_tmp++;
......
......@@ -200,6 +200,7 @@ void lv_disp_mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color)
*/
bool lv_disp_is_mem_blend_supported(void)
{
if(active == NULL) return false;
if(active->driver.mem_blend) return true;
else return false;
}
......@@ -210,6 +211,7 @@ bool lv_disp_is_mem_blend_supported(void)
*/
bool lv_disp_is_mem_fill_supported(void)
{
if(active == NULL) return false;
if(active->driver.mem_fill) return true;
else return false;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#include <stdint.h>
#include "../lv_font.h"
#if USE_LV_FONT_SYMBOL_20 != 0 /*Can be enabled in lv_conf.h*/
/***********************************************************************************
* fontawesome-webfont.ttf 20 px Font in U+f000 () .. U+f2ee () range with 2 bpp
* Sparse font with only these characters: 
* fontawesome-webfont.ttf 20 px Font in U+f000 () .. U+f2ee () range with 1 bpp
* Sparse font with only these characters:     
***********************************************************************************/
/*Store the image of the letters (glyph)*/
......@@ -1603,7 +1602,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
/*Unicode: U+f04c () , Width: 16 */
0x00, 0x00, 0x00, 0x00, //................
0x00, 0x00, 0x00, 0x00, //................
0x00, 0x00, 0x00, 0x00, //................
0xff, 0xf8, 0x2f, 0xff, //@@@@@@%..%@@@@@@
0xff, 0xfc, 0x3f, 0xff, //@@@@@@@..@@@@@@@
......@@ -1622,7 +1621,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
0xff, 0xfc, 0x3f, 0xff, //@@@@@@@..@@@@@@@
0xff, 0xf8, 0x2f, 0xff, //@@@@@@%..%@@@@@@
0x15, 0x50, 0x05, 0x54, //.+++++....+++++.
0x00, 0x00, 0x00, 0x00, //................
0x00, 0x00, 0x00, 0x00, //................
/*Unicode: U+f04d () , Width: 17 */
......@@ -2502,7 +2501,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
/*Unicode: U+f015 () , Width: 18 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x69, 0x80, 0x00, //........++..+%%...
......@@ -2519,7 +2518,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
0x00, 0x0f, 0xff, 0xfb, 0x00, 0xbf, 0xff, 0xf0, 0x00, //...@@@@%..%@@@@...
0x00, 0x0f, 0xff, 0xfb, 0x00, 0xbf, 0xff, 0xf0, 0x00, //...@@@@%..%@@@@...
0x00, 0x0d, 0xff, 0xfb, 0x00, 0xbf, 0xff, 0xd0, 0x00, //...@@@@%..%@@@@...
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
......@@ -2847,7 +2846,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
/*Unicode: U+f053 () , Width: 12 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............
0x00, 0x00, 0x00, 0x00, 0x9d, 0x10, //........%@..
0x00, 0x00, 0x00, 0x09, 0xff, 0xd1, //.......%@@@.
0x00, 0x00, 0x00, 0x9f, 0xff, 0xf8, //......%@@@@%
......@@ -2865,7 +2864,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
0x00, 0x00, 0x00, 0xaf, 0xff, 0xf7, //......%@@@@+
0x00, 0x00, 0x00, 0x0a, 0xff, 0xe2, //.......%@@@.
0x00, 0x00, 0x00, 0x00, 0xae, 0x20, //........%@..
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //............
......@@ -3654,7 +3653,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
/*Unicode: U+f015 () , Width: 18 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x74, 0x70, 0x00, 0x00, 0x60, 0x92, 0x8a, 0x00, 0x00, 0x00, //........++..+%%...
......@@ -3671,7 +3670,7 @@ static const uint8_t lv_font_symbol_20_glyph_bitmap[] =
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbe, 0x00, 0x00, 0xbe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@@@%..%@@@@...
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xbe, 0x00, 0x00, 0xbe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, //...@@@@%..%@@@@...
0x00, 0x00, 0x00, 0xdc, 0xff, 0xff, 0xff, 0xbe, 0x00, 0x00, 0xbe, 0xff, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, //...@@@@%..%@@@@...
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //..................
......@@ -4848,11 +4847,11 @@ lv_font_t lv_font_symbol_20 =
.unicode_last = 241, /*Last Unicode letter in this font*/
#endif
.h_px = 20, /*Font height in pixels*/
.get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph bitmap*/
.get_width = lv_font_get_width_continuous, /*Function pointer to get glyph width*/
.glyph_bitmap = lv_font_symbol_20_glyph_bitmap, /*Bitmap of glyphs*/
.glyph_dsc = lv_font_symbol_20_glyph_dsc, /*Description of glyphs*/
.unicode_list = NULL, /*Characters are stored in order*/
.unicode_list = NULL,
.get_bitmap = lv_font_get_bitmap_continuous, /*Function pointer to get glyph's bitmap*/
.get_width = lv_font_get_width_continuous, /*Function pointer to get glyph's width*/
#if USE_LV_FONT_SYMBOL_20 == 1
.bpp = 1, /*Bit per pixel*/
#elif USE_LV_FONT_SYMBOL_20 == 2
......
......@@ -10,6 +10,7 @@ CSRCS += lv_color.c
CSRCS += lv_txt.c
CSRCS += lv_ufs.c
CSRCS += lv_trigo.c
CSRCS += lv_math.c
DEPPATH += --dep-path lvgl/lv_misc
VPATH += :lvgl/lv_misc
......
......@@ -130,7 +130,7 @@ LV_ATTRIBUTE_TASK_HANDLER void lv_task_handler(void)
*/
lv_task_t* lv_task_create(void (*task) (void *), uint32_t period, lv_task_prio_t prio, void * param)
{
lv_task_t* new_lv_task;
lv_task_t* new_lv_task = NULL;
lv_task_t* tmp;
/*Create task lists in order of priority from high to low*/
......
......@@ -775,8 +775,9 @@ static void lv_label_refr_text(lv_obj_t * label)
anim.act_time = 0;
anim.end_cb = NULL;
anim.path = lv_anim_path_linear;
anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') + style->text.letter_space) * 1000) /ext->anim_speed)
* ANIM_WAIT_CHAR_COUNT;
anim.playback_pause = (((lv_font_get_width(style->text.font, ' ') +
style->text.letter_space) * 1000) / ext->anim_speed) * ANIM_WAIT_CHAR_COUNT;
anim.repeat_pause = anim.playback_pause;
if(lv_obj_get_width(label) > lv_obj_get_width(parent)) {
......
......@@ -57,7 +57,7 @@ extern "C" {
#define LVGL_VERSION_MAJOR 5
#define LVGL_VERSION_MINOR 1
#define LVGL_VERSION_PATCH 0
#define LVGL_VERSION_INFO "beta"
#define LVGL_VERSION_INFO ""
/**********************
* TYPEDEFS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment