diff options
author | Ben V. Brown <[email protected]> | 2017-05-18 21:20:26 +1000 |
---|---|---|
committer | Ben V. Brown <[email protected]> | 2017-05-18 21:20:26 +1000 |
commit | 0ebaab5847e968ac254793b42d5b744dcc7fc464 (patch) | |
tree | a64dc80732df68c9856656fe03c7bd4f01269d8f | |
parent | 203a7c154bca2f89a3079ae1961b3770d6a72445 (diff) | |
download | IronOS-0ebaab5847e968ac254793b42d5b744dcc7fc464.tar.gz IronOS-0ebaab5847e968ac254793b42d5b744dcc7fc464.zip |
Add more intuitive idle screen with prompts
-rw-r--r-- | workspace/ts100/inc/Font.h | 66 | ||||
-rw-r--r-- | workspace/ts100/inc/Oled.h | 2 | ||||
-rw-r--r-- | workspace/ts100/src/Modes.c | 5 | ||||
-rw-r--r-- | workspace/ts100/src/Oled.c | 22 |
4 files changed, 91 insertions, 4 deletions
diff --git a/workspace/ts100/inc/Font.h b/workspace/ts100/inc/Font.h index 57415810..486b9836 100644 --- a/workspace/ts100/inc/Font.h +++ b/workspace/ts100/inc/Font.h @@ -97,4 +97,70 @@ const uint8_t FONT[]={ 0x00,0x00,0x00,0x00,0x0F,0x0F,0x0F,0x0F,0x00,0x00,0x00,0x00,/*.*/ }; +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, + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x60,0x60,0x60, + 0x60,0x60,0x60,0x60,0x60,0x70,0xF8,0x88,0x84,0x82,0x82,0x83, + 0x83,0x83,0x83,0x83,0x83,0x82,0x82,0x82,0x82,0x83,0x83,0x83, + 0x83,0x83,0x83,0x82,0x82,0x82,0x82,0x82,0x86,0x84,0x84,0x84, + 0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, + 0x84,0x84,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,0xFE,0x00, + +}; +//The top pixel row for left arrow / on hint +const uint8_t Iron_LeftArrow_UP[] = { + 0x00,0x7C,0x82,0x82,0x82,0x7C,0x00,0xFE,0x08,0x10,0x20,0xFE,//ON + 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,0x88, + 0x98,0xBF,0xBF,0x98,0x88,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; + +const uint8_t Iron_LeftArrow_DOWN[] = { + 0x00,0x7C,0x82,0x82,0x82,0x7C,0x00,0xFE,0x08,0x10,0x20,0xFE,//ON + 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,0x10, + 0x30,0x7E,0x7E,0x30,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,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; +//The top pixel row for both arrows / +const uint8_t Iron_BothArrows[] = { + 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, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88, + 0x98,0xBF,0xBF,0x98,0x88,0x00,0x00,0x00,0x00,0x88,0x98,0xBF, + 0xBF,0x98,0x88,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, +}; +//The top pixel row for right arrow / settings hint +const uint8_t Iron_RightArrow_UP[] = { + 0x00,0x8C,0x92,0x92,0x92,0x62,0x00,0xFE,0x92,0x92,0x92,0x82,//SE + 0x00,0x02,0x02,0xFE,0x02,0x02,0x00,0x02,0x02,0xFE,0x02,0x02,//TT + 0x00,0x00,0x82,0xFE,0x82,0x00,0x00,0xFE,0x08,0x10,0x20,0xFE,//IN + 0x00,0x7C,0x82,0x82,0xA2,0x62,0x00,0x8C,0x92,0x92,0x92,0x62,//GS + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x98,0xBF, + 0xBF,0x98,0x88,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, +}; +const uint8_t Iron_RightArrow_DOWN[] = { + 0x00,0x8C,0x92,0x92,0x92,0x62,0x00,0xFE,0x92,0x92,0x92,0x82,//SE + 0x00,0x02,0x02,0xFE,0x02,0x02,0x00,0x02,0x02,0xFE,0x02,0x02,//TT + 0x00,0x00,0x82,0xFE,0x82,0x00,0x00,0xFE,0x08,0x10,0x20,0xFE,//IN + 0x00,0x7C,0x82,0x82,0xA2,0x62,0x00,0x8C,0x92,0x92,0x92,0x62,//GS + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x30,0x7E, + 0x7E,0x30,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,0x00,0x00,0x00,0x00,0x00,0x00, +}; + #endif /* FONT_H_ */ diff --git a/workspace/ts100/inc/Oled.h b/workspace/ts100/inc/Oled.h index 172118a2..c46ba628 100644 --- a/workspace/ts100/inc/Oled.h +++ b/workspace/ts100/inc/Oled.h @@ -26,6 +26,6 @@ void OLED_DrawString(char* string, uint8_t length); void OLED_DrawChar(char c, uint8_t x);
void OLED_DrawTwoNumber(uint8_t in, uint8_t x);
void OLED_DrawThreeNumber(uint16_t in, uint8_t x);
-
+void OLED_DrawIDLELogo();
#endif
/******************************** END OF FILE *********************************/
diff --git a/workspace/ts100/src/Modes.c b/workspace/ts100/src/Modes.c index a925a131..4db834fb 100644 --- a/workspace/ts100/src/Modes.c +++ b/workspace/ts100/src/Modes.c @@ -211,7 +211,7 @@ void ProcessUI() { } else if (Buttons == BUT_A) { //Try and calibrate if (tempCalStatus == 0) { - if (readTipTemp() < 300 && readSensorTemp() < 300) { + if ((readTipTemp() < 300) && (readSensorTemp() < 300)) { tempCalStatus = 1; systemSettings.tempCalibration = readTipTemp(); saveSettings(); @@ -256,7 +256,8 @@ void DrawUI() { Oled_DisplayOff(); } else { Oled_DisplayOn(); - OLED_DrawString(" IDLE ", 8); //write the word IDLE + //OLED_DrawString(" IDLE ", 8); //write the word IDLE + OLED_DrawIDLELogo(); } break; case SOLDERING: diff --git a/workspace/ts100/src/Oled.c b/workspace/ts100/src/Oled.c index 306c4170..db952650 100644 --- a/workspace/ts100/src/Oled.c +++ b/workspace/ts100/src/Oled.c @@ -105,7 +105,7 @@ void Set_ShowPos(u8 x, u8 y) { Function:Oled_DrawArea
Description:
Inputs:(x,y) start point, (width,height) of enclosing rect, pointer to data
- Output: last byte written out
+ Output: pointer to the last byte written out
*******************************************************************************/
u8* Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 high, u8* ptr) {
u8 m, n, y;
@@ -234,3 +234,23 @@ void OLED_DrawFourNumber(uint16_t in, uint8_t x) { OLED_DrawChar((in / 10) % 10, x + 2);
OLED_DrawChar(in % 10, x + 3);
}
+
+void OLED_DrawIDLELogo() {
+ static uint8_t drawAttempt = 0;
+ drawAttempt++;
+ if (drawAttempt & 0x80) {
+ if (drawAttempt & 0x08)
+ Oled_DrawArea(0, 0, 96, 8, (u8*) Iron_RightArrow_UP);
+ else
+ Oled_DrawArea(0, 0, 96, 8, (u8*) Iron_RightArrow_DOWN);
+
+ Oled_DrawArea(0, 8, 96, 8, (u8*) Iron_Base);
+ } else {
+ if (drawAttempt & 0x08)
+ Oled_DrawArea(0, 0, 96, 8, (u8*) Iron_LeftArrow_UP);
+ else
+ Oled_DrawArea(0, 0, 96, 8, (u8*) Iron_LeftArrow_DOWN);
+ Oled_DrawArea(0, 8, 96, 8, (u8*) Iron_Base);
+ }
+
+}
|