mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Merge pull request #1171 from discip/master
changed the source of the DisconnectedTip Icon to reduce code 😊
This commit is contained in:
@@ -134,18 +134,12 @@ const uint8_t idleScreenBG[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x22, 0x4a, 0x46, 0x8a, 0xa6, 0x8a, 0xa6, 0x8a, 0xa6,
|
||||
0x8a, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xa6, 0x8e, 0xbe, 0x80, 0xae, 0x94, 0x8c, 0x94, 0x88, 0x8a, 0x89, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00};
|
||||
const uint8_t disconnectedTipIcon[] = {
|
||||
const uint8_t disconnectedTip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xcc, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x1c, 0xcc, 0x40,
|
||||
0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0x60, 0xe0, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02, 0x05, 0x00, 0x07, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04,
|
||||
0x31, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x39, 0x30, 0x01, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x09, 0x0f};
|
||||
const uint8_t disconnectedTipIconFlip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0xe0, 0x60, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x40, 0xcc, 0x1c, 0x38, 0x70, 0x20, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x9c, 0xcc, 0xc0, 0xc0,
|
||||
0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x09, 0x04, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x03, 0x01, 0x30,
|
||||
0x39, 0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x38, 0x31, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x07, 0x00, 0x05, 0x02, 0x01, 0x02, 0x01, 0x01, 0x01};
|
||||
#endif
|
||||
|
||||
#if defined(MODEL_TS80) + defined(MODEL_TS80P) >= 1
|
||||
@@ -158,18 +152,12 @@ const uint8_t idleScreenBG[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x44, 0x4c, 0x94, 0x8c, 0x94, 0x8c, 0x94, 0x8c,
|
||||
0x94, 0x8c, 0x94, 0x80, 0x9c, 0x8a, 0xa6, 0x8a, 0xa6, 0x8e, 0xa6, 0x9c, 0x81, 0x94, 0x88, 0x88, 0x8a, 0x81, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00};
|
||||
const uint8_t disconnectedTipIcon[] = {
|
||||
const uint8_t disconnectedTip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0x40, 0xc0, 0x40, 0x80, 0x00, 0x80, 0x80, 0x8c, 0x9c, 0x38, 0x70, 0xe0, 0xc0, 0x80, 0x20, 0x70, 0x38, 0x9c, 0x8c,
|
||||
0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0x40, 0xe0, 0x60, 0xe0, 0x01, 0x01, 0x01, 0x02, 0x00, 0x03, 0x04, 0x01, 0x04, 0x01, 0x04, 0x01, 0x03, 0x00, 0x02,
|
||||
0x01, 0x32, 0x39, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x31, 0x02, 0x01, 0x02, 0x00, 0x02, 0x01, 0x04, 0x01, 0x04, 0x01, 0x0a, 0x01, 0x0f};
|
||||
const uint8_t disconnectedTipIconFlip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0xe0, 0x60, 0xe0, 0x40, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x8c, 0x9c, 0x38, 0x70, 0x20, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x9c, 0x8c, 0x80, 0x80, 0x00,
|
||||
0x80, 0x40, 0xc0, 0x40, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x0a, 0x01, 0x04, 0x01, 0x04, 0x01, 0x02, 0x00, 0x02, 0x01, 0x02, 0x31, 0x38,
|
||||
0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x39, 0x32, 0x01, 0x02, 0x00, 0x03, 0x01, 0x04, 0x01, 0x04, 0x01, 0x04, 0x03, 0x00, 0x02, 0x01, 0x01, 0x01};
|
||||
#endif
|
||||
|
||||
#ifdef MODEL_MHP30
|
||||
@@ -182,18 +170,12 @@ const uint8_t idleScreenBG[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0xba, 0x83, 0x80, 0x8e, 0xaa, 0x8e, 0x80, 0x80, 0xbf, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x18, 0x20, 0x40, 0x40, 0x86, 0x89, 0x85, 0x91, 0x8b, 0x93,
|
||||
0x8b, 0xa3, 0x97, 0xa7, 0x97, 0xa7, 0x8f, 0xaf, 0x87, 0x97, 0xa5, 0x86, 0x93, 0x8b, 0x93, 0x83, 0x89, 0xa5, 0x89, 0x46, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00};
|
||||
const uint8_t disconnectedTipIcon[] = {
|
||||
const uint8_t disconnectedTip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x30, 0x70, 0x70, 0x60, 0x4c, 0x9c, 0x38, 0x70, 0xe4, 0xcc, 0x88, 0x20, 0x70, 0x38, 0x9c, 0x4c, 0x60,
|
||||
0x70, 0x60, 0x20, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x29, 0x10, 0x22, 0x01,
|
||||
0x32, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x38, 0x30, 0x01, 0x12, 0x29, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
const uint8_t disconnectedTipIconFlip[] = {
|
||||
//
|
||||
// 41 x 16
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0xa0, 0x20, 0x60, 0x70, 0x60, 0x4c, 0x9c, 0x38, 0x70, 0x20, 0x88, 0xcc, 0xe4, 0x70, 0x38, 0x9c, 0x4c, 0x60, 0x70,
|
||||
0x70, 0x30, 0xa0, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x29, 0x12, 0x01, 0x30,
|
||||
0x38, 0x1c, 0x0e, 0x07, 0x03, 0x01, 0x04, 0x0e, 0x1c, 0x38, 0x32, 0x01, 0x22, 0x10, 0x29, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
#endif
|
||||
|
||||
// 16 x 16
|
||||
|
||||
@@ -832,6 +832,7 @@ void showWarnings() {
|
||||
}
|
||||
|
||||
uint8_t idleScreenBGF[sizeof(idleScreenBG)];
|
||||
uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
||||
/* StartGUITask function */
|
||||
void startGUITask(void const *argument) {
|
||||
(void)argument;
|
||||
@@ -853,6 +854,9 @@ void startGUITask(void const *argument) {
|
||||
for (int x = 0; x < 84; x++) {
|
||||
idleScreenBGF[(row * 84) + x] = idleScreenBG[(row * 84) + (83 - x)];
|
||||
}
|
||||
for (int x = 0; x < 41; x++) {
|
||||
disconnectedTipF[(row * 41) + x] = disconnectedTip[(row * 41) + (40 - x)];
|
||||
}
|
||||
}
|
||||
}
|
||||
getTipRawTemp(1); // reset filter
|
||||
@@ -963,9 +967,9 @@ void startGUITask(void const *argument) {
|
||||
if (OLED::getRotation()) {
|
||||
#endif
|
||||
// in right handed mode we want to draw over the first part
|
||||
OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip);
|
||||
OLED::drawArea(55, 0, 41, 16, disconnectedTipF);
|
||||
} else {
|
||||
OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon);
|
||||
OLED::drawArea(0, 0, 41, 16, disconnectedTip);
|
||||
}
|
||||
#ifdef OLED_FLIP
|
||||
if (!OLED::getRotation()) {
|
||||
@@ -1076,9 +1080,9 @@ void startGUITask(void const *argument) {
|
||||
if (OLED::getRotation()) {
|
||||
#endif
|
||||
// in right handed mode we want to draw over the first part
|
||||
OLED::drawArea(55, 0, 41, 16, disconnectedTipIconFlip);
|
||||
OLED::drawArea(55, 0, 41, 16, disconnectedTipF);
|
||||
} else {
|
||||
OLED::drawArea(0, 0, 41, 16, disconnectedTipIcon);
|
||||
OLED::drawArea(0, 0, 41, 16, disconnectedTip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user