1
0
forked from me/IronOS

New graphics for the idle screen

This commit is contained in:
Ben V. Brown
2017-10-06 09:10:30 +11:00
parent 8b8e2a1f10
commit 835ef5d7de
4 changed files with 28 additions and 39 deletions

View File

@@ -17,7 +17,7 @@ uint8_t OLED_Setup_Array[] = { /**/
0x80, 0xD5,/*Set display clock divide ratio / osc freq*/
0x80, 0x52,/*Divide ratios*/
0x80, 0xA8,/*Set Multiplex Ratio*/
0x80, 0x0E,/*16 == max brightness,39==dimmest*/
0x80, 0x0F,/*16 == max brightness,39==dimmest*/
0x80, 0xC0,/*Set COM Scan direction*/
0x80, 0xD3,/*Set vertical Display offset*/
0x80, 0x00,/*0 Offset*/
@@ -53,6 +53,7 @@ OLED::OLED(I2C_HandleTypeDef* i2cHandle) {
fontWidth = 12;
displayOffset = 0;
displayOnOffState = true;
fontTableLength=sizeof(FONT_12);
}
@@ -71,14 +72,14 @@ void OLED::refresh() {
screenBuffer[0] = 0x80;
screenBuffer[1] = 0x21;
screenBuffer[2] = 0x80;
screenBuffer[3] = inLeftHandedMode ? 0 : 32;
screenBuffer[3] = inLeftHandedMode ? 0 : 32;//display is shifted by 32 in left handed mode as driver ram is 128 wide
screenBuffer[4] = 0x80;
screenBuffer[5] = inLeftHandedMode ? 95 : 0x7F;
screenBuffer[5] = inLeftHandedMode ? 95 : 0x7F;//End address of the ram segment we are writing to (96 wide)
screenBuffer[6] = 0x80; //Set pages to rollover after 2
screenBuffer[7] = 0x22;
screenBuffer[8] = 0x80;
screenBuffer[9] = 0x00;
screenBuffer[9] = 0x00;//start page 0
screenBuffer[10] = 0x80;
screenBuffer[11] = 0x01;

View File

@@ -694,8 +694,7 @@ void startGUITask(void const * argument) {
saveSettings();
setCalibrationOffset(systemSettings.CalibrationOffset);
HAL_IWDG_Refresh(&hiwdg);
osDelay(500);
//tempWarningState=0;//make sure warning can show
osDelay(250);
break;
}
currentlyActiveTemperatureTarget = 0; //ensure tip is off
@@ -746,9 +745,9 @@ void startGUITask(void const * argument) {
lcd.setFont(0);
if (lcd.getRotation())
lcd.drawArea(0, 0, 96, 16, idleScreenBG);
lcd.drawArea(12, 0, 84, 16, idleScreenBG);
else
lcd.drawArea(0, 0, 96, 16, idleScreenBGF);
lcd.drawArea(12, 0, 84, 16, idleScreenBGF);//Needs to be flipped
lcd.setCursor(0, 0);
gui_drawBatteryIcon();

View File

@@ -413,36 +413,29 @@ const uint8_t FontSymbols[] = {
};
const uint8_t idleScreenBG[] = {
//width = 96
//width = 84
//height = 16
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,
0x0C, 0x02, 0x02, 0x01, 0x01, 0x01, 0x81, 0xFD, 0x81, 0x01, 0x01, 0x01, 0x1D, 0xF1, 0xF1, 0x1D, 0x01, 0x01,
0x01, 0x01, 0x02, 0x02, 0x0C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x02,
0x02, 0x01, 0x01, 0x01, 0x0D, 0x1D, 0x29, 0x71, 0xA1, 0xC1, 0x01, 0x01, 0x01, 0x31, 0xC9, 0x01, 0x01, 0x01,
0x02, 0x02, 0x0C, 0xF0, 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, 0x07, 0x18, 0x20, 0x20, 0x40, 0x40, 0x40, 0x4F, 0x4F, 0x4F, 0x40, 0x40, 0x40,
0x4E, 0x43, 0x43, 0x4E, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x20, 0x40, 0x40, 0x40, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x49, 0x4A,
0x4C, 0x49, 0x48, 0x48, 0x40, 0x40, 0x20, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,0xE0,0x18,0x04,0x02,0x02,0x01,0x41,0x61,0x61,0x61,0xE1,0xC1,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
0x81,0x81,0x81,0x81,0xC1,0xE1,0x61,0x61,0x61,0x41,0x01,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,0x00,0xE0,0x18,0x04,0x02,0x02,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x99,0x65,0x01,0x01,0x81,0x41,0x01,0x02,0x02,0x04,0x18,0xE0,
0x00,0x07,0x18,0x20,0x40,0x40,0x80,0x82,0x86,0x86,0x86,0x87,0x83,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
0x81,0x81,0x81,0x81,0x83,0x87,0x86,0x86,0x86,0x82,0x80,0x80,0x40,0x40,0x20,0x18,0x07,0x00,0x00,0x07,0x18,0x20,0x40,0x40,
0x80,0x82,0x87,0x85,0x85,0x85,0x85,0x87,0x87,0x85,0x87,0x85,0x87,0x87,0x82,0x82,0x82,0x80,0x82,0x80,0x82,0x82,0x82,0x92,
0x8A,0x84,0x82,0x81,0x80,0x80,0x80,0x40,0x40,0x20,0x18,0x07,
};
const uint8_t idleScreenBGF[] = {
//width = 96
//width = 84
//height = 16
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xF0, 0x0C, 0x02, 0x02, 0x01, 0x01, 0x01, 0xC9, 0x31, 0x01, 0x01, 0x01, 0xC1, 0xA1, 0x71, 0x29,
0x1D, 0x0D, 0x01, 0x01, 0x01, 0x02, 0x02, 0x0C, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0x0C, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x1D, 0xF1, 0xF1, 0x1D, 0x01, 0x01, 0x01, 0x81, 0xFD, 0x81,
0x01, 0x01, 0x01, 0x02, 0x02, 0x0C, 0xF0, 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, 0x07, 0x18, 0x20, 0x20, 0x40, 0x40, 0x48, 0x48, 0x49, 0x4C,
0x4A, 0x49, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x40, 0x40, 0x40, 0x20, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x4E, 0x43, 0x43, 0x4E,
0x40, 0x40, 0x40, 0x4F, 0x4F, 0x4F, 0x40, 0x40, 0x40, 0x20, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0,0x18,0x04,0x02,0x02,0x01,0x41,0x81,0x01,0x01,0x65,0x99,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,0x00,0xE0,0x18,0x04,0x02,0x02,
0x01,0x01,0x41,0x61,0x61,0x61,0xE1,0xC1,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xC1,
0xE1,0x61,0x61,0x61,0x41,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,
0x07,0x18,0x20,0x40,0x40,0x80,0x80,0x80,0x81,0x82,0x84,0x8A,0x92,0x82,0x82,0x82,0x80,0x82,0x80,0x82,0x82,0x82,0x87,0x87,
0x85,0x87,0x85,0x87,0x87,0x85,0x85,0x85,0x85,0x87,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00,0x00,0x07,0x18,0x20,0x40,0x40,
0x80,0x80,0x82,0x86,0x86,0x86,0x87,0x83,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x83,
0x87,0x86,0x86,0x86,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00,
};
@@ -540,6 +533,5 @@ const unsigned char ASCII6x8[] = {
0x00, 0x44, 0x28, 0x10, 0x28, 0x44, // x
0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C, // y
0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, // z
0x14, 0x14, 0x14, 0x14, 0x14, 0x14, // horiz lines
};
#endif /* FONT_H_ */