aboutsummaryrefslogtreecommitdiffhomepage
path: root/workspace/ts100/inc
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2017-07-22 12:20:36 +1000
committerBen V. Brown <[email protected]>2017-07-22 12:20:36 +1000
commitbaa4979a9696f4055f3fbee1acf49bb64f3e6877 (patch)
tree4909b084f755587439d9ebaf21e17b423cce8148 /workspace/ts100/inc
parent2a5f4e6d8964653fa8f93ff87272fae1ff4c7e86 (diff)
downloadIronOS-baa4979a9696f4055f3fbee1acf49bb64f3e6877.tar.gz
IronOS-baa4979a9696f4055f3fbee1acf49bb64f3e6877.zip
V1.14 - Adds battery icon to cell selectionv1.14
Relivant to #29 and #30
Diffstat (limited to 'workspace/ts100/inc')
-rw-r--r--workspace/ts100/inc/Font.h38
-rw-r--r--workspace/ts100/inc/Oled.h5
2 files changed, 40 insertions, 3 deletions
diff --git a/workspace/ts100/inc/Font.h b/workspace/ts100/inc/Font.h
index f95590ab..fb36ed03 100644
--- a/workspace/ts100/inc/Font.h
+++ b/workspace/ts100/inc/Font.h
@@ -9,7 +9,9 @@
#ifndef FONT_H_
#define FONT_H_
-
+/*
+ * Remember screen is LSB at the top, MSB at the bottom of the strip!
+ */
#define FONT_WIDTH 12 /*How many pixels wide the font is*/
const uint8_t FONT[]={
0x00,0xF0,0xFC,0x0E,0x82,0xC2,0x62,0x1E,0xFC,0xF0,0x00,0x00,
@@ -95,8 +97,42 @@ const uint8_t FONT[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00,/*.*/
+
};
+const uint8_t extendedFont[] = {
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x00,0x00,/*Battery Empty*/
+
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x60,0x60,0x60,0x60,0x60,0x60,0x7F,0x00,0x00,/*Battery 1*/
+
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x70,0x70,0x70,0x70,0x70,0x70,0x7F,0x00,0x00,/*Battery 2*/
+
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x78,0x78,0x78,0x78,0x78,0x78,0x7F,0x00,0x00,/*Battery 3*/
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7F,0x00,0x00,/*Battery 4*/
+
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7F,0x00,0x00,/*Battery 5*/
+
+ 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x00,0x00,/*Battery 6*/
+
+ 0x00,0x00,0xF8,0x88,0x8E,0x82,0x82,0x8E,0x88,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x00,0x00,/*Battery 7*/
+
+ 0x00,0x00,0xF8,0xC8,0xCE,0xC2,0xC2,0xCE,0xC8,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x00,0x00,/*Battery 8*/
+
+ 0x00,0x00,0xF8,0xE8,0xEE,0xE2,0xE2,0xEE,0xE8,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x00,0x00,/*Battery 9*/
+
+ 0x00,0x00,0xF8,0xF8,0xFE,0xF2,0xF2,0xFE,0xF8,0xF8,0x00,0x00,
+ 0x00,0x00,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x00,0x00,/*Battery 10*/
+};
const uint8_t Iron_Base[] ={
0x00,0x20,0x60,0x60,0x60,0x60,0x60,0x60,0x90,0x90,0x90,0x90,
0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
diff --git a/workspace/ts100/inc/Oled.h b/workspace/ts100/inc/Oled.h
index 8b896d1e..664e933b 100644
--- a/workspace/ts100/inc/Oled.h
+++ b/workspace/ts100/inc/Oled.h
@@ -14,16 +14,17 @@
void Oled_DisplayOn(void);
void Oled_DisplayOff(void);
-u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, u8* ptr);
+const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high,const u8* ptr);
void Set_ShowPos(u8 x, u8 y);
void Oled_DisplayFlip();
void GPIO_Init_OLED(void);
void Init_Oled(uint8_t leftHanded);
-u8* Data_Command(u8 len, u8* ptr);
+const u8* Data_Command(u8 len,const u8* ptr);
void Clear_Screen(void);//Clear the screen
/*Functions for writing to the screen*/
void OLED_DrawString(const char* string, const uint8_t length);
void OLED_DrawChar(char c, uint8_t x);
+void OLED_DrawExtendedChar(uint8_t id, uint8_t x);
void OLED_DrawTwoNumber(uint8_t in, uint8_t x);
void OLED_BlankSlot(uint8_t xStart,uint8_t width);
void OLED_DrawThreeNumber(uint16_t in, uint8_t x);