forked from MarlinFirmware/Marlin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚸 Update FTDI Eve / CocoaPress UI (MarlinFirmware#26233)
- Loading branch information
1 parent
632de02
commit faf732c
Showing
36 changed files
with
1,568 additions
and
501 deletions.
There are no files selected for viewing
134 changes: 134 additions & 0 deletions
134
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/_bootscreen_landscape.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
|
||
/**************************************************************************** | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* To view a copy of the GNU General Public License, go to the following * | ||
* location: <http://www.gnu.org/licenses/>. * | ||
****************************************************************************/ | ||
|
||
/** | ||
* This file was auto-generated using "svg2cpp.pl" | ||
* | ||
* The encoding consists of x,y pairs with the min and max scaled to | ||
* 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the | ||
* start of a new closed path. | ||
*/ | ||
|
||
#pragma once | ||
|
||
constexpr float x_min = 0.000000; | ||
|
||
constexpr float x_max = 480.000000; | ||
|
||
constexpr float y_min = 0.000000; | ||
|
||
constexpr float y_max = 272.000000; | ||
|
||
const PROGMEM uint16_t outline[] = { | ||
0x8278, 0xC8E7, 0x7714, 0xC659, 0x6D20, 0xC0EF, 0x64D1, 0xB8D4, 0x5E5F, 0xAE2F, | ||
0x5AF5, 0xA493, 0x58F2, 0x99F6, 0x5886, 0x8B4E, 0x590F, 0x7956, 0x5997, 0x69F3, | ||
0x5B46, 0x5E96, 0x5E92, 0x5430, 0x6363, 0x4AF8, 0x69A4, 0x4327, 0x6F5B, 0x3E4A, | ||
0x7871, 0x3979, 0x82A1, 0x371E, 0x8CBB, 0x3756, 0x95A1, 0x3997, 0x9D90, 0x3D88, | ||
0xA50B, 0x43B6, 0xA6BC, 0x46C9, 0xA776, 0x4A42, 0xA669, 0x6D96, 0xA54B, 0x71E5, | ||
0xA030, 0x7B45, 0x9ECB, 0x7CC5, 0x9B2C, 0x7E1D, 0x9717, 0x7C80, 0x9521, 0x7B11, | ||
0x8FAD, 0x77D6, 0x8A1D, 0x7607, 0x82E0, 0x7609, 0x7CDD, 0x7812, 0x77F3, 0x7C15, | ||
0x75EF, 0x7EC5, 0x7830, 0x8278, 0x7D94, 0x8772, 0x847F, 0x8A0B, 0x8B98, 0x89F7, | ||
0x9127, 0x8806, 0x96AB, 0x849C, 0x9C6D, 0x81F2, 0x9F8E, 0x82E5, 0xA22C, 0x85FF, | ||
0xA63C, 0x8D9E, 0xA78B, 0x931F, 0xA68F, 0xB5E2, 0xA5D0, 0xB944, 0xA430, 0xBC3E, | ||
0x9E55, 0xC146, 0x94CA, 0xC660, 0x8A75, 0xC8DB, 0x8278, 0xC8E7, 0x8278, 0xC8E7 | ||
}; | ||
|
||
const PROGMEM uint16_t shadow[] = { | ||
0x8699, 0x52F4, 0x807A, 0x5409, 0x7A89, 0x576A, 0x7583, 0x5D79, 0x7227, 0x6695, | ||
0x714B, 0x70C7, 0x71C8, 0x75DB, 0x730A, 0x7A69, 0x7496, 0x7A0E, 0x7601, 0x787F, | ||
0x78EF, 0x7565, 0x80E9, 0x7178, 0x8924, 0x7108, 0x914E, 0x7393, 0x9914, 0x789A, | ||
0x9B62, 0x792D, 0x9D8A, 0x7823, 0xA0FE, 0x72DA, 0xA34C, 0x6DC9, 0xA3D7, 0x6766, | ||
0xA42B, 0x5E98, 0xA3FD, 0x55F8, 0xA279, 0x55CE, 0xA12E, 0x578E, 0x9FE2, 0x59BB, | ||
0x9E59, 0x5AD8, 0x9AAC, 0x5AE1, 0x9728, 0x58ED, 0x9019, 0x54A3, 0x8699, 0x52F4, | ||
0x8699, 0x52F4, 0xFFFF, 0x5CA3, 0x849F, 0x5B93, 0x8686, 0x5B52, 0x896F, 0x5B3F, | ||
0x8FA9, 0x5C60, 0x9D67, 0x6003, 0xA994, 0x6582, 0xB393, 0x6C3B, 0xBAC7, 0x7604, | ||
0xC0E2, 0x8047, 0xC3D1, 0x8AB3, 0xC3DC, 0x94FB, 0xC14A, 0x9C85, 0xBD52, 0xA35D, | ||
0xB6C2, 0xA41B, 0xABC2, 0xA460, 0xA092, 0xA416, 0x9C7C, 0xA33E, 0x9B91, 0xA20E, | ||
0x9C3C, 0x9618, 0xA353, 0x8992, 0xA62E, 0x7CED, 0xA4E9, 0x7097, 0x9FA2, 0x6ADE, | ||
0x9B4F, 0x65A4, 0x9557, 0x6117, 0x8DDF, 0x5D63, 0x850D, 0x5CA3, 0x849F, 0x5CA3, | ||
0x849F | ||
}; | ||
|
||
const PROGMEM uint16_t highlight[] = { | ||
0x861C, 0x5348, 0x8243, 0x53C6, 0x7EBF, 0x5693, 0x7C12, 0x5B55, 0x7ABE, 0x61B3, | ||
0x7AFC, 0x6656, 0x7C42, 0x6A49, 0x7FB1, 0x7163, 0x862A, 0x7090, 0x8C99, 0x717A, | ||
0x92E2, 0x740A, 0x98E8, 0x782A, 0x9AB3, 0x7852, 0x9C22, 0x7665, 0x9E0C, 0x7087, | ||
0x9E69, 0x65BE, 0x9C07, 0x5BDE, 0x9319, 0x568D, 0x8E92, 0x544E, 0x89E2, 0x534D, | ||
0x861C, 0x5348, 0x861C, 0x5348, 0xFFFF, 0x6B6A, 0x9CA0, 0x69D9, 0x9F11, 0x695E, | ||
0xA2AD, 0x6A25, 0xAA51, 0x6DB0, 0xBBAA, 0x785A, 0xC170, 0x8372, 0xC3D0, 0x8E9F, | ||
0xC2E2, 0x9987, 0xBEBD, 0x9CAB, 0xBCE9, 0x9EFE, 0xB9D2, 0x9E63, 0xB379, 0x9CE9, | ||
0xAD92, 0x98DE, 0xA2B8, 0x8D7F, 0xA5FA, 0x81FE, 0xA636, 0x76A6, 0xA32E, 0x6BC5, | ||
0x9CA0, 0x6B6A, 0x9CA0, 0x6B6A, 0x9CA0 | ||
}; | ||
|
||
const PROGMEM uint16_t stroke[] = { | ||
0x8282, 0xC890, 0x7A14, 0xC6FB, 0x7257, 0xC3D9, 0x6B6A, 0xBF38, 0x6569, 0xB928, | ||
0x5E84, 0xADEC, 0x5B1E, 0xA460, 0x5926, 0x99F8, 0x58A5, 0x90C0, 0x59B6, 0x6B3D, | ||
0x5B4C, 0x5F6C, 0x5EA3, 0x549E, 0x63A2, 0x4B13, 0x6A2E, 0x430B, 0x71D8, 0x3D0C, | ||
0x7A7A, 0x3923, 0x83D5, 0x3761, 0x8DAA, 0x37DB, 0x98A8, 0x3B38, 0xA283, 0x4193, | ||
0xA638, 0x4620, 0xA741, 0x4B64, 0xA6C5, 0x5D20, 0xA613, 0x6E81, 0xA43A, 0x738A, | ||
0xA01F, 0x7AE8, 0x9DE9, 0x7D0E, 0x9B69, 0x7DBD, 0x9629, 0x7B6D, 0x905C, 0x77C9, | ||
0x8A94, 0x75BF, 0x8402, 0x7587, 0x7E52, 0x76FE, 0x79CA, 0x79CE, 0x75B1, 0x7EC7, | ||
0x780B, 0x82C0, 0x7C5E, 0x8702, 0x8193, 0x89A9, 0x8702, 0x8AA4, 0x8C76, 0x8A18, | ||
0x91F2, 0x8803, 0x977B, 0x8464, 0x9C8C, 0x825E, 0x9EAF, 0x82C4, 0xA0FC, 0x84BC, | ||
0xA3C6, 0x8965, 0xA6CF, 0x8FEF, 0xA756, 0x9463, 0xA6DA, 0xA612, 0xA5DF, 0xB86B, | ||
0xA414, 0xBBE7, 0xA03D, 0xBF7C, 0x9648, 0xC56A, 0x8B45, 0xC86E, 0x8282, 0xC890, | ||
0x8282, 0xC890, 0xFFFF, 0x89EE, 0xC221, 0x9395, 0xBFE8, 0x9C6D, 0xBB4F, 0xA047, | ||
0xB837, 0xA298, 0xB561, 0xA30A, 0xAA1F, 0xA34B, 0x9D6D, 0xA204, 0x9E54, 0x9820, | ||
0xA474, 0x960F, 0xA542, 0x886E, 0xA808, 0x803F, 0xA783, 0x785E, 0xA57C, 0x703C, | ||
0xA168, 0x691E, 0x9BB9, 0x623D, 0x92BA, 0x5D27, 0x8795, 0x5C9D, 0x868D, 0x5C4D, | ||
0x90BE, 0x5DBC, 0x9E89, 0x6126, 0xA944, 0x6630, 0xB207, 0x6CB0, 0xB914, 0x6E6F, | ||
0xBA8C, 0x7080, 0xBC05, 0x78E3, 0xC016, 0x8263, 0xC21E, 0x89EE, 0xC221, 0x89EE, | ||
0xC221, 0xFFFF, 0x8CBB, 0xA14B, 0x9726, 0x9E32, 0xA086, 0x9855, 0xA324, 0x95C0, | ||
0xA39A, 0x92E9, 0xA121, 0x8DC2, 0x9E86, 0x8984, 0x9C63, 0x88AD, 0x98A6, 0x8A73, | ||
0x8FB6, 0x8F97, 0x86EE, 0x90FB, 0x804C, 0x8FBC, 0x7A84, 0x8C98, 0x7476, 0x85CD, | ||
0x706D, 0x7C88, 0x6EAA, 0x7064, 0x6EFF, 0x6929, 0x7056, 0x624A, 0x73DB, 0x59D0, | ||
0x76F3, 0x5586, 0x7AA5, 0x523E, 0x83F8, 0x4E97, 0x8B83, 0x4EA9, 0x9221, 0x50DF, | ||
0x98F7, 0x552D, 0x9C44, 0x56AE, 0x9DAF, 0x5652, 0xA12C, 0x5116, 0xA370, 0x4C6E, | ||
0xA381, 0x4A6D, 0xA10D, 0x4772, 0x985F, 0x41B3, 0x8EB8, 0x3E71, 0x8631, 0x3DA9, | ||
0x7DFC, 0x3EA4, 0x7645, 0x4159, 0x6F3D, 0x45BB, 0x6952, 0x4B6F, 0x646A, 0x529B, | ||
0x60B0, 0x5AA7, 0x5E57, 0x6375, 0x5D39, 0x6ED1, 0x5E1E, 0x7B35, 0x6120, 0x8666, | ||
0x6620, 0x9016, 0x6D01, 0x97F7, 0x7747, 0x9E7A, 0x83D9, 0xA18C, 0x8CBB, 0xA14B, | ||
0x8CBB, 0xA14B, 0xFFFF, 0x7481, 0x77DA, 0x793F, 0x7317, 0x7EE3, 0x701D, 0x8044, | ||
0x6FBD, 0x81B4, 0x6F76, 0x846C, 0x6F18, 0x8E1D, 0x7044, 0x97FF, 0x75D2, 0x9B2B, | ||
0x772F, 0x9DAF, 0x75F3, 0xA26D, 0x6D0E, 0xA2E9, 0x62B8, 0xA33C, 0x583A, 0xA31E, | ||
0x573E, 0xA252, 0x5871, 0x9FC0, 0x5BDB, 0x9CD5, 0x5D2A, 0x9751, 0x5AEC, 0x914A, | ||
0x5720, 0x8B83, 0x5519, 0x83E3, 0x5506, 0x7ECB, 0x56B4, 0x7A0F, 0x59E9, 0x765D, | ||
0x5E9D, 0x73CE, 0x64A3, 0x727C, 0x6BCF, 0x7286, 0x72FD, 0x73A3, 0x78D6, 0x7481, | ||
0x77DA, 0x7481, 0x77DA | ||
}; | ||
|
||
const PROGMEM uint16_t surface[] = { | ||
0x8CBB, 0xA14B, 0x9726, 0x9E32, 0xA086, 0x9855, 0xA324, 0x95C0, 0xA39A, 0x92E9, | ||
0xA121, 0x8DC2, 0x9E86, 0x8984, 0x9C63, 0x88AD, 0x98A6, 0x8A73, 0x8FB6, 0x8F97, | ||
0x86EE, 0x90FB, 0x804C, 0x8FBC, 0x7A84, 0x8C98, 0x7476, 0x85CD, 0x706D, 0x7C88, | ||
0x6EAA, 0x7064, 0x6EFF, 0x6929, 0x7056, 0x624A, 0x73DB, 0x59D0, 0x76F3, 0x5586, | ||
0x7AA5, 0x523E, 0x83F8, 0x4E97, 0x8B83, 0x4EA9, 0x9221, 0x50DF, 0x98F7, 0x552D, | ||
0x9C44, 0x56AE, 0x9DAF, 0x5652, 0xA12C, 0x5116, 0xA370, 0x4C6E, 0xA381, 0x4A6D, | ||
0xA10D, 0x4772, 0x985F, 0x41B3, 0x8EB8, 0x3E71, 0x8631, 0x3DA9, 0x7DFC, 0x3EA4, | ||
0x7645, 0x4159, 0x6F3D, 0x45BB, 0x6952, 0x4B6F, 0x646A, 0x529B, 0x60B0, 0x5AA7, | ||
0x5E57, 0x6375, 0x5D39, 0x6ED1, 0x5E1E, 0x7B35, 0x6120, 0x8666, 0x6620, 0x9016, | ||
0x6D01, 0x97F7, 0x7747, 0x9E7A, 0x83D9, 0xA18C, 0x8CBB, 0xA14B, 0x8CBB, 0xA14B | ||
}; | ||
|
||
//#define LOGO_BACKGROUND 0xF05A22 | ||
#define LOGO_BACKGROUND 0xFFFFFF | ||
|
||
#define LOGO_PAINT_PATHS \ | ||
LOGO_PAINT_PATH(0xF27121, surface) \ | ||
LOGO_PAINT_PATH(0x6B2C1B, shadow) \ | ||
LOGO_PAINT_PATH(0xBC3E26, highlight) \ | ||
LOGO_PAINT_PATH(0x3C2215, stroke) |
116 changes: 116 additions & 0 deletions
116
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
/******************** | ||
* about_screen.cpp * | ||
********************/ | ||
|
||
/**************************************************************************** | ||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. * | ||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * | ||
* * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* To view a copy of the GNU General Public License, go to the following * | ||
* location: <https://www.gnu.org/licenses/>. * | ||
****************************************************************************/ | ||
|
||
#include "../config.h" | ||
#include "../screens.h" | ||
|
||
#ifdef COCOA_ABOUT_SCREEN | ||
|
||
#define GRID_COLS 4 | ||
#define GRID_ROWS 8 | ||
|
||
using namespace FTDI; | ||
using namespace Theme; | ||
using namespace ExtUI; | ||
|
||
void AboutScreen::onEntry() { | ||
BaseScreen::onEntry(); | ||
sound.play(chimes, PLAY_ASYNCHRONOUS); | ||
} | ||
|
||
void AboutScreen::onRedraw(draw_mode_t) { | ||
CommandProcessor cmd; | ||
cmd.cmd(CLEAR_COLOR_RGB(bg_color)) | ||
.cmd(CLEAR(true,true,true)) | ||
.cmd(COLOR_RGB(bg_text_enabled)) | ||
.tag(0); | ||
|
||
#define HEADING_POS BTN_POS(1,1), BTN_SIZE(4,2) | ||
#define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1) | ||
#define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1) | ||
#define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,3) | ||
#define STATS_POS BTN_POS(1,8), BTN_SIZE(2,1) | ||
#define BACK_POS BTN_POS(3,8), BTN_SIZE(2,1) | ||
|
||
char about_str[1 | ||
+ strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) | ||
#ifdef TOOLHEAD_NAME | ||
+ strlen_P(TOOLHEAD_NAME) | ||
#endif | ||
]; | ||
#ifdef TOOLHEAD_NAME | ||
// If MSG_ABOUT_TOUCH_PANEL_2 has %s, substitute in the toolhead name. | ||
// But this is optional, so squelch the compiler warning here. | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wformat-extra-args" | ||
sprintf_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2), TOOLHEAD_NAME); | ||
#pragma GCC diagnostic pop | ||
#else | ||
strcpy_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)); | ||
#endif | ||
|
||
draw_text_box(cmd, HEADING_POS, | ||
#ifdef MACHINE_NAME | ||
F(MACHINE_NAME) | ||
#else | ||
GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_1) | ||
#endif | ||
, OPT_CENTER, font_xlarge | ||
); | ||
#if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) | ||
cmd.tag(3); | ||
#endif | ||
draw_text_box(cmd, FW_VERS_POS, | ||
#ifdef TOUCH_UI_VERSION | ||
F(TOUCH_UI_VERSION) | ||
#else | ||
FPSTR(getFirmwareName_str()) | ||
#endif | ||
, OPT_CENTER, font_medium); | ||
cmd.tag(0); | ||
draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium); | ||
draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); | ||
|
||
cmd.font(font_medium); | ||
#if ENABLED(PRINTCOUNTER) | ||
cmd.colors(normal_btn) | ||
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); | ||
#endif | ||
cmd.colors(action_btn) | ||
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); | ||
} | ||
|
||
bool AboutScreen::onTouchEnd(uint8_t tag) { | ||
switch (tag) { | ||
case 1: GOTO_PREVIOUS(); break; | ||
#if ENABLED(PRINTCOUNTER) | ||
case 2: GOTO_SCREEN(StatisticsScreen); break; | ||
#endif | ||
#if ALL(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) | ||
case 3: GOTO_SCREEN(DeveloperMenu); break; | ||
#endif | ||
default: return false; | ||
} | ||
return true; | ||
} | ||
|
||
#endif // COCOA_ABOUT_SCREEN |
33 changes: 33 additions & 0 deletions
33
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/about_screen.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/****************** | ||
* about_screen.h * | ||
******************/ | ||
|
||
/**************************************************************************** | ||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. * | ||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * | ||
* * | ||
* This program is free software: you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation, either version 3 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, * | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
* GNU General Public License for more details. * | ||
* * | ||
* To view a copy of the GNU General Public License, go to the following * | ||
* location: <https://www.gnu.org/licenses/>. * | ||
****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#define COCOA_ABOUT_SCREEN | ||
#define COCOA_ABOUT_SCREEN_CLASS AboutScreen | ||
|
||
class AboutScreen : public BaseScreen, public UncachedScreen { | ||
public: | ||
static void onEntry(); | ||
static void onRedraw(draw_mode_t); | ||
static bool onTouchEnd(uint8_t tag); | ||
}; |
Oops, something went wrong.