aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--workspace/ts100/inc/Font.h132
-rw-r--r--workspace/ts100/inc/Modes.h5
-rw-r--r--workspace/ts100/inc/Oled.h7
-rw-r--r--workspace/ts100/inc/Settings.h1
-rw-r--r--workspace/ts100/inc/Strings.h4
-rw-r--r--workspace/ts100/src/Bios.c5
-rw-r--r--workspace/ts100/src/I2C.c2
-rw-r--r--workspace/ts100/src/Main.c4
-rw-r--r--workspace/ts100/src/Modes.c42
-rw-r--r--workspace/ts100/src/Oled.c54
-rw-r--r--workspace/ts100/src/Settings.c3
-rw-r--r--workspace/ts100/src/Strings.c18
12 files changed, 219 insertions, 58 deletions
diff --git a/workspace/ts100/inc/Font.h b/workspace/ts100/inc/Font.h
index 2c6e60ef..d6a1beae 100644
--- a/workspace/ts100/inc/Font.h
+++ b/workspace/ts100/inc/Font.h
@@ -116,6 +116,138 @@ const uint8_t FONT[]={
0x00,0x10,0x18,0x0C,0x04,0x0C,0x18,0x10,0x18,0x0C,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~
0x00,0x00,0x80,0xC0,0x60,0x30,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x0F,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0F,0x0F,0x00,//Up triangle
+ /*The following is all the extended ASCII table (128-255) See http://www.asciitable.com/ for what these all are*/
+ 0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x03,0x07,0x1E,0x1C,0x00,0x00,0x01,0x07,0xCE,0xDC,0xF8,0xF8,0x18,0x1C,0x0E,0x06,0x00,//C_
+ 0x00,0xE0,0xE0,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//
+ 0x00,0x80,0xC0,0xE0,0x60,0x68,0x6C,0x66,0x62,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x3B,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,
+ 0x00,0x00,0x40,0x68,0x6C,0x66,0x66,0x6C,0x68,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x00,0x40,0x6C,0x6C,0x60,0x60,0x6C,0x6C,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x00,0x40,0x60,0x62,0x66,0x6C,0x68,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x00,0x40,0x60,0x64,0x6A,0x6A,0x64,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0xB8,0xB0,0xF0,0xF0,0x30,0x38,0x18,0x08,0x00,
+ 0x00,0x80,0xC0,0xE8,0x6C,0x66,0x66,0x6C,0x68,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,
+ 0x00,0x80,0xC0,0xEC,0x6C,0x60,0x60,0x6C,0x6C,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,
+ 0x00,0x80,0xC0,0xE0,0x62,0x66,0x6C,0x68,0x60,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,
+ 0x00,0x00,0x00,0x0C,0x6C,0xE0,0xEC,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x6C,0xE6,0xE6,0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x62,0xE6,0xEC,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x83,0xE3,0x78,0x78,0xE3,0x83,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+ 0x00,0x00,0x00,0x80,0xE2,0x75,0x75,0xE2,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+
+ 0x00,0xF8,0xF8,0x98,0x98,0x9C,0x9E,0x9B,0x99,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,
+ 0x00,0x80,0xC0,0x40,0x40,0xC0,0x80,0x40,0x40,0xC0,0x80,0x00,0x00,0x1C,0x3E,0x22,0x22,0x1F,0x3F,0x22,0x22,0x33,0x11,0x00,
+ 0x00,0x00,0x80,0xF0,0x7C,0x1F,0xFF,0xFF,0xC3,0xC3,0x03,0x00,0x00,0x3C,0x3F,0x07,0x06,0x06,0x3F,0x3F,0x30,0x30,0x30,0x00,
+ 0x00,0x80,0xC0,0xE8,0x6C,0x66,0x66,0x6C,0xE8,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0x80,0xC0,0xEC,0x6C,0x60,0x60,0x6C,0xEC,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0x80,0xC0,0xE0,0x62,0x66,0x6C,0x68,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xE0,0xE0,0x08,0x0C,0x06,0x06,0x0C,0x08,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,
+ 0x00,0xE0,0xE0,0x00,0x02,0x06,0x0C,0x08,0x00,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,
+ 0x00,0x00,0x60,0xEC,0x8C,0x00,0x00,0x8C,0xEC,0x60,0x00,0x00,0x00,0x00,0x00,0x81,0xE7,0x7E,0x1E,0x07,0x01,0x00,0x00,0x00,
+ 0x00,0xE0,0xF0,0x3B,0x1B,0x18,0x18,0x1B,0x3B,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xE0,0xE0,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,
+ 0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0xE0,0xC0,0xE0,0xA0,0x00,0x00,0x2F,0x3F,0x18,0x3C,0x36,0x33,0x31,0x38,0x1F,0x0F,0x00,
+ 0x00,0x00,0x00,0x80,0xF8,0xFC,0x8C,0x8C,0x1C,0x18,0x00,0x00,0x00,0x00,0x18,0x1C,0x1F,0x0B,0x18,0x18,0x18,0x18,0x08,0x00,
+ 0x00,0xF0,0xF8,0x1C,0x0C,0x8C,0xEC,0x7C,0x18,0xFC,0xF4,0x00,0x00,0x2F,0x3F,0x18,0x3E,0x37,0x31,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0x00,0x10,0x30,0x60,0xC0,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x01,0x03,0x06,0x04,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x80,0xFE,0xFF,0x83,0x87,0x06,0x00,0x00,0x00,0x00,0x30,0x70,0x60,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x40,0x60,0x68,0x6C,0x66,0x62,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x00,0x00,0x00,0x68,0xEC,0xE6,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x80,0xC0,0xE0,0x68,0x6C,0x66,0x62,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xE0,0xE0,0x00,0x08,0x0C,0x06,0x02,0x00,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,
+ 0x00,0x00,0xE0,0xE8,0x6C,0x64,0x6C,0x68,0xEC,0xC4,0x80,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,
+ 0x00,0xF8,0xF8,0x72,0xE3,0xC1,0x83,0x02,0x03,0xF9,0xF8,0x00,0x00,0x3F,0x3F,0x00,0x00,0x01,0x03,0x07,0x0E,0x3F,0x3F,0x00,
+ 0x00,0x70,0xFA,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xFF,0xFE,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,
+ 0x00,0x3C,0x7E,0xE7,0xC3,0xC3,0xC3,0xC3,0xE7,0x7E,0x3C,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0xC0,0xFB,0x7B,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x1F,0x3B,0x31,0x30,0x30,0x30,0x38,0x1E,0x0E,0x00,
+ 0x00,0xF0,0xF8,0x1C,0xEC,0xEC,0xAC,0xEC,0x4C,0x1C,0xF8,0xF0,0x00,0x07,0x0F,0x1C,0x1B,0x1B,0x18,0x1B,0x1B,0x1C,0x0F,0x07,
+ 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x00,
+ 0x00,0x48,0x7C,0x7C,0x40,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x00,0x19,0x1D,0x17,0x12,0x00,
+ 0x00,0x48,0x7C,0x7C,0x40,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x06,0x07,0x04,0x1F,0x1F,0x00,
+ 0x00,0x00,0x00,0x00,0x80,0xF3,0xF3,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0x3F,0x0F,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0xC0,0x60,0x20,0x00,0x80,0xC0,0x60,0x20,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x00,0x00,0x01,0x03,0x02,0x00,0x00,
+ 0x00,0x20,0x60,0xC0,0x80,0x00,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0x00,0x02,0x03,0x01,0x00,0x00,0x00,
+ 0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,
+ 0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,
+ 0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,
+ 0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0xE4,0x7E,0x7B,0xE1,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+ 0x00,0x00,0x00,0x84,0xE6,0x7B,0x7B,0xE6,0x84,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+ 0x00,0x00,0x00,0x80,0xE1,0x7B,0x7E,0xE4,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+ 0x00,0xF0,0xF8,0x1C,0xCC,0xEC,0x2C,0x6C,0x4C,0x1C,0xF8,0xF0,0x00,0x07,0x0F,0x1C,0x19,0x1B,0x1A,0x1B,0x19,0x1C,0x0F,0x07,
+ 0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0xFE,0xFE,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0xFE,0xFE,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xE0,0xF0,0x38,0xFE,0xFE,0x18,0x38,0x30,0x00,0x00,0x00,0x00,0x03,0x07,0x0E,0x3F,0x3F,0x0C,0x0E,0x06,0x00,0x00,
+ 0x00,0x03,0x0F,0x3C,0xF0,0xC0,0xC0,0xF0,0x3C,0x0F,0x03,0x00,0x00,0x00,0x0A,0x0A,0x0A,0x3F,0x3F,0x0A,0x0A,0x0A,0x00,0x00,
+ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,
+ 0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,
+ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+ 0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,
+ 0x00,0x00,0x40,0x68,0x6C,0x64,0x6C,0x68,0x6C,0xE4,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,
+ 0x00,0x00,0x00,0x82,0xE3,0x79,0x7B,0xE2,0x83,0x01,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,
+ 0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x07,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,
+ 0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0xFE,0xFE,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,
+ 0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,
+ 0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+ 0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0xFE,0xFE,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,
+ 0x00,0xF6,0xFE,0x18,0x0C,0x0C,0x0C,0x0C,0x18,0xFE,0xF6,0x00,0x00,0x1B,0x1F,0x06,0x0C,0x0C,0x0C,0x0C,0x06,0x1F,0x1B,0x00,
+ 0x00,0x00,0x00,0x78,0xFC,0xCC,0x8C,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x3E,0x33,0x33,0x3F,0x1E,0x00,0x00,0x00,
+ 0x00,0xC0,0xFF,0xFF,0xC3,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00,
+ 0x00,0xF8,0xF8,0x9C,0x9E,0x9B,0x9B,0x9E,0x9C,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,
+ 0x00,0xF8,0xF8,0x9B,0x9B,0x98,0x98,0x9B,0x9B,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,
+ 0x00,0xF8,0xF8,0x99,0x9B,0x9E,0x9C,0x98,0x98,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x18,0x18,0xFC,0xFE,0x1B,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x1C,0x1E,0xFB,0xFB,0x1E,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x1B,0x1B,0xF8,0xF8,0x1B,0x1B,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+ 0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x19,0x1B,0xFE,0xFC,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,
+ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xE0,0xF0,0x38,0x18,0x1C,0x1E,0x1B,0x39,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0x00,0xC0,0xE0,0x30,0x10,0x10,0x30,0xE0,0xC0,0x00,0x00,0x00,0x00,0xFF,0xFF,0x21,0x21,0x21,0x33,0x3F,0x1E,0x00,0x00,
+ 0x00,0xE0,0xF0,0x3C,0x1E,0x1B,0x1B,0x1E,0x3C,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xE0,0xF0,0x39,0x1B,0x1E,0x1C,0x18,0x38,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0x80,0xC8,0xEC,0x64,0x6C,0x68,0x6C,0xE4,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xE0,0xF0,0x3A,0x1B,0x19,0x1B,0x1A,0x3B,0xF1,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,
+ 0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x00,0xFF,0xFF,0x0E,0x0C,0x0C,0x0C,0x06,0x0F,0x0F,0x00,0x00,
+ 0x00,0x00,0x0C,0xFC,0xFC,0x6C,0x60,0x60,0xE0,0xC0,0x00,0x00,0x00,0x00,0x30,0x3F,0x3F,0x36,0x06,0x06,0x07,0x03,0x00,0x00,
+ 0x00,0x00,0x03,0xFF,0xFF,0x1B,0x18,0x18,0xF8,0xF0,0x00,0x00,0x00,0x00,0x30,0x3F,0x3F,0x36,0x06,0x06,0x07,0x03,0x00,0x00,
+ 0x00,0xF8,0xF8,0x00,0x00,0x04,0x06,0x03,0x01,0xF8,0xF8,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,
+ 0x00,0xF8,0xF8,0x04,0x06,0x03,0x03,0x06,0x04,0xF8,0xF8,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,
+ 0x00,0xF8,0xF8,0x01,0x03,0x06,0x04,0x00,0x00,0xF8,0xF8,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,
+ 0x00,0x00,0x60,0xE0,0x80,0x10,0x18,0x8C,0xE4,0x60,0x00,0x00,0x00,0x00,0x00,0x81,0xE7,0x7E,0x1E,0x07,0x01,0x00,0x00,0x00,
+ 0x00,0x08,0x18,0x30,0x60,0xC4,0xC6,0x63,0x31,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xC0,0xC0,0xF0,0xF0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x1B,0x1B,0x18,0x18,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,
+ 0x00,0x44,0x54,0x7C,0x28,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x06,0x07,0x04,0x1F,0x1F,0x00,
+ 0x00,0x38,0x7C,0xC6,0x82,0xFE,0xFE,0x02,0xFE,0xFE,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x3F,0x3F,0x00,0x00,
+ 0x00,0x00,0xDC,0xFE,0x22,0x22,0x22,0x22,0xE6,0xC4,0x00,0x00,0x00,0x00,0x08,0x19,0x11,0x11,0x11,0x11,0x1F,0x0E,0x00,0x00,
+ 0x00,0x00,0x80,0x80,0x80,0xB0,0xB0,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0D,0x0D,0x01,0x01,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x40,0x80,0x80,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x1E,0x3F,0x33,0x33,0x3F,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x00,0x00,0x01,0x03,0x01,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x11,0x15,0x15,0x1F,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x19,0x1D,0x15,0x17,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,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,
+
};
const uint8_t extendedFont[] = {
0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,
diff --git a/workspace/ts100/inc/Modes.h b/workspace/ts100/inc/Modes.h
index 26542b48..ddd3f2c8 100644
--- a/workspace/ts100/inc/Modes.h
+++ b/workspace/ts100/inc/Modes.h
@@ -36,9 +36,9 @@ typedef enum {
} operatingModeEnum;
//#define PIDTUNING
#ifdef PIDTUNING
-#define SETTINGSOPTIONSCOUNT (12+3) /*Number of settings in the settings menu*/
+#define SETTINGSOPTIONSCOUNT (13+3) /*Number of settings in the settings menu*/
#else
-#define SETTINGSOPTIONSCOUNT (12) /*Number of settings in the settings menu*/
+#define SETTINGSOPTIONSCOUNT (13) /*Number of settings in the settings menu*/
#endif
typedef enum {
UVCO = 0,
@@ -54,6 +54,7 @@ typedef enum {
BOOSTTEMP,
POWERDISPLAY,
AUTOSTART,
+ COOLINGBLINK,
#ifdef PIDTUNING
PIDP,
PIDI,
diff --git a/workspace/ts100/inc/Oled.h b/workspace/ts100/inc/Oled.h
index 2241f722..6f8a0cf2 100644
--- a/workspace/ts100/inc/Oled.h
+++ b/workspace/ts100/inc/Oled.h
@@ -13,8 +13,8 @@
void Oled_DisplayOn(void);
void Oled_DisplayOff(void);
-
-const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr);
+void OLED_Sync();
+void Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 height, const u8* ptr);
void Set_ShowPos(u8 x, u8 y);
void Oled_DisplayFlip();
void GPIO_Init_OLED(void);
@@ -27,11 +27,10 @@ void OLED_DrawChar(char c, uint8_t x);
void OLED_DrawExtendedChar(uint8_t id, uint8_t x);
void OLED_DrawWideChar(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);
void OLED_DrawIDLELogo();
void OLED_DrawSymbol(uint8_t x, uint8_t symbol);
-const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr);
+
void OLED_SetOrientation(uint8_t ori);
uint8_t OLED_GetOrientation();
#endif
diff --git a/workspace/ts100/inc/Settings.h b/workspace/ts100/inc/Settings.h
index c3631a51..7b392b0e 100644
--- a/workspace/ts100/inc/Settings.h
+++ b/workspace/ts100/inc/Settings.h
@@ -40,6 +40,7 @@ typedef struct {
uint8_t displayUpdateSpeed:2; //How fast the display updates / temp showing mode
uint8_t temperatureRounding:2; //Rounding mode for the temperature
uint8_t boostModeEnabled:1; //Boost mode swaps BUT_A in soldering mode to temporary soldering temp over-ride
+ uint8_t coolingTempBlink:1; //Should the temperature blink on the cool down screen until its <50C
uint16_t tempCalibration; //Temperature calibration value
uint16_t voltageDiv; //Voltage divisor factor
uint16_t BoostTemp; //Boost mode set point for the iron
diff --git a/workspace/ts100/inc/Strings.h b/workspace/ts100/inc/Strings.h
index 9a66dc17..62147794 100644
--- a/workspace/ts100/inc/Strings.h
+++ b/workspace/ts100/inc/Strings.h
@@ -12,8 +12,8 @@
#ifndef STRINGS_H_
#define STRINGS_H_
-extern const char* SettingsLongNames[13];
-extern const char* SettingsShortNames[13];
+extern const char* SettingsLongNames[14];
+extern const char* SettingsShortNames[14];
extern const char* TempCalStatus[3]; //All fixed 8 chars
extern const char* UVLOWarningString; //Fixed width 8 chars
extern const char* CoolingPromptString; //Fixed width 5 chars
diff --git a/workspace/ts100/src/Bios.c b/workspace/ts100/src/Bios.c
index 65293109..1b2f73b7 100644
--- a/workspace/ts100/src/Bios.c
+++ b/workspace/ts100/src/Bios.c
@@ -55,7 +55,7 @@ void GPIO_Config(void) {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE); // GPIOB & AFIO
GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE);
- GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
+ GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);//disables jtag and maps pins for SWD
//------ PA7 TMP36 Analog input ----------------------------------------//
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
@@ -63,7 +63,7 @@ void GPIO_Config(void) {
GPIO_Init(GPIOA, &GPIO_InitStructure);
//------ OLED_RST_PIN(PB9) ---------------------------------------------//
- GPIO_InitStructure.GPIO_Pin = OLED_RST_PIN;
+ GPIO_InitStructure.GPIO_Pin = OLED_RST_PIN|GPIO_Pin_12;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure);
@@ -100,6 +100,7 @@ void GPIO_Config(void) {
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //pullup just in case something resets the accel
GPIO_Init(GPIOB, &GPIO_InitStructure);
+ GPIO_ResetBits(GPIOA, GPIO_Pin_12);//Write PA12 low so USB does not enumerate
}
/*
* Init the ADC's
diff --git a/workspace/ts100/src/I2C.c b/workspace/ts100/src/I2C.c
index e0a4ae13..f63489b8 100644
--- a/workspace/ts100/src/I2C.c
+++ b/workspace/ts100/src/I2C.c
@@ -78,7 +78,7 @@ int I2C_Master_Read(uint8_t deviceAddr, uint8_t readAddr, uint8_t* pBuffer,
uint16_t numByteToRead) {
__IO uint32_t temp = 0;
- volatile int I2C_TimeOut = 0;
+ volatile int I2C_TimeOut = temp;
// /* While the bus is busy * /
I2C_TimeOut = 1000;
diff --git a/workspace/ts100/src/Main.c b/workspace/ts100/src/Main.c
index 063094a1..cbaf3776 100644
--- a/workspace/ts100/src/Main.c
+++ b/workspace/ts100/src/Main.c
@@ -20,6 +20,7 @@ int main(void) {
Clear_Watchdog(); //reset the Watch dog timer
ProcessUI();
DrawUI();
+ OLED_Sync();//Write out the screen buffer
delayMs(15); //Slow the system down waiting for the iron.
if (systemSettings.OrientationMode == 2) {
@@ -60,7 +61,8 @@ void setup() {
else
Init_Oled(systemSettings.OrientationMode); //Init the OLED display
- OLED_DrawString("VER 1.16", 8); //Version Number
+ OLED_DrawString("Ver 1.17", 8); //Version Number
+ OLED_Sync();
delayMs(400); //Pause to show version number
showBootLogoIfavailable();
//RESETs settings
diff --git a/workspace/ts100/src/Modes.c b/workspace/ts100/src/Modes.c
index db9f506c..2768d2ae 100644
--- a/workspace/ts100/src/Modes.c
+++ b/workspace/ts100/src/Modes.c
@@ -33,8 +33,7 @@ void ProcessUI() {
}
break;
case SOLDERING:
- if ((millis() - getLastButtonPress()) < 250)
- Buttons = 0;
+
//^ This is to make the button more delayed in timing for people to find A+B easier
//We need to check the buttons if we need to jump out
if ((Buttons == BUT_A && !systemSettings.boostModeEnabled)
@@ -221,6 +220,10 @@ void ProcessUI() {
case AUTOSTART:
systemSettings.autoStart = !systemSettings.autoStart;
break;
+ case COOLINGBLINK:
+ systemSettings.coolingTempBlink =
+ !systemSettings.coolingTempBlink;
+ break;
#ifdef PIDTUNING
case PIDP:
pidSettings.kp++;
@@ -437,17 +440,18 @@ void DrawUI() {
else if (systemSettings.displayUpdateSpeed == DISPLAYMODE_MEDIUM
&& (millis() - lastOLEDDrawTime < 100))
return;
- else if (systemSettings.displayUpdateSpeed == DISPLAYMODE_FAST
- && (millis() - lastOLEDDrawTime < 50))
- return;
+
+ Clear_Screen();
uint32_t tempavg = (temp + lastSolderingDrawnTemp1
+ lastSolderingDrawnTemp2);
tempavg /= 3;
+
drawTemp(tempavg, 0, systemSettings.temperatureRounding);
lastSolderingDrawnTemp1 = temp;
lastSolderingDrawnTemp2 = lastSolderingDrawnTemp1;
lastOLEDDrawTime = millis();
+
//Now draw symbols
if (StatusFlags == 8)
OLED_DrawChar('B', 4);
@@ -469,9 +473,8 @@ void DrawUI() {
if (cellV > 9)
cellV = 9;
OLED_DrawExtendedChar(cellV + 1, 5);
- } else {
- OLED_DrawChar(' ', 5);
}
+
if (systemSettings.displayTempInF) {
OLED_DrawChar(SettingTempFChar, 3);
} else {
@@ -487,7 +490,6 @@ void DrawUI() {
OLED_DrawWideChar((count), 6);
} else {
//Draw in the arrows if the user has the power display turned off
- OLED_BlankSlot(6 * 12 + 16, 24 - 16);//blank out the tail after the arrows
if (getIronTimer() == 0
&& (temp / 10) > (systemSettings.SolderingTemp / 10)) {
//Cooling
@@ -665,6 +667,17 @@ void DrawUI() {
break;
}
break;
+ case COOLINGBLINK:
+ OLED_DrawString(SettingsShortNames[COOLINGBLINK], 7);
+ switch (systemSettings.coolingTempBlink) {
+ case 1:
+ OLED_DrawChar(SettingTrueChar, 7);
+ break;
+ case 0:
+ OLED_DrawChar(SettingFalseChar, 7);
+ break;
+ }
+ break;
#ifdef PIDTUNING
case PIDP:
OLED_DrawString("PIDP ", 5);
@@ -688,9 +701,9 @@ void DrawUI() {
case SLEEP:
//The iron is in sleep temp mode
//Draw in temp and sleep
+ Clear_Screen();
OLED_DrawString("SLP ", 4);
drawTemp(temp, 4, systemSettings.temperatureRounding);
- OLED_BlankSlot(84, 96 - 85); //blank out after the temp
if (millis() - getLastMovement() > (10 * 60 * 1000)
&& (millis() - getLastButtonPress() > (10 * 60 * 1000))) {
@@ -703,9 +716,12 @@ void DrawUI() {
break;
case COOLING:
//We are warning the user the tip is cooling
+ Clear_Screen();
OLED_DrawString(CoolingPromptString, 5);
temp = readIronTemp(0, 1, 0xFFFF); //force temp re-reading
- drawTemp(temp, 5, systemSettings.temperatureRounding);
+ if (temp < 500 || ((millis() % 1000) > 500))
+ drawTemp(temp, 5, systemSettings.temperatureRounding);
+
break;
case UVLOWARN:
OLED_DrawString(UVLOWarningString, 8);
@@ -721,12 +737,12 @@ void DrawUI() {
if (StatusFlags == 0 || ((millis() % 1000) > 500)) {
OLED_DrawString("IN", 2);
- OLED_DrawChar(48+((voltage / 100) % 10), 2);
+ OLED_DrawChar(48 + ((voltage / 100) % 10), 2);
voltage -= (voltage / 100) * 100;
- OLED_DrawChar(48+((voltage / 10) % 10), 3);
+ OLED_DrawChar(48 + ((voltage / 10) % 10), 3);
voltage -= (voltage / 10) * 10;
OLED_DrawChar('.', 4);
- OLED_DrawChar(48+(voltage % 10), 5);
+ OLED_DrawChar(48 + (voltage % 10), 5);
OLED_DrawChar('V', 6);
OLED_DrawChar(' ', 7);
} else {
diff --git a/workspace/ts100/src/Oled.c b/workspace/ts100/src/Oled.c
index 202c4c00..0ddf102f 100644
--- a/workspace/ts100/src/Oled.c
+++ b/workspace/ts100/src/Oled.c
@@ -15,6 +15,9 @@
#include "Font.h"
int8_t displayOffset = 32;
uint8_t currentOrientation = 0;
+
+uint8_t displayBuffer[2 * 96]; //This is used to allow us to draw locally before sync'ing to the screen.
+
/*Setup params for the OLED screen*/
/*http://www.displayfuture.com/Display/datasheet/controller/SSD1307.pdf*/
/*All commands are prefixed with 0x80*/
@@ -74,7 +77,7 @@ const u8* Data_Command(u8 length, const u8* data) {
//here are are inserting the data write command at the beginning
tx_data[0] = 0x40;
length++;
- for (i = 1; i < length; i++) //Loop through the array of data
+ for (i = 1; i <= length; i++) //Loop through the array of data
{
if (data == 0)
tx_data[i] = 0;
@@ -84,6 +87,14 @@ const u8* Data_Command(u8 length, const u8* data) {
I2C_PageWrite(tx_data, length, DEVICEADDR_OLED); //write out the buffer
return data;
}
+//This causes us to write out the buffered screen data to the display
+void OLED_Sync() {
+ Set_ShowPos(0,0);
+ Data_Command(96, displayBuffer);
+ Set_ShowPos(0,1);
+ Data_Command(96, displayBuffer + 96);
+
+}
/*******************************************************************************
Function:Set_ShowPos
Description:Set the current position in GRAM that we are drawing to
@@ -103,25 +114,21 @@ void Set_ShowPos(u8 x, u8 y) {
Inputs:(x,y) start point, (width,height) of enclosing rect, pointer to data
Output: pointer to the last byte written out
*******************************************************************************/
-const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr) {
- u8 m, n, y;
-
- n = y0 + high;
- if (y0 % 8 == 0)
- m = y0 / 8;
- else
- m = y0 / 8 + 1;
-
- if (n % 8 == 0)
- y = n / 8;
- else
- y = n / 8 + 1;
-
- for (; m < y; m++) {
- Set_ShowPos(x0, m);
- ptr = Data_Command(wide, ptr);
+void Oled_DrawArea(u8 x, u8 y, u8 wide, u8 height, const u8* ptr) {
+ //We want to blat the given data over the buffer
+ //X is the left right position (index's through the display buffer)
+ //Y is the height value (affects the bits)
+ //Y is either 0 or 8, we dont do smaller bit blatting
+ u8 lines = height / 8;
+ //We draw the 1 or two stripes seperately
+ for (u8 i = 0; i < (wide * lines); i++) {
+ u8 xp = x + (i % wide);
+ u8 yoffset = i < wide ? 0 : 96;
+ if (y == 8)
+ yoffset = 96;
+ displayBuffer[xp + yoffset] = ptr[i];
}
- return ptr;
+
}
/*******************************************************************************
@@ -159,6 +166,8 @@ void Init_Oled(uint8_t leftHanded) {
displayOffset = 32;
}
I2C_PageWrite((u8 *) OLED_Setup_Array, param_len, DEVICEADDR_OLED);
+ for (uint8_t i = 0; i < 2 * 96; i++)
+ displayBuffer[i] = 0; //turn off screen
}
/*******************************************************************************
@@ -166,11 +175,8 @@ void Init_Oled(uint8_t leftHanded) {
Description:Clear the entire screen to off (black)
*******************************************************************************/
void Clear_Screen(void) {
- u8 tx_data[128];
- memset(tx_data, 0, 128);
- for (u8 i = 0; i < 2; i++) {
- Oled_DrawArea(0, i * 8, 128, 8, tx_data);
- }
+ memset(displayBuffer, 0, 96 * 2);
+
}
/*
* Draws a string onto the screen starting at the left
diff --git a/workspace/ts100/src/Settings.c b/workspace/ts100/src/Settings.c
index f0e362be..1606b52f 100644
--- a/workspace/ts100/src/Settings.c
+++ b/workspace/ts100/src/Settings.c
@@ -74,6 +74,7 @@ void resetSettings() {
systemSettings.BoostTemp = 4000; //default to 400C
systemSettings.powerDisplay = 0; //default to power display being off
systemSettings.autoStart = 0; //Auto start off for safety
+ systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C
saveSettings();
}
@@ -112,6 +113,6 @@ void showBootLogoIfavailable() {
return;
Oled_DrawArea(0, 0, 96, 16, (uint8_t*) (temp8 + 4));
-
+ OLED_Sync();
delayMs(1000);
}
diff --git a/workspace/ts100/src/Strings.c b/workspace/ts100/src/Strings.c
index 282f5b76..c015d2b2 100644
--- a/workspace/ts100/src/Strings.c
+++ b/workspace/ts100/src/Strings.c
@@ -7,7 +7,7 @@
#include "Strings.h"
#define LANG_EN
#ifdef LANG_EN
-const char* SettingsLongNames[13] =
+const char* SettingsLongNames[14] =
{
/*These are all the help text for all the settings.*/
/*All must start with 6 spaces so they come on screen nicely.*/
@@ -21,10 +21,11 @@ const char* SettingsLongNames[13] =
" Enable front key boost 450C mode when soldering",
" Temperature when in boost mode",
" Changes the arrows to a power display when soldering",
- " Automatically starts the iron into soldering on power up." };
+ " Automatically starts the iron into soldering on power up.",
+ " Blink the temperature on the cooling screen while the tip is still hot." };
-const char* TempCalStatus[3] = { "CAL TEMP", "CAL OK ", "CAL FAIL" }; //All fixed 8 chars
-const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars
+const char* TempCalStatus[3] = { "Cal Temp", "Cal OK ", "Cal Fail" }; //All fixed 8 chars
+const char* UVLOWarningString = "Low Volt"; //Fixed width 8 chars
const char* CoolingPromptString = "COOL "; //Fixed width 5 chars
const char SettingTrueChar = 'T';
const char SettingFalseChar = 'F';
@@ -39,7 +40,7 @@ const char SettingTempFChar = 'F';
#endif
#ifdef LANG_ES
-const char* SettingsLongNames[13] =
+const char* SettingsLongNames[14] =
{
/*These are all the help text for all the settings.*/
/*All must start with 6 spaces so they come on screen nicely.*/
@@ -53,7 +54,8 @@ const char* SettingsLongNames[13] =
" Activar el boton <Boost> en modo soldadura.",
" Temperatura en modo <Boost>.",
" Cambiar las flechas en pantalla por indicador de potencia en modo soldadura.",
- " Iniciar directamente modo soldadura en el encendido."};
+ " Iniciar directamente modo soldadura en el encendido.",
+ " Blink the temperature on the cooling screen while the tip is still hot."};/*Needs translation*/
const char* TempCalStatus[3] = {"CAL TEMP", "CAL OK ", "CAL FAIL"}; //All fixed 8 chars
const char* UVLOWarningString = "LOW VOLT";//Fixed width 8 chars
@@ -70,6 +72,6 @@ const char SettingTempCChar = 'C';
const char SettingTempFChar = 'F';
#endif
-const char* SettingsShortNames[13] = { "PWRSC ", "STMP ", "SLTME ", "SHTME ",
+const char* SettingsShortNames[14] = { "PWRSC ", "STMP ", "SLTME ", "SHTME ",
"MSENSE ", "TMPUNT ", "TMPRND ", "TMPSPD ", "DSPROT ", "BOOST ",
- "BTMP ", "PWRDSP ", "ASTART " };
+ "BTMP ", "PWRDSP ", "ASTART ", "CLBLNK " };