From 191dbc088a36bca40d740f3e0e1ac17373be2b4e Mon Sep 17 00:00:00 2001 From: Tectu Date: Tue, 26 Jun 2012 21:48:12 +0200 Subject: [PATCH] added guiDrawWheel() dummy --- gui.c | 25 +++++++++++++++++++++++++ gui.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/gui.c b/gui.c index 0ecaf52d..ad285374 100644 --- a/gui.c +++ b/gui.c @@ -179,3 +179,28 @@ uint8_t guiDrawSlider(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_ return 1; } +uint8_t guiDrawWheel(uint16_t x0, uint16_t y0, uint16_t radius1, uint16_t radius2, uint16_t bkColor, uint16_t valueColor, uint8_t *active, uint8_t *value) { + struct guiNode_t *newNode; + + newNode = chHeapAlloc(NULL, sizeof(struct guiNode_t)); + if(newNode == NULL) + return 0; + + newNode->type = wheel; + newNode->x0 = x0; + newNode->y0 = y0; + newNode->r1 = radius1; + newNode->r2 = radius2; + newNode->active = active; + newNode->state = value; + + if(addNode(newNode) != 1) + return 0; + + // lcdDraw functions + + chHeapFree(newNode); + + return 1; +} + diff --git a/gui.h b/gui.h index 9d1842da..54f93d27 100644 --- a/gui.h +++ b/gui.h @@ -12,6 +12,8 @@ static struct guiNode_t { uint16_t y0; uint16_t x1; uint16_t y1; + uint16_t r1; + uint16_t r2; uint8_t orientation; uint8_t *active; uint8_t *state;