Adapt OSD in plugin lib to be greylib compatible.

Requires addition of viewports and alternate framebuffers to greylib
which are essentially similar to the core implementation except that
the framebuffer can be any size and relationship to a viewport. Drawing
is always fully clipped to the intersecting area.

Adapt oscilloscope.c to the API change. FFT will use the new features
(later update).

Get rid of silly and wrong lcd_bmp_part use in OSD. Remove it from
plugin API (must be made incompatible now).

Change-Id: Iafa5e2174148fb8ad11db6b9d4add0dcabc5c563
This commit is contained in:
Michael Sevakis 2012-12-07 01:50:52 -05:00
parent f668c36241
commit 371c86bf3f
11 changed files with 1057 additions and 356 deletions

View file

@ -677,10 +677,11 @@ bool grey_init(unsigned char *gbuf, long gbuf_size,
_grey_info.bheight = bdim;
#endif
_grey_info.flags = features & 0xff;
_grey_info.fg_brightness = 0;
_grey_info.bg_brightness = 255;
_grey_info.drawmode = DRMODE_SOLID;
_grey_info.curfont = FONT_SYSFIXED;
/* default viewport and settings */
grey_set_viewport(NULL);
grey_viewport_set_fullscreen(NULL, SCREEN_MAIN);
grey_set_framebuffer(NULL);
/* precalculate the value -> pattern index conversion table, taking
linearisation and gamma correction into account */