Add blinking temp

Adds blinking temp
#39
This commit is contained in:
Ben V. Brown
2017-08-08 21:00:41 +10:00
parent 1822cece90
commit c0f2a4991a
12 changed files with 219 additions and 58 deletions

View File

@@ -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,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 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[] = { const uint8_t extendedFont[] = {
0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00, 0x00,0x00,0xF8,0x08,0x0E,0x02,0x02,0x0E,0x08,0xF8,0x00,0x00,

View File

@@ -36,9 +36,9 @@ typedef enum {
} operatingModeEnum; } operatingModeEnum;
//#define PIDTUNING //#define PIDTUNING
#ifdef 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 #else
#define SETTINGSOPTIONSCOUNT (12) /*Number of settings in the settings menu*/ #define SETTINGSOPTIONSCOUNT (13) /*Number of settings in the settings menu*/
#endif #endif
typedef enum { typedef enum {
UVCO = 0, UVCO = 0,
@@ -54,6 +54,7 @@ typedef enum {
BOOSTTEMP, BOOSTTEMP,
POWERDISPLAY, POWERDISPLAY,
AUTOSTART, AUTOSTART,
COOLINGBLINK,
#ifdef PIDTUNING #ifdef PIDTUNING
PIDP, PIDP,
PIDI, PIDI,

View File

@@ -13,8 +13,8 @@
void Oled_DisplayOn(void); void Oled_DisplayOn(void);
void Oled_DisplayOff(void); void Oled_DisplayOff(void);
void OLED_Sync();
const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr); void Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 height, const u8* ptr);
void Set_ShowPos(u8 x, u8 y); void Set_ShowPos(u8 x, u8 y);
void Oled_DisplayFlip(); void Oled_DisplayFlip();
void GPIO_Init_OLED(void); 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_DrawExtendedChar(uint8_t id, uint8_t x);
void OLED_DrawWideChar(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_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_DrawThreeNumber(uint16_t in, uint8_t x);
void OLED_DrawIDLELogo(); void OLED_DrawIDLELogo();
void OLED_DrawSymbol(uint8_t x, uint8_t symbol); 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); void OLED_SetOrientation(uint8_t ori);
uint8_t OLED_GetOrientation(); uint8_t OLED_GetOrientation();
#endif #endif

View File

@@ -40,6 +40,7 @@ typedef struct {
uint8_t displayUpdateSpeed:2; //How fast the display updates / temp showing mode uint8_t displayUpdateSpeed:2; //How fast the display updates / temp showing mode
uint8_t temperatureRounding:2; //Rounding mode for the temperature 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 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 tempCalibration; //Temperature calibration value
uint16_t voltageDiv; //Voltage divisor factor uint16_t voltageDiv; //Voltage divisor factor
uint16_t BoostTemp; //Boost mode set point for the iron uint16_t BoostTemp; //Boost mode set point for the iron

View File

@@ -12,8 +12,8 @@
#ifndef STRINGS_H_ #ifndef STRINGS_H_
#define STRINGS_H_ #define STRINGS_H_
extern const char* SettingsLongNames[13]; extern const char* SettingsLongNames[14];
extern const char* SettingsShortNames[13]; extern const char* SettingsShortNames[14];
extern const char* TempCalStatus[3]; //All fixed 8 chars extern const char* TempCalStatus[3]; //All fixed 8 chars
extern const char* UVLOWarningString; //Fixed width 8 chars extern const char* UVLOWarningString; //Fixed width 8 chars
extern const char* CoolingPromptString; //Fixed width 5 chars extern const char* CoolingPromptString; //Fixed width 5 chars

View File

@@ -55,7 +55,7 @@ void GPIO_Config(void) {
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE); // GPIOB & AFIO RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE); // GPIOB & AFIO
GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE); 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 ----------------------------------------// //------ PA7 TMP36 Analog input ----------------------------------------//
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
@@ -63,7 +63,7 @@ void GPIO_Config(void) {
GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_Init(GPIOA, &GPIO_InitStructure);
//------ OLED_RST_PIN(PB9) ---------------------------------------------// //------ 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_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure); 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_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //pullup just in case something resets the accel
GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_Init(GPIOB, &GPIO_InitStructure);
GPIO_ResetBits(GPIOA, GPIO_Pin_12);//Write PA12 low so USB does not enumerate
} }
/* /*
* Init the ADC's * Init the ADC's

View File

@@ -78,7 +78,7 @@ int I2C_Master_Read(uint8_t deviceAddr, uint8_t readAddr, uint8_t* pBuffer,
uint16_t numByteToRead) { uint16_t numByteToRead) {
__IO uint32_t temp = 0; __IO uint32_t temp = 0;
volatile int I2C_TimeOut = 0; volatile int I2C_TimeOut = temp;
// /* While the bus is busy * / // /* While the bus is busy * /
I2C_TimeOut = 1000; I2C_TimeOut = 1000;

View File

@@ -20,6 +20,7 @@ int main(void) {
Clear_Watchdog(); //reset the Watch dog timer Clear_Watchdog(); //reset the Watch dog timer
ProcessUI(); ProcessUI();
DrawUI(); DrawUI();
OLED_Sync();//Write out the screen buffer
delayMs(15); //Slow the system down waiting for the iron. delayMs(15); //Slow the system down waiting for the iron.
if (systemSettings.OrientationMode == 2) { if (systemSettings.OrientationMode == 2) {
@@ -60,7 +61,8 @@ void setup() {
else else
Init_Oled(systemSettings.OrientationMode); //Init the OLED display 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 delayMs(400); //Pause to show version number
showBootLogoIfavailable(); showBootLogoIfavailable();
//RESETs settings //RESETs settings

View File

@@ -33,8 +33,7 @@ void ProcessUI() {
} }
break; break;
case SOLDERING: 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 //^ 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 //We need to check the buttons if we need to jump out
if ((Buttons == BUT_A && !systemSettings.boostModeEnabled) if ((Buttons == BUT_A && !systemSettings.boostModeEnabled)
@@ -221,6 +220,10 @@ void ProcessUI() {
case AUTOSTART: case AUTOSTART:
systemSettings.autoStart = !systemSettings.autoStart; systemSettings.autoStart = !systemSettings.autoStart;
break; break;
case COOLINGBLINK:
systemSettings.coolingTempBlink =
!systemSettings.coolingTempBlink;
break;
#ifdef PIDTUNING #ifdef PIDTUNING
case PIDP: case PIDP:
pidSettings.kp++; pidSettings.kp++;
@@ -437,17 +440,18 @@ void DrawUI() {
else if (systemSettings.displayUpdateSpeed == DISPLAYMODE_MEDIUM else if (systemSettings.displayUpdateSpeed == DISPLAYMODE_MEDIUM
&& (millis() - lastOLEDDrawTime < 100)) && (millis() - lastOLEDDrawTime < 100))
return; return;
else if (systemSettings.displayUpdateSpeed == DISPLAYMODE_FAST
&& (millis() - lastOLEDDrawTime < 50)) Clear_Screen();
return;
uint32_t tempavg = (temp + lastSolderingDrawnTemp1 uint32_t tempavg = (temp + lastSolderingDrawnTemp1
+ lastSolderingDrawnTemp2); + lastSolderingDrawnTemp2);
tempavg /= 3; tempavg /= 3;
drawTemp(tempavg, 0, systemSettings.temperatureRounding); drawTemp(tempavg, 0, systemSettings.temperatureRounding);
lastSolderingDrawnTemp1 = temp; lastSolderingDrawnTemp1 = temp;
lastSolderingDrawnTemp2 = lastSolderingDrawnTemp1; lastSolderingDrawnTemp2 = lastSolderingDrawnTemp1;
lastOLEDDrawTime = millis(); lastOLEDDrawTime = millis();
//Now draw symbols //Now draw symbols
if (StatusFlags == 8) if (StatusFlags == 8)
OLED_DrawChar('B', 4); OLED_DrawChar('B', 4);
@@ -469,9 +473,8 @@ void DrawUI() {
if (cellV > 9) if (cellV > 9)
cellV = 9; cellV = 9;
OLED_DrawExtendedChar(cellV + 1, 5); OLED_DrawExtendedChar(cellV + 1, 5);
} else {
OLED_DrawChar(' ', 5);
} }
if (systemSettings.displayTempInF) { if (systemSettings.displayTempInF) {
OLED_DrawChar(SettingTempFChar, 3); OLED_DrawChar(SettingTempFChar, 3);
} else { } else {
@@ -487,7 +490,6 @@ void DrawUI() {
OLED_DrawWideChar((count), 6); OLED_DrawWideChar((count), 6);
} else { } else {
//Draw in the arrows if the user has the power display turned off //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 if (getIronTimer() == 0
&& (temp / 10) > (systemSettings.SolderingTemp / 10)) { && (temp / 10) > (systemSettings.SolderingTemp / 10)) {
//Cooling //Cooling
@@ -665,6 +667,17 @@ void DrawUI() {
break; break;
} }
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 #ifdef PIDTUNING
case PIDP: case PIDP:
OLED_DrawString("PIDP ", 5); OLED_DrawString("PIDP ", 5);
@@ -688,9 +701,9 @@ void DrawUI() {
case SLEEP: case SLEEP:
//The iron is in sleep temp mode //The iron is in sleep temp mode
//Draw in temp and sleep //Draw in temp and sleep
Clear_Screen();
OLED_DrawString("SLP ", 4); OLED_DrawString("SLP ", 4);
drawTemp(temp, 4, systemSettings.temperatureRounding); drawTemp(temp, 4, systemSettings.temperatureRounding);
OLED_BlankSlot(84, 96 - 85); //blank out after the temp
if (millis() - getLastMovement() > (10 * 60 * 1000) if (millis() - getLastMovement() > (10 * 60 * 1000)
&& (millis() - getLastButtonPress() > (10 * 60 * 1000))) { && (millis() - getLastButtonPress() > (10 * 60 * 1000))) {
@@ -703,9 +716,12 @@ void DrawUI() {
break; break;
case COOLING: case COOLING:
//We are warning the user the tip is cooling //We are warning the user the tip is cooling
Clear_Screen();
OLED_DrawString(CoolingPromptString, 5); OLED_DrawString(CoolingPromptString, 5);
temp = readIronTemp(0, 1, 0xFFFF); //force temp re-reading 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; break;
case UVLOWARN: case UVLOWARN:
OLED_DrawString(UVLOWarningString, 8); OLED_DrawString(UVLOWarningString, 8);
@@ -721,12 +737,12 @@ void DrawUI() {
if (StatusFlags == 0 || ((millis() % 1000) > 500)) { if (StatusFlags == 0 || ((millis() % 1000) > 500)) {
OLED_DrawString("IN", 2); OLED_DrawString("IN", 2);
OLED_DrawChar(48+((voltage / 100) % 10), 2); OLED_DrawChar(48 + ((voltage / 100) % 10), 2);
voltage -= (voltage / 100) * 100; voltage -= (voltage / 100) * 100;
OLED_DrawChar(48+((voltage / 10) % 10), 3); OLED_DrawChar(48 + ((voltage / 10) % 10), 3);
voltage -= (voltage / 10) * 10; voltage -= (voltage / 10) * 10;
OLED_DrawChar('.', 4); OLED_DrawChar('.', 4);
OLED_DrawChar(48+(voltage % 10), 5); OLED_DrawChar(48 + (voltage % 10), 5);
OLED_DrawChar('V', 6); OLED_DrawChar('V', 6);
OLED_DrawChar(' ', 7); OLED_DrawChar(' ', 7);
} else { } else {

View File

@@ -15,6 +15,9 @@
#include "Font.h" #include "Font.h"
int8_t displayOffset = 32; int8_t displayOffset = 32;
uint8_t currentOrientation = 0; 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*/ /*Setup params for the OLED screen*/
/*http://www.displayfuture.com/Display/datasheet/controller/SSD1307.pdf*/ /*http://www.displayfuture.com/Display/datasheet/controller/SSD1307.pdf*/
/*All commands are prefixed with 0x80*/ /*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 //here are are inserting the data write command at the beginning
tx_data[0] = 0x40; tx_data[0] = 0x40;
length++; 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) if (data == 0)
tx_data[i] = 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 I2C_PageWrite(tx_data, length, DEVICEADDR_OLED); //write out the buffer
return data; 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 Function:Set_ShowPos
Description:Set the current position in GRAM that we are drawing to 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 Inputs:(x,y) start point, (width,height) of enclosing rect, pointer to data
Output: pointer to the last byte written out Output: pointer to the last byte written out
*******************************************************************************/ *******************************************************************************/
const u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, const u8* ptr) { void Oled_DrawArea(u8 x, u8 y, u8 wide, u8 height, const u8* ptr) {
u8 m, n, y; //We want to blat the given data over the buffer
//X is the left right position (index's through the display buffer)
n = y0 + high; //Y is the height value (affects the bits)
if (y0 % 8 == 0) //Y is either 0 or 8, we dont do smaller bit blatting
m = y0 / 8; u8 lines = height / 8;
else //We draw the 1 or two stripes seperately
m = y0 / 8 + 1; for (u8 i = 0; i < (wide * lines); i++) {
u8 xp = x + (i % wide);
if (n % 8 == 0) u8 yoffset = i < wide ? 0 : 96;
y = n / 8; if (y == 8)
else yoffset = 96;
y = n / 8 + 1; displayBuffer[xp + yoffset] = ptr[i];
for (; m < y; m++) {
Set_ShowPos(x0, m);
ptr = Data_Command(wide, ptr);
} }
return ptr;
} }
/******************************************************************************* /*******************************************************************************
@@ -159,6 +166,8 @@ void Init_Oled(uint8_t leftHanded) {
displayOffset = 32; displayOffset = 32;
} }
I2C_PageWrite((u8 *) OLED_Setup_Array, param_len, DEVICEADDR_OLED); 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) Description:Clear the entire screen to off (black)
*******************************************************************************/ *******************************************************************************/
void Clear_Screen(void) { void Clear_Screen(void) {
u8 tx_data[128]; memset(displayBuffer, 0, 96 * 2);
memset(tx_data, 0, 128);
for (u8 i = 0; i < 2; i++) {
Oled_DrawArea(0, i * 8, 128, 8, tx_data);
}
} }
/* /*
* Draws a string onto the screen starting at the left * Draws a string onto the screen starting at the left

View File

@@ -74,6 +74,7 @@ void resetSettings() {
systemSettings.BoostTemp = 4000; //default to 400C systemSettings.BoostTemp = 4000; //default to 400C
systemSettings.powerDisplay = 0; //default to power display being off systemSettings.powerDisplay = 0; //default to power display being off
systemSettings.autoStart = 0; //Auto start off for safety systemSettings.autoStart = 0; //Auto start off for safety
systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C
saveSettings(); saveSettings();
} }
@@ -112,6 +113,6 @@ void showBootLogoIfavailable() {
return; return;
Oled_DrawArea(0, 0, 96, 16, (uint8_t*) (temp8 + 4)); Oled_DrawArea(0, 0, 96, 16, (uint8_t*) (temp8 + 4));
OLED_Sync();
delayMs(1000); delayMs(1000);
} }

View File

@@ -7,7 +7,7 @@
#include "Strings.h" #include "Strings.h"
#define LANG_EN #define LANG_EN
#ifdef LANG_EN #ifdef LANG_EN
const char* SettingsLongNames[13] = const char* SettingsLongNames[14] =
{ {
/*These are all the help text for all the settings.*/ /*These are all the help text for all the settings.*/
/*All must start with 6 spaces so they come on screen nicely.*/ /*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", " Enable front key boost 450C mode when soldering",
" Temperature when in boost mode", " Temperature when in boost mode",
" Changes the arrows to a power display when soldering", " 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* TempCalStatus[3] = { "Cal Temp", "Cal OK ", "Cal Fail" }; //All fixed 8 chars
const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars const char* UVLOWarningString = "Low Volt"; //Fixed width 8 chars
const char* CoolingPromptString = "COOL "; //Fixed width 5 chars const char* CoolingPromptString = "COOL "; //Fixed width 5 chars
const char SettingTrueChar = 'T'; const char SettingTrueChar = 'T';
const char SettingFalseChar = 'F'; const char SettingFalseChar = 'F';
@@ -39,7 +40,7 @@ const char SettingTempFChar = 'F';
#endif #endif
#ifdef LANG_ES #ifdef LANG_ES
const char* SettingsLongNames[13] = const char* SettingsLongNames[14] =
{ {
/*These are all the help text for all the settings.*/ /*These are all the help text for all the settings.*/
/*All must start with 6 spaces so they come on screen nicely.*/ /*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.", " Activar el boton <Boost> en modo soldadura.",
" Temperatura en modo <Boost>.", " Temperatura en modo <Boost>.",
" Cambiar las flechas en pantalla por indicador de potencia en modo soldadura.", " 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* TempCalStatus[3] = {"CAL TEMP", "CAL OK ", "CAL FAIL"}; //All fixed 8 chars
const char* UVLOWarningString = "LOW VOLT";//Fixed width 8 chars const char* UVLOWarningString = "LOW VOLT";//Fixed width 8 chars
@@ -70,6 +72,6 @@ const char SettingTempCChar = 'C';
const char SettingTempFChar = 'F'; const char SettingTempFChar = 'F';
#endif #endif
const char* SettingsShortNames[13] = { "PWRSC ", "STMP ", "SLTME ", "SHTME ", const char* SettingsShortNames[14] = { "PWRSC ", "STMP ", "SLTME ", "SHTME ",
"MSENSE ", "TMPUNT ", "TMPRND ", "TMPSPD ", "DSPROT ", "BOOST ", "MSENSE ", "TMPUNT ", "TMPRND ", "TMPSPD ", "DSPROT ", "BOOST ",
"BTMP ", "PWRDSP ", "ASTART " }; "BTMP ", "PWRDSP ", "ASTART ", "CLBLNK " };