Refactor FTDI EVE Touch Screen (#20987)

This commit is contained in:
Marcio Teixeira 2021-02-03 10:03:48 -07:00 committed by Scott Lahteine
parent 77966135e8
commit 8416edd127
152 changed files with 3378 additions and 1370 deletions

View File

@ -26,7 +26,7 @@
/********************** VIRTUAL DISPATCH DATA TYPE ******************************/
uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
for (uint8_t type = 0; type < functionTableSize; type++) {
for (uint8_t type = 0; type < tableSize(); type++) {
if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
return type;
}
@ -49,7 +49,7 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
}
void ScreenRef::initializeAll() {
for (uint8_t type = 0; type < functionTableSize; type++)
for (uint8_t type = 0; type < tableSize(); type++)
GET_METHOD(type, onStartup)();
}

View File

@ -50,7 +50,11 @@ typedef enum {
#define GET_METHOD(type, method) reinterpret_cast<method##_func_t*>(pgm_read_ptr_far(&functionTable[type].method##_ptr))
#define SCREEN_TABLE PROGMEM const ScreenRef::table_t ScreenRef::functionTable[] =
#define SCREEN_TABLE_POST const uint8_t ScreenRef::functionTableSize = sizeof(ScreenRef::functionTable)/sizeof(ScreenRef::functionTable[0]);
#define SCREEN_TABLE_POST size_t ScreenRef::tableSize() { \
constexpr size_t siz = sizeof(functionTable)/sizeof(functionTable[0]); \
static_assert(siz > 0, "The screen table is empty!"); \
return siz; \
}
class ScreenRef {
protected:
@ -79,14 +83,12 @@ class ScreenRef {
uint8_t type = 0;
static PROGMEM const table_t functionTable[];
static const uint8_t functionTableSize;
public:
uint8_t getType() {return type;}
static size_t tableSize();
void setType(uint8_t t) {
type = t;
}
uint8_t getType() {return type;}
void setType(uint8_t t) {type = t;}
uint8_t lookupScreen(onRedraw_func_t onRedraw_ptr);

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_ABOUT_SCREEN
#define GRID_COLS 4
#define GRID_ROWS 7
@ -113,4 +112,4 @@ bool AboutScreen::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_ABOUT_SCREEN

View File

@ -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 FTDI_ABOUT_SCREEN
#define FTDI_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);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_ADVANCED_SETTINGS_MENU
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -153,4 +152,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO
#endif // FTDI_ADVANCED_SETTINGS_MENU

View File

@ -0,0 +1,32 @@
/***************************
* advance_settings_menu.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 FTDI_ADVANCED_SETTINGS_MENU
#define FTDI_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,18 +21,19 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_ALERT_DIALOG_BOX
constexpr static AlertDialogBoxData &mydata = screen_data.AlertDialogBox;
using namespace FTDI;
using namespace Theme;
void AlertDialogBox::onEntry() {
BaseScreen::onEntry();
sound.play(screen_data.AlertDialog.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS);
sound.play(mydata.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS);
}
void AlertDialogBox::onRedraw(draw_mode_t what) {
@ -45,7 +46,7 @@ template<typename T>
void AlertDialogBox::show(const T message) {
drawMessage(message);
storeBackground();
screen_data.AlertDialog.isError = false;
mydata.isError = false;
GOTO_SCREEN(AlertDialogBox);
}
@ -53,7 +54,7 @@ template<typename T>
void AlertDialogBox::showError(const T message) {
drawMessage(message);
storeBackground();
screen_data.AlertDialog.isError = true;
mydata.isError = true;
GOTO_SCREEN(AlertDialogBox);
}
@ -67,4 +68,4 @@ template void AlertDialogBox::show(const progmem_str);
template void AlertDialogBox::showError(const char *);
template void AlertDialogBox::showError(const progmem_str);
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_ALERT_DIALOG_BOX

View File

@ -0,0 +1,39 @@
/**********************
* alert_dialog_box.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 FTDI_ALERT_DIALOG_BOX
#define FTDI_ALERT_DIALOG_BOX_CLASS AlertDialogBox
struct AlertDialogBoxData {
bool isError;
};
class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen<ALERT_BOX_CACHE,ALERT_BOX_DL_SIZE> {
public:
static void onEntry();
static void onRedraw(draw_mode_t);
template<typename T> static void show(T);
template<typename T> static void showError(T);
static void hide();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, BACKLASH_GCODE)
#include "screens.h"
#ifdef FTDI_BACKLASH_COMP_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -73,4 +72,4 @@ bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_BACKLASH_COMP_SCREEN

View File

@ -0,0 +1,32 @@
/**********************************
* backlash_compensation_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 FTDI_BACKLASH_COMP_SCREEN
#define FTDI_BACKLASH_COMP_SCREEN_CLASS BacklashCompensationScreen
class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<BACKLASH_COMPENSATION_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,15 +21,16 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_BASE_NUMERIC_ADJ_SCREEN
using namespace FTDI;
using namespace Theme;
constexpr static BaseNumericAdjustmentScreenData &mydata = screen_data.BaseNumericAdjustmentScreen;
#if ENABLED(TOUCH_UI_PORTRAIT)
#define GRID_COLS 13
#define GRID_ROWS 10
@ -116,8 +117,8 @@ void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint
BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) {
_decimals = decimals;
if (screen_data.BaseNumericAdjustment.increment == 0) {
screen_data.BaseNumericAdjustment.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals;
if (mydata.increment == 0) {
mydata.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals;
}
return *this;
}
@ -154,7 +155,7 @@ void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) {
void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(CommandProcessor &cmd, uint8_t, const uint8_t tag) {
const char *label = PSTR("?");
uint8_t pos;
uint8_t & increment = screen_data.BaseNumericAdjustment.increment;
uint8_t & increment = mydata.increment;
if (increment == 0) {
increment = tag; // Set the default value to be the first.
@ -358,7 +359,7 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
}
void BaseNumericAdjustmentScreen::onEntry() {
screen_data.BaseNumericAdjustment.increment = 0; // This will force the increment to be picked while drawing.
mydata.increment = 0; // This will force the increment to be picked while drawing.
BaseScreen::onEntry();
CommandProcessor cmd;
cmd.set_button_style_callback(nullptr);
@ -367,14 +368,14 @@ void BaseNumericAdjustmentScreen::onEntry() {
bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1: GOTO_PREVIOUS(); return true;
case 240 ... 245: screen_data.BaseNumericAdjustment.increment = tag; break;
case 240 ... 245: mydata.increment = tag; break;
default: return current_screen.onTouchHeld(tag);
}
return true;
}
float BaseNumericAdjustmentScreen::getIncrement() {
switch (screen_data.BaseNumericAdjustment.increment) {
switch (mydata.increment) {
case 240: return 0.001;
case 241: return 0.01;
case 242: return 0.1;
@ -385,4 +386,4 @@ float BaseNumericAdjustmentScreen::getIncrement() {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_BASE_NUMERIC_ADJ_SCREEN

View File

@ -0,0 +1,87 @@
/************************************
* base_numeric_adjustment_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 FTDI_BASE_NUMERIC_ADJ_SCREEN
#define FTDI_BASE_NUMERIC_ADJ_SCREEN_CLASS BaseNumericAdjustmentScreen
struct BaseNumericAdjustmentScreenData {
uint8_t increment;
};
class BaseNumericAdjustmentScreen : public BaseScreen {
public:
enum precision_default_t {
DEFAULT_LOWEST,
DEFAULT_MIDRANGE,
DEFAULT_HIGHEST
};
protected:
class widgets_t {
private:
draw_mode_t _what;
uint8_t _line;
uint32_t _color;
uint8_t _decimals;
progmem_str _units;
enum style_t {
BTN_NORMAL,
BTN_ACTION,
BTN_TOGGLE,
BTN_DISABLED,
TEXT_AREA,
TEXT_LABEL
} _style;
protected:
void _draw_increment_btn(CommandProcessor &, uint8_t line, const uint8_t tag);
void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str, bool enabled = true, bool highlight = false);
void _button_style(CommandProcessor &cmd, style_t style);
public:
widgets_t(draw_mode_t);
widgets_t &color(uint32_t color) {_color = color; return *this;}
widgets_t &units(progmem_str units) {_units = units; return *this;}
widgets_t &draw_mode(draw_mode_t what) {_what = what; return *this;}
widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST);
void heading (progmem_str label);
void adjuster_sram_val (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void adjuster (uint8_t tag, progmem_str label, float value=0, bool is_enabled = true);
void button (uint8_t tag, progmem_str label, bool is_enabled = true);
void text_field (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true);
void two_buttons (uint8_t tag1, progmem_str label1,
uint8_t tag2, progmem_str label2, bool is_enabled = true);
void toggle (uint8_t tag, progmem_str label, bool value, bool is_enabled = true);
void home_buttons (uint8_t tag);
void increments ();
};
static float getIncrement();
public:
static void onEntry();
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_BASE_SCREEN
using namespace FTDI;
using namespace Theme;
@ -87,4 +86,4 @@ void BaseScreen::reset_menu_timeout() {
uint32_t BaseScreen::last_interaction;
#endif
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_BASE_SCREEN

View File

@ -0,0 +1,43 @@
/*****************
* base_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 FTDI_BASE_SCREEN
#define FTDI_BASE_SCREEN_CLASS BaseScreen
class BaseScreen : public UIScreen {
protected:
#if LCD_TIMEOUT_TO_STATUS > 0
static uint32_t last_interaction;
#endif
static bool buttonIsPressed(uint8_t tag);
public:
static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool);
static void reset_menu_timeout();
static void onEntry();
static void onIdle();
};

View File

@ -20,16 +20,17 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MESH)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_BED_MESH_SCREEN
using namespace FTDI;
using namespace Theme;
using namespace ExtUI;
constexpr static BedMeshScreenData &mydata = screen_data.BedMeshScreen;
#if ENABLED(TOUCH_UI_PORTRAIT)
#define GRID_COLS 2
#define GRID_ROWS 10
@ -196,7 +197,7 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::
}
if (opts & USE_HIGHLIGHT) {
const uint8_t tag = screen_data.BedMesh.highlightedTag;
const uint8_t tag = mydata.highlightedTag;
uint8_t x, y;
if (tagToPoint(tag, x, y)) {
cmd.cmd(COLOR_A(128))
@ -221,16 +222,16 @@ bool BedMeshScreen::tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y) {
}
void BedMeshScreen::onEntry() {
screen_data.BedMesh.highlightedTag = 0;
screen_data.BedMesh.count = GRID_MAX_POINTS;
screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE;
mydata.highlightedTag = 0;
mydata.count = GRID_MAX_POINTS;
mydata.message = mydata.MSG_NONE;
BaseScreen::onEntry();
}
float BedMeshScreen::getHightlightedValue() {
if (screen_data.BedMesh.highlightedTag) {
if (mydata.highlightedTag) {
xy_uint8_t pt;
tagToPoint(screen_data.BedMesh.highlightedTag, pt.x, pt.y);
tagToPoint(mydata.highlightedTag, pt.x, pt.y);
return ExtUI::getMeshPoint(pt);
}
return NAN;
@ -253,9 +254,9 @@ void BedMeshScreen::drawHighlightedPointValue() {
.tag(1).button(OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
.tag(0);
switch (screen_data.BedMesh.message) {
case screen_data.BedMesh.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
case screen_data.BedMesh.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
switch (mydata.message) {
case mydata.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
case mydata.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
default: break;
}
}
@ -277,11 +278,11 @@ void BedMeshScreen::onRedraw(draw_mode_t what) {
if (what & FOREGROUND) {
constexpr float autoscale_max_amplitude = 0.03;
const bool gotAllPoints = screen_data.BedMesh.count >= GRID_MAX_POINTS;
const bool gotAllPoints = mydata.count >= GRID_MAX_POINTS;
if (gotAllPoints) {
drawHighlightedPointValue();
}
const float levelingProgress = sq(float(screen_data.BedMesh.count) / GRID_MAX_POINTS);
const float levelingProgress = sq(float(mydata.count) / GRID_MAX_POINTS);
BedMeshScreen::drawMesh(INSET_POS(MESH_POS), ExtUI::getMeshArray(),
USE_POINTS | USE_HIGHLIGHT | USE_AUTOSCALE | (gotAllPoints ? USE_COLORS : 0),
autoscale_max_amplitude * levelingProgress
@ -290,7 +291,7 @@ void BedMeshScreen::onRedraw(draw_mode_t what) {
}
bool BedMeshScreen::onTouchStart(uint8_t tag) {
screen_data.BedMesh.highlightedTag = tag;
mydata.highlightedTag = tag;
return true;
}
@ -312,21 +313,21 @@ void BedMeshScreen::onMeshUpdate(const int8_t, const int8_t, const float) {
void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
switch (state) {
case ExtUI::MESH_START:
screen_data.BedMesh.count = 0;
screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE;
mydata.count = 0;
mydata.message = mydata.MSG_NONE;
break;
case ExtUI::MESH_FINISH:
if (screen_data.BedMesh.count == GRID_MAX_POINTS && ExtUI::getMeshValid())
screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_COMPLETE;
if (mydata.count == GRID_MAX_POINTS && ExtUI::getMeshValid())
mydata.message = mydata.MSG_MESH_COMPLETE;
else
screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_INCOMPLETE;
screen_data.BedMesh.count = GRID_MAX_POINTS;
mydata.message = mydata.MSG_MESH_INCOMPLETE;
mydata.count = GRID_MAX_POINTS;
break;
case ExtUI::PROBE_START:
screen_data.BedMesh.highlightedTag = pointToTag(x, y);
mydata.highlightedTag = pointToTag(x, y);
break;
case ExtUI::PROBE_FINISH:
screen_data.BedMesh.count++;
mydata.count++;
break;
}
BedMeshScreen::onMeshUpdate(x, y, 0);
@ -334,8 +335,8 @@ void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::pr
void BedMeshScreen::startMeshProbe() {
GOTO_SCREEN(BedMeshScreen);
screen_data.BedMesh.count = 0;
mydata.count = 0;
injectCommands_P(PSTR(BED_LEVELING_COMMANDS));
}
#endif // TOUCH_UI_FTDI_EVE && HAS_MESH
#endif // FTDI_BED_MESH_SCREEN

View File

@ -0,0 +1,62 @@
/*********************
* bed_mesh_screen.h *
*********************/
/****************************************************************************
* Written By Marcio Teixeira 2020 *
* *
* 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 FTDI_BED_MESH_SCREEN
#define FTDI_BED_MESH_SCREEN_CLASS BedMeshScreen
struct BedMeshScreenData {
enum : uint8_t {
MSG_NONE,
MSG_MESH_COMPLETE,
MSG_MESH_INCOMPLETE
} message;
uint8_t count;
uint8_t highlightedTag;
};
class BedMeshScreen : public BaseScreen, public CachedScreen<BED_MESH_SCREEN_CACHE> {
private:
enum MeshOpts {
USE_POINTS = 0x01,
USE_COLORS = 0x02,
USE_TAGS = 0x04,
USE_HIGHLIGHT = 0x08,
USE_AUTOSCALE = 0x10
};
static uint8_t pointToTag(uint8_t x, uint8_t y);
static bool tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y);
static float getHightlightedValue();
static void drawHighlightedPointValue();
static void drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts, float autoscale_max = 0.1);
public:
static void onMeshUpdate(const int8_t x, const int8_t y, const float val);
static void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t);
static void onEntry();
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static void startMeshProbe();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_ADVANCED_SETTINGS_MENU
using namespace FTDI;
using namespace Theme;
@ -134,4 +133,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_ADVANCED_SETTINGS_MENU

View File

@ -0,0 +1,32 @@
/***************************
* bio_advanced_settings.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 FTDI_BIO_ADVANCED_SETTINGS_MENU
#define FTDI_BIO_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_CONFIRM_HOME_E
using namespace FTDI;
void BioConfirmHomeE::onRedraw(draw_mode_t) {
@ -54,4 +53,4 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_CONFIRM_HOME_E

View File

@ -0,0 +1,32 @@
/****************************
* bio_confirm_home_e.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 FTDI_BIO_CONFIRM_HOME_E
#define FTDI_BIO_CONFIRM_HOME_E_CLASS BioConfirmHomeE
class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_CONFIRM_HOME_XYZ
using namespace FTDI;
void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
@ -53,4 +52,4 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_CONFIRM_HOME_XYZ

View File

@ -0,0 +1,32 @@
/**************************
* bio_confirm_home_xyz.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 FTDI_BIO_CONFIRM_HOME_XYZ
#define FTDI_BIO_CONFIRM_HOME_XYZ_CLASS BioConfirmHomeXYZ
class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_MAIN_MENU
using namespace FTDI;
using namespace Theme;
@ -85,4 +84,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_MAIN_MENU

View File

@ -0,0 +1,32 @@
/*********************
* bio_main_menu.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/>. *
****************************************************************************/
#pragma once
#define FTDI_BIO_MAIN_MENU
#define FTDI_BIO_MAIN_MENU_CLASS MainMenu
class MainMenu : public BaseScreen, public CachedScreen<MENU_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_PRINTING_DIALOG_BOX
#include "../ftdi_eve_lib/extras/circular_progress.h"
using namespace FTDI;
@ -147,4 +146,4 @@ void BioPrintingDialogBox::show() {
GOTO_SCREEN(BioPrintingDialogBox);
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_PRINTING_DIALOG_BOX

View File

@ -0,0 +1,44 @@
/*****************************
* bio_printing_dialog_box.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 FTDI_BIO_PRINTING_DIALOG_BOX
#define FTDI_BIO_PRINTING_DIALOG_BOX_CLASS BioPrintingDialogBox
class BioPrintingDialogBox : public BaseScreen, public CachedScreen<PRINTING_SCREEN_CACHE,PRINTING_SCREEN_DL_SIZE> {
private:
static void draw_status_message(draw_mode_t, const char * const);
static void draw_progress(draw_mode_t);
static void draw_time_remaining(draw_mode_t);
static void draw_interaction_buttons(draw_mode_t);
public:
static void onRedraw(draw_mode_t);
static void show();
static void setStatusMessage(const char *);
static void setStatusMessage(progmem_str);
static void onIdle();
static bool onTouchEnd(uint8_t tag);
};

View File

@ -22,11 +22,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_STATUS_SCREEN
#include "../ftdi_eve_lib/extras/poly_ui.h"
#if ENABLED(TOUCH_UI_PORTRAIT)
@ -376,4 +375,4 @@ void StatusScreen::onIdle() {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_BIO_STATUS_SCREEN

View File

@ -0,0 +1,56 @@
/*************************
* bio_status_screen.cpp *
*************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_BIO_STATUS_SCREEN
#define FTDI_BIO_STATUS_SCREEN_CLASS StatusScreen
class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE> {
private:
static float increment;
static bool jog_xy;
static bool fine_motion;
static void draw_progress(draw_mode_t what);
static void draw_temperature(draw_mode_t what);
static void draw_syringe(draw_mode_t what);
static void draw_arrows(draw_mode_t what);
static void draw_overlay_icons(draw_mode_t what);
static void draw_fine_motion(draw_mode_t what);
static void draw_buttons(draw_mode_t what);
public:
static void loadBitmaps();
static void unlockMotors();
static void setStatusMessage(const char *);
static void setStatusMessage(progmem_str);
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchHeld(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO)
#include "screens.h"
#ifdef FTDI_BIO_TUNE_MENU
using namespace FTDI;
using namespace Theme;
using namespace ExtUI;
@ -76,4 +75,4 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO
#endif // FTDI_BIO_TUNE_MENU

View File

@ -0,0 +1,35 @@
/*******************
* bio_tune_menu.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 FTDI_BIO_TUNE_MENU
#define FTDI_BIO_TUNE_MENU_CLASS TuneMenu
class TuneMenu : public BaseScreen, public CachedScreen<TUNE_SCREEN_CACHE> {
private:
static void pausePrint();
static void resumePrint();
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -22,11 +22,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_BOOT_SCREEN
#include "../ftdi_eve_lib/extras/poly_ui.h"
#include "../archim2-flash/flash_storage.h"
@ -127,4 +126,4 @@ void BootScreen::showSplashScreen() {
ExtUI::delay_ms(2500);
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_BOOT_SCREEN

View File

@ -0,0 +1,35 @@
/*****************
* boot_screen.h *
*****************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_BOOT_SCREEN
#define FTDI_BOOT_SCREEN_CLASS BootScreen
class BootScreen : public BaseScreen, public UncachedScreen {
private:
static void showSplashScreen();
public:
static void onRedraw(draw_mode_t);
static void onIdle();
};

View File

@ -20,11 +20,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, CASE_LIGHT_ENABLE)
#include "screens.h"
#ifdef FTDI_CASE_LIGHT_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -59,4 +58,4 @@ bool CaseLightScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CASE_LIGHT_SCREEN

View File

@ -0,0 +1,31 @@
/***********************
* case_light_screen.h *
***********************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_CASE_LIGHT_SCREEN
#define FTDI_CASE_LIGHT_SCREEN_CLASS CaseLightScreen
class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen<CASE_LIGHT_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,16 +21,17 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_CHANGE_FILAMENT_SCREEN
using namespace ExtUI;
using namespace FTDI;
using namespace Theme;
constexpr static ChangeFilamentScreenData &mydata = screen_data.ChangeFilamentScreen;
#ifdef TOUCH_UI_PORTRAIT
#define GRID_COLS 2
#define GRID_ROWS 11
@ -122,17 +123,17 @@ void ChangeFilamentScreen::drawTempGradient(uint16_t x, uint16_t y, uint16_t w,
void ChangeFilamentScreen::onEntry() {
BaseScreen::onEntry();
screen_data.ChangeFilament.e_tag = ExtUI::getActiveTool() + 10;
screen_data.ChangeFilament.t_tag = 0;
screen_data.ChangeFilament.repeat_tag = 0;
screen_data.ChangeFilament.saved_extruder = getActiveTool();
mydata.e_tag = ExtUI::getActiveTool() + 10;
mydata.t_tag = 0;
mydata.repeat_tag = 0;
mydata.saved_extruder = getActiveTool();
#if FILAMENT_UNLOAD_PURGE_LENGTH > 0
screen_data.ChangeFilament.need_purge = true;
mydata.need_purge = true;
#endif
}
void ChangeFilamentScreen::onExit() {
setActiveTool(screen_data.ChangeFilament.saved_extruder, true);
setActiveTool(mydata.saved_extruder, true);
}
void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
@ -170,7 +171,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
const bool t_ok = getActualTemp_celsius(e) > getSoftenTemp() - 10;
if (screen_data.ChangeFilament.t_tag && !t_ok) {
if (mydata.t_tag && !t_ok) {
cmd.text(HEATING_LBL_POS, GET_TEXT_F(MSG_HEATING));
} else if (getActualTemp_celsius(e) > 100) {
cmd.cmd(COLOR_RGB(0xFF0000))
@ -181,12 +182,12 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
#define TOG_STYLE(A) colors(A ? action_btn : normal_btn)
const bool tog2 = screen_data.ChangeFilament.t_tag == 2;
const bool tog3 = screen_data.ChangeFilament.t_tag == 3;
const bool tog4 = screen_data.ChangeFilament.t_tag == 4;
const bool tog10 = screen_data.ChangeFilament.e_tag == 10;
const bool tog2 = mydata.t_tag == 2;
const bool tog3 = mydata.t_tag == 3;
const bool tog4 = mydata.t_tag == 4;
const bool tog10 = mydata.e_tag == 10;
#if HAS_MULTI_HOTEND
const bool tog11 = screen_data.ChangeFilament.e_tag == 11;
const bool tog11 = mydata.e_tag == 11;
#endif
cmd.TOG_STYLE(tog10)
@ -200,8 +201,8 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
if (!t_ok) reset_menu_timeout();
const bool tog7 = screen_data.ChangeFilament.repeat_tag == 7;
const bool tog8 = screen_data.ChangeFilament.repeat_tag == 8;
const bool tog7 = mydata.repeat_tag == 7;
const bool tog8 = mydata.repeat_tag == 8;
{
char str[30];
@ -228,7 +229,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
}
uint8_t ChangeFilamentScreen::getSoftenTemp() {
switch (screen_data.ChangeFilament.t_tag) {
switch (mydata.t_tag) {
case 2: return LOW_TEMP;
case 3: return MED_TEMP;
case 4: return HIGH_TEMP;
@ -237,7 +238,7 @@ uint8_t ChangeFilamentScreen::getSoftenTemp() {
}
ExtUI::extruder_t ChangeFilamentScreen::getExtruder() {
switch (screen_data.ChangeFilament.e_tag) {
switch (mydata.e_tag) {
case 13: return ExtUI::E3;
case 12: return ExtUI::E2;
case 11: return ExtUI::E1;
@ -248,8 +249,8 @@ ExtUI::extruder_t ChangeFilamentScreen::getExtruder() {
void ChangeFilamentScreen::doPurge() {
#if FILAMENT_UNLOAD_PURGE_LENGTH > 0
constexpr float purge_distance_mm = FILAMENT_UNLOAD_PURGE_LENGTH;
if (screen_data.ChangeFilament.need_purge) {
screen_data.ChangeFilament.need_purge = false;
if (mydata.need_purge) {
mydata.need_purge = false;
MoveAxisScreen::setManualFeedrate(getExtruder(), purge_distance_mm);
ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(getExtruder()) + purge_distance_mm, getExtruder());
}
@ -277,23 +278,23 @@ bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) {
case 3:
case 4:
// Change temperature
screen_data.ChangeFilament.t_tag = tag;
mydata.t_tag = tag;
setTargetTemp_celsius(getSoftenTemp(), getExtruder());
break;
case 7:
screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 7) ? 0 : 7;
mydata.repeat_tag = (mydata.repeat_tag == 7) ? 0 : 7;
break;
case 8:
screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 8) ? 0 : 8;
mydata.repeat_tag = (mydata.repeat_tag == 8) ? 0 : 8;
break;
case 10:
case 11:
// Change extruder
screen_data.ChangeFilament.e_tag = tag;
screen_data.ChangeFilament.t_tag = 0;
screen_data.ChangeFilament.repeat_tag = 0;
mydata.e_tag = tag;
mydata.t_tag = 0;
mydata.repeat_tag = 0;
#if FILAMENT_UNLOAD_PURGE_LENGTH > 0
screen_data.ChangeFilament.need_purge = true;
mydata.need_purge = true;
#endif
setActiveTool(getExtruder(), true);
break;
@ -319,7 +320,7 @@ bool ChangeFilamentScreen::onTouchHeld(uint8_t tag) {
void ChangeFilamentScreen::onIdle() {
reset_menu_timeout();
if (screen_data.ChangeFilament.repeat_tag) onTouchHeld(screen_data.ChangeFilament.repeat_tag);
if (mydata.repeat_tag) onTouchHeld(mydata.repeat_tag);
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
onRefresh();
refresh_timer.start();
@ -327,4 +328,4 @@ void ChangeFilamentScreen::onIdle() {
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CHANGE_FILAMENT_SCREEN

View File

@ -0,0 +1,51 @@
/****************************
* change_filament_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 FTDI_CHANGE_FILAMENT_SCREEN
#define FTDI_CHANGE_FILAMENT_SCREEN_CLASS ChangeFilamentScreen
struct ChangeFilamentScreenData {
uint8_t e_tag, t_tag, repeat_tag;
ExtUI::extruder_t saved_extruder;
#if FILAMENT_UNLOAD_PURGE_LENGTH > 0
bool need_purge;
#endif
};
class ChangeFilamentScreen : public BaseScreen, public CachedScreen<CHANGE_FILAMENT_SCREEN_CACHE> {
private:
static uint8_t getSoftenTemp();
static ExtUI::extruder_t getExtruder();
static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
static uint32_t getTempColor(uint32_t temp);
static void doPurge();
public:
static void onEntry();
static void onExit();
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static bool onTouchHeld(uint8_t tag);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_COCOA_ADVANCED_SETTINGS_MENU
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -99,4 +98,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
}
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_ADVANCED_SETTINGS_MENU

View File

@ -0,0 +1,32 @@
/***************************************
* cocoa_press_advance_settings_menu.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 FTDI_COCOA_ADVANCED_SETTINGS_MENU
#define FTDI_COCOA_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu
class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -22,12 +22,11 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_COCOA_LOAD_CHOCOLATE_SCREEN
using namespace ExtUI;
using namespace FTDI;
using namespace Theme;
@ -98,4 +97,4 @@ bool LoadChocolateScreen::onTouchHeld(uint8_t tag) {
return false;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_LOAD_CHOCOLATE_SCREEN

View File

@ -0,0 +1,34 @@
/********************************
* cocoa_press_load_chocolate.h *
********************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2020 - Cocoa Press *
* *
* 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 FTDI_COCOA_LOAD_CHOCOLATE_SCREEN
#define FTDI_COCOA_LOAD_CHOCOLATE_SCREEN_CLASS LoadChocolateScreen
class LoadChocolateScreen : public BaseScreen, public CachedScreen<LOAD_CHOCOLATE_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -22,11 +22,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_COCOA_MAIN_MENU
using namespace FTDI;
using namespace Theme;
@ -86,4 +85,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_MAIN_MENU

View File

@ -0,0 +1,33 @@
/***************************
* cocoa_press_main_menu.h *
***************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_COCOA_MAIN_MENU
#define FTDI_COCOA_MAIN_MENU_CLASS MainMenu
class MainMenu : public BaseScreen, public CachedScreen<MENU_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -22,12 +22,11 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_COCOA_MOVE_E_SCREEN
using namespace FTDI;
using namespace ExtUI;
@ -59,4 +58,4 @@ void MoveEScreen::onIdle() {
}
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_MOVE_E_SCREEN

View File

@ -0,0 +1,33 @@
/*******************************
* cocoa_press_move_e_screen.h *
*******************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_COCOA_MOVE_E_SCREEN
#define FTDI_COCOA_MOVE_E_SCREEN_CLASS MoveEScreen
class MoveEScreen : public BaseMoveAxisScreen, public CachedScreen<MOVE_E_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static void onIdle();
};

View File

@ -1,6 +1,6 @@
/************************************
/***********************************
* cocoa_press_move_xyz_screen.cpp *
************************************/
***********************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
@ -22,12 +22,11 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_COCOA_MOVE_XYZ_SCREEN
using namespace FTDI;
using namespace ExtUI;
@ -50,4 +49,4 @@ void MoveXYZScreen::onIdle() {
}
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_MOVE_XYZ_SCREEN

View File

@ -0,0 +1,33 @@
/*********************************
* cocoa_press_move_xyz_screen.h *
*********************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_COCOA_MOVE_XYZ_SCREEN
#define FTDI_COCOA_MOVE_XYZ_SCREEN_CLASS MoveXYZScreen
class MoveXYZScreen : public BaseMoveAxisScreen, public CachedScreen<MOVE_XYZ_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static void onIdle();
};

View File

@ -20,11 +20,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_COCOA_PREHEAT_MENU
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -110,4 +109,4 @@ bool PreheatMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_PREHEAT_MENU

View File

@ -0,0 +1,31 @@
/******************************
* cocoa_press_preheat_menu.h *
******************************/
/****************************************************************************
* Written By Marcio Teixeira 2020 - Cocoa Press *
* *
* 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 FTDI_COCOA_PREHEAT_MENU
#define FTDI_COCOA_PREHEAT_MENU_CLASS PreheatMenu
class PreheatMenu : public BaseScreen, public CachedScreen<PREHEAT_MENU_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -20,18 +20,19 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_COCOA_PREHEAT_SCREEN
#include "../ftdi_eve_lib/extras/circular_progress.h"
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
constexpr static PreheatTimerScreenData &mydata = screen_data.PreheatTimerScreen;
#define GRID_COLS 2
#define GRID_ROWS 8
@ -54,7 +55,7 @@ void PreheatTimerScreen::draw_message(draw_mode_t what) {
}
uint16_t PreheatTimerScreen::secondsRemaining() {
const uint32_t elapsed_sec = (millis() - screen_data.PreheatTimer.start_ms) / 1000;
const uint32_t elapsed_sec = (millis() - mydata.start_ms) / 1000;
return (COCOA_PRESS_PREHEAT_SECONDS > elapsed_sec) ? COCOA_PRESS_PREHEAT_SECONDS - elapsed_sec : 0;
}
@ -118,7 +119,7 @@ void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_st
}
void PreheatTimerScreen::onEntry() {
screen_data.PreheatTimer.start_ms = millis();
mydata.start_ms = millis();
}
void PreheatTimerScreen::onRedraw(draw_mode_t what) {
@ -169,4 +170,4 @@ void PreheatTimerScreen::onIdle() {
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_PREHEAT_SCREEN

View File

@ -0,0 +1,46 @@
/*********************************
* cocoapress_preheat_screen.cpp *
*********************************/
/****************************************************************************
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_COCOA_PREHEAT_SCREEN
#define FTDI_COCOA_PREHEAT_SCREEN_CLASS PreheatTimerScreen
struct PreheatTimerScreenData {
uint32_t start_ms;
};
class PreheatTimerScreen : public BaseScreen, public CachedScreen<PREHEAT_TIMER_SCREEN_CACHE> {
private:
static uint16_t secondsRemaining();
static void draw_message(draw_mode_t);
static void draw_time_remaining(draw_mode_t);
static void draw_interaction_buttons(draw_mode_t);
static void draw_adjuster(draw_mode_t, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h);
public:
static void onRedraw(draw_mode_t);
static void onEntry();
static void onIdle();
static bool onTouchHeld(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -22,11 +22,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_COCOA_STATUS_SCREEN
#include "../ftdi_eve_lib/extras/poly_ui.h"
#include "cocoa_press_ui.h"
@ -304,4 +303,4 @@ void StatusScreen::onIdle() {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_STATUS_SCREEN

View File

@ -0,0 +1,55 @@
/*******************************
* cocoa_press_status_screen.h *
*******************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2019 - Cocoa Press *
* *
* 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 FTDI_COCOA_STATUS_SCREEN
#define FTDI_COCOA_STATUS_SCREEN_CLASS StatusScreen
class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE> {
private:
static float increment;
static bool jog_xy;
static bool fine_motion;
static void draw_progress(draw_mode_t what);
static void draw_temperature(draw_mode_t what);
static void draw_syringe(draw_mode_t what);
static void draw_arrows(draw_mode_t what);
static void draw_overlay_icons(draw_mode_t what);
static void draw_fine_motion(draw_mode_t what);
static void draw_buttons(draw_mode_t what);
public:
static void loadBitmaps();
static void unlockMotors();
static void setStatusMessage(const char *);
static void setStatusMessage(progmem_str);
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchHeld(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -22,12 +22,11 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN
using namespace ExtUI;
using namespace FTDI;
using namespace Theme;
@ -98,4 +97,4 @@ bool UnloadCartridgeScreen::onTouchHeld(uint8_t tag) {
return false;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN

View File

@ -0,0 +1,34 @@
/**********************************
* cocoa_press_unload_cartridge.h *
**********************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* Written By Marcio Teixeira 2020 - Cocoa Press *
* *
* 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 FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN
#define FTDI_COCOA_UNLOAD_CARTRIDGE_SCREEN_CLASS UnloadCartridgeScreen
class UnloadCartridgeScreen : public BaseScreen, public CachedScreen<UNLOAD_CARTRIDGE_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX
#include "../../../../../feature/host_actions.h"
using namespace ExtUI;
@ -50,4 +49,4 @@ bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX

View File

@ -0,0 +1,32 @@
/************************************
* confirm_abort_print_dialog_box.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 FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX
#define FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX_CLASS ConfirmAbortPrintDialogBox
class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, CALIBRATION_GCODE)
#include "screens.h"
#ifdef FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX
using namespace ExtUI;
using namespace Theme;
@ -45,4 +44,4 @@ bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX

View File

@ -0,0 +1,32 @@
/*****************************************
* confirm_auto_calibration_dialog_box.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 FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX
#define FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX_CLASS ConfirmAutoCalibrationDialogBox
class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU)
#include "screens.h"
#ifdef FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX
#include "../archim2-flash/flash_storage.h"
using namespace FTDI;
@ -51,4 +50,4 @@ bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) {
}
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX

View File

@ -0,0 +1,32 @@
/************************************
* confirm_erase_flash_dialog_box.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 FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX
#define FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX_CLASS ConfirmEraseFlashDialogBox
class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,16 +21,17 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_CONFIRM_START_PRINT_DIALOG_BOX
using namespace FTDI;
using namespace Theme;
using namespace ExtUI;
constexpr static ConfirmStartPrintDialogBoxData &mydata = screen_data.ConfirmStartPrintDialogBox;
void ConfirmStartPrintDialogBox::onRedraw(draw_mode_t) {
const char *filename = getLongFilename();
char buffer[strlen_P(GET_TEXT(MSG_START_PRINT_CONFIRMATION)) + strlen(filename) + 1];
@ -53,13 +54,13 @@ bool ConfirmStartPrintDialogBox::onTouchEnd(uint8_t tag) {
const char *ConfirmStartPrintDialogBox::getFilename(bool longName) {
FileList files;
files.seek(screen_data.ConfirmStartPrintDialog.file_index, true);
files.seek(mydata.file_index, true);
return longName ? files.longFilename() : files.shortFilename();
}
void ConfirmStartPrintDialogBox::show(uint8_t file_index) {
screen_data.ConfirmStartPrintDialog.file_index = file_index;
mydata.file_index = file_index;
GOTO_SCREEN(ConfirmStartPrintDialogBox);
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CONFIRM_START_PRINT_DIALOG_BOX

View File

@ -0,0 +1,43 @@
/************************************
* confirm_start_print_dialog_box.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 FTDI_CONFIRM_START_PRINT_DIALOG_BOX
#define FTDI_CONFIRM_START_PRINT_DIALOG_BOX_CLASS ConfirmStartPrintDialogBox
struct ConfirmStartPrintDialogBoxData {
uint8_t file_index;
};
class ConfirmStartPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
private:
inline static const char *getShortFilename() {return getFilename(false);}
inline static const char *getLongFilename() {return getFilename(true);}
static const char *getFilename(bool longName);
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t);
static void show(uint8_t file_index);
};

View File

@ -21,12 +21,11 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_CONFIRM_USER_REQUEST_ALERT_BOX
using namespace FTDI;
void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) {
@ -54,7 +53,7 @@ bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
void ConfirmUserRequestAlertBox::show(const char* msg) {
drawMessage(msg);
storeBackground();
screen_data.AlertDialog.isError = false;
screen_data.AlertDialogBox.isError = false;
GOTO_SCREEN(ConfirmUserRequestAlertBox);
}
@ -63,4 +62,4 @@ void ConfirmUserRequestAlertBox::hide() {
GOTO_PREVIOUS();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_CONFIRM_USER_REQUEST_ALERT_BOX

View File

@ -0,0 +1,35 @@
/************************************
* confirm_user_request_alert_box.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 FTDI_CONFIRM_USER_REQUEST_ALERT_BOX
#define FTDI_CONFIRM_USER_REQUEST_ALERT_BOX_CLASS ConfirmUserRequestAlertBox
class ConfirmUserRequestAlertBox : public AlertDialogBox {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t);
static void hide();
static void show(const char*);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
*/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, CUSTOM_USER_MENUS) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
#include "screens.h"
#ifdef FTDI_CUSTOM_USER_MENUS
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -212,4 +211,4 @@ bool CustomUserMenus::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && CUSTOM_USER_MENUS && !TOUCH_UI_LULZBOT_BIO && !TOUCH_UI_COCOA_PRESS
#endif // FTDI_CUSTOM_USER_MENUS

View File

@ -0,0 +1,32 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define FTDI_CUSTOM_USER_MENUS
#define FTDI_CUSTOM_USER_MENUS_CLASS CustomUserMenus
class CustomUserMenus : public BaseScreen, public CachedScreen<CUSTOM_USER_MENUS_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_DEFAULT_ACCELERATION_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -60,4 +59,4 @@ bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_DEFAULT_ACCELERATION_SCREEN

View File

@ -0,0 +1,32 @@
/*********************************
* default_acceleration_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 FTDI_DEFAULT_ACCELERATION_SCREEN
#define FTDI_DEFAULT_ACCELERATION_SCREEN_CLASS DefaultAccelerationScreen
class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DEFAULT_ACCELERATION_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU)
#include "screens.h"
#ifdef FTDI_DEVELOPER_MENU
#include "../archim2-flash/flash_storage.h"
using namespace FTDI;
@ -147,4 +146,4 @@ bool DeveloperMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_DEVELOPER_MENU

View File

@ -0,0 +1,32 @@
/********************
* developer_menu.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 FTDI_DEVELOPER_MENU
#define FTDI_DEVELOPER_MENU_CLASS DeveloperMenu
class DeveloperMenu : public BaseScreen, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_DIALOG_BOX_BASE_CLASS
using namespace FTDI;
using namespace Theme;
@ -84,4 +83,4 @@ void DialogBoxBaseClass::onIdle() {
reset_menu_timeout();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_DIALOG_BOX_BASE_CLASS

View File

@ -0,0 +1,40 @@
/***************************
* dialog_box_base_class.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 FTDI_DIALOG_BOX_BASE_CLASS
#define FTDI_DIALOG_BOX_BASE_CLASS_CLASS DialogBoxBaseClass
class DialogBoxBaseClass : public BaseScreen {
protected:
template<typename T> static void drawMessage(const T, int16_t font = 0);
static void drawYesNoButtons(uint8_t default_btn = 0);
static void drawOkayButton();
static void drawSpinner();
static void drawButton(const progmem_str);
static void onRedraw(draw_mode_t) {};
public:
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_DISPLAY_TUNING_SCREEN
using namespace FTDI;
using namespace Theme;
@ -58,4 +57,4 @@ bool DisplayTuningScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_DISPLAY_TUNING_SCREEN

View File

@ -0,0 +1,32 @@
/***************************
* display_tuning_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 FTDI_DISPLAY_TUNING_SCREEN
#define FTDI_DISPLAY_TUNING_SCREEN_CLASS DisplayTuningScreen
class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DISPLAY_TIMINGS_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_ENDSTOP_STATE_SCREEN
using namespace FTDI;
using namespace Theme;
using namespace ExtUI;
@ -149,4 +148,4 @@ void EndstopStatesScreen::onIdle() {
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_ENDSTOP_STATE_SCREEN

View File

@ -0,0 +1,35 @@
/**************************
* endstop_state_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 FTDI_ENDSTOP_STATE_SCREEN
#define FTDI_ENDSTOP_STATE_SCREEN_CLASS EndstopStatesScreen
class EndstopStatesScreen : public BaseScreen, public UncachedScreen {
public:
static void onEntry();
static void onExit();
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_FEEDRATE_PERCENT_SCREEN
using namespace FTDI;
using namespace ExtUI;
@ -49,4 +48,4 @@ bool FeedratePercentScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_FEEDRATE_PERCENT_SCREEN

View File

@ -0,0 +1,32 @@
/*****************************
* feedrate_percent_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 FTDI_FEEDRATE_PERCENT_SCREEN
#define FTDI_FEEDRATE_PERCENT_SCREEN_CLASS FeedratePercentScreen
class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MAX_FEEDRATE_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
#include "screens.h"
#ifdef FTDI_FILAMENT_MENU
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -82,4 +81,4 @@ bool FilamentMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_FILAMENT_MENU

View File

@ -0,0 +1,32 @@
/*******************
* filament_menu.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 FTDI_FILAMENT_MENU
#define FTDI_FILAMENT_MENU_CLASS FilamentMenu
class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, FILAMENT_RUNOUT_SENSOR)
#include "screens.h"
#ifdef FTDI_FILAMENT_RUNOUT_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -62,4 +61,4 @@ bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_FILAMENT_RUNOUT_SCREEN

View File

@ -0,0 +1,32 @@
/****************************
* filament_runout_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 FTDI_FILAMENT_RUNOUT_SCREEN
#define FTDI_FILAMENT_RUNOUT_SCREEN_CLASS FilamentRunoutScreen
class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_RUNOUT_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,19 +21,20 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, SDSUPPORT)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_FILES_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
constexpr static FilesScreenData &mydata = screen_data.FilesScreen;
void FilesScreen::onEntry() {
screen_data.Files.cur_page = 0;
screen_data.Files.selected_tag = 0xFF;
mydata.cur_page = 0;
mydata.selected_tag = 0xFF;
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP);
#endif
@ -50,21 +51,21 @@ const char *FilesScreen::getSelectedFilename(bool longName) {
void FilesScreen::drawSelectedFile() {
FileList files;
files.seek(getSelectedFileIndex(), true);
screen_data.Files.flags.is_dir = files.isDir();
mydata.flags.is_dir = files.isDir();
drawFileButton(
files.filename(),
screen_data.Files.selected_tag,
screen_data.Files.flags.is_dir,
mydata.selected_tag,
mydata.flags.is_dir,
true
);
}
uint16_t FilesScreen::getSelectedFileIndex() {
return getFileForTag(screen_data.Files.selected_tag);
return getFileForTag(mydata.selected_tag);
}
uint16_t FilesScreen::getFileForTag(uint8_t tag) {
return screen_data.Files.cur_page * files_per_page + tag - 2;
return mydata.cur_page * files_per_page + tag - 2;
}
#if ENABLED(TOUCH_UI_PORTRAIT)
@ -106,15 +107,15 @@ void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir,
void FilesScreen::drawFileList() {
FileList files;
screen_data.Files.num_page = max(1,ceil(float(files.count()) / files_per_page));
screen_data.Files.cur_page = min(screen_data.Files.cur_page, screen_data.Files.num_page-1);
screen_data.Files.flags.is_root = files.isAtRootDir();
mydata.num_page = max(1,ceil(float(files.count()) / files_per_page));
mydata.cur_page = min(mydata.cur_page, mydata.num_page-1);
mydata.flags.is_root = files.isAtRootDir();
#undef MARGIN_T
#undef MARGIN_B
#define MARGIN_T 0
#define MARGIN_B 0
uint16_t fileIndex = screen_data.Files.cur_page * files_per_page;
uint16_t fileIndex = mydata.cur_page * files_per_page;
for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
if (files.seek(fileIndex)) {
drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
@ -126,8 +127,8 @@ void FilesScreen::drawFileList() {
}
void FilesScreen::drawHeader() {
const bool prev_enabled = screen_data.Files.cur_page > 0;
const bool next_enabled = screen_data.Files.cur_page < (screen_data.Files.num_page - 1);
const bool prev_enabled = mydata.cur_page > 0;
const bool next_enabled = mydata.cur_page < (mydata.num_page - 1);
#undef MARGIN_T
#undef MARGIN_B
@ -136,7 +137,7 @@ void FilesScreen::drawHeader() {
char str[16];
sprintf_P(str, PSTR("Page %d of %d"),
screen_data.Files.cur_page + 1, screen_data.Files.num_page);
mydata.cur_page + 1, mydata.num_page);
CommandProcessor cmd;
cmd.colors(normal_btn)
@ -158,8 +159,8 @@ void FilesScreen::drawFooter() {
#define MARGIN_T 5
#define MARGIN_B 5
#endif
const bool has_selection = screen_data.Files.selected_tag != 0xFF;
const uint8_t back_tag = screen_data.Files.flags.is_root ? 240 : 245;
const bool has_selection = mydata.selected_tag != 0xFF;
const uint8_t back_tag = mydata.flags.is_root ? 240 : 245;
const uint8_t y = GRID_ROWS - footer_h + 1;
const uint8_t h = footer_h;
@ -171,7 +172,7 @@ void FilesScreen::drawFooter() {
.enabled(has_selection)
.colors(has_selection ? action_btn : normal_btn);
if (screen_data.Files.flags.is_dir)
if (mydata.flags.is_dir)
cmd.tag(244).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_OPEN));
else
cmd.tag(243).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_PRINT));
@ -186,8 +187,8 @@ void FilesScreen::onRedraw(draw_mode_t what) {
}
void FilesScreen::gotoPage(uint8_t page) {
screen_data.Files.selected_tag = 0xFF;
screen_data.Files.cur_page = page;
mydata.selected_tag = 0xFF;
mydata.cur_page = page;
CommandProcessor cmd;
cmd.cmd(CMD_DLSTART)
.cmd(CLEAR_COLOR_RGB(bg_color))
@ -201,13 +202,13 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
case 240: GOTO_PREVIOUS(); return true;
case 241:
if (screen_data.Files.cur_page > 0) {
gotoPage(screen_data.Files.cur_page-1);
if (mydata.cur_page > 0) {
gotoPage(mydata.cur_page-1);
}
break;
case 242:
if (screen_data.Files.cur_page < (screen_data.Files.num_page-1)) {
gotoPage(screen_data.Files.cur_page+1);
if (mydata.cur_page < (mydata.num_page-1)) {
gotoPage(mydata.cur_page+1);
}
break;
case 243:
@ -229,18 +230,18 @@ bool FilesScreen::onTouchEnd(uint8_t tag) {
break;
default:
if (tag < 240) {
screen_data.Files.selected_tag = tag;
mydata.selected_tag = tag;
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
if (FTDI::ftdi_chip >= 810) {
const char *longFilename = getSelectedLongFilename();
if (longFilename[0]) {
CommandProcessor cmd;
uint16_t text_width = cmd.font(font_medium).text_width(longFilename);
screen_data.Files.scroll_pos = 0;
mydata.scroll_pos = 0;
if (text_width > display_width)
screen_data.Files.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
mydata.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
else
screen_data.Files.scroll_max = 0;
mydata.scroll_max = 0;
}
}
#endif
@ -254,11 +255,11 @@ void FilesScreen::onIdle() {
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
if (FTDI::ftdi_chip >= 810) {
CLCD::mem_write_32(CLCD::REG::MACRO_0,
VERTEX_TRANSLATE_X(-int32_t(screen_data.Files.scroll_pos)));
if (screen_data.Files.scroll_pos < screen_data.Files.scroll_max * 16)
screen_data.Files.scroll_pos++;
VERTEX_TRANSLATE_X(-int32_t(mydata.scroll_pos)));
if (mydata.scroll_pos < mydata.scroll_max * 16)
mydata.scroll_pos++;
}
#endif
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_FILES_SCREEN

View File

@ -0,0 +1,75 @@
/******************
* files_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 FTDI_FILES_SCREEN
#define FTDI_FILES_SCREEN_CLASS FilesScreen
struct FilesScreenData {
struct {
uint8_t is_dir : 1;
uint8_t is_root : 1;
} flags;
uint8_t selected_tag;
uint8_t num_page;
uint8_t cur_page;
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
uint16_t scroll_pos;
uint16_t scroll_max;
#endif
};
class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, FILE_SCREEN_DL_SIZE> {
private:
#if ENABLED(TOUCH_UI_PORTRAIT)
static constexpr uint8_t header_h = 2;
static constexpr uint8_t footer_h = 2;
static constexpr uint8_t files_per_page = 11;
#else
static constexpr uint8_t header_h = 1;
static constexpr uint8_t footer_h = 1;
static constexpr uint8_t files_per_page = 6;
#endif
static uint8_t getTagForLine(uint8_t line) {return line + 2;}
static uint8_t getLineForTag(uint8_t tag) {return tag - 2;}
static uint16_t getFileForTag(uint8_t tag);
static uint16_t getSelectedFileIndex();
inline static const char *getSelectedShortFilename() {return getSelectedFilename(false);}
inline static const char *getSelectedLongFilename() {return getSelectedFilename(true);}
static const char *getSelectedFilename(bool longName);
static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted);
static void drawFileList();
static void drawHeader();
static void drawFooter();
static void drawSelectedFile();
static void gotoPage(uint8_t);
public:
static void onEntry();
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,12 +21,11 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_INTERFACE_SETTINGS_SCREEN
#include "../archim2-flash/flash_storage.h"
#include "../../../../../module/settings.h"
@ -42,13 +41,14 @@ using namespace ExtUI;
using namespace Theme;
constexpr bool PERSISTENT_STORE_SUCCESS = false; // persistentStore uses true for error
constexpr static InterfaceSettingsScreenData &mydata = screen_data.InterfaceSettingsScreen;
void InterfaceSettingsScreen::onStartup() {
}
void InterfaceSettingsScreen::onEntry() {
screen_data.InterfaceSettings.brightness = CLCD::get_brightness();
screen_data.InterfaceSettings.volume = SoundPlayer::get_volume();
mydata.brightness = CLCD::get_brightness();
mydata.volume = SoundPlayer::get_volume();
BaseScreen::onEntry();
}
@ -96,9 +96,9 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
#define EDGE_R 30
.colors(ui_slider)
#if DISABLED(LCD_FYSETC_TFT81050)
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.brightness, 128)
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128)
#endif
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume, 0xFF)
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume, 0xFF)
.colors(ui_toggle)
.tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
#if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
@ -161,13 +161,13 @@ void InterfaceSettingsScreen::onIdle() {
CommandProcessor cmd;
switch (cmd.track_tag(value)) {
case 2:
screen_data.InterfaceSettings.brightness = max(11, (value * 128UL) / 0xFFFF);
CLCD::set_brightness(screen_data.InterfaceSettings.brightness);
mydata.brightness = max(11, (value * 128UL) / 0xFFFF);
CLCD::set_brightness(mydata.brightness);
SaveSettingsDialogBox::settingsChanged();
break;
case 3:
screen_data.InterfaceSettings.volume = value >> 8;
SoundPlayer::set_volume(screen_data.InterfaceSettings.volume);
mydata.volume = value >> 8;
SoundPlayer::set_volume(mydata.volume);
SaveSettingsDialogBox::settingsChanged();
break;
default:
@ -288,4 +288,4 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
}
#endif
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_INTERFACE_SETTINGS_SCREEN

View File

@ -0,0 +1,67 @@
/*******************************
* interface_settings_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 FTDI_INTERFACE_SETTINGS_SCREEN
#define FTDI_INTERFACE_SETTINGS_SCREEN_CLASS InterfaceSettingsScreen
struct InterfaceSettingsScreenData {
uint8_t volume;
uint8_t brightness;
};
class InterfaceSettingsScreen : public BaseScreen, public CachedScreen<INTERFACE_SETTINGS_SCREEN_CACHE> {
private:
struct persistent_data_t {
uint32_t touch_transform_a;
uint32_t touch_transform_b;
uint32_t touch_transform_c;
uint32_t touch_transform_d;
uint32_t touch_transform_e;
uint32_t touch_transform_f;
uint16_t passcode;
uint8_t display_brightness;
int8_t display_h_offset_adj;
int8_t display_v_offset_adj;
uint8_t sound_volume;
uint8_t bit_flags;
uint8_t event_sounds[InterfaceSoundsScreen::NUM_EVENTS];
};
public:
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
static bool backupEEPROM();
#endif
static void saveSettings(char *);
static void loadSettings(const char *);
static void defaultSettings();
static void failSafeSettings();
static void onStartup();
static void onEntry();
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,12 +21,11 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#include "screen_data.h"
#ifdef FTDI_INTERFACE_SOUNDS_SCREEN
using namespace FTDI;
using namespace Theme;
using namespace ExtUI;
@ -93,7 +92,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
cmd.font(font_medium)
.colors(ui_slider)
#define EDGE_R 30
.tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume, 0xFF)
.tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
.colors(ui_toggle)
.tag(3).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled())
#undef EDGE_R
@ -108,7 +107,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
}
void InterfaceSoundsScreen::onEntry() {
screen_data.InterfaceSettings.volume = SoundPlayer::get_volume();
screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume();
BaseScreen::onEntry();
}
@ -145,8 +144,8 @@ void InterfaceSoundsScreen::onIdle() {
CommandProcessor cmd;
switch (cmd.track_tag(value)) {
case 2:
screen_data.InterfaceSettings.volume = value >> 8;
SoundPlayer::set_volume(screen_data.InterfaceSettings.volume);
screen_data.InterfaceSettingsScreen.volume = value >> 8;
SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume);
SaveSettingsDialogBox::settingsChanged();
break;
default:
@ -157,4 +156,4 @@ void InterfaceSoundsScreen::onIdle() {
BaseScreen::onIdle();
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_INTERFACE_SOUNDS_SCREEN

View File

@ -0,0 +1,57 @@
/*****************************
* interface_sounds_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 FTDI_INTERFACE_SOUNDS_SCREEN
#define FTDI_INTERFACE_SOUNDS_SCREEN_CLASS InterfaceSoundsScreen
class InterfaceSoundsScreen : public BaseScreen, public CachedScreen<INTERFACE_SOUNDS_SCREEN_CACHE> {
public:
enum event_t {
PRINTING_STARTED = 0,
PRINTING_FINISHED = 1,
PRINTING_FAILED = 2,
NUM_EVENTS
};
private:
friend class InterfaceSettingsScreen;
static uint8_t event_sounds[NUM_EVENTS];
static const char* getSoundSelection(event_t);
static void toggleSoundSelection(event_t);
static void setSoundSelection(event_t, const FTDI::SoundPlayer::sound_t*);
public:
static void playEventSound(event_t, FTDI::play_mode_t = FTDI::PLAY_ASYNCHRONOUS);
static void defaultSettings();
static void onEntry();
static void onRedraw(draw_mode_t);
static bool onTouchStart(uint8_t tag);
static bool onTouchEnd(uint8_t tag);
static void onIdle();
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, CLASSIC_JERK)
#include "screens.h"
#ifdef FTDI_JERK_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -62,4 +61,4 @@ bool JerkScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && CLASSIC_JERK
#endif // FTDI_JERK_SCREEN

View File

@ -0,0 +1,32 @@
/*****************
* jerk_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 FTDI_JERK_SCREEN
#define FTDI_JERK_SCREEN_CLASS JerkScreen
class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JERK_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -1,6 +1,6 @@
/*******************
* boot_screen.cpp *
*******************/
/*********************************
* junction_deviation_screen.cpp *
*********************************/
/****************************************************************************
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, HAS_JUNCTION_DEVIATION)
#include "screens.h"
#ifdef FTDI_JUNCTION_DEVIATION_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -51,4 +50,4 @@ bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && !CLASSIC_JERK
#endif // FTDI_JUNCTION_DEVIATION_SCREEN

View File

@ -0,0 +1,32 @@
/*******************************
* junction_deviation_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 FTDI_JUNCTION_DEVIATION_SCREEN
#define FTDI_JUNCTION_DEVIATION_SCREEN_CLASS JunctionDeviationScreen
class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JUNC_DEV_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE)
#include "screens.h"
#ifdef FTDI_KILL_SCREEN
using namespace FTDI;
// The kill screen is an oddball that happens after Marlin has killed the events
@ -59,4 +58,4 @@ void KillScreen::show(const char *message) {
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, PLAY_SYNCHRONOUS);
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_KILL_SCREEN

View File

@ -0,0 +1,33 @@
/*****************
* kill_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 FTDI_KILL_SCREEN
#define FTDI_KILL_SCREEN_CLASS KillScreen
class KillScreen {
// The KillScreen is behaves differently than the
// others, so we do not bother extending UIScreen.
public:
static void show(const char*);
};

View File

@ -21,12 +21,12 @@
****************************************************************************/
#include "../config.h"
#include "../language/language.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && NUM_LANGUAGES > 1
#include "screens.h"
#ifdef FTDI_LANGUAGE_MENU
#include "../language/language.h"
using namespace FTDI;
using namespace Theme;
@ -63,4 +63,4 @@ bool LanguageMenu::onTouchEnd(uint8_t tag) {
return false;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_LANGUAGE_MENU

View File

@ -0,0 +1,32 @@
/*******************
* language_menu.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 FTDI_LANGUAGE_MENU
#define FTDI_LANGUAGE_MENU_CLASS LanguageMenu
class LanguageMenu : public BaseScreen, public UncachedScreen {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE,HAS_LEVELING)
#include "screens.h"
#ifdef FTDI_LEVELING_MENU
#if BOTH(HAS_BED_PROBE,BLTOUCH)
#include "../../../../../feature/bltouch.h"
#endif
@ -118,4 +117,4 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE && HAS_LEVELING
#endif // FTDI_LEVELING_MENU

View File

@ -0,0 +1,32 @@
/*******************
* leveling_menu.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 FTDI_LEVELING_MENU
#define FTDI_LEVELING_MENU_CLASS LevelingMenu
class LevelingMenu : public BaseScreen, public CachedScreen<LEVELING_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchEnd(uint8_t tag);
};

View File

@ -21,11 +21,10 @@
****************************************************************************/
#include "../config.h"
#if BOTH(TOUCH_UI_FTDI_EVE, LIN_ADVANCE)
#include "screens.h"
#ifdef FTDI_LINEAR_ADVANCE_SCREEN
using namespace FTDI;
using namespace ExtUI;
using namespace Theme;
@ -74,4 +73,4 @@ bool LinearAdvanceScreen::onTouchHeld(uint8_t tag) {
return true;
}
#endif // TOUCH_UI_FTDI_EVE
#endif // FTDI_LINEAR_ADVANCE_SCREEN

View File

@ -0,0 +1,32 @@
/***************************
* linear_advance_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 FTDI_LINEAR_ADVANCE_SCREEN
#define FTDI_LINEAR_ADVANCE_SCREEN_CLASS LinearAdvanceScreen
class LinearAdvanceScreen : public BaseNumericAdjustmentScreen, public CachedScreen<LINEAR_ADVANCE_SCREEN_CACHE> {
public:
static void onRedraw(draw_mode_t);
static bool onTouchHeld(uint8_t tag);
};

Some files were not shown because too many files have changed in this diff Show More