Demo updates to fix compile issues.
This commit is contained in:
parent
5f8ca40ef0
commit
fe6708c7a2
8 changed files with 12 additions and 9 deletions
8
demos/3rdparty/bubbles/main.c
vendored
8
demos/3rdparty/bubbles/main.c
vendored
|
@ -60,7 +60,7 @@ void matrix (int16_t xyz[3][N], color_t col[N])
|
||||||
xyz[0][i] = x;
|
xyz[0][i] = x;
|
||||||
xyz[1][i] = y;
|
xyz[1][i] = y;
|
||||||
|
|
||||||
d = sqrtf(x * x + y * y); /* originally a fastsqrt() call */
|
d = sqrt(x * x + y * y); /* originally a fastsqrt() call */
|
||||||
s = sine[(t * 30) % SCALE] + SCALE;
|
s = sine[(t * 30) % SCALE] + SCALE;
|
||||||
|
|
||||||
xyz[2][i] = sine[(d + s) % SCALE] * sine[(t * 10) % SCALE] / SCALE / 2;
|
xyz[2][i] = sine[(d + s) % SCALE] * sine[(t * 10) % SCALE] / SCALE / 2;
|
||||||
|
@ -151,11 +151,11 @@ int main (void)
|
||||||
|
|
||||||
gfxInit();
|
gfxInit();
|
||||||
|
|
||||||
chThdSleepMilliseconds (10);
|
gfxSleepMilliseconds (10);
|
||||||
gdispClear (background); /* glitches.. */
|
gdispClear (background); /* glitches.. */
|
||||||
chThdSleepMilliseconds (10);
|
gfxSleepMilliseconds (10);
|
||||||
gdispClear (background); /* glitches.. */
|
gdispClear (background); /* glitches.. */
|
||||||
chThdSleepMilliseconds (10);
|
gfxSleepMilliseconds (10);
|
||||||
gdispClear (background); /* glitches.. */
|
gdispClear (background); /* glitches.. */
|
||||||
|
|
||||||
width = (uint16_t)gdispGetWidth();
|
width = (uint16_t)gdispGetWidth();
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
#define GDISP_NEED_CLIP TRUE
|
#define GDISP_NEED_CLIP TRUE
|
||||||
#define GDISP_NEED_TEXT TRUE
|
#define GDISP_NEED_TEXT TRUE
|
||||||
#define GDISP_NEED_CIRCLE TRUE
|
#define GDISP_NEED_CIRCLE TRUE
|
||||||
#define GDISP_NEED_CONTROL TRUE
|
|
||||||
#define GDISP_NEED_MULTITHREAD TRUE
|
#define GDISP_NEED_MULTITHREAD TRUE
|
||||||
|
|
||||||
/* Builtin Fonts */
|
/* Builtin Fonts */
|
||||||
|
|
|
@ -79,7 +79,6 @@ int main(void) {
|
||||||
|
|
||||||
gfxInit();
|
gfxInit();
|
||||||
ginputGetMouse(0);
|
ginputGetMouse(0);
|
||||||
gdispSetOrientation(GDISP_ROTATE_90);
|
|
||||||
|
|
||||||
drawScreen();
|
drawScreen();
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ int main(void) {
|
||||||
case GEVENT_GWIN_CHECKBOX:
|
case GEVENT_GWIN_CHECKBOX:
|
||||||
if (((GEventGWinCheckbox*)pe)->checkbox == ghCheckbox1) {
|
if (((GEventGWinCheckbox*)pe)->checkbox == ghCheckbox1) {
|
||||||
// The state of our checkbox has changed
|
// The state of our checkbox has changed
|
||||||
printf("Checkbox state: %d\r\n", ((GEventGWinCheckbox*)pe)->isChecked);
|
//printf("Checkbox state: %d\r\n", ((GEventGWinCheckbox*)pe)->isChecked);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
/* GFX sub-systems to turn on */
|
/* GFX sub-systems to turn on */
|
||||||
#define GFX_USE_GDISP TRUE
|
#define GFX_USE_GDISP TRUE
|
||||||
#define GFX_USE_GWIN TRUE
|
#define GFX_USE_GWIN TRUE
|
||||||
|
#define GFX_USE_GMISC TRUE
|
||||||
|
|
||||||
/* Features for the GDISP sub-system. */
|
/* Features for the GDISP sub-system. */
|
||||||
#define GDISP_NEED_VALIDATION TRUE
|
#define GDISP_NEED_VALIDATION TRUE
|
||||||
|
@ -48,5 +49,8 @@
|
||||||
#define GWIN_NEED_WINDOWMANAGER TRUE
|
#define GWIN_NEED_WINDOWMANAGER TRUE
|
||||||
#define GWIN_NEED_GRAPH TRUE
|
#define GWIN_NEED_GRAPH TRUE
|
||||||
|
|
||||||
|
/* Features for the GMISC subsystem. */
|
||||||
|
#define GMISC_NEED_FASTTRIG TRUE
|
||||||
|
|
||||||
#endif /* _GFXCONF_H */
|
#endif /* _GFXCONF_H */
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
#define GWIN_NEED_WINDOWMANAGER TRUE
|
#define GWIN_NEED_WINDOWMANAGER TRUE
|
||||||
#define GWIN_NEED_WIDGET TRUE
|
#define GWIN_NEED_WIDGET TRUE
|
||||||
|
#define GWIN_NEED_LABEL TRUE
|
||||||
#define GWIN_NEED_LIST TRUE
|
#define GWIN_NEED_LIST TRUE
|
||||||
#define GWIN_NEED_LIST_IMAGES TRUE
|
#define GWIN_NEED_LIST_IMAGES TRUE
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ int main(void) {
|
||||||
|
|
||||||
switch(pe->type) {
|
switch(pe->type) {
|
||||||
case GEVENT_GWIN_RADIO:
|
case GEVENT_GWIN_RADIO:
|
||||||
printf("group: %u radio: %s\n", ((GEventGWinRadio *)pe)->group, gwinGetText(((GEventGWinRadio *)pe)->radio));
|
//printf("group: %u radio: %s\n", ((GEventGWinRadio *)pe)->group, gwinGetText(((GEventGWinRadio *)pe)->radio));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -77,7 +77,7 @@ int main(void) {
|
||||||
|
|
||||||
switch(pe->type) {
|
switch(pe->type) {
|
||||||
case GEVENT_GWIN_SLIDER:
|
case GEVENT_GWIN_SLIDER:
|
||||||
printf("Slider %s = %d\n", gwinGetText(((GEventGWinSlider *)pe)->slider), ((GEventGWinSlider *)pe)->position);
|
//printf("Slider %s = %d\n", gwinGetText(((GEventGWinSlider *)pe)->slider), ((GEventGWinSlider *)pe)->position);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue