--- /dev/null
+#define Bluetooth_icon_width 24
+#define Bluetooth_icon_height 24
+static unsigned char Bluetooth_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x6c, 0x00,
+ 0x10, 0xcc, 0x00, 0x30, 0x8c, 0x01, 0x60, 0x0c, 0x03, 0xc0, 0x0c, 0x06,
+ 0x80, 0x0d, 0x03, 0x00, 0x8f, 0x01, 0x00, 0xce, 0x00, 0x00, 0x7c, 0x00,
+ 0x00, 0x3c, 0x00, 0x00, 0x6e, 0x00, 0x00, 0xcf, 0x00, 0x80, 0x8d, 0x01,
+ 0xc0, 0x0c, 0x03, 0x60, 0x0c, 0x06, 0x30, 0x0c, 0x03, 0x10, 0x8c, 0x01,
+ 0x00, 0xcc, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00,
+ };
#include "LcdDisplay.h"
+void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_t width, const uint8_t height, const void *bmp)
+{
+ uint8_t x, y;
+ uint8_t *cb;
+
+ // we only draw set pixel, unset pixel remain as they are
+ for (y=0; y<height; y++) {
+ for (x=0; x<width; x++) {
+ cb = (uint8_t *)(bmp + (y * ((width / 8)+((width % 8) ? 1:0))) + (x / 8));
+ if (*cb & (1 << (x % 8)))
+ hal_lcd_set_pixel(xstart + x, ystart + y, TRUE);
+ }
+ }
+}
+
void DrawLcdLineBresenham(u8t xstart, u8t ystart, u8t xend, u8t yend)
{
int x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
// #include "oswald_hal.h"
+void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_t width, const uint8_t height, const void *bmp);
void DrawLcdLineBresenham(u8t xstart, u8t ystart, u8t xend, u8t yend);
void DrawLcdLineBresenhamWW(u8t xstart, u8t ystart, u8t xend, u8t yend, u8t thickness);
u8t WriteLcdCharacter(u8t x, u8t y, u8t Character);
--- /dev/null
+#define Oswald_width 80
+#define Oswald_height 96
+static const char Oswald_bits[] = {
+ 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, 0xC0, 0x0F,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x3F, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xF0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF,
+ 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFE, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xBA, 0x01, 0x00, 0x00, 0xF8,
+ 0x3F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x00, 0x00, 0xF0, 0x7F, 0x00,
+ 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00,
+ 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0xE0, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF,
+ 0xFF, 0x0F, 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x3F,
+ 0x00, 0xC0, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x7F, 0x00, 0xC0,
+ 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0x00, 0x80, 0x7F, 0x00,
+ 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0x03, 0x80, 0x3F, 0x00, 0x00, 0x00,
+ 0xE0, 0xFF, 0xFF, 0xFF, 0x07, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x59,
+ 0xE9, 0xFF, 0x0F, 0xC0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC,
+ 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF,
+ 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0x83, 0x0F, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x01, 0x0F, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0C, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x10, 0x18, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x83, 0x07, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x83, 0x07, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81,
+ 0x0F, 0x7C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x07, 0x7C,
+ 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC3, 0x07, 0x7C, 0x38, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x07, 0x7C, 0x38, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x87, 0x07, 0x7C, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xCF, 0x07, 0x7C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF,
+ 0x87, 0x7C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xF0, 0x03,
+ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0xF8, 0x03, 0x16, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xF8, 0x03, 0x13, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x1A, 0xF0, 0x81, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x34, 0x00, 0xC0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8,
+ 0x01, 0x38, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xF7, 0xCF,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x58, 0xFC, 0x1E, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xE0, 0x9F, 0xFF, 0x67, 0xFE, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xF8, 0xBF, 0xF0, 0x63, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x00,
+ 0xFC, 0xFF, 0xE6, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xDF, 0xFF,
+ 0xDF, 0xA2, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x80, 0xE1, 0xEF, 0x00, 0xF1,
+ 0xB6, 0x63, 0x00, 0x00, 0x00, 0x40, 0x00, 0x74, 0x00, 0xF0, 0x13, 0x80,
+ 0x00, 0x00, 0x00, 0x70, 0x00, 0x96, 0x00, 0x9C, 0x21, 0x00, 0x01, 0x00,
+ 0x00, 0x48, 0xC0, 0x89, 0x03, 0x27, 0xC1, 0x00, 0x01, 0x00, 0x00, 0x64,
+ 0xD1, 0xC8, 0xFE, 0x66, 0x82, 0x11, 0x01, 0x00, 0x00, 0x3C, 0x33, 0x44,
+ 0x06, 0x3C, 0x02, 0x91, 0x03, 0x00, 0x00, 0x10, 0x11, 0x84, 0x03, 0x00,
+ 0x02, 0xB3, 0x04, 0x00, 0x00, 0xE0, 0x09, 0x04, 0x01, 0x00, 0x02, 0xB1,
+ 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x00, 0x00, 0x02, 0x91, 0x05, 0x00,
+ 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x07, 0x9E, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x0C, 0x00, 0x00, 0x04, 0xE0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80,
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0xA4, 0xC7, 0x07, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x78, 0xF9, 0x0F, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xFE, 0x0F, 0xFE, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xFF, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
+ 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xE0,
+ 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xE0, 0x1F, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x00, 0xF0, 0x1F, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xFF, 0x01, 0xFC, 0x2F, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0xFF, 0x05, 0xF2, 0xF3, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xD4, 0xFC,
+ 0x04, 0x02, 0x3C, 0x00, 0x03, 0x00, 0x00, 0x80, 0xEF, 0x01, 0x0C, 0x8E,
+ 0x07, 0x00, 0x02, 0x00, 0x00, 0xC0, 0x00, 0x07, 0x1E, 0xF9, 0x03, 0x00,
+ 0x04, 0x00, 0x00, 0x20, 0x00, 0xFC, 0xB1, 0x81, 0x00, 0x00, 0x06, 0x00,
+ 0x00, 0x10, 0x00, 0x30, 0xE0, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0xE0, 0x3C, 0x00, 0x80, 0x05, 0x00, 0x00, 0x38, 0x00, 0x00, 0xF8, 0x83,
+ 0x07, 0xE0, 0x02, 0x00, 0x00, 0x78, 0x00, 0x00, 0x6F, 0x7E, 0xFE, 0x3E,
+ 0x03, 0x00, 0x00, 0xD0, 0x01, 0x30, 0x30, 0xC0, 0x81, 0xC3, 0x01, 0x00,
+ 0x00, 0x20, 0xFF, 0x4F, 0x0F, 0x00, 0x0E, 0x78, 0x00, 0x00, 0x00, 0xC0,
+ 0x09, 0xFA, 0x00, 0x00, 0xF8, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x07,
+ 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,
+ };
--- /dev/null
+#define alarm_icon_width 24
+#define alarm_icon_height 24
+static unsigned char alarm_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38,
+ 0x1e, 0xff, 0x78, 0xce, 0xff, 0x73, 0xe6, 0x00, 0x67, 0x70, 0x18, 0x0e,
+ 0x38, 0x18, 0x1c, 0x18, 0x18, 0x18, 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30,
+ 0x0c, 0x18, 0x30, 0x0c, 0xf8, 0x31, 0x0c, 0xf8, 0x31, 0x0c, 0x00, 0x30,
+ 0x0c, 0x00, 0x30, 0x0c, 0x00, 0x30, 0x18, 0x00, 0x18, 0x38, 0x00, 0x1c,
+ 0x70, 0x00, 0x0e, 0xe0, 0x00, 0x07, 0xc0, 0xff, 0x03, 0x00, 0xff, 0x00,
+ };
--- /dev/null
+#define battery0_icon_width 15
+#define battery0_icon_height 20
+static unsigned char battery0_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22,
+ 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22,
+ 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define battery100_icon_width 15
+#define battery100_icon_height 20
+static unsigned char battery100_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define battery25_icon_width 15
+#define battery25_icon_height 20
+static unsigned char battery25_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22,
+ 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22,
+ 0x00, 0x22, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define battery50_icon_width 15
+#define battery50_icon_height 20
+static unsigned char battery50_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x22, 0x00, 0x22, 0x00, 0x22,
+ 0x00, 0x22, 0x00, 0x22, 0x00, 0x22, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define battery75_icon_width 15
+#define battery75_icon_height 20
+static unsigned char battery75_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x22, 0x00, 0x22, 0x00, 0x3e,
+ 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define bluetooth_icon_width 15
+#define bluetooth_icon_height 20
+static unsigned char bluetooth_icon_bits[] = {
+ 0x10, 0x00, 0x30, 0x00, 0x54, 0x00, 0x38, 0x00, 0x54, 0x00, 0x30, 0x00,
+ 0x10, 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, };
--- /dev/null
+#define charger_icon_width 15
+#define charger_icon_height 20
+static unsigned char charger_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x28, 0x00, 0x7c, 0x00,
+ 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
+ 0x10, 0x00, 0x10, 0x00, };
--- /dev/null
+#define downbutton_icon_width 15
+#define downbutton_icon_height 20
+static unsigned char downbutton_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+ 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x80, 0x7f, 0x00, 0x3f,
+ 0x00, 0x1e, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define lapsebutton_icon_width 15
+#define lapsebutton_icon_height 20
+static unsigned char lapsebutton_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61,
+ 0x00, 0x63, 0x00, 0x67, 0xc0, 0x6f, 0xc0, 0x6f, 0x00, 0x67, 0x00, 0x63,
+ 0x00, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
gdk_draw_point(GDK_DRAWABLE(ui_g->pixmap), state ? ui_g->darea->style->black_gc : ui_g->darea->style->white_gc, ix, iy+1);
gdk_draw_point(GDK_DRAWABLE(ui_g->pixmap), state ? ui_g->darea->style->black_gc : ui_g->darea->style->white_gc, ix+1, iy+1);
-// gtk_widget_queue_draw(ui_g->darea);
}
/* updates the actual LCD so that drawing becomes visible */
gtk_widget_queue_draw(ui_g->darea);
}
+static bluetooth_state bt_state = BLUETOOTH_OFF;
+static boolean bt_visible = FALSE;
+
+bluetooth_state hal_bluetooth_set_state(bluetooth_state state)
+{
+ bt_state = state;
+ if (bt_state == BLUETOOTH_OFF)
+ bt_visible = FALSE;
+
+ return bt_state;
+}
+
+bluetooth_state hal_bluetooth_get_state(void)
+{
+ return bt_state;
+}
+
+uint8_t *hal_bluetooth_get_local_bdaddr(void)
+{
+ static uint8_t local_bdaddr[6] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55};
+
+ return local_bdaddr;
+}
+
+void hal_bluetooth_set_visible(boolean visible)
+{
+ bt_visible = visible;
+}
+
+boolean hal_bluetooth_get_visible(void)
+{
+ return bt_visible;
+}
+
+void hal_bluetooth_send_data(const void *mdat, uint16_t mlen)
+{
+ g_printerr("write comm %d\n", mlen);
+}
+
static gint
configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer user_data)
{
#ifndef _OSWALD_H
#define _OSWALD_H
+#include <stdio.h>
+#include <string.h>
#include <stdint.h>
//#define DEBUG 1
IDLE_SCREEN = 0,
ALARM_SETUP_SCREEN,
STOP_WATCH_SCREEN,
+ BLUETOOTH_SCREEN,
ACCEL_DISPLAY_SCREEN,
MENU_TEST_SCREEN,
// APPLICATION_SCREEN,
#include "oswald_graphics.h"
+#if 0
void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_t width, const uint8_t height, const void *bmp)
{
uint8_t x, y;
+ uint8_t *cb;
// we only draw set pixel, unset pixel remain as they are
for (y=0; y<height; y++) {
for (x=0; x<width; x++) {
- hal_lcd_set_pixel(x, y, TRUE);
+ cb = (uint8_t *)(bmp + (y * ((width / 8)+((width % 8) ? 1:0))) + (x / 8));
+ if (*cb & (1 << (x % 8)))
+ hal_lcd_set_pixel(xstart + x, ystart + y, TRUE);
}
}
}
+#endif
void oswald_draw_Line(uint8_t xstart, uint8_t ystart, uint8_t xend, uint8_t yend)
{
- int x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
+ uint8_t x, y, t, dx, dy, incx, incy, pdx, pdy, ddx, ddy, es, el, err;
dx = xend - xstart;
dy = yend - ystart;
#include "oswald_graphics.h"
+void oswald_draw_bitmap(const uint8_t xstart, const uint8_t ystart, const uint8_t width, const uint8_t height, const void *bmp);
+
void oswald_draw_Line(uint8_t xstart, uint8_t ystart, uint8_t xend, uint8_t yend);
void oswald_draw_line_ww(u8t xstart, u8t ystart, u8t xend, u8t yend, u8t thickness);
void hal_vibration_set_state(boolean state);
boolean hal_vibration_get_state(void);
+bluetooth_state hal_bluetooth_set_state(bluetooth_state state);
+bluetooth_state hal_bluetooth_get_state(void);
+uint8_t *hal_bluetooth_get_local_bdaddr(void);
+void hal_bluetooth_set_visible(boolean visible);
+boolean hal_bluetooth_get_visible(void);
+void hal_bluetooth_send_data(const void *mdat, uint16_t mlen);
#endif
watch_screen OswaldScreens[SCREENS_END];
power_state OswaldPowerState;
u8t backlight_safety_off = 0;
+char MainMessage[148];
+
void oswald_change_to_screen(screen_number screen_id)
{
OswaldState.screen->event_func(EVENT_AMBIENTLIGHT_UPDATE, &light_level);
}
+void oswald_handle_comm_input(uint16_t mlen, const void *mdat)
+{
+ char *icmd = (char *) mdat;
+
+ if (icmd[0] == '$') {
+ if (strncmp(icmd, "$GRT", 4) == 0) { // get current RTC
+ char rtime[16];
+ snprintf(rtime, 10, "%02d%02d%02d\n", OswaldClk.hour, OswaldClk.minute, OswaldClk.second);
+ hal_bluetooth_send_data(rtime, strlen(rtime));
+ } else if (strncmp(icmd, "$MSG", 4) == 0) { // message on main screen
+ char *msg = (icmd+4);
+ mlen -= 4;
+ memset(MainMessage, 0, 148);
+ strncpy(MainMessage, msg, (mlen > 147) ? 147 : mlen);
+ } else if (strncmp(icmd, "$MCL", 4) == 0) { // clear message
+ memset(MainMessage, 0, 148);
+ }
+ }
+}
+
void oswald_init(void)
{
OswaldScreens[IDLE_SCREEN].event_mask = EVENT_USER_BUTTONS | EVENT_ONE_SEC_TIMER;
OswaldScreens[STOP_WATCH_SCREEN].event_mask = EVENT_USER_BUTTONS | EVENT_CS_TIMER;
OswaldScreens[STOP_WATCH_SCREEN].event_func = stop_watch_handle_events;
+ OswaldScreens[BLUETOOTH_SCREEN].event_mask = EVENT_USER_BUTTONS | EVENT_HALF_SEC_TIMER;
+ OswaldScreens[BLUETOOTH_SCREEN].event_func = bluetooth_screen_events;
+
OswaldScreens[ALARM_SCREEN].event_mask = EVENT_USER_BUTTONS | EVENT_HALF_SEC_TIMER;
OswaldScreens[ALARM_SCREEN].event_func = alarm_handle_events;
extern power_state OswaldPowerState;
extern watch_state OswaldState;
extern watch_screen OswaldScreens[];
+extern char MainMessage[];
/* gets triggered by OS timer function */
void oswald_one_second_tick();
void oswald_halfsecond_tick(void);
void oswald_centisecond_tick(void);
void oswald_init(void);
-
+void oswald_handle_comm_input(uint16_t mlen, const void *mdat);
#endif
#include "oswald_screens.h"
+#include "timesetup_icon.xbm"
+#include "stopwatch_icon.xbm"
+#include "alarm_icon.xbm"
+#include "startstopbutton_icon.xbm"
+#include "lapsebutton_icon.xbm"
+#include "upbutton_icon.xbm"
+#include "downbutton_icon.xbm"
+#include "Bluetooth_icon.xbm"
+
typedef struct {
void (*screendraw_func)(boolean show_seconds);
WriteLcdNumber(20, 18, accel_data->y);
WriteLcdString(2, 34, "Z:");
WriteLcdNumber(20, 34, accel_data->z);
+
+ WriteLcdString(2, 54, "Light:");
+ WriteLcdNumber(40, 54, accel_data->z);
+
hal_lcd_update_display();
}
void draw_datetime_setup_screen(datetime_setup_data_t *sdata)
{
hal_lcd_clear_display();
- SetFont(MetaWatch16);
- WriteLcdString(2, 2, "Set");
+// SetFont(MetaWatch16);
+// WriteLcdString(2, 2, "Set");
+ oswald_draw_bitmap(36, 0, timesetup_icon_width, timesetup_icon_height, timesetup_icon_bits);
+
+ oswald_draw_bitmap(81, 6, upbutton_icon_width, upbutton_icon_height, upbutton_icon_bits);
+ oswald_draw_bitmap(81, 38, downbutton_icon_width, downbutton_icon_height, downbutton_icon_bits);
SetFont(MetaWatchTime);
if ((sdata->pos == 0 && sdata->on) || sdata->pos != 0) {
- WriteLcdCharacter(2, 20, (OswaldClk.hour / 10));
- WriteLcdCharacter(14, 20, (OswaldClk.hour % 10));
+ WriteLcdCharacter(2, 30, (OswaldClk.hour / 10));
+ WriteLcdCharacter(14, 30, (OswaldClk.hour % 10));
}
- WriteLcdCharacter(26, 20, TIME_CHARACTER_COLON_INDEX);
+ WriteLcdCharacter(26, 30, TIME_CHARACTER_COLON_INDEX);
if ((sdata->pos == 1 && sdata->on) || sdata->pos != 1) {
- WriteLcdCharacter(31, 20, (OswaldClk.minute / 10));
- WriteLcdCharacter(43, 20, (OswaldClk.minute % 10));
+ WriteLcdCharacter(31, 30, (OswaldClk.minute / 10));
+ WriteLcdCharacter(43, 30, (OswaldClk.minute % 10));
}
-
+/*
WriteLcdCharacter(55, 20, TIME_CHARACTER_COLON_INDEX);
if ((sdata->pos == 2 && sdata->on) || sdata->pos != 2) {
WriteLcdCharacter(60, 20, (OswaldClk.second / 10));
WriteLcdCharacter(72, 20, (OswaldClk.second % 10));
}
-
+*/
SetFont(MetaWatch16);
+ if ((sdata->pos == 2 && sdata->on) || sdata->pos != 2) {
+ WriteLcdCharacter(59, 36, 0x30 + (OswaldClk.second / 10));
+ WriteLcdCharacter(66, 36, 0x30 + (OswaldClk.second % 10));
+ }
+
+
if ((sdata->pos == 3 && sdata->on) || sdata->pos != 3) {
- WriteLcdNumber(2, 45, OswaldClk.day);
+ WriteLcdNumber(2, 55, OswaldClk.day);
}
- WriteLcdString(18, 45, ".");
+ WriteLcdString(18, 55, ".");
if ((sdata->pos == 4 && sdata->on) || sdata->pos != 4) {
- WriteLcdNumber(22, 45, OswaldClk.month);
+ WriteLcdNumber(22, 55, OswaldClk.month);
}
- WriteLcdString(38, 45, ".");
+ WriteLcdString(38, 55, ".");
if ((sdata->pos == 5 && sdata->on) || sdata->pos != 5) {
- WriteLcdNumber(42, 45, OswaldClk.year);
+ WriteLcdNumber(42, 55, OswaldClk.year);
}
SetFont(MetaWatch7);
if ((sdata->pos == 6 && sdata->on) || sdata->pos != 6) {
if (OswaldClk.clk24hr)
- WriteLcdString(2, 66, "x");
+ WriteLcdString(2, 76, "x");
else
- WriteLcdString(2, 66, "_");
+ WriteLcdString(2, 76, "_");
}
- WriteLcdString(15, 66, "24hr");
+ WriteLcdString(15, 76, "24hr");
if ((sdata->pos == 7 && sdata->on) || sdata->pos != 7) {
if (OswaldClk.day_first)
- WriteLcdString(2, 79, "x");
+ WriteLcdString(2, 89, "x");
else
- WriteLcdString(2, 79, "_");
+ WriteLcdString(2, 89, "_");
}
- WriteLcdString(15, 79, "dd.mm. mm/dd");
+ WriteLcdString(15, 89, "dd.mm. mm/dd");
hal_lcd_update_display();
}
};
}
+
+/*
+ * Alarm setup
+ */
+
typedef struct {
u8t pos;
boolean on;
{
hal_lcd_clear_display();
- SetFont(MetaWatch16);
- WriteLcdString(2, 2, "Alarm");
+ oswald_draw_bitmap(36, 0, alarm_icon_width, alarm_icon_height, alarm_icon_bits);
+
+ oswald_draw_bitmap(81, 6, upbutton_icon_width, upbutton_icon_height, upbutton_icon_bits);
+ oswald_draw_bitmap(81, 38, downbutton_icon_width, downbutton_icon_height, downbutton_icon_bits);
SetFont(MetaWatchTime);
if ((sdata->pos == 0 && sdata->on) || sdata->pos != 0) {
- WriteLcdCharacter(2, 20, (OswaldAlarm.hour / 10));
- WriteLcdCharacter(14, 20, (OswaldAlarm.hour % 10));
+ WriteLcdCharacter(22, 30, (OswaldAlarm.hour / 10));
+ WriteLcdCharacter(34, 30, (OswaldAlarm.hour % 10));
}
- WriteLcdCharacter(26, 20, TIME_CHARACTER_COLON_INDEX);
+ WriteLcdCharacter(46, 30, TIME_CHARACTER_COLON_INDEX);
if ((sdata->pos == 1 && sdata->on) || sdata->pos != 1) {
- WriteLcdCharacter(31, 20, (OswaldAlarm.minute / 10));
- WriteLcdCharacter(43, 20, (OswaldAlarm.minute % 10));
+ WriteLcdCharacter(51, 30, (OswaldAlarm.minute / 10));
+ WriteLcdCharacter(63, 30, (OswaldAlarm.minute % 10));
}
SetFont(MetaWatchMonospaced10);
- WriteLcdCharacter(3, 45, 'S');
- WriteLcdCharacter(15, 45, 'M');
- WriteLcdCharacter(27, 45, 'T');
- WriteLcdCharacter(39, 45, 'W');
- WriteLcdCharacter(51, 45, 'T');
- WriteLcdCharacter(63, 45, 'F');
- WriteLcdCharacter(75, 45, 'S');
+ WriteLcdCharacter(3, 55, 'S');
+ WriteLcdCharacter(15, 55, 'M');
+ WriteLcdCharacter(27, 55, 'T');
+ WriteLcdCharacter(39, 55, 'W');
+ WriteLcdCharacter(51, 55, 'T');
+ WriteLcdCharacter(63, 55, 'F');
+ WriteLcdCharacter(75, 55, 'S');
if ((sdata->pos == 2 && sdata->on) || sdata->pos != 2)
- WriteLcdCharacter(3, 55, (OswaldAlarm.wday & WDAY_SUNDAY) ? 'x' : '_');
+ WriteLcdCharacter(3, 65, (OswaldAlarm.wday & WDAY_SUNDAY) ? 'x' : '_');
if ((sdata->pos == 3 && sdata->on) || sdata->pos != 3)
- WriteLcdCharacter(15, 55, (OswaldAlarm.wday & WDAY_MONDAY) ? 'x' : '_');
+ WriteLcdCharacter(15, 65, (OswaldAlarm.wday & WDAY_MONDAY) ? 'x' : '_');
if ((sdata->pos == 4 && sdata->on) || sdata->pos != 4)
- WriteLcdCharacter(27, 55, (OswaldAlarm.wday & WDAY_TUESDAY) ? 'x' : '_');
+ WriteLcdCharacter(27, 65, (OswaldAlarm.wday & WDAY_TUESDAY) ? 'x' : '_');
if ((sdata->pos == 5 && sdata->on) || sdata->pos != 5)
- WriteLcdCharacter(39, 55, (OswaldAlarm.wday & WDAY_WEDNESDAY) ? 'x' : '_');
+ WriteLcdCharacter(39, 65, (OswaldAlarm.wday & WDAY_WEDNESDAY) ? 'x' : '_');
if ((sdata->pos == 6 && sdata->on) || sdata->pos != 6)
- WriteLcdCharacter(51, 55, (OswaldAlarm.wday & WDAY_THURSDAY) ? 'x' : '_');
+ WriteLcdCharacter(51, 65, (OswaldAlarm.wday & WDAY_THURSDAY) ? 'x' : '_');
if ((sdata->pos == 7 && sdata->on) || sdata->pos != 7)
- WriteLcdCharacter(63, 55, (OswaldAlarm.wday & WDAY_FRIDAY) ? 'x' : '_');
+ WriteLcdCharacter(63, 65, (OswaldAlarm.wday & WDAY_FRIDAY) ? 'x' : '_');
if ((sdata->pos == 8 && sdata->on) || sdata->pos != 8)
- WriteLcdCharacter(75, 55, (OswaldAlarm.wday & WDAY_SATURDAY) ? 'x' : '_');
+ WriteLcdCharacter(75, 65, (OswaldAlarm.wday & WDAY_SATURDAY) ? 'x' : '_');
-#if 0
- SetFont(MetaWatch7);
- if ((sdata->pos == 6 && sdata->on) || sdata->pos != 6) {
- if (OswaldClk.clk24hr)
- WriteLcdString(2, 66, "x");
- else
- WriteLcdString(2, 66, "_");
- }
- WriteLcdString(15, 66, "24hr");
-
- if ((sdata->pos == 7 && sdata->on) || sdata->pos != 7) {
- if (OswaldClk.day_first)
- WriteLcdString(2, 79, "x");
- else
- WriteLcdString(2, 79, "_");
- }
- WriteLcdString(15, 79, "dd.mm. mm/dd");
-#endif
hal_lcd_update_display();
}
}
+/*
+ * Test menu
+ */
+
typedef struct {
u8t menu_pos;
} test_menu_t;
}
+/*
+ * Stop Watch
+ */
+
typedef struct {
u8t hr;
u8t min;
char tstr[16];
SetFont(MetaWatchMonospaced10);
-#if 0
- WriteLcdNumber(0, 30, sdata->hr);
- WriteLcdCharacter(14, 30, ':');
- WriteLcdNumber(19, 30, sdata->min);
- WriteLcdCharacter(33, 30, ':');
- WriteLcdNumber(38, 30, sdata->sec);
- WriteLcdCharacter(52, 30, '.');
- WriteLcdNumber(57, 30, sdata->csec / 10);
-
- WriteLcdNumber(0, 50, sdata->lapse_hr);
- WriteLcdCharacter(14, 50, ':');
- WriteLcdNumber(19, 50, sdata->lapse_min);
- WriteLcdCharacter(33, 50, ':');
- WriteLcdNumber(38, 50, sdata->lapse_sec);
- WriteLcdCharacter(52, 50, '.');
- WriteLcdNumber(57, 50, sdata->lapse_csec / 10);
-#else
snprintf(tstr, 16, "%02d:%02d:%02d.%1d", sdata->hr, sdata->min, sdata->sec, sdata->csec / 10);
- WriteLcdString(0, 30, tstr);
+ WriteLcdString(5, 40, tstr);
snprintf(tstr, 16, "%02d:%02d:%02d.%02d", sdata->lapse_hr, sdata->lapse_min, sdata->lapse_sec, sdata->lapse_csec);
- WriteLcdString(0, 50, tstr);
-#endif
+ WriteLcdString(5, 60, tstr);
hal_lcd_update_display();
}
static void draw_stop_watch_screen(stopwatch_data_t *sdata)
{
- SetFont(MetaWatch16);
- WriteLcdString(2, 5, "StopWatch");
+ oswald_draw_bitmap(36, 0, stopwatch_icon_width, stopwatch_icon_height, stopwatch_icon_bits);
+ oswald_draw_bitmap(81, 6, startstopbutton_icon_width, startstopbutton_icon_height, startstopbutton_icon_bits);
+ oswald_draw_bitmap(81, 38, lapsebutton_icon_width, lapsebutton_icon_height, lapsebutton_icon_bits);
update_stop_watch_screen(sdata);
}
}
+/*
+ * when alarm is fired
+ */
void draw_alarm_screen(void)
{
hal_lcd_clear_display();
- SetFont(MetaWatch16);
- WriteLcdString(2, 2, "ALARM !");
+// SetFont(MetaWatch16);
+// WriteLcdString(2, 2, "ALARM !");
+ oswald_draw_bitmap(36, 20, alarm_icon_width, alarm_icon_height, alarm_icon_bits);
+
hal_lcd_update_display();
}
};
}
+
+/*
+ * Bluetooth screen
+ */
+typedef struct {
+ u8t pos;
+ boolean bt_en;
+ boolean on;
+} bluetooth_data_t;
+static bluetooth_data_t bluetooth_screen = {
+ 0,
+ FALSE,
+ TRUE
+};
+
+void draw_bluetooth_screen(bluetooth_data_t *sdata)
+{
+ char bstr[20];
+ uint8_t *bd_addr;
+
+ hal_lcd_clear_display();
+
+ oswald_draw_bitmap(36, 0, Bluetooth_icon_width, Bluetooth_icon_height, Bluetooth_icon_bits);
+
+ oswald_draw_bitmap(81, 6, upbutton_icon_width, upbutton_icon_height, upbutton_icon_bits);
+ oswald_draw_bitmap(81, 38, downbutton_icon_width, downbutton_icon_height, downbutton_icon_bits);
+
+ SetFont(MetaWatch5);
+ WriteLcdString(2, 30, "Enable:");
+ if ((sdata->pos == 0 && sdata->on) || sdata->pos != 0) {
+ WriteLcdCharacter(45, 30, bluetooth_screen.bt_en ? 'x' : '_');
+ }
+ WriteLcdString(2, 39, "State:");
+ switch (hal_bluetooth_get_state()) {
+ case BLUETOOTH_OFF:
+ WriteLcdString(45, 39, "off");
+ break;
+ case BLUETOOTH_ON:
+ WriteLcdString(45, 39, "on");
+ break;
+ case BLUETOOTH_CONNECTED:
+ WriteLcdString(45, 39, "conn.");
+ break;
+ default:
+ break;
+ };
+ if (hal_bluetooth_get_state() >= BLUETOOTH_ON) {
+ bd_addr = hal_bluetooth_get_local_bdaddr();
+ snprintf(bstr, 20, "%02x:%02x:%02x:%02x:%02x:%02x", bd_addr[5], bd_addr[4], bd_addr[3], bd_addr[2], bd_addr[1], bd_addr[0]);
+ WriteLcdString(2, 48, bstr);
+ } else {
+ }
+ WriteLcdString(2, 57, "Visible:");
+ if ((sdata->pos == 1 && sdata->on) || sdata->pos != 1) {
+ WriteLcdCharacter(45, 57, hal_bluetooth_get_visible() ? 'x' : '_');
+ }
+
+ hal_lcd_update_display();
+}
+
+void bluetooth_handle_updown(u8t pos, s8t incr)
+{
+ switch (pos) {
+ case 0:
+ if (hal_bluetooth_get_state() >= BLUETOOTH_ON) {
+ hal_bluetooth_set_state(BLUETOOTH_OFF);
+ bluetooth_screen.bt_en = FALSE;
+ } else {
+ hal_bluetooth_set_state(BLUETOOTH_ON);
+ bluetooth_screen.bt_en = TRUE;
+ }
+ break;
+ case 1:
+ if (hal_bluetooth_get_state() >= BLUETOOTH_ON && !hal_bluetooth_get_visible()) {
+ hal_bluetooth_set_visible(TRUE);
+ } else {
+ hal_bluetooth_set_visible(FALSE);
+ }
+ break;
+ case 2:
+ break;
+ case 3:
+ break;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ break;
+ case 8:
+ break;
+ default:
+ break;
+ };
+}
+
+void handle_bluetooth_buttons(watch_button button, bluetooth_data_t *sdata)
+{
+ switch (button) {
+ case BUTTON_A:
+ bluetooth_handle_updown(sdata->pos, 1);
+ break;
+ case BUTTON_B:
+ bluetooth_handle_updown(sdata->pos, -1);
+ break;
+ case BUTTON_F:
+ sdata->pos++;
+ sdata->pos %= 2;
+ break;
+ default:
+ break;
+ }
+ draw_bluetooth_screen(sdata);
+}
+
+void bluetooth_screen_events(u16t event, void *data)
+{
+ switch (event) {
+ case EVENT_SCREEN_VISIBLE:
+ bluetooth_screen.pos = 0;
+ bluetooth_screen.bt_en = (hal_bluetooth_get_state() > 0);
+ draw_bluetooth_screen(&bluetooth_screen);
+ hal_enable_halfsecond_timer();
+ break;
+ case EVENT_SCREEN_DESTROY:
+ hal_disable_halfsecond_timer();
+ break;
+ case EVENT_USER_BUTTONS:
+ dbg_out("button event %d\n", *(int *)data);
+ handle_bluetooth_buttons(*(watch_button *)data, &bluetooth_screen);
+ break;
+ case EVENT_HALF_SEC_TIMER:
+ if (bluetooth_screen.on)
+ bluetooth_screen.on = FALSE;
+ else
+ bluetooth_screen.on = TRUE;
+ draw_bluetooth_screen(&bluetooth_screen);
+ break;
+ default:
+ break;
+ };
+}
+
void alarm_handle_events(u16t event, void *data);
-#endif
+void bluetooth_screen_events(u16t event, void *data);
+#endif
#include "oswald_watch_faces.h"
+#include "battery0_icon.xbm"
+#include "battery25_icon.xbm"
+#include "battery50_icon.xbm"
+#include "battery75_icon.xbm"
+#include "battery100_icon.xbm"
+#include "charger_icon.xbm"
+#include "bluetooth_icon.xbm"
+
+
+/* sine table, per degree, factor 100 */
int16_t sintab[]={
0, 2, 3, 5, 7, 9, 10, 12, 14, 16,
17, 19, 21, 22, 24, 26, 28, 29, 31, 33,
int gRow = 3;
int gColumn = 3;
char tstr[16];
+ int i;
SetFont(MetaWatchTime);
snprintf(tstr, 16, "%d/%d %d", OswaldClk.month, OswaldClk.day, OswaldClk.year);
WriteLcdString(3, 25, tstr);
+ if (OswaldPowerState.source)
+ oswald_draw_bitmap(81, 4, charger_icon_width, charger_icon_height, charger_icon_bits);
+
+ if (OswaldPowerState.percent > 75)
+ oswald_draw_bitmap(81, 4, battery100_icon_width, battery100_icon_height, battery100_icon_bits);
+ else if (OswaldPowerState.percent > 50)
+ oswald_draw_bitmap(81, 4, battery75_icon_width, battery75_icon_height, battery75_icon_bits);
+ else if (OswaldPowerState.percent > 25)
+ oswald_draw_bitmap(81, 4, battery50_icon_width, battery50_icon_height, battery50_icon_bits);
+ else if (OswaldPowerState.percent > 5)
+ oswald_draw_bitmap(81, 4, battery25_icon_width, battery25_icon_height, battery25_icon_bits);
+ else
+ oswald_draw_bitmap(81, 4, battery0_icon_width, battery0_icon_height, battery0_icon_bits);
+
+
+ if (hal_bluetooth_get_state() >= BLUETOOTH_ON)
+ oswald_draw_bitmap(81, 4, bluetooth_icon_width, bluetooth_icon_height, bluetooth_icon_bits);
+
+ gRow = 0;
+ gColumn = 45;
+ SetFont(MetaWatch5);
+ for (i=0; i<strlen(MainMessage); i++) {
+ gRow += WriteLcdCharacter(gRow, gColumn, MainMessage[i]);
+ if (gRow > 90) {
+ gRow = 0;
+ gColumn += 7;
+ }
+ if (gColumn > 95)
+ i = 255;
+ }
+#if 0
snprintf(tstr, 16, "%d%% (%dmV)", OswaldPowerState.percent, OswaldPowerState.level);
WriteLcdString(2, 48, tstr);
WriteLcdString(2, 64, OswaldPowerState.source ? "ext" : "bat");
break;
};
};
+#endif
hal_lcd_update_display();
}
--- /dev/null
+#define resetbutton_icon_width 15
+#define resetbutton_icon_height 20
+static unsigned char resetbutton_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0xff, 0x00,
+ 0xff, 0x00, 0xce, 0x00, 0xcc, 0x00, 0xc8, 0x00, 0xc0, 0x00, 0xc0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define startstopbutton_icon_width 15
+#define startstopbutton_icon_height 20
+static unsigned char startstopbutton_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b,
+ 0x00, 0x1b, 0x00, 0x3b, 0x00, 0x7b, 0x00, 0x7b, 0x00, 0x3b, 0x00, 0x1b,
+ 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define stopwatch_width 24
+#define stopwatch_height 24
+static unsigned char stopwatch_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00,
+ 0x00, 0x7e, 0x10, 0x80, 0x81, 0x39, 0x40, 0x18, 0x1e, 0x20, 0x18, 0x0c,
+ 0x10, 0x18, 0x08, 0x08, 0x18, 0x10, 0x08, 0x18, 0x10, 0x04, 0x18, 0x20,
+ 0x04, 0x18, 0x20, 0x04, 0x18, 0x20, 0x04, 0x00, 0x20, 0x04, 0x00, 0x20,
+ 0x04, 0x00, 0x20, 0x08, 0x00, 0x10, 0x08, 0x00, 0x10, 0x10, 0x00, 0x08,
+ 0x20, 0x00, 0x04, 0x40, 0x00, 0x02, 0x80, 0x81, 0x01, 0x00, 0x7e, 0x00,
+ };
--- /dev/null
+#define stopwatch_icon_width 24
+#define stopwatch_icon_height 24
+static unsigned char stopwatch_icon_bits[] = {
+ 0x00, 0x18, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x18,
+ 0x00, 0xff, 0x3c, 0xc0, 0xff, 0x3f, 0xe0, 0x00, 0x1f, 0x70, 0x18, 0x0e,
+ 0x38, 0x18, 0x1c, 0x18, 0x18, 0x18, 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30,
+ 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30, 0x0c, 0x00, 0x30,
+ 0x0c, 0x00, 0x30, 0x0c, 0x00, 0x30, 0x18, 0x00, 0x18, 0x38, 0x00, 0x1c,
+ 0x70, 0x00, 0x0e, 0xe0, 0x00, 0x07, 0xc0, 0xff, 0x03, 0x00, 0xff, 0x00,
+ };
--- /dev/null
+#define timesetup_icon_width 24
+#define timesetup_icon_height 24
+static unsigned char timesetup_icon_bits[] = {
+ 0x00, 0xff, 0x00, 0xc0, 0xff, 0x03, 0xe0, 0x00, 0x07, 0x70, 0x18, 0x0e,
+ 0x38, 0x18, 0x1c, 0x18, 0x18, 0x18, 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30,
+ 0x0c, 0x18, 0x30, 0x0c, 0xf8, 0x31, 0x0c, 0xf8, 0x31, 0x0c, 0x00, 0x30,
+ 0x0c, 0x00, 0x30, 0x0c, 0x00, 0x30, 0x18, 0x00, 0x18, 0x38, 0x00, 0x1c,
+ 0x70, 0x00, 0x0e, 0xe0, 0x00, 0x07, 0xc0, 0xff, 0x03, 0x00, 0xff, 0x00,
+ 0xfe, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xff, 0xff, 0x3f, 0xfe, 0x00, 0x00,
+ };
--- /dev/null
+#define upbutton_icon_width 15
+#define upbutton_icon_height 20
+static unsigned char upbutton_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
+ 0x00, 0x1e, 0x00, 0x3f, 0x80, 0x7f, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c,
+ 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, };
--- /dev/null
+#define watch_icon_width 24
+#define watch_icon_height 24
+static unsigned char watch_icon_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0xc0, 0xff, 0x03, 0xe0, 0x00, 0x07, 0x70, 0x18, 0x0e,
+ 0x38, 0x18, 0x1c, 0x18, 0x18, 0x18, 0x0c, 0x18, 0x30, 0x0c, 0x18, 0x30,
+ 0x0c, 0x18, 0x30, 0x0c, 0xf8, 0x31, 0x0c, 0xf8, 0x31, 0x0c, 0x00, 0x30,
+ 0x0c, 0x00, 0x30, 0x0c, 0x00, 0x30, 0x18, 0x00, 0x18, 0x38, 0x00, 0x1c,
+ 0x70, 0x00, 0x0e, 0xe0, 0x00, 0x07, 0xc0, 0xff, 0x03, 0x00, 0xff, 0x00,
+ };