Add LULZBOT_TOUCH_UI (#14967)
This commit is contained in:
parent
179d6c4ed1
commit
274934ad81
356 changed files with 22195 additions and 58 deletions
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
const uint32_t mask = MASK(DIO ## IO ## _PIN); \
|
||||
if (V) port->PIO_SODR = mask; \
|
||||
else port->PIO_CODR = mask; \
|
||||
} while(0)
|
||||
}while(0)
|
||||
|
||||
// Toggle a pin
|
||||
#define _TOGGLE(IO) _WRITE(IO, !READ(IO))
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
* \def unused
|
||||
* \brief Marking \a v as a unused parameter or value.
|
||||
*/
|
||||
#define unused(v) do { (void)(v); } while(0)
|
||||
#define unused(v) do { (void)(v); }while(0)
|
||||
|
||||
/**
|
||||
* \def barrier
|
||||
|
@ -169,7 +169,7 @@
|
|||
* heuristics and inline the function no matter how big it thinks it
|
||||
* becomes.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#ifdef __CC_ARM
|
||||
# define __always_inline __forceinline
|
||||
#elif (defined __GNUC__)
|
||||
#ifdef __always_inline
|
||||
|
@ -187,7 +187,7 @@
|
|||
* This annotation instructs the compiler to ignore its inlining
|
||||
* heuristics and not inline the function.
|
||||
*/
|
||||
#if defined(__CC_ARM)
|
||||
#ifdef __CC_ARM
|
||||
# define __no_inline __attribute__((noinline))
|
||||
#elif (defined __GNUC__)
|
||||
# define __no_inline __attribute__((__noinline__))
|
||||
|
@ -204,7 +204,7 @@
|
|||
*
|
||||
* \param expr Expression to evaluate and supposed to be nonzero.
|
||||
*/
|
||||
#if defined(_ASSERT_ENABLE_)
|
||||
#ifdef _ASSERT_ENABLE_
|
||||
# if defined(TEST_SUITE_DEFINE_ASSERT_MACRO)
|
||||
// Assert() is defined in unit_test/suite.h
|
||||
# include "unit_test/suite.h"
|
||||
|
@ -998,14 +998,14 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
|
|||
#endif // #ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
#if defined(__ICCARM__)
|
||||
#ifdef __ICCARM__
|
||||
#define SHORTENUM __packed
|
||||
#elif defined(__GNUC__)
|
||||
#define SHORTENUM __attribute__((packed))
|
||||
#endif
|
||||
|
||||
/* No operation */
|
||||
#if defined(__ICCARM__)
|
||||
#ifdef __ICCARM__
|
||||
#define nop() __no_operation()
|
||||
#elif defined(__GNUC__)
|
||||
#define nop() (__NOP())
|
||||
|
|
|
@ -142,10 +142,10 @@ public:
|
|||
void print_bin(uint32_t value, uint8_t num_digits) {
|
||||
uint32_t mask = 1 << (num_digits -1);
|
||||
for (uint8_t i = 0; i < num_digits; i++) {
|
||||
if (!(i % 4) && i) write(' ');
|
||||
if (!(i % 16) && i) write(' ');
|
||||
if (value & mask) write('1');
|
||||
else write('0');
|
||||
if (!(i % 4) && i) write(' ');
|
||||
if (!(i % 16) && i) write(' ');
|
||||
if (value & mask) write('1');
|
||||
else write('0');
|
||||
value <<= 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ void FastIO_init(); // Must be called before using fast io macros
|
|||
#define _WRITE(IO, V) do { \
|
||||
if (V) FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO])) ; \
|
||||
else FastIOPortMap[STM_PORT(digitalPin[IO])]->BRR = _BV32(STM_PIN(digitalPin[IO])) ; \
|
||||
} while(0)
|
||||
}while(0)
|
||||
#else
|
||||
#define _WRITE(IO, V) (FastIOPortMap[STM_PORT(digitalPin[IO])]->BSRR = _BV32(STM_PIN(digitalPin[IO]) + (V ? 0 : 16)))
|
||||
#endif
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
#define _SET_OUTPUT(IO) _SET_MODE(IO, GPIO_OUTPUT_PP)
|
||||
#define _SET_OUTPUT_OD(IO) _SET_MODE(IO, GPIO_OUTPUT_OD)
|
||||
|
||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); } while(0)
|
||||
#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); } while(0)
|
||||
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
|
||||
#define OUT_WRITE_OD(IO,V) do{ _SET_OUTPUT_OD(IO); WRITE(IO,V); }while(0)
|
||||
|
||||
#define SET_INPUT(IO) _SET_MODE(IO, GPIO_INPUT_FLOATING)
|
||||
#define SET_INPUT_PULLUP(IO) _SET_MODE(IO, GPIO_INPUT_PU)
|
||||
|
|
|
@ -118,24 +118,24 @@
|
|||
// Using GCC extensions, but Travis GCC version does not like it and gives
|
||||
// "error: statement-expressions are not allowed outside functions nor in template-argument lists"
|
||||
#define NOLESS(v, n) \
|
||||
do { \
|
||||
do{ \
|
||||
__typeof__(n) _n = (n); \
|
||||
if (v < _n) v = _n; \
|
||||
} while(0)
|
||||
}while(0)
|
||||
|
||||
#define NOMORE(v, n) \
|
||||
do { \
|
||||
do{ \
|
||||
__typeof__(n) _n = (n); \
|
||||
if (v > _n) v = _n; \
|
||||
} while(0)
|
||||
}while(0)
|
||||
|
||||
#define LIMIT(v, n1, n2) \
|
||||
do { \
|
||||
do{ \
|
||||
__typeof__(n1) _n1 = (n1); \
|
||||
__typeof__(n2) _n2 = (n2); \
|
||||
if (v < _n1) v = _n1; \
|
||||
else if (v > _n2) v = _n2; \
|
||||
} while(0)
|
||||
}while(0)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -184,5 +184,5 @@ void print_bin(const uint16_t val);
|
|||
|
||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float x, const float y, const float z);
|
||||
void print_xyz(PGM_P const prefix, PGM_P const suffix, const float xyz[]);
|
||||
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
|
||||
#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); } while(0)
|
||||
#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); }while(0)
|
||||
#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(PSTR(PREFIX), nullptr, V); }while(0)
|
||||
|
|
|
@ -125,7 +125,7 @@ void LEDLights::set_color(const LEDColor &incol
|
|||
// If the pins can do PWM then their intensity will be set.
|
||||
#define UPDATE_RGBW(C,c) do { if (PWM_PIN(RGB_LED_##C##_PIN)) \
|
||||
analogWrite(pin_t(RGB_LED_##C##_PIN), incol.c); \
|
||||
else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); } while(0)
|
||||
else WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); }while(0)
|
||||
UPDATE_RGBW(R,r);
|
||||
UPDATE_RGBW(G,g);
|
||||
UPDATE_RGBW(B,b);
|
||||
|
|
|
@ -445,7 +445,7 @@ void GcodeSuite::G33() {
|
|||
_tower_results = (_4p_calibration && towers_set) || probe_points >= 3,
|
||||
_opposite_results = (_4p_calibration && !towers_set) || probe_points >= 3,
|
||||
_endstop_results = probe_points != 1 && probe_points != -1 && probe_points != 0,
|
||||
_angle_results = probe_points >= 3 && towers_set;
|
||||
_angle_results = probe_points >= 3 && towers_set;
|
||||
static const char save_message[] PROGMEM = "Save with M500 and/or copy to Configuration.h";
|
||||
int8_t iterations = 0;
|
||||
float test_precision,
|
||||
|
|
|
@ -284,7 +284,7 @@ void GcodeSuite::G34() {
|
|||
// Home Z after the alignment procedure
|
||||
process_subcommands_now_P(PSTR("G28 Z"));
|
||||
|
||||
} while(0);
|
||||
}while(0);
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< G34");
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@
|
|||
#endif
|
||||
|
||||
// Extensible UI serial touch screens. (See src/lcd/extensible_ui)
|
||||
#if EITHER(MALYAN_LCD, DGUS_LCD)
|
||||
#if ANY(MALYAN_LCD, DGUS_LCD, LULZBOT_TOUCH_UI)
|
||||
#define IS_EXTUI
|
||||
#define EXTENSIBLE_UI
|
||||
#endif
|
||||
|
|
|
@ -99,3 +99,6 @@
|
|||
#define LED_USER_PRESET_BRIGHTNESS 255
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Extensible UI pin mapping for RepRapDiscount
|
||||
#define TOUCH_UI_ULTIPANEL ENABLED(LULZBOT_TOUCH_UI) && ANY(AO_EXP1_PINMAP, AO_EXP2_PINMAP, CR10_TFT_PINMAP)
|
||||
|
|
|
@ -1892,6 +1892,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
|||
+ ENABLED(OVERLORD_OLED) \
|
||||
+ ENABLED(DGUS_LCD) \
|
||||
+ ENABLED(MALYAN_LCD) \
|
||||
+ ENABLED(LULZBOT_TOUCH_UI) \
|
||||
+ ENABLED(FSMC_GRAPHICAL_TFT)
|
||||
#error "Please select no more than one LCD controller option."
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,560 @@
|
|||
/*********************
|
||||
* flash_storage.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../compat.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
|
||||
|
||||
#include "media_file_reader.h"
|
||||
#include "flash_storage.h"
|
||||
|
||||
// The following must be changed whenever the layout of the flash
|
||||
// data is changed in a manner that would render the data invalid.
|
||||
|
||||
constexpr uint32_t flash_eeprom_version = 1;
|
||||
|
||||
/* SPI Flash Memory Map:
|
||||
*
|
||||
* The following offsets and sizes are specified in 4k erase units:
|
||||
*
|
||||
* Page Size Description
|
||||
* 0 16 DATA STORAGE AREA
|
||||
* 16 1 VERSIONING DATA
|
||||
* 17 inf MEDIA STORAGE AREA
|
||||
*
|
||||
*/
|
||||
|
||||
#define DATA_STORAGE_SIZE_64K
|
||||
|
||||
using namespace FTDI::SPI;
|
||||
using namespace FTDI::SPI::most_significant_byte_first;
|
||||
|
||||
bool UIFlashStorage::is_present = false;
|
||||
|
||||
#ifdef SPI_FLASH_SS
|
||||
/************************** SPI Flash Chip Interface **************************/
|
||||
|
||||
void SPIFlash::wait_while_busy() {
|
||||
uint8_t status;
|
||||
safe_delay(1);
|
||||
do {
|
||||
spi_flash_select();
|
||||
spi_write_8(READ_STATUS_1);
|
||||
status = spi_read_8();
|
||||
spi_flash_deselect();
|
||||
safe_delay(1);
|
||||
} while (status & 1);
|
||||
}
|
||||
|
||||
void SPIFlash::erase_sector_4k(uint32_t addr) {
|
||||
spi_flash_select();
|
||||
spi_write_8(WRITE_ENABLE);
|
||||
spi_flash_deselect();
|
||||
|
||||
spi_flash_select();
|
||||
spi_write_8(ERASE_4K);
|
||||
spi_write_24(addr);
|
||||
spi_flash_deselect();
|
||||
|
||||
wait_while_busy();
|
||||
}
|
||||
|
||||
void SPIFlash::erase_sector_64k(uint32_t addr) {
|
||||
spi_flash_select();
|
||||
spi_write_8(WRITE_ENABLE);
|
||||
spi_flash_deselect();
|
||||
|
||||
spi_flash_select();
|
||||
spi_write_8(ERASE_64K);
|
||||
spi_write_24(addr);
|
||||
spi_flash_deselect();
|
||||
|
||||
wait_while_busy();
|
||||
}
|
||||
|
||||
void SPIFlash::spi_write_begin(uint32_t addr) {
|
||||
spi_flash_select();
|
||||
spi_write_8(WRITE_ENABLE);
|
||||
spi_flash_deselect();
|
||||
|
||||
spi_flash_select();
|
||||
spi_write_8(PAGE_PROGRAM);
|
||||
spi_write_24(addr);
|
||||
}
|
||||
|
||||
void SPIFlash::spi_write_end() {
|
||||
spi_flash_deselect();
|
||||
wait_while_busy();
|
||||
}
|
||||
|
||||
void SPIFlash::spi_read_begin(uint32_t addr) {
|
||||
spi_flash_select();
|
||||
spi_write_8(READ_DATA);
|
||||
spi_write_24(addr);
|
||||
}
|
||||
|
||||
void SPIFlash::spi_read_end() {
|
||||
spi_flash_deselect();
|
||||
}
|
||||
|
||||
void SPIFlash::erase_chip() {
|
||||
spi_flash_select();
|
||||
spi_write_8(WRITE_ENABLE);
|
||||
spi_flash_deselect();
|
||||
|
||||
spi_flash_select();
|
||||
spi_write_8(ERASE_CHIP);
|
||||
spi_flash_deselect();
|
||||
wait_while_busy();
|
||||
}
|
||||
|
||||
void SPIFlash::read_jedec_id(uint8_t &manufacturer_id, uint8_t &device_type, uint8_t &capacity) {
|
||||
spi_flash_select();
|
||||
spi_write_8(READ_JEDEC_ID);
|
||||
manufacturer_id = spi_recv();
|
||||
device_type = spi_recv();
|
||||
capacity = spi_recv();
|
||||
spi_flash_deselect ();
|
||||
}
|
||||
|
||||
/* This function writes "size" bytes from "data" starting at addr, while properly
|
||||
* taking into account the special case of writing across a 256 byte page boundary.
|
||||
* Returns the addr directly after the write.
|
||||
*/
|
||||
uint32_t SPIFlash::write(uint32_t addr, const void *_data, size_t size) {
|
||||
const uint8_t *data = (const uint8_t*) _data;
|
||||
while (size) {
|
||||
const uint32_t page_start = addr & 0xFFFF00ul;
|
||||
const uint32_t page_end = page_start + 256;
|
||||
const uint32_t write_size = min(page_end - addr, size);
|
||||
spi_write_begin(addr);
|
||||
spi_write_bulk<ram_write>(data, write_size);
|
||||
spi_write_end();
|
||||
addr += write_size;
|
||||
size -= write_size;
|
||||
data += write_size;
|
||||
}
|
||||
return addr;
|
||||
}
|
||||
|
||||
uint32_t SPIFlash::read(uint32_t addr, void *data, size_t size) {
|
||||
spi_read_begin(addr);
|
||||
spi_read_bulk(data, size);
|
||||
spi_read_end();
|
||||
return addr + size;
|
||||
}
|
||||
|
||||
/********************************** UTILITY ROUTINES *********************************/
|
||||
|
||||
bool UIFlashStorage::check_known_device() {
|
||||
uint8_t manufacturer_id, device_type, capacity;
|
||||
read_jedec_id(manufacturer_id, device_type, capacity);
|
||||
|
||||
const bool is_known =
|
||||
((manufacturer_id == 0xEF) && (device_type == 0x40) && (capacity == 0x15)) || // unknown
|
||||
((manufacturer_id == 0x01) && (device_type == 0x40) && (capacity == 0x15)) || // Cypress S25FL116K
|
||||
((manufacturer_id == 0xEF) && (device_type == 0x14) && (capacity == 0x15)) || // Winbond W25Q16JV
|
||||
((manufacturer_id == 0x1F) && (device_type == 0x86) && (capacity == 0x01)) ; // Adesto AT255F161
|
||||
|
||||
if (!is_known) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to locate supported SPI Flash Memory.");
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Manufacturer ID, got: ", manufacturer_id);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Device Type , got: ", device_type);
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Capacity , got: ", capacity);
|
||||
}
|
||||
|
||||
return is_known;
|
||||
}
|
||||
|
||||
void UIFlashStorage::initialize() {
|
||||
for(uint8_t i = 0; i < 10; i++) {
|
||||
if (check_known_device()) {
|
||||
is_present = true;
|
||||
break;
|
||||
}
|
||||
safe_delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
/**************************** DATA STORAGE AREA (first 4K or 64k) ********************/
|
||||
|
||||
#ifdef DATA_STORAGE_SIZE_64K
|
||||
constexpr uint32_t data_storage_area_size = 64 * 1024; // Large erase unit
|
||||
#else
|
||||
constexpr uint32_t data_storage_area_size = 4 * 1024; // Small erase unit
|
||||
#endif
|
||||
|
||||
/* In order to provide some degree of wear leveling, each data write to the
|
||||
* SPI Flash chip is appended to data that was already written before, until
|
||||
* the data storage area is completely filled. New data is written preceeded
|
||||
* with a 32-bit delimiter 'LULZ', so that we can distinguish written and
|
||||
* unwritten data:
|
||||
*
|
||||
* 'LULZ' <--- 1st record delimiter
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* 'LULZ' <--- 2nd record delimiter
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* ...
|
||||
* 'LULZ' <--- Last record delimiter
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* <data_byte>
|
||||
* 0xFF <--- Start of free space
|
||||
* 0xFF
|
||||
* ...
|
||||
*
|
||||
* This function walks down the data storage area, verifying that the
|
||||
* delimiters are either 'LULZ' or 0xFFFFFFFF. In the case that an invalid
|
||||
* delimiter is found, this function returns -1, indicating that the Flash
|
||||
* data is invalid (this will happen if the block_size changed with respect
|
||||
* to earlier firmware). Otherwise, it returns the offset of the last
|
||||
* valid delimiter 'LULZ', indicating the most recently written data.
|
||||
*/
|
||||
int32_t UIFlashStorage::get_config_read_offset(uint32_t block_size) {
|
||||
uint16_t stride = 4 + block_size;
|
||||
int32_t read_offset = -1;
|
||||
|
||||
for(uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
|
||||
uint32_t delim;
|
||||
spi_read_begin(offset);
|
||||
spi_read_bulk (&delim, sizeof(delim));
|
||||
spi_read_end();
|
||||
switch (delim) {
|
||||
case 0xFFFFFFFFul: return read_offset;
|
||||
case delimiter: read_offset = offset; break;
|
||||
default:
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Invalid delimiter in Flash: ", delim);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("No LULZ delimiter found.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* This function returns the offset at which new data should be
|
||||
* appended, or -1 if the Flash needs to be erased */
|
||||
int32_t UIFlashStorage::get_config_write_offset(uint32_t block_size) {
|
||||
int32_t read_offset = get_config_read_offset(block_size);
|
||||
if (read_offset == -1) return -1; // The SPI flash is invalid
|
||||
|
||||
int32_t write_offset = read_offset + 4 + block_size;
|
||||
if ((write_offset + 4 + block_size) > data_storage_area_size) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Not enough free space in Flash.");
|
||||
return -1; // Not enough free space
|
||||
}
|
||||
return write_offset;
|
||||
}
|
||||
|
||||
bool UIFlashStorage::verify_config_data(const void *data, size_t size) {
|
||||
if (!is_present) return false;
|
||||
|
||||
int32_t read_addr = get_config_read_offset(size);
|
||||
if (read_addr == -1) return false;
|
||||
|
||||
uint32_t delim;
|
||||
spi_read_begin(read_addr);
|
||||
spi_read_bulk (&delim, sizeof(delim));
|
||||
bool ok = spi_verify_bulk(data,size);
|
||||
spi_read_end();
|
||||
return ok && delim == delimiter;
|
||||
}
|
||||
|
||||
bool UIFlashStorage::read_config_data(void *data, size_t size) {
|
||||
if (!is_present) return false;
|
||||
|
||||
int32_t read_addr = get_config_read_offset(size);
|
||||
if (read_addr == -1) return false;
|
||||
|
||||
uint32_t delim;
|
||||
spi_read_begin(read_addr);
|
||||
spi_read_bulk (&delim, sizeof(delim));
|
||||
spi_read_bulk (data, size);
|
||||
spi_read_end();
|
||||
return delim == delimiter;
|
||||
}
|
||||
|
||||
void UIFlashStorage::write_config_data(const void *data, size_t size) {
|
||||
if (!is_present) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("SPI Flash chip not present. Not saving UI settings.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Since Flash storage has a limited number of write cycles,
|
||||
// make sure that the data is different before rewriting.
|
||||
|
||||
if (verify_config_data(data, size)) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("UI settings already written, skipping write.");
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t write_addr = get_config_write_offset(size);
|
||||
if (write_addr == -1) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Erasing UI settings from SPI Flash... ");
|
||||
#ifdef DATA_STORAGE_SIZE_64K
|
||||
erase_sector_64k(0);
|
||||
#else
|
||||
erase_sector_4k(0);
|
||||
#endif
|
||||
write_addr = 0;
|
||||
SERIAL_ECHOLNPGM("DONE");
|
||||
}
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Writing UI settings to SPI Flash (offset ", write_addr);
|
||||
SERIAL_ECHOPGM(")...");
|
||||
|
||||
const uint32_t delim = delimiter;
|
||||
write_addr = write(write_addr, &delim, sizeof(delim));
|
||||
write_addr = write(write_addr, data, size);
|
||||
|
||||
SERIAL_ECHOLNPGM("DONE");
|
||||
}
|
||||
|
||||
/************************** VERSIONING INFO AREA ************************/
|
||||
|
||||
/* The version info area follows the data storage area. If the version
|
||||
* is incorrect, the data on the chip is invalid and format_flash should
|
||||
* be called.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic;
|
||||
uint32_t version;
|
||||
} flash_version_info;
|
||||
|
||||
constexpr uint32_t version_info_addr = data_storage_area_size;
|
||||
constexpr uint32_t version_info_size = 4 * 1024; // Small erase unit
|
||||
|
||||
bool UIFlashStorage::is_valid() {
|
||||
flash_version_info info;
|
||||
|
||||
spi_read_begin(version_info_addr);
|
||||
spi_read_bulk (&info, sizeof(flash_version_info));
|
||||
spi_read_end();
|
||||
|
||||
return info.magic == delimiter && info.version == flash_eeprom_version;
|
||||
}
|
||||
|
||||
void UIFlashStorage::write_version_info() {
|
||||
flash_version_info info;
|
||||
|
||||
info.magic = delimiter;
|
||||
info.version = flash_eeprom_version;
|
||||
|
||||
spi_write_begin(version_info_addr);
|
||||
spi_write_bulk<ram_write>(&info, sizeof(flash_version_info));
|
||||
spi_write_end();
|
||||
}
|
||||
|
||||
/**************************** MEDIA STORAGE AREA *****************************/
|
||||
|
||||
/* The media storage area follows the versioning info area. It consists
|
||||
* of a file index followed by the data for one or more media files.
|
||||
*
|
||||
* The file index consists of an array of 32-bit file sizes. If a file
|
||||
* is not present, the file's size will be set to 0xFFFFFFFF
|
||||
*/
|
||||
|
||||
constexpr uint32_t media_storage_addr = version_info_addr + version_info_size;
|
||||
constexpr uint8_t media_storage_slots = 4;
|
||||
|
||||
void UIFlashStorage::format_flash() {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOPGM("Erasing SPI Flash...");
|
||||
SPIFlash::erase_chip();
|
||||
SERIAL_ECHOLNPGM("DONE");
|
||||
|
||||
write_version_info();
|
||||
}
|
||||
|
||||
uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
|
||||
uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
|
||||
spi_read_begin(media_storage_addr);
|
||||
for(uint8_t i = 0; i < slot; i++) {
|
||||
addr += spi_read_32();
|
||||
}
|
||||
spi_read_end();
|
||||
return addr;
|
||||
}
|
||||
|
||||
void UIFlashStorage::set_media_file_size(uint8_t slot, uint32_t size) {
|
||||
spi_write_begin(media_storage_addr + sizeof(uint32_t) * slot);
|
||||
spi_write_32(size);
|
||||
spi_write_end();
|
||||
}
|
||||
|
||||
uint32_t UIFlashStorage::get_media_file_size(uint8_t slot) {
|
||||
spi_read_begin(media_storage_addr + sizeof(uint32_t) * slot);
|
||||
uint32_t size = spi_read_32();
|
||||
spi_read_end();
|
||||
return size;
|
||||
}
|
||||
|
||||
/* Writes a media file from the SD card/USB flash drive into a slot on the SPI Flash. Media
|
||||
* files must be written sequentially following by a chip erase and it is not possible to
|
||||
* overwrite files. */
|
||||
UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str filename, uint8_t slot) {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
uint32_t addr;
|
||||
uint8_t buff[write_page_size];
|
||||
|
||||
strcpy_P( (char*) buff, (const char*) filename);
|
||||
|
||||
MediaFileReader reader;
|
||||
if (!reader.open((char*) buff)) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Unable to find media file");
|
||||
return FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (get_media_file_size(slot) != 0xFFFFFFFFUL) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Media file already exists");
|
||||
return WOULD_OVERWRITE;
|
||||
}
|
||||
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOPGM("Writing SPI Flash...");
|
||||
|
||||
set_media_file_size(slot, reader.size());
|
||||
addr = get_media_file_start(slot);
|
||||
|
||||
// Write out the file itself
|
||||
for(;;) {
|
||||
const int16_t nBytes = reader.read(buff, write_page_size);
|
||||
if (nBytes == -1) {
|
||||
SERIAL_ECHOLNPGM("Failed to read from file");
|
||||
return READ_ERROR;
|
||||
}
|
||||
|
||||
addr = write(addr, buff, nBytes);
|
||||
if (nBytes != write_page_size)
|
||||
break;
|
||||
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::yield();
|
||||
#endif
|
||||
}
|
||||
|
||||
SERIAL_ECHOLNPGM("DONE");
|
||||
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOPGM("Verifying SPI Flash...");
|
||||
|
||||
bool verifyOk = true;
|
||||
|
||||
// Verify the file index
|
||||
|
||||
if (get_media_file_start(slot+1) != (get_media_file_start(slot) + reader.size())) {
|
||||
SERIAL_ECHOLNPGM("File index verification failed. ");
|
||||
verifyOk = false;
|
||||
}
|
||||
|
||||
// Verify the file itself
|
||||
addr = get_media_file_start(slot);
|
||||
reader.rewind();
|
||||
|
||||
while (verifyOk) {
|
||||
const int16_t nBytes = reader.read(buff, write_page_size);
|
||||
if (nBytes == -1) {
|
||||
SERIAL_ECHOPGM("Failed to read from file");
|
||||
verifyOk = false;
|
||||
break;
|
||||
}
|
||||
|
||||
spi_read_begin(addr);
|
||||
if (!spi_verify_bulk(buff, nBytes)) {
|
||||
verifyOk = false;
|
||||
spi_read_end();
|
||||
break;
|
||||
}
|
||||
spi_read_end();
|
||||
|
||||
addr += nBytes;
|
||||
if (nBytes != write_page_size) break;
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::yield();
|
||||
#endif
|
||||
};
|
||||
|
||||
if (verifyOk) {
|
||||
SERIAL_ECHOLNPGM("DONE");
|
||||
return SUCCESS;
|
||||
} else {
|
||||
SERIAL_ECHOLNPGM("FAIL");
|
||||
return VERIFY_ERROR;
|
||||
}
|
||||
#else
|
||||
return VERIFY_ERROR;
|
||||
#endif // ENABLED(SDSUPPORT)
|
||||
}
|
||||
|
||||
bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t slot) {
|
||||
if (!is_present) return false;
|
||||
|
||||
bytes_remaining = get_media_file_size(slot);
|
||||
if (bytes_remaining != 0xFFFFFFFFUL) {
|
||||
SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Boot media file size:", bytes_remaining);
|
||||
addr = get_media_file_start(slot);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int16_t UIFlashStorage::BootMediaReader::read(void *data, const size_t size) {
|
||||
if (bytes_remaining == 0xFFFFFFFFUL) return -1;
|
||||
|
||||
if (size > bytes_remaining)
|
||||
return read(data, bytes_remaining);
|
||||
|
||||
if (size > 0) {
|
||||
spi_read_begin(addr);
|
||||
spi_read_bulk(data, size);
|
||||
spi_read_end();
|
||||
addr += size;
|
||||
bytes_remaining -= size;
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
int16_t UIFlashStorage::BootMediaReader::read(void *obj, void *data, const size_t size) {
|
||||
return reinterpret_cast<UIFlashStorage::BootMediaReader*>(obj)->read(data, size);
|
||||
}
|
||||
|
||||
#else
|
||||
void UIFlashStorage::initialize() {}
|
||||
bool UIFlashStorage::is_valid() {return true;}
|
||||
void UIFlashStorage::write_config_data(const void *, size_t) {}
|
||||
bool UIFlashStorage::verify_config_data(const void *, size_t) {return false;}
|
||||
bool UIFlashStorage::read_config_data(void *, size_t ) {return false;}
|
||||
UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str, uint8_t) {return FILE_NOT_FOUND;}
|
||||
void UIFlashStorage::format_flash() {}
|
||||
|
||||
bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t) {return false;}
|
||||
int16_t UIFlashStorage::BootMediaReader::read(void *, const size_t) {return -1;}
|
||||
int16_t UIFlashStorage::BootMediaReader::read(void *, void *, const size_t) {return -1;}
|
||||
#endif // SPI_FLASH_SS
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,110 @@
|
|||
/*******************
|
||||
* flash_storage.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef LULZBOT_TOUCH_UI
|
||||
|
||||
class SPIFlash {
|
||||
public:
|
||||
static constexpr uint32_t erase_unit_size = 4 * 1024; // Minimum erase unit
|
||||
static constexpr uint32_t write_page_size = 256; // Minimum page write unit
|
||||
|
||||
enum {
|
||||
READ_STATUS_1 = 0x05,
|
||||
READ_STATUS_2 = 0x35,
|
||||
READ_STATUS_3 = 0x33,
|
||||
WRITE_ENABLE = 0x06,
|
||||
WRITE_DISABLE = 0x04,
|
||||
READ_ID = 0x90,
|
||||
READ_JEDEC_ID = 0x9F,
|
||||
READ_DATA = 0x03,
|
||||
PAGE_PROGRAM = 0x02,
|
||||
ERASE_4K = 0x20,
|
||||
ERASE_64K = 0xD8,
|
||||
ERASE_CHIP = 0xC7
|
||||
};
|
||||
|
||||
static void wait_while_busy();
|
||||
static void erase_sector_4k(uint32_t addr);
|
||||
static void erase_sector_64k(uint32_t addr);
|
||||
static void erase_chip ();
|
||||
|
||||
static void read_jedec_id(uint8_t &manufacturer_id, uint8_t &device_type, uint8_t &capacity);
|
||||
|
||||
static void spi_read_begin(uint32_t addr);
|
||||
static void spi_read_end();
|
||||
|
||||
static void spi_write_begin(uint32_t addr);
|
||||
static void spi_write_end();
|
||||
|
||||
static uint32_t write(uint32_t addr, const void *data, size_t size);
|
||||
static uint32_t read(uint32_t addr, void *data, size_t size);
|
||||
};
|
||||
|
||||
class UIFlashStorage : private SPIFlash {
|
||||
private:
|
||||
|
||||
static bool is_present;
|
||||
static int32_t get_config_read_offset(uint32_t block_size);
|
||||
static int32_t get_config_write_offset(uint32_t block_size);
|
||||
|
||||
static uint32_t get_media_file_start(uint8_t slot);
|
||||
static void set_media_file_size(uint8_t slot, uint32_t size);
|
||||
static uint32_t get_media_file_size(uint8_t slot);
|
||||
|
||||
static constexpr uint32_t delimiter = 0x4C554C5A; // 'LULZ'
|
||||
public:
|
||||
enum error_t {
|
||||
SUCCESS,
|
||||
FILE_NOT_FOUND,
|
||||
READ_ERROR,
|
||||
VERIFY_ERROR,
|
||||
WOULD_OVERWRITE
|
||||
};
|
||||
|
||||
static void initialize ();
|
||||
static void format_flash ();
|
||||
static bool check_known_device();
|
||||
|
||||
static bool is_valid ();
|
||||
static void write_version_info();
|
||||
|
||||
static void write_config_data (const void *data, size_t size);
|
||||
static bool verify_config_data (const void *data, size_t size);
|
||||
static bool read_config_data (void *data, size_t size);
|
||||
static error_t write_media_file (progmem_str filename, uint8_t slot = 0);
|
||||
|
||||
class BootMediaReader;
|
||||
};
|
||||
|
||||
class UIFlashStorage::BootMediaReader {
|
||||
private:
|
||||
uint32_t addr;
|
||||
uint32_t bytes_remaining;
|
||||
|
||||
public:
|
||||
bool isAvailable(uint32_t slot = 0);
|
||||
int16_t read(void *buffer, size_t const size);
|
||||
|
||||
static int16_t read(void *obj, void *buffer, const size_t size);
|
||||
};
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,63 @@
|
|||
/************************
|
||||
* media_filereader.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../compat.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
#include "media_file_reader.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
bool MediaFileReader::open(const char* filename) {
|
||||
card.init(SPI_SPEED, SDSS);
|
||||
volume.init(&card);
|
||||
root.openRoot(&volume);
|
||||
return file.open(&root, filename, O_READ);
|
||||
}
|
||||
|
||||
int16_t MediaFileReader::read(void *buff, size_t bytes) {
|
||||
return file.read(buff, bytes);
|
||||
}
|
||||
|
||||
void MediaFileReader::close() {
|
||||
file.close();
|
||||
}
|
||||
|
||||
uint32_t MediaFileReader::size() {
|
||||
return file.fileSize();
|
||||
}
|
||||
|
||||
void MediaFileReader::rewind() {
|
||||
file.rewind();
|
||||
}
|
||||
|
||||
int16_t MediaFileReader::read(void *obj, void *buff, size_t bytes) {
|
||||
return reinterpret_cast<MediaFileReader*>(obj)->read(buff, bytes);
|
||||
}
|
||||
#else
|
||||
bool MediaFileReader::open(const char*) {return -1;}
|
||||
int16_t MediaFileReader::read(void *, size_t) {return 0;}
|
||||
void MediaFileReader::close() {}
|
||||
uint32_t MediaFileReader::size() {return 0;}
|
||||
void MediaFileReader::rewind() {}
|
||||
int16_t MediaFileReader::read(void *, void *, size_t) {return 0;}
|
||||
#endif
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,44 @@
|
|||
/**********************
|
||||
* media_filereader.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../../../../../sd/SdFile.h"
|
||||
#include "../../../../../sd/cardreader.h"
|
||||
|
||||
class MediaFileReader {
|
||||
private:
|
||||
#if ENABLED(SDSUPPORT)
|
||||
Sd2Card card;
|
||||
SdVolume volume;
|
||||
SdFile root, file;
|
||||
#endif
|
||||
|
||||
public:
|
||||
bool open(const char* filename);
|
||||
int16_t read(void *buff, size_t bytes);
|
||||
uint32_t size();
|
||||
void rewind();
|
||||
void close();
|
||||
|
||||
static int16_t read(void *obj, void *buff, size_t bytes);
|
||||
};
|
61
Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h
Normal file
61
Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/************
|
||||
* compat.h *
|
||||
************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* This following provides compatibility whether compiling
|
||||
* as a part of Marlin or outside it
|
||||
*/
|
||||
|
||||
#if defined __has_include
|
||||
#if __has_include ("../../ui_api.h")
|
||||
#include "../../ui_api.h"
|
||||
#endif
|
||||
#else
|
||||
#include "../../ui_api.h"
|
||||
#endif
|
||||
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
// If __MARLIN_FIRMWARE__ exists, then we are being
|
||||
// compiled inside Marlin.
|
||||
#include "pin_mappings.h"
|
||||
#else
|
||||
// Messages that are declared in Marlin
|
||||
#define WELCOME_MSG "Printer Ready"
|
||||
#define MSG_SD_INSERTED "Media Inserted"
|
||||
#define MSG_SD_REMOVED "Media Removed"
|
||||
|
||||
// Define macros for compatibility
|
||||
#define EXTENSIBLE_UI
|
||||
#define _CAT(a, ...) a ## __VA_ARGS__
|
||||
#define SWITCH_ENABLED_ 1
|
||||
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
|
||||
#define DISABLED(b) !ENABLED(b)
|
||||
|
||||
namespace UI {
|
||||
static inline uint32_t safe_millis() {return millis();};
|
||||
static inline void yield() {};
|
||||
};
|
||||
#endif
|
||||
|
||||
class __FlashStringHelper;
|
||||
typedef const __FlashStringHelper *progmem_str;
|
98
Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h
Normal file
98
Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h
Normal file
|
@ -0,0 +1,98 @@
|
|||
/************
|
||||
* config.h *
|
||||
************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
// Define the display board used (see "ftdi_eve_boards.h" for definitions)
|
||||
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" 320x240 with FT800
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" 480x272
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" 480x272
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" 800x480
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD User Interface
|
||||
|
||||
// Leave the following commented out to use a board's default resolution.
|
||||
// If you have changed the LCD panel, you may override the resolution
|
||||
// below (see "ftdi_eve_resolutions.h" for definitions):
|
||||
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Define the printer interface or pins used (see "ui_pin_mappings.h" for definitions):
|
||||
|
||||
//#define CR10_TFT_PINMAP
|
||||
//#define AO_EXP1_DEPRECATED_PINMAP // UltraLCD EXP1 connector, old AlephObject's wiring
|
||||
//#define AO_EXP1_PINMAP // UltraLCD EXP1 connector, new AlephObject's wiring
|
||||
//#define AO_EXP2_PINMAP // UltraLCD EXP2 connector, new AlephObject's wiring
|
||||
//#define OTHER_PIN_LAYOUT
|
||||
|
||||
// Otherwise. Define all the pins manually:
|
||||
|
||||
#ifdef OTHER_PIN_LAYOUT
|
||||
// Select interfacing pins, the following pin specifiers are supported:
|
||||
//
|
||||
// ARDUINO_DIGITAL_1 - Arduino pin via digitalWrite/digitalRead
|
||||
// AVR_A1 - Fast AVR port access via PORTA/PINA/DDRA
|
||||
// 1 - When compiling Marlin, use Marlin pin IDs.
|
||||
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Defines how to orient the display. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 or better also support a portrait
|
||||
// and mirrored orientation.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Parental lock".
|
||||
// This is a recommended for smaller displays.
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
|
||||
// Define number of seconds after which the menu screens
|
||||
// timeout and returns the user to the status screen
|
||||
//#define LCD_TIMEOUT_TO_STATUS 120
|
||||
|
||||
// Enable this to debug the event framework
|
||||
//#define UI_FRAMEWORK_DEBUG
|
||||
|
||||
// Enable the developer's menu and screens
|
||||
//#define DEVELOPER_SCREENS
|
||||
|
||||
// Maximum feed rate for manual extrusion (mm/s)
|
||||
//#define MAX_MANUAL_FEEDRATE 240
|
||||
|
||||
// Sets the SPI speed in Hz
|
||||
|
||||
#define SPI_FREQUENCY 8000000 >> SPI_SPEED
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,28 @@
|
|||
FTDI EVE Library
|
||||
----------------
|
||||
|
||||
The FTDI EVE Library is a fully open-source library and UI framework for the FTDI
|
||||
FT800 and FT810 graphics processor.
|
||||
|
||||
Although the library has been developed within Lulzbot for providing a user interface
|
||||
for Marlin, the library has been written so that it can be used in any Arduino sketch.
|
||||
|
||||
The library is split into two parts. The "basic" API provides a shallow interface to
|
||||
the underlying FTDI hardware and command FIFO and provides low-level access to the
|
||||
hardware as closely as possible to the API described in the FTDI Programmer's Guide.
|
||||
|
||||
The "extended" API builds on top of the "basic" API to provide a GUI framework for
|
||||
handling common challenges in building a usable GUI. The GUI framework provides the
|
||||
following features:
|
||||
|
||||
- Macros for a resolution-independent placement of widgets based on a grid.
|
||||
- Class-based UI screens, with press and unpress touch events, as well as touch repeat.
|
||||
- Event loop with button debouncing and button push visual and auditory feedback.
|
||||
- Easy screen-to-screen navigation including a navigation stack for going backwards.
|
||||
- Visual feedback for disabled vs enabled buttons, and custom button styles.
|
||||
- A sound player class for playing individual notes or complete sound sequences.
|
||||
- Display list caching, for storing static background elements of a screen in RAM_G.
|
||||
|
||||
See the "examples" folder for Arduino sketches. Modify the "src/config.h" file in
|
||||
each to suit your particular setup. The "sample_configs" contain sample configuration
|
||||
files for running the sketches on our 3D printer boards.
|
|
@ -0,0 +1,183 @@
|
|||
/************
|
||||
* boards.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480))
|
||||
|
||||
#define IS_FT800 \
|
||||
constexpr uint16_t ftdi_chip = 800; \
|
||||
using namespace FTDI_FT800; \
|
||||
namespace DL { \
|
||||
using namespace FTDI_FT800_DL; \
|
||||
} \
|
||||
typedef ft800_memory_map ftdi_memory_map; \
|
||||
typedef ft800_registers ftdi_registers;
|
||||
|
||||
#define IS_FT810 \
|
||||
constexpr uint16_t ftdi_chip = 810; \
|
||||
using namespace FTDI_FT810; \
|
||||
namespace DL { \
|
||||
using namespace FTDI_FT800_DL; \
|
||||
using namespace FTDI_FT810_DL; \
|
||||
} \
|
||||
typedef ft810_memory_map ftdi_memory_map; \
|
||||
typedef ft810_registers ftdi_registers;
|
||||
|
||||
|
||||
#ifdef LCD_FTDI_VM800B35A
|
||||
#if !HAS_RESOLUTION
|
||||
#define TOUCH_UI_320x240
|
||||
#endif
|
||||
#ifndef FTDI_API_LEVEL
|
||||
#define FTDI_API_LEVEL 800
|
||||
#endif
|
||||
namespace FTDI {
|
||||
IS_FT800
|
||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||
constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */
|
||||
constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */
|
||||
constexpr uint8_t Swizzle = 2;
|
||||
constexpr uint8_t CSpread = 1;
|
||||
|
||||
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B)
|
||||
* Haoyu Electronics, 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B)
|
||||
*
|
||||
* http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16
|
||||
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16
|
||||
*
|
||||
* Datasheet:
|
||||
*
|
||||
* http://www.hantronix.com/files/data/1278363262430-3.pdf
|
||||
* http://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf
|
||||
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
||||
*
|
||||
*/
|
||||
|
||||
#elif defined(LCD_HAOYU_FT800CB)
|
||||
#if !HAS_RESOLUTION
|
||||
#define TOUCH_UI_480x272
|
||||
#endif
|
||||
#ifndef FTDI_API_LEVEL
|
||||
#define FTDI_API_LEVEL 800
|
||||
#endif
|
||||
namespace FTDI {
|
||||
IS_FT800
|
||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||
constexpr bool GPIO_0_Audio_Enable = false;
|
||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||
constexpr uint8_t Swizzle = 0;
|
||||
constexpr uint8_t CSpread = 1;
|
||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810
|
||||
*
|
||||
* http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html
|
||||
*
|
||||
* Datasheet:
|
||||
*
|
||||
* http://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf
|
||||
*
|
||||
*/
|
||||
|
||||
#elif defined(LCD_HAOYU_FT810CB)
|
||||
#if !HAS_RESOLUTION
|
||||
#define TOUCH_UI_800x480
|
||||
#endif
|
||||
#ifndef FTDI_API_LEVEL
|
||||
#define FTDI_API_LEVEL 810
|
||||
#endif
|
||||
namespace FTDI {
|
||||
IS_FT810
|
||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||
constexpr bool GPIO_0_Audio_Enable = false;
|
||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||
constexpr uint8_t Swizzle = 0;
|
||||
constexpr uint8_t CSpread = 1;
|
||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843)
|
||||
*
|
||||
* http://www.4dsystems.com.au/product/4DLCD_FT843/
|
||||
*
|
||||
* Datasheet:
|
||||
*
|
||||
* http://www.4dsystems.com.au/productpages/4DLCD-FT843/downloads/FT843-4.3-Display_datasheet_R_1_2.pdf
|
||||
*
|
||||
*/
|
||||
|
||||
#elif defined(LCD_4DSYSTEMS_4DLCD_FT843)
|
||||
#if !HAS_RESOLUTION
|
||||
#define TOUCH_UI_480x272
|
||||
#endif
|
||||
#ifndef FTDI_API_LEVEL
|
||||
#define FTDI_API_LEVEL 800
|
||||
#endif
|
||||
namespace FTDI {
|
||||
IS_FT800
|
||||
constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||
constexpr bool GPIO_0_Audio_Enable = false;
|
||||
constexpr bool GPIO_1_Audio_Shutdown = true;
|
||||
constexpr uint8_t Swizzle = 0;
|
||||
constexpr uint8_t CSpread = 1;
|
||||
constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings for the Aleph Objects Color LCD User Interface
|
||||
*
|
||||
* https://code.alephobjects.com/source/aotctl/
|
||||
*
|
||||
* Datasheet:
|
||||
*
|
||||
* http://www.hantronix.com/files/data/s1501799605s500-gh7.pdf
|
||||
*
|
||||
*/
|
||||
#elif defined(LCD_ALEPHOBJECTS_CLCD_UI)
|
||||
#if !HAS_RESOLUTION
|
||||
#define TOUCH_UI_800x480
|
||||
#endif
|
||||
#ifndef FTDI_API_LEVEL
|
||||
#define FTDI_API_LEVEL 810
|
||||
#endif
|
||||
namespace FTDI {
|
||||
IS_FT810
|
||||
constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated
|
||||
constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio
|
||||
constexpr bool GPIO_1_Audio_Shutdown = false;
|
||||
constexpr uint8_t Swizzle = 0;
|
||||
constexpr uint8_t CSpread = 0;
|
||||
constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#error Unknown or no LULZBOT_TOUCH_UI board specified. To add a new board, modify "ftdi_eve_boards.h"
|
||||
#endif
|
|
@ -0,0 +1,1174 @@
|
|||
/****************
|
||||
* commands.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_basic.h"
|
||||
|
||||
#ifdef FTDI_BASIC
|
||||
|
||||
#define MULTIPLE_OF_4(val) ((((val)+3)>>2)<<2)
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace FTDI::SPI;
|
||||
|
||||
void CLCD::enable (void) {
|
||||
mem_write_8(REG::PCLK, Pclk);
|
||||
}
|
||||
|
||||
void CLCD::disable (void) {
|
||||
mem_write_8(REG::PCLK, 0x00);
|
||||
}
|
||||
|
||||
void CLCD::set_brightness (uint8_t brightness) {
|
||||
mem_write_8(REG::PWM_DUTY, min(128,brightness));
|
||||
}
|
||||
|
||||
uint8_t CLCD::get_brightness() {
|
||||
return mem_read_8(REG::PWM_DUTY);
|
||||
}
|
||||
|
||||
void CLCD::turn_on_backlight (void) {
|
||||
mem_write_8(REG::PWM_DUTY, 128);
|
||||
}
|
||||
|
||||
void CLCD::FontMetrics::load(const uint8_t font) {
|
||||
uint32_t rom_fontroot = mem_read_32(MAP::ROM_FONT_ADDR);
|
||||
mem_read_bulk(rom_fontroot + 148 * (font - 16), (uint8_t*) this, 148);
|
||||
}
|
||||
|
||||
uint16_t CLCD::FontMetrics::get_text_width(const char *str, size_t n) const {
|
||||
uint16_t width = 0;
|
||||
const uint8_t *p = (const uint8_t *) str;
|
||||
for(;;) {
|
||||
const uint8_t val = *p++; n--;
|
||||
if (!val || n == 0) break;
|
||||
width += val < 128 ? char_widths[val] : 0;
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
uint16_t CLCD::FontMetrics::get_text_width_P(const char *str, size_t n) const {
|
||||
uint16_t width = 0;
|
||||
const uint8_t *p = (const uint8_t *) str;
|
||||
for(;;) {
|
||||
const uint8_t val = pgm_read_byte(p++); n--;
|
||||
if (!val || n == 0) break;
|
||||
width += val < 128 ? char_widths[val] : 0;
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
/************************** HOST COMMAND FUNCTION *********************************/
|
||||
|
||||
void CLCD::host_cmd (unsigned char host_command, unsigned char byte2) { // Sends 24-Bit Host Command to LCD
|
||||
if (host_command != ACTIVE) {
|
||||
host_command |= 0x40;
|
||||
}
|
||||
spi_ftdi_select();
|
||||
spi_send(host_command);
|
||||
spi_send(byte2);
|
||||
spi_send(0x00);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
/************************** MEMORY READ FUNCTIONS *********************************/
|
||||
|
||||
void CLCD::spi_read_addr (uint32_t reg_address) {
|
||||
spi_send((reg_address >> 16) & 0x3F); // Address [21:16]
|
||||
spi_send((reg_address >> 8 ) & 0xFF); // Address [15:8]
|
||||
spi_send((reg_address >> 0) & 0xFF); // Address [7:0]
|
||||
spi_send(0x00); // Dummy Byte
|
||||
}
|
||||
|
||||
// Write 4-Byte Address, Read Multiple Bytes
|
||||
void CLCD::mem_read_bulk (uint32_t reg_address, uint8_t *data, uint16_t len) {
|
||||
spi_ftdi_select();
|
||||
spi_read_addr(reg_address);
|
||||
spi_read_bulk (data, len);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 4-Byte Address, Read 1-Byte Data
|
||||
uint8_t CLCD::mem_read_8 (uint32_t reg_address) {
|
||||
spi_ftdi_select();
|
||||
spi_read_addr(reg_address);
|
||||
uint8_t r_data = spi_read_8();
|
||||
spi_ftdi_deselect();
|
||||
return r_data;
|
||||
}
|
||||
|
||||
// Write 4-Byte Address, Read 2-Bytes Data
|
||||
uint16_t CLCD::mem_read_16 (uint32_t reg_address) {
|
||||
using namespace SPI::least_significant_byte_first;
|
||||
spi_ftdi_select();
|
||||
spi_read_addr(reg_address);
|
||||
uint16_t r_data = spi_read_16();
|
||||
spi_ftdi_deselect();
|
||||
return r_data;
|
||||
}
|
||||
|
||||
// Write 4-Byte Address, Read 4-Bytes Data
|
||||
uint32_t CLCD::mem_read_32 (uint32_t reg_address) {
|
||||
using namespace SPI::least_significant_byte_first;
|
||||
spi_ftdi_select();
|
||||
spi_read_addr(reg_address);
|
||||
uint32_t r_data = spi_read_32();
|
||||
spi_ftdi_deselect();
|
||||
return r_data;
|
||||
}
|
||||
|
||||
/************************** MEMORY WRITE FUNCTIONS *********************************/
|
||||
|
||||
// Generic operations for transforming a byte, for use with _mem_write_bulk:
|
||||
static inline uint8_t reverse_byte(uint8_t a) {
|
||||
return ((a & 0x1) << 7) | ((a & 0x2) << 5) |
|
||||
((a & 0x4) << 3) | ((a & 0x8) << 1) |
|
||||
((a & 0x10) >> 1) | ((a & 0x20) >> 3) |
|
||||
((a & 0x40) >> 5) | ((a & 0x80) >> 7);
|
||||
}
|
||||
static inline uint8_t xbm_write(const uint8_t *p) {return reverse_byte(pgm_read_byte(p));}
|
||||
|
||||
void CLCD::spi_write_addr (uint32_t reg_address) {
|
||||
spi_send((reg_address >> 16) | 0x80); // Address [21:16]
|
||||
spi_send((reg_address >> 8 ) & 0xFF); // Address [15:8]
|
||||
spi_send((reg_address >> 0) & 0xFF); // Address [7:0]
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from RAM
|
||||
void CLCD::mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding) {
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_bulk<ram_write>(data, len, padding);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM
|
||||
void CLCD::mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding) {
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_bulk<pgm_write>(str, len, padding);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM
|
||||
void CLCD::mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding) {
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_bulk<pgm_write>(data, len, padding);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images)
|
||||
void CLCD::mem_write_xbm (uint32_t reg_address, progmem_str data, uint16_t len, uint8_t padding) {
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_bulk<xbm_write>(data, len, padding);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Write 1-Byte Data
|
||||
void CLCD::mem_write_8 (uint32_t reg_address, uint8_t data) {
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_8(data);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Write 2-Bytes Data
|
||||
void CLCD::mem_write_16 (uint32_t reg_address, uint16_t data) {
|
||||
using namespace SPI::least_significant_byte_first;
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_32(data);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
// Write 3-Byte Address, Write 4-Bytes Data
|
||||
void CLCD::mem_write_32 (uint32_t reg_address, uint32_t data) {
|
||||
using namespace SPI::least_significant_byte_first;
|
||||
spi_ftdi_select();
|
||||
spi_write_addr(reg_address);
|
||||
spi_write_32(data);
|
||||
spi_ftdi_deselect();
|
||||
}
|
||||
|
||||
/******************* FT800/810 Co-processor Commands *********************************/
|
||||
|
||||
#if FTDI_API_LEVEL == 800
|
||||
uint32_t CLCD::CommandFifo::command_write_ptr = 0xFFFFFFFFul;
|
||||
#endif
|
||||
|
||||
void CLCD::CommandFifo::cmd(uint32_t cmd32) {
|
||||
write((void*)&cmd32, sizeof(uint32_t));
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::cmd(void* data, uint16_t len) {
|
||||
write(data, len);
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::bgcolor(uint32_t rgb) {
|
||||
cmd(CMD_BGCOLOR);
|
||||
cmd(rgb);
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::fgcolor(uint32_t rgb) {
|
||||
cmd(CMD_FGCOLOR);
|
||||
cmd(rgb);
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::gradcolor(uint32_t rgb) {
|
||||
cmd(CMD_GRADCOLOR);
|
||||
cmd(rgb);
|
||||
}
|
||||
|
||||
// This sends the a text command to the command preprocessor, must be followed by str()
|
||||
void CLCD::CommandFifo::button(int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t option) {
|
||||
struct {
|
||||
int32_t type = CMD_BUTTON;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
int16_t font;
|
||||
uint16_t option;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.font = font;
|
||||
cmd_data.option = option;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
// This sends the a text command to the command preprocessor, must be followed by str()
|
||||
void CLCD::CommandFifo::text(int16_t x, int16_t y, int16_t font, uint16_t options) {
|
||||
struct {
|
||||
int32_t type = CMD_TEXT;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t font;
|
||||
uint16_t options;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.font = font;
|
||||
cmd_data.options = options;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
// This sends the a toggle command to the command preprocessor, must be followed by str()
|
||||
void CLCD::CommandFifo::toggle (int16_t x, int16_t y, int16_t w, int16_t font, uint16_t options, bool state) {
|
||||
struct {
|
||||
int32_t type = CMD_TOGGLE;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t font;
|
||||
uint16_t options;
|
||||
uint16_t state;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.font = font;
|
||||
cmd_data.options = options;
|
||||
cmd_data.state = state ? 65535 : 0;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
// This sends the a keys command to the command preprocessor, must be followed by str()
|
||||
void CLCD::CommandFifo::keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options) {
|
||||
struct {
|
||||
int32_t type = CMD_KEYS;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
int16_t font;
|
||||
uint16_t options;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.font = font;
|
||||
cmd_data.options = options;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::clock (int16_t x, int16_t y, int16_t r, uint16_t options, int16_t h, int16_t m, int16_t s, int16_t ms)
|
||||
{
|
||||
struct {
|
||||
int32_t type = CMD_CLOCK;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t r;
|
||||
uint16_t options;
|
||||
int16_t h;
|
||||
int16_t m;
|
||||
int16_t s;
|
||||
int16_t ms;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.r = r;
|
||||
cmd_data.options = options;
|
||||
cmd_data.h = h;
|
||||
cmd_data.m = m;
|
||||
cmd_data.s = s;
|
||||
cmd_data.ms = ms;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::gauge (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t major, uint16_t minor, uint16_t val, uint16_t range)
|
||||
{
|
||||
struct {
|
||||
int32_t type = CMD_GAUGE;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t r;
|
||||
uint16_t options;
|
||||
uint16_t major;
|
||||
uint16_t minor;
|
||||
uint16_t val;
|
||||
uint16_t range;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.r = r;
|
||||
cmd_data.options = options;
|
||||
cmd_data.major = major;
|
||||
cmd_data.minor = minor;
|
||||
cmd_data.val = val;
|
||||
cmd_data.range = range;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::dial (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t val)
|
||||
{
|
||||
struct {
|
||||
int32_t type = CMD_DIAL;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t r;
|
||||
uint16_t options;
|
||||
uint16_t val;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.r = r;
|
||||
cmd_data.options = options;
|
||||
cmd_data.val = val;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::scrollbar (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t size, uint16_t range) {
|
||||
struct {
|
||||
int32_t type = CMD_SCROLLBAR;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
uint16_t h;
|
||||
uint16_t options;
|
||||
uint16_t val;
|
||||
uint16_t size;
|
||||
uint16_t range;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.options = options;
|
||||
cmd_data.val = val;
|
||||
cmd_data.size = size;
|
||||
cmd_data.range = range;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::progress (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range) {
|
||||
struct {
|
||||
int32_t type = CMD_PROGRESS;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
uint16_t options;
|
||||
uint16_t val;
|
||||
uint16_t range;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.options = options;
|
||||
cmd_data.val = val;
|
||||
cmd_data.range = range;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::slider (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range) {
|
||||
struct {
|
||||
int32_t type = CMD_SLIDER;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
uint16_t options;
|
||||
uint16_t val;
|
||||
uint16_t range;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.options = options;
|
||||
cmd_data.val = val;
|
||||
cmd_data.range = range;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::gradient (int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1) {
|
||||
struct {
|
||||
int32_t type = CMD_GRADIENT;
|
||||
int16_t x0;
|
||||
int16_t y0;
|
||||
uint32_t rgb0;
|
||||
int16_t x1;
|
||||
int16_t y1;
|
||||
uint32_t rgb1;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x0 = x0;
|
||||
cmd_data.y0 = y0;
|
||||
cmd_data.rgb0 = rgb0;
|
||||
cmd_data.x1 = x1;
|
||||
cmd_data.y1 = y1;
|
||||
cmd_data.rgb1 = rgb1;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n) {
|
||||
struct {
|
||||
int32_t type = CMD_NUMBER;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t font;
|
||||
uint16_t options;
|
||||
int16_t n;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.font = font;
|
||||
cmd_data.options = options;
|
||||
cmd_data.n = n;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::memzero (uint32_t ptr, uint32_t size) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEMZERO;
|
||||
uint32_t ptr;
|
||||
uint32_t size;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.size = size;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::memset (uint32_t ptr, uint32_t val, uint32_t size) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEMSET;
|
||||
uint32_t ptr;
|
||||
uint32_t val;
|
||||
uint32_t size;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.val = val;
|
||||
cmd_data.size = size;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::memcpy (uint32_t dst, uint32_t src, uint32_t size) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEMCPY;
|
||||
uint32_t dst;
|
||||
uint32_t src;
|
||||
uint32_t size;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.dst = dst;
|
||||
cmd_data.src = src;
|
||||
cmd_data.size = size;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::memcrc (uint32_t ptr, uint32_t num, uint32_t result) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEMCRC;
|
||||
uint32_t ptr;
|
||||
uint32_t num;
|
||||
uint32_t result;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.num = num;
|
||||
cmd_data.result = result;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::memwrite (uint32_t ptr, uint32_t value) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEMWRITE;
|
||||
uint32_t ptr;
|
||||
uint32_t num;
|
||||
uint32_t value;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.num = 4;
|
||||
cmd_data.value = value;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::append (uint32_t ptr, uint32_t size) {
|
||||
struct {
|
||||
uint32_t type = CMD_APPEND;
|
||||
uint32_t ptr;
|
||||
uint32_t size;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.size = size;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::inflate (uint32_t ptr) {
|
||||
struct {
|
||||
uint32_t type = CMD_INFLATE;
|
||||
uint32_t ptr;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::getptr (uint32_t result) {
|
||||
struct {
|
||||
uint32_t type = CMD_GETPTR;
|
||||
uint32_t result;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.result = result;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::track(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t tag) {
|
||||
struct {
|
||||
uint32_t type = CMD_TRACK;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
int16_t tag;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.tag = tag;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::sketch(int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format) {
|
||||
struct {
|
||||
uint32_t type = CMD_SKETCH;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
uint16_t w;
|
||||
uint16_t h;
|
||||
uint32_t ptr;
|
||||
uint16_t format;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.format = format;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::snapshot(uint32_t ptr) {
|
||||
struct {
|
||||
uint32_t type = CMD_SNAPSHOT;
|
||||
uint32_t ptr;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::spinner(int16_t x, int16_t y, uint16_t style, uint16_t scale) {
|
||||
struct {
|
||||
uint32_t type = CMD_SPINNER;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
uint16_t style;
|
||||
uint16_t scale;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.style = style;
|
||||
cmd_data.scale = scale;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::loadimage(uint32_t ptr, uint32_t options) {
|
||||
struct {
|
||||
uint32_t type = CMD_LOADIMAGE;
|
||||
uint32_t ptr;
|
||||
uint32_t options;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.options = options;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::getprops (uint32_t ptr, uint32_t width, uint32_t height) {
|
||||
struct {
|
||||
uint32_t type = CMD_GETPROPS;
|
||||
uint32_t ptr;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.width = width;
|
||||
cmd_data.height = height;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::scale(int32_t sx, int32_t sy) {
|
||||
struct {
|
||||
uint32_t type = CMD_SCALE;
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.sx = sx;
|
||||
cmd_data.sy = sy;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::rotate(int32_t a) {
|
||||
struct {
|
||||
uint32_t type = CMD_ROTATE;
|
||||
int32_t a;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.a = a;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::translate (int32_t tx, int32_t ty) {
|
||||
struct {
|
||||
uint32_t type = CMD_TRANSLATE;
|
||||
int32_t tx;
|
||||
int32_t ty;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.tx = tx;
|
||||
cmd_data.ty = ty;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::setbase (uint8_t base) {
|
||||
struct {
|
||||
int32_t type = CMD_SETBASE;
|
||||
uint32_t base;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.base = base;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::setbitmap(uint32_t addr, uint16_t fmt, uint16_t w, uint16_t h) {
|
||||
struct {
|
||||
uint32_t type = CMD_SETBITMAP;
|
||||
uint32_t addr;
|
||||
uint16_t fmt;
|
||||
uint16_t w;
|
||||
uint16_t h;
|
||||
uint16_t dummy;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.addr = addr;
|
||||
cmd_data.fmt = fmt;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
cmd_data.dummy = 0;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::snapshot2(uint32_t format, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h) {
|
||||
struct {
|
||||
uint32_t type = CMD_SNAPSHOT2;
|
||||
uint32_t format;
|
||||
uint32_t ptr;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
uint16_t w;
|
||||
uint16_t h;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.format = format;
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.x = x;
|
||||
cmd_data.y = y;
|
||||
cmd_data.w = w;
|
||||
cmd_data.h = h;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::mediafifo(uint32_t ptr, uint32_t size) {
|
||||
struct {
|
||||
uint32_t type = CMD_MEDIAFIFO;
|
||||
uint32_t ptr;
|
||||
uint32_t size;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.ptr = ptr;
|
||||
cmd_data.size = size;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::videostart() {
|
||||
cmd( CMD_VIDEOSTART );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::videoframe(uint32_t dst, uint32_t ptr) {
|
||||
struct {
|
||||
uint32_t type = CMD_VIDEOFRAME;
|
||||
uint32_t dst;
|
||||
uint32_t ptr;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.dst = dst;
|
||||
cmd_data.ptr = ptr;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::playvideo(uint32_t options) {
|
||||
struct {
|
||||
uint32_t type = CMD_PLAYVIDEO;
|
||||
uint32_t options;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.options = options;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void CLCD::CommandFifo::setrotate (uint8_t rotation) {
|
||||
struct {
|
||||
uint32_t type = CMD_SETROTATE;
|
||||
uint32_t rotation;
|
||||
} cmd_data;
|
||||
|
||||
cmd_data.rotation = rotation;
|
||||
|
||||
cmd( &cmd_data, sizeof(cmd_data) );
|
||||
}
|
||||
#endif
|
||||
|
||||
/**************************** FT800/810 Co-Processor Command FIFO ****************************/
|
||||
|
||||
bool CLCD::CommandFifo::is_processing() {
|
||||
return (mem_read_32(REG::CMD_READ) & 0x0FFF) != (mem_read_32(REG::CMD_WRITE) & 0x0FFF);
|
||||
}
|
||||
|
||||
bool CLCD::CommandFifo::has_fault() {
|
||||
uint16_t Cmd_Read_Reg = mem_read_32(REG::CMD_READ) & 0x0FFF;
|
||||
return Cmd_Read_Reg == 0x0FFF;
|
||||
}
|
||||
|
||||
#if FTDI_API_LEVEL == 800
|
||||
void CLCD::CommandFifo::start() {
|
||||
if (command_write_ptr == 0xFFFFFFFFul) {
|
||||
command_write_ptr = mem_read_32(REG::CMD_WRITE) & 0x0FFF;
|
||||
}
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::execute() {
|
||||
if (command_write_ptr != 0xFFFFFFFFul) {
|
||||
mem_write_32(REG::CMD_WRITE, command_write_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::reset() {
|
||||
safe_delay(100);
|
||||
mem_write_32(REG::CPURESET, 0x00000001);
|
||||
mem_write_32(REG::CMD_WRITE, 0x00000000);
|
||||
mem_write_32(REG::CMD_READ, 0x00000000);
|
||||
mem_write_32(REG::CPURESET, 0x00000000);
|
||||
safe_delay(300);
|
||||
command_write_ptr = 0xFFFFFFFFul;
|
||||
};
|
||||
|
||||
template <class T> bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len) {
|
||||
const char *ptr = (const char*)data;
|
||||
uint32_t bytes_tail, bytes_head;
|
||||
uint32_t command_read_ptr;
|
||||
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
if (command_write_ptr == 0xFFFFFFFFul) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Attempt to write to FIFO before CommandFifo::Cmd_Start().");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Wait until there is enough space in the circular buffer for the transfer */
|
||||
do {
|
||||
command_read_ptr = mem_read_32(REG::CMD_READ) & 0x0FFF;
|
||||
if (command_read_ptr <= command_write_ptr) {
|
||||
bytes_tail = 4096U - command_write_ptr;
|
||||
bytes_head = command_read_ptr;
|
||||
} else {
|
||||
bytes_tail = command_read_ptr - command_write_ptr;
|
||||
bytes_head = 0;
|
||||
}
|
||||
// Check for faults which can lock up the command processor
|
||||
if (has_fault()) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHOLNPGM("Fault waiting for space in the command processor");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
} while ((bytes_tail + bytes_head) < len);
|
||||
|
||||
/* Write as many bytes as possible following REG::CMD_WRITE */
|
||||
uint16_t bytes_to_write = min(len, bytes_tail);
|
||||
mem_write_bulk (MAP::RAM_CMD + command_write_ptr, T(ptr), bytes_to_write);
|
||||
command_write_ptr += bytes_to_write;
|
||||
ptr += bytes_to_write;
|
||||
len -= bytes_to_write;
|
||||
|
||||
if (len > 0) {
|
||||
/* Write remaining bytes at start of circular buffer */
|
||||
mem_write_bulk (MAP::RAM_CMD, T(ptr), len);
|
||||
command_write_ptr = len;
|
||||
}
|
||||
|
||||
if (command_write_ptr == 4096U) {
|
||||
command_write_ptr = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Writes len bytes into the FIFO, if len is not
|
||||
// divisible by four, zero bytes will be written
|
||||
// to align to the boundary.
|
||||
|
||||
template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
|
||||
const uint8_t padding = MULTIPLE_OF_4(len) - len;
|
||||
|
||||
uint8_t pad_bytes[] = {0, 0, 0, 0};
|
||||
return _write_unaligned(data, len) &&
|
||||
_write_unaligned(pad_bytes, padding);
|
||||
}
|
||||
#else
|
||||
void CLCD::CommandFifo::start() {
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::execute() {
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::reset() {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHOLNPGM("Resetting command processor");
|
||||
#endif
|
||||
safe_delay(100);
|
||||
mem_write_32(REG::CPURESET, 0x00000001);
|
||||
mem_write_32(REG::CMD_WRITE, 0x00000000);
|
||||
mem_write_32(REG::CMD_READ, 0x00000000);
|
||||
mem_write_32(REG::CPURESET, 0x00000000);
|
||||
safe_delay(300);
|
||||
};
|
||||
|
||||
// Writes len bytes into the FIFO, if len is not
|
||||
// divisible by four, zero bytes will be written
|
||||
// to align to the boundary.
|
||||
|
||||
template <class T> bool CLCD::CommandFifo::write(T data, uint16_t len) {
|
||||
const uint8_t padding = MULTIPLE_OF_4(len) - len;
|
||||
|
||||
if (has_fault()) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHOLNPGM("Faulted... ignoring write.");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
// The FT810 provides a special register that can be used
|
||||
// for writing data without us having to do our own FIFO
|
||||
// management.
|
||||
uint16_t Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
if (Command_Space < (len + padding)) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Waiting for ", len + padding);
|
||||
SERIAL_ECHOPAIR(" bytes in command queue, now free: ", Command_Space);
|
||||
#endif
|
||||
do {
|
||||
Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF;
|
||||
if (has_fault()) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHOLNPGM("... fault");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
} while (Command_Space < len + padding);
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHOLNPGM("... done");
|
||||
#endif
|
||||
}
|
||||
mem_write_bulk(REG::CMDB_WRITE, data, len, padding);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
template bool CLCD::CommandFifo::write(const void*, uint16_t);
|
||||
template bool CLCD::CommandFifo::write(progmem_str, uint16_t);
|
||||
|
||||
// CO_PROCESSOR COMMANDS
|
||||
|
||||
void CLCD::CommandFifo::str (const char * data) {
|
||||
write(data, strlen(data)+1);
|
||||
}
|
||||
|
||||
void CLCD::CommandFifo::str (progmem_str data) {
|
||||
write(data, strlen_P((const char*)data)+1);
|
||||
}
|
||||
|
||||
/******************* LCD INITIALIZATION ************************/
|
||||
|
||||
void CLCD::init (void) {
|
||||
spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control
|
||||
ftdi_reset(); // Power down/up the FT8xx with the apropriate delays
|
||||
|
||||
if (Use_Crystal == 1) {
|
||||
host_cmd(CLKEXT, 0);
|
||||
}
|
||||
else {
|
||||
host_cmd(CLKINT, 0);
|
||||
}
|
||||
|
||||
host_cmd(ACTIVE, 0); // Activate the System Clock
|
||||
|
||||
/* read the device-id until it returns 0x7c or times out, should take less than 150ms */
|
||||
uint8_t counter;
|
||||
for(counter = 0; counter < 250; counter++) {
|
||||
uint8_t device_id = mem_read_8(REG::ID); // Read Device ID, Should Be 0x7C;
|
||||
if (device_id == 0x7c) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("FTDI chip initialized ");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
else {
|
||||
delay(1);
|
||||
}
|
||||
if (counter == 249) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default
|
||||
|
||||
/* Configure the FT8xx Registers */
|
||||
mem_write_16(REG::HCYCLE, FTDI::Hcycle);
|
||||
mem_write_16(REG::HOFFSET, FTDI::Hoffset);
|
||||
mem_write_16(REG::HSYNC0, FTDI::Hsync0);
|
||||
mem_write_16(REG::HSYNC1, FTDI::Hsync1);
|
||||
mem_write_16(REG::VCYCLE, FTDI::Vcycle);
|
||||
mem_write_16(REG::VOFFSET, FTDI::Voffset);
|
||||
mem_write_16(REG::VSYNC0, FTDI::Vsync0);
|
||||
mem_write_16(REG::VSYNC1, FTDI::Vsync1);
|
||||
mem_write_16(REG::HSIZE, FTDI::Hsize);
|
||||
mem_write_16(REG::VSIZE, FTDI::Vsize);
|
||||
mem_write_8(REG::SWIZZLE, FTDI::Swizzle);
|
||||
mem_write_8(REG::PCLK_POL, FTDI::Pclkpol);
|
||||
mem_write_8(REG::CSPREAD, FTDI::CSpread);
|
||||
|
||||
/* write a basic display-list to get things started */
|
||||
mem_write_32(MAP::RAM_DL, DL::CLEAR_COLOR_RGB);
|
||||
mem_write_32(MAP::RAM_DL + 4, (DL::CLEAR | 0x07)); /* clear color, stencil and tag buffer */
|
||||
mem_write_32(MAP::RAM_DL + 8, DL::DL_DISPLAY); /* end of display list */
|
||||
|
||||
mem_write_8(REG::DLSWAP, 0x02); // activate display list, Bad Magic Cookie 2 = switch to new list after current frame is scanned out
|
||||
|
||||
//mem_write_8(REG::TOUCH_MODE, 0x03); // Configure the Touch Screen, Bad Magic Cookie, 3 = CONTINUOUS = Reset Default
|
||||
//mem_write_8(REG::TOUCH_ADC_MODE, 0x01); // Bad Magic Cookie, 1 = single touch = Reset Default
|
||||
//mem_write_8(REG::TOUCH_OVERSAMPLE, 0x0F); // Reset Default = 7 - why 15?
|
||||
mem_write_16(REG::TOUCH_RZTHRESH, touch_threshold); /* setup touch sensitivity */
|
||||
mem_write_8(REG::VOL_SOUND, 0x00); // Turn Synthesizer Volume Off
|
||||
|
||||
/* turn on the display by setting DISP high */
|
||||
/* turn on the Audio Amplifier by setting GPIO_1 high for the select few modules supporting this */
|
||||
/* no need to use GPIOX here since DISP/GPIO_0 and GPIO_1 are on REG::GPIO for FT81x as well */
|
||||
if (GPIO_1_Audio_Shutdown) {
|
||||
mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP1);
|
||||
mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP1);
|
||||
} else if (GPIO_0_Audio_Enable) {
|
||||
mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP0);
|
||||
mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP0);
|
||||
}
|
||||
else {
|
||||
mem_write_8(REG::GPIO, GPIO_DISP); /* REG::GPIO_DIR is set to output for GPIO_DISP by default */
|
||||
}
|
||||
|
||||
mem_write_8(REG::PCLK, Pclk); // Turns on Clock by setting PCLK Register to the value necessary for the module
|
||||
|
||||
mem_write_16(REG::PWM_HZ, 0x00FA);
|
||||
|
||||
// Turning off dithering seems to help prevent horizontal line artifacts on certain colors
|
||||
mem_write_8(REG::DITHER, 0);
|
||||
|
||||
// Initialize the command FIFO
|
||||
CommandFifo::reset();
|
||||
|
||||
default_touch_transform();
|
||||
default_display_orientation();
|
||||
}
|
||||
|
||||
void CLCD::default_touch_transform() {
|
||||
// Set Initial Values for Touch Transform Registers
|
||||
mem_write_32(REG::ROTATE, 0);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_A, FTDI::default_transform_a);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_B, FTDI::default_transform_b);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_C, FTDI::default_transform_c);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_D, FTDI::default_transform_d);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_E, FTDI::default_transform_e);
|
||||
mem_write_32(REG::TOUCH_TRANSFORM_F, FTDI::default_transform_f);
|
||||
}
|
||||
|
||||
void CLCD::default_display_orientation() {
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
// Set the initial display orientation. On the FT810, we use the command
|
||||
// processor to do this since it will also update the transform matrices.
|
||||
if (FTDI::ftdi_chip >= 810) {
|
||||
CommandFifo cmd;
|
||||
cmd.setrotate(0
|
||||
#if ENABLED(TOUCH_UI_MIRRORED)
|
||||
+ 4
|
||||
#endif
|
||||
#if ENABLED(TOUCH_UI_PORTRAIT)
|
||||
+ 2
|
||||
#endif
|
||||
#if ENABLED(TOUCH_UI_INVERTED)
|
||||
+ 1
|
||||
#endif
|
||||
);
|
||||
cmd.execute();
|
||||
}
|
||||
else {
|
||||
#ifdef TOUCH_UI_INVERTED
|
||||
mem_write_32(REG::ROTATE, 1);
|
||||
#endif
|
||||
}
|
||||
#elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
|
||||
#error PORTRAIT or MIRRORED orientation not supported on the FT800
|
||||
#elif ENABLED(TOUCH_UI_INVERTED)
|
||||
mem_write_32(REG::ROTATE, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // FTDI_BASIC
|
|
@ -0,0 +1,258 @@
|
|||
/****************
|
||||
* commands.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* FUNCTION MAP *
|
||||
* *
|
||||
* SPI and FT800/810 Commands *
|
||||
* *
|
||||
* CLCD::spi_select() Set CS line to 0 *
|
||||
* CLCD::spi_deselect() Set CS Line to 1 *
|
||||
* CLCD::reset() Toggle FT800/810 Power Down Line 50 ms *
|
||||
* CLCD::spi_init() Configure I/O Lines for SPI *
|
||||
* CLCD::spi_transfer() Send/Receive 1 SPI Byte *
|
||||
* CLCD::init() Set FT800/810 Registers *
|
||||
* CLCD::enable() Turn On FT800/810 PCLK *
|
||||
* CLCD::disable() Turn Off FT8880/810 PCLK *
|
||||
* CLCD::set_backlight() Set LCD Backlight Level *
|
||||
* *
|
||||
* MEMORY READ FUNCTIONS *
|
||||
* *
|
||||
* CLCD::mem_read_addr() Send 32-Bit Address *
|
||||
* CLCD::mem_read_8() Read 1 Byte *
|
||||
* CLCD::mem_read_16() Read 2 Bytes *
|
||||
* CLCD::mem_read_32() Read 4 Bytes *
|
||||
* *
|
||||
* MEMORY WRITE FUNCTIONS *
|
||||
* *
|
||||
* CLCD::mem_write_addr() Send 24-Bit Address *
|
||||
* CLCD::mem_write_8() Write 1 Byte *
|
||||
* CLCD::mem_write_16() Write 2 Bytes *
|
||||
* CLCD::mem_write_32() Write 4 Bytes *
|
||||
* *
|
||||
* HOST COMMAND FUNCTION *
|
||||
* *
|
||||
* CLCD::host_cmd() Send 24-Bit Host Command *
|
||||
* *
|
||||
* COMMAND BUFFER FUNCTIONS *
|
||||
* *
|
||||
* CLCD::cmd() Send 32-Bit Value(4 Bytes)CMD Buffer *
|
||||
* CLCD::cmd() Send Data Structure with 32-Bit Cmd *
|
||||
* CLCD::str() Send Text String in 32-Bit Multiples *
|
||||
|
||||
* *
|
||||
* FT800/810 GRAPHIC COMMANDS *
|
||||
* *
|
||||
* class CLCD:CommandFifo {} Class to control Cmd FIFO *
|
||||
|
||||
* CommandFifo::start() Wait for CP finish - Set FIFO Ptr *
|
||||
* CommandFifo::execute() Set REG_CMD_WRITE and start CP *
|
||||
* CommandFifo::reset() Set Cmd Buffer Pointers to 0 *
|
||||
*
|
||||
* CommandFifo::fgcolor Set Graphic Item Foreground Color *
|
||||
* CommandFifo::bgcolor Set Graphic Item Background Color *
|
||||
* CommandFifo::begin() Begin Drawing a Primative *
|
||||
* CommandFifo::mem_copy() Copy a Block of Memory *
|
||||
* CommandFifo::append() Append Commands to Current DL *
|
||||
* CommandFifo::gradient_color() Set 3D Button Highlight Color *
|
||||
* CommandFifo::button() Draw Button with Bulk Write *
|
||||
* CommandFifo::text() Draw Text with Bulk Write *
|
||||
*****************************************************************************/
|
||||
|
||||
/**************************************************
|
||||
* RAM_G Graphics RAM Allocation *
|
||||
* *
|
||||
* Address Use *
|
||||
* *
|
||||
* 8000 Extruder Bitmap *
|
||||
* 8100 Bed Heat Bitmap *
|
||||
* 8200 Fan Bitmap *
|
||||
* 8300 Thumb Drive Symbol Bitmap *
|
||||
* 35000 Static DL Space (FT800) *
|
||||
* F5000 Static DL Space (FT810) *
|
||||
**************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef const __FlashStringHelper *progmem_str;
|
||||
|
||||
class UIStorage;
|
||||
|
||||
class CLCD {
|
||||
friend class UIStorage;
|
||||
|
||||
public:
|
||||
typedef FTDI::ftdi_registers REG;
|
||||
typedef FTDI::ftdi_memory_map MAP;
|
||||
|
||||
static void spi_write_addr (uint32_t reg_address);
|
||||
static void spi_read_addr (uint32_t reg_address);
|
||||
|
||||
static uint8_t mem_read_8 (uint32_t reg_address);
|
||||
static uint16_t mem_read_16 (uint32_t reg_address);
|
||||
static uint32_t mem_read_32 (uint32_t reg_address);
|
||||
static void mem_read_bulk (uint32_t reg_address, uint8_t *data, uint16_t len);
|
||||
|
||||
static void mem_write_8 (uint32_t reg_address, uint8_t w_data);
|
||||
static void mem_write_16 (uint32_t reg_address, uint16_t w_data);
|
||||
static void mem_write_32 (uint32_t reg_address, uint32_t w_data);
|
||||
static void mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0);
|
||||
static void mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0);
|
||||
static void mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0);
|
||||
static void mem_write_xbm (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0);
|
||||
|
||||
public:
|
||||
class CommandFifo;
|
||||
class FontMetrics;
|
||||
|
||||
static void init (void);
|
||||
static void default_touch_transform (void);
|
||||
static void default_display_orientation (void);
|
||||
static void turn_on_backlight (void);
|
||||
static void enable (void);
|
||||
static void disable (void);
|
||||
static void set_brightness (uint8_t brightness);
|
||||
static uint8_t get_brightness();
|
||||
static void host_cmd (unsigned char host_command, unsigned char byte2);
|
||||
|
||||
static void get_font_metrics (uint8_t font, struct FontMetrics &fm);
|
||||
static uint16_t get_text_width(const uint8_t font, const char *str);
|
||||
static uint16_t get_text_width_P(const uint8_t font, const char *str);
|
||||
|
||||
static uint8_t get_tag () {return mem_read_8(REG::TOUCH_TAG);}
|
||||
static bool is_touching () {return (mem_read_32(REG::TOUCH_DIRECT_XY) & 0x80000000) == 0;}
|
||||
|
||||
static uint8_t get_tracker (uint16_t &value) {
|
||||
uint32_t tracker = mem_read_32(REG::TRACKER);
|
||||
value = tracker >> 16;
|
||||
return tracker & 0xFF;
|
||||
}
|
||||
};
|
||||
|
||||
/*************************** FT800/810 Font Metrics ****************************/
|
||||
|
||||
class CLCD::FontMetrics {
|
||||
public:
|
||||
uint8_t char_widths[128];
|
||||
uint32_t format;
|
||||
uint32_t stride;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t ptr;
|
||||
|
||||
FontMetrics(uint8_t font) {load(font);}
|
||||
|
||||
void load(uint8_t font);
|
||||
|
||||
// Returns width of string, up to a maximum of n characters.
|
||||
uint16_t get_text_width(const char *str, size_t n = SIZE_MAX) const;
|
||||
uint16_t get_text_width_P(const char *str, size_t n = SIZE_MAX) const;
|
||||
};
|
||||
|
||||
/******************* FT800/810 Graphic Commands *********************************/
|
||||
|
||||
class CLCD::CommandFifo {
|
||||
protected:
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
uint32_t getRegCmdBSpace();
|
||||
#else
|
||||
static uint32_t command_write_ptr;
|
||||
template <class T> bool _write_unaligned(T data, uint16_t len);
|
||||
#endif
|
||||
void start(void);
|
||||
|
||||
public:
|
||||
template <class T> bool write(T data, uint16_t len);
|
||||
|
||||
public:
|
||||
CommandFifo() {start();}
|
||||
|
||||
static void reset (void);
|
||||
static bool is_processing();
|
||||
static bool has_fault();
|
||||
|
||||
void execute(void);
|
||||
|
||||
void cmd(uint32_t cmd32);
|
||||
void cmd(void* data, uint16_t len);
|
||||
|
||||
void dlstart() {cmd(FTDI::CMD_DLSTART);}
|
||||
void swap() {cmd(FTDI::CMD_SWAP);}
|
||||
void coldstart() {cmd(FTDI::CMD_COLDSTART);}
|
||||
void screensaver() {cmd(FTDI::CMD_SCREENSAVER);}
|
||||
void stop() {cmd(FTDI::CMD_STOP);}
|
||||
void loadidentity() {cmd(FTDI::CMD_LOADIDENTITY);}
|
||||
void setmatrix() {cmd(FTDI::CMD_SETMATRIX);}
|
||||
|
||||
void fgcolor (uint32_t rgb);
|
||||
void bgcolor (uint32_t rgb);
|
||||
void gradcolor (uint32_t rgb);
|
||||
|
||||
void track (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t tag);
|
||||
void clock (int16_t x, int16_t y, int16_t r, uint16_t options, int16_t h, int16_t m, int16_t s, int16_t ms);
|
||||
void gauge (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t major, uint16_t minor, uint16_t val, uint16_t range);
|
||||
void dial (int16_t x, int16_t y, int16_t r, uint16_t options, uint16_t val);
|
||||
void slider (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range);
|
||||
void progress (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t range);
|
||||
void scrollbar (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t options, uint16_t val, uint16_t size, uint16_t range);
|
||||
void number (int16_t x, int16_t y, int16_t font, uint16_t options, int32_t n);
|
||||
void spinner (int16_t x, int16_t y, uint16_t style, uint16_t scale);
|
||||
void sketch (int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format);
|
||||
void gradient (int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1);
|
||||
void snapshot (uint32_t ptr);
|
||||
void loadimage (uint32_t ptr, uint32_t options);
|
||||
void getprops (uint32_t ptr, uint32_t width, uint32_t height);
|
||||
|
||||
void scale (int32_t sx, int32_t sy);
|
||||
void rotate (int32_t a);
|
||||
void translate (int32_t tx, int32_t ty);
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
void setbase (uint8_t base);
|
||||
void setrotate (uint8_t rotation);
|
||||
void setbitmap (uint32_t ptr, uint16_t fmt, uint16_t w, uint16_t h);
|
||||
void snapshot2 (uint32_t fmt, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h);
|
||||
void mediafifo (uint32_t ptr, uint32_t size);
|
||||
void playvideo (uint32_t options);
|
||||
void videostart();
|
||||
void videoframe(uint32_t dst, uint32_t ptr);
|
||||
#endif
|
||||
|
||||
// All the following must be followed by str()
|
||||
void text (int16_t x, int16_t y, int16_t font, uint16_t options);
|
||||
void button (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t option);
|
||||
void toggle (int16_t x, int16_t y, int16_t w, int16_t font, uint16_t options, bool state);
|
||||
void keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options);
|
||||
|
||||
// Sends the string portion of text, button, toggle and keys.
|
||||
void str (const char * data);
|
||||
void str (progmem_str data);
|
||||
|
||||
void memzero (uint32_t ptr, uint32_t size);
|
||||
void memset (uint32_t ptr, uint32_t value, uint32_t size);
|
||||
void memcpy (uint32_t dst, uint32_t src, uint32_t size);
|
||||
void memcrc (uint32_t ptr, uint32_t num, uint32_t result);
|
||||
void memwrite (uint32_t ptr, uint32_t value);
|
||||
void inflate (uint32_t ptr);
|
||||
void getptr (uint32_t result);
|
||||
void append (uint32_t ptr, uint32_t size);
|
||||
};
|
|
@ -0,0 +1,411 @@
|
|||
/***************
|
||||
* constants.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* This header defines constants and commands for the FTDI FT810 LCD Driver *
|
||||
* chip. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
// OPTIONS
|
||||
|
||||
namespace FTDI {
|
||||
constexpr uint16_t OPT_3D = 0x0000;
|
||||
constexpr uint16_t OPT_RGB565 = 0x0000;
|
||||
constexpr uint16_t OPT_MONO = 0x0001;
|
||||
constexpr uint16_t OPT_NODL = 0x0002;
|
||||
constexpr uint16_t OPT_FLAT = 0x0100;
|
||||
constexpr uint16_t OPT_SIGNED = 0x0100;
|
||||
constexpr uint16_t OPT_CENTERX = 0x0200;
|
||||
constexpr uint16_t OPT_CENTERY = 0x0400;
|
||||
constexpr uint16_t OPT_CENTER = (OPT_CENTERX | OPT_CENTERY);
|
||||
constexpr uint16_t OPT_RIGHTX = 0x0800;
|
||||
constexpr uint16_t OPT_NOBACK = 0x1000;
|
||||
constexpr uint16_t OPT_NOTICKS = 0x2000;
|
||||
constexpr uint16_t OPT_NOHM = 0x4000;
|
||||
constexpr uint16_t OPT_NOPOINTER = 0x4000;
|
||||
constexpr uint16_t OPT_NOSECS = 0x8000;
|
||||
constexpr uint16_t OPT_NOHANDS = (OPT_NOPOINTER | OPT_NOSECS);
|
||||
}
|
||||
|
||||
namespace FTDI_FT810 {
|
||||
constexpr uint16_t OPT_NOTEAR = 0x0004;
|
||||
constexpr uint16_t OPT_FULLSCREEN = 0x0008;
|
||||
constexpr uint16_t OPT_MEDIAFIFO = 0x0010;
|
||||
constexpr uint16_t OPT_SOUND = 0x0020;
|
||||
}
|
||||
|
||||
// GPIO Bits
|
||||
|
||||
namespace FTDI {
|
||||
constexpr uint8_t GPIO_GP0 = 1 << 0;
|
||||
constexpr uint8_t GPIO_GP1 = 1 << 1;
|
||||
constexpr uint8_t GPIO_DISP = 1 << 7;
|
||||
}
|
||||
|
||||
namespace FTDI_FT810 {
|
||||
constexpr uint16_t GPIOX_GP0 = 1 << 0;
|
||||
constexpr uint16_t GPIOX_GP1 = 1 << 1;
|
||||
constexpr uint16_t GPIOX_DISP = 1 << 15;
|
||||
}
|
||||
|
||||
// HOST COMMANDS
|
||||
|
||||
namespace FTDI {
|
||||
constexpr uint8_t ACTIVE = 0x00;
|
||||
constexpr uint8_t STANDBY = 0x41;
|
||||
constexpr uint8_t SLEEP = 0x42;
|
||||
constexpr uint8_t PWRDOWN = 0x50;
|
||||
constexpr uint8_t CLKEXT = 0x44;
|
||||
constexpr uint8_t CLKINT = 0x48;
|
||||
constexpr uint8_t CORESET = 0x68;
|
||||
}
|
||||
|
||||
namespace FTDI_FT800 {
|
||||
constexpr uint8_t CLK48M = 0x62;
|
||||
constexpr uint8_t CLK36M = 0x61;
|
||||
}
|
||||
|
||||
namespace FTDI_FT810 {
|
||||
constexpr uint8_t CLKSEL = 0x61;
|
||||
}
|
||||
|
||||
// DISPLAY LIST COMMANDS
|
||||
|
||||
namespace FTDI {
|
||||
constexpr uint8_t ARGB1555 = 0;
|
||||
constexpr uint8_t L1 = 1;
|
||||
constexpr uint8_t L4 = 2;
|
||||
constexpr uint8_t L8 = 3;
|
||||
constexpr uint8_t RGB332 = 4;
|
||||
constexpr uint8_t ARGB2 = 5;
|
||||
constexpr uint8_t ARGB4 = 6;
|
||||
constexpr uint8_t RGB565 = 7;
|
||||
constexpr uint8_t PALETTED = 8;
|
||||
constexpr uint8_t TEXT8X8 = 9;
|
||||
constexpr uint8_t TEXTVGA = 10;
|
||||
constexpr uint8_t BARGRAPH = 11;
|
||||
|
||||
constexpr uint8_t ALPHA_FUNC_NEVER = 0;
|
||||
constexpr uint8_t ALPHA_FUNC_LESS = 1;
|
||||
constexpr uint8_t ALPHA_FUNC_LEQUAL = 2;
|
||||
constexpr uint8_t ALPHA_FUNC_GREATER = 3;
|
||||
constexpr uint8_t ALPHA_FUNC_GEQUAL = 4;
|
||||
constexpr uint8_t ALPHA_FUNC_EQUAL = 5;
|
||||
constexpr uint8_t ALPHA_FUNC_NOTEQUAL = 6;
|
||||
constexpr uint8_t ALPHA_FUNC_ALWAYS = 7;
|
||||
|
||||
constexpr uint8_t NEAREST = 0;
|
||||
constexpr uint8_t BILINEAR = 1;
|
||||
constexpr uint8_t BORDER = 0;
|
||||
constexpr uint8_t REPEAT = 1;
|
||||
|
||||
constexpr uint8_t BLEND_FUNC_ZERO = 0;
|
||||
constexpr uint8_t BLEND_FUNC_ONE = 1;
|
||||
constexpr uint8_t BLEND_FUNC_SRC_ALPHA = 2;
|
||||
constexpr uint8_t BLEND_FUNC_DST_ALPHA = 3;
|
||||
constexpr uint8_t BLEND_FUNC_ONE_MINUS_SRC_ALPHA = 4;
|
||||
constexpr uint8_t BLEND_FUNC_ONE_MINUS_DST_ALPHA = 5;
|
||||
|
||||
constexpr uint32_t COLOR_MASK_RED = 8;
|
||||
constexpr uint32_t COLOR_MASK_GRN = 4;
|
||||
constexpr uint32_t COLOR_MASK_BLU = 2;
|
||||
constexpr uint32_t COLOR_MASK_ALPHA = 1;
|
||||
|
||||
constexpr uint8_t STENCIL_FUNC_NEVER = 0;
|
||||
constexpr uint8_t STENCIL_FUNC_LESS = 1;
|
||||
constexpr uint8_t STENCIL_FUNC_LEQUAL = 2;
|
||||
constexpr uint8_t STENCIL_FUNC_GREATER = 3;
|
||||
constexpr uint8_t STENCIL_FUNC_GEQUAL = 4;
|
||||
constexpr uint8_t STENCIL_FUNC_EQUAL = 5;
|
||||
constexpr uint8_t STENCIL_FUNC_NOTEQUAL = 6;
|
||||
constexpr uint8_t STENCIL_FUNC_ALWAYS = 7;
|
||||
|
||||
constexpr uint8_t STENCIL_OP_ZERO = 0;
|
||||
constexpr uint8_t STENCIL_OP_KEEP = 1;
|
||||
constexpr uint8_t STENCIL_OP_REPLACE = 2;
|
||||
constexpr uint8_t STENCIL_OP_INCR = 3;
|
||||
constexpr uint8_t STENCIL_OP_DECR = 4;
|
||||
constexpr uint8_t STENCIL_OP_INVERT = 5;
|
||||
|
||||
typedef enum: uint32_t {
|
||||
BITMAPS = 1,
|
||||
POINTS = 2,
|
||||
LINES = 3,
|
||||
LINE_STRIP = 4,
|
||||
EDGE_STRIP_R = 5,
|
||||
EDGE_STRIP_L = 6,
|
||||
EDGE_STRIP_A = 7,
|
||||
EDGE_STRIP_B = 8,
|
||||
RECTS = 9
|
||||
} begin_t;
|
||||
}
|
||||
|
||||
namespace FTDI_FT800_DL {
|
||||
constexpr uint32_t ALPHA_FUNC = 0x09000000;
|
||||
constexpr uint32_t BEGIN = 0x1F000000;
|
||||
constexpr uint32_t BITMAP_HANDLE = 0x05000000;
|
||||
constexpr uint32_t BITMAP_LAYOUT = 0x07000000;
|
||||
constexpr uint32_t BITMAP_SIZE = 0x08000000;
|
||||
constexpr uint32_t BITMAP_SOURCE = 0x01000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_A = 0x15000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_B = 0x16000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_C = 0x17000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_D = 0x18000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_E = 0x19000000;
|
||||
constexpr uint32_t BITMAP_TRANSFORM_F = 0x1A000000;
|
||||
constexpr uint32_t BLEND_FUNC = 0x0B000000;
|
||||
constexpr uint32_t CALL = 0x1D000000;
|
||||
constexpr uint32_t CELL = 0x06000000;
|
||||
constexpr uint32_t CLEAR = 0x26000000;
|
||||
constexpr uint32_t CLEAR_COLOR_BUFFER = 0x00000004;
|
||||
constexpr uint32_t CLEAR_STENCIL_BUFFER = 0x00000002;
|
||||
constexpr uint32_t CLEAR_TAG_BUFFER = 0x00000001;
|
||||
constexpr uint32_t CLEAR_COLOR_A = 0x0F000000;
|
||||
constexpr uint32_t CLEAR_COLOR_RGB = 0x02000000;
|
||||
constexpr uint32_t CLEAR_STENCIL = 0x11000000;
|
||||
constexpr uint32_t CLEAR_TAG = 0x12000000;
|
||||
constexpr uint32_t COLOR_A = 0x10000000;
|
||||
constexpr uint32_t COLOR_MASK = 0x20000000;
|
||||
constexpr uint32_t COLOR_RGB = 0x04000000;
|
||||
constexpr uint32_t DL_DISPLAY = 0x00000000;
|
||||
constexpr uint32_t END = 0x21000000;
|
||||
constexpr uint32_t JUMP = 0x1E000000;
|
||||
constexpr uint32_t LINE_WIDTH = 0x0E000000;
|
||||
constexpr uint32_t MACRO = 0x25000000;
|
||||
constexpr uint32_t POINT_SIZE = 0x0D000000;
|
||||
constexpr uint32_t RESTORE_CONTEXT = 0x23000000;
|
||||
constexpr uint32_t RETURN = 0x24000000;
|
||||
constexpr uint32_t SAVE_CONTEXT = 0x22000000;
|
||||
constexpr uint32_t SCISSOR_SIZE = 0x1C000000;
|
||||
constexpr uint32_t SCISSOR_XY = 0x1B000000;
|
||||
constexpr uint32_t STENCIL_FUNC = 0x0A000000;
|
||||
constexpr uint32_t STENCIL_MASK = 0x13000000;
|
||||
constexpr uint32_t STENCIL_OP = 0x0C000000;
|
||||
constexpr uint32_t TAG = 0x03000000;
|
||||
constexpr uint32_t TAG_MASK = 0x14000000;
|
||||
constexpr uint32_t VERTEX2F = 0x40000000;
|
||||
constexpr uint32_t VERTEX2II = 0x80000000;
|
||||
}
|
||||
|
||||
namespace FTDI_FT810_DL {
|
||||
constexpr uint32_t NOP = 0x25000000;
|
||||
constexpr uint32_t BITMAP_LAYOUT_H = 0x28000000;
|
||||
constexpr uint32_t BITMAP_SIZE_H = 0x29000000;
|
||||
constexpr uint32_t VERTEX_FORMAT = 0x27000000;
|
||||
constexpr uint32_t VERTEX_TRANSLATE_X = 0x2B000000;
|
||||
constexpr uint32_t VERTEX_TRANSLATE_Y = 0x2C000000;
|
||||
}
|
||||
|
||||
// CO-PROCESSOR ENGINE COMMANDS
|
||||
namespace FTDI {
|
||||
constexpr uint32_t CMD_DLSTART = 0xFFFFFF00;
|
||||
constexpr uint32_t CMD_SWAP = 0xFFFFFF01;
|
||||
constexpr uint32_t CMD_COLDSTART = 0xFFFFFF32;
|
||||
constexpr uint32_t CMD_INTERRUPT = 0xFFFFFF02;
|
||||
constexpr uint32_t CMD_APPEND = 0xFFFFFF1E;
|
||||
constexpr uint32_t CMD_REGREAD = 0xFFFFFF19;
|
||||
constexpr uint32_t CMD_MEMWRITE = 0xFFFFFF1A;
|
||||
constexpr uint32_t CMD_INFLATE = 0xFFFFFF22;
|
||||
constexpr uint32_t CMD_LOADIMAGE = 0xFFFFFF24;
|
||||
constexpr uint32_t CMD_MEMCRC = 0xFFFFFF18;
|
||||
constexpr uint32_t CMD_MEMZERO = 0xFFFFFF1C;
|
||||
constexpr uint32_t CMD_MEMSET = 0xFFFFFF1B;
|
||||
constexpr uint32_t CMD_MEMCPY = 0xFFFFFF1D;
|
||||
constexpr uint32_t CMD_BUTTON = 0xFFFFFF0D;
|
||||
constexpr uint32_t CMD_CLOCK = 0xFFFFFF14;
|
||||
constexpr uint32_t CMD_FGCOLOR = 0xFFFFFF0A;
|
||||
constexpr uint32_t CMD_BGCOLOR = 0xFFFFFF09;
|
||||
constexpr uint32_t CMD_GRADCOLOR = 0xFFFFFF34;
|
||||
constexpr uint32_t CMD_GAUGE = 0xFFFFFF13;
|
||||
constexpr uint32_t CMD_GRADIENT = 0xFFFFFF0B;
|
||||
constexpr uint32_t CMD_KEYS = 0xFFFFFF0E;
|
||||
constexpr uint32_t CMD_PROGRESS = 0xFFFFFF0F;
|
||||
constexpr uint32_t CMD_SCROLLBAR = 0xFFFFFF11;
|
||||
constexpr uint32_t CMD_SLIDER = 0xFFFFFF10;
|
||||
constexpr uint32_t CMD_DIAL = 0xFFFFFF2D;
|
||||
constexpr uint32_t CMD_TOGGLE = 0xFFFFFF12;
|
||||
constexpr uint32_t CMD_TEXT = 0xFFFFFF0C;
|
||||
constexpr uint32_t CMD_NUMBER = 0xFFFFFF2E;
|
||||
constexpr uint32_t CMD_LOADIDENTITY = 0xFFFFFF26;
|
||||
constexpr uint32_t CMD_SETMATRIX = 0xFFFFFF2A;
|
||||
constexpr uint32_t CMD_GETMATRIX = 0xFFFFFF33;
|
||||
constexpr uint32_t CMD_GETPTR = 0xFFFFFF23;
|
||||
constexpr uint32_t CMD_GETPROPS = 0xFFFFFF25;
|
||||
constexpr uint32_t CMD_SCALE = 0xFFFFFF28;
|
||||
constexpr uint32_t CMD_ROTATE = 0xFFFFFF29;
|
||||
constexpr uint32_t CMD_TRANSLATE = 0xFFFFFF27;
|
||||
constexpr uint32_t CMD_CALIBRATE = 0xFFFFFF15;
|
||||
constexpr uint32_t CMD_SPINNER = 0xFFFFFF16;
|
||||
constexpr uint32_t CMD_SCREENSAVER = 0xFFFFFF2F;
|
||||
constexpr uint32_t CMD_SKETCH = 0xFFFFFF30;
|
||||
constexpr uint32_t CMD_STOP = 0xFFFFFF17;
|
||||
constexpr uint32_t CMD_SETFONT = 0xFFFFFF2B;
|
||||
constexpr uint32_t CMD_TRACK = 0xFFFFFF2C;
|
||||
constexpr uint32_t CMD_SNAPSHOT = 0xFFFFFF1F;
|
||||
constexpr uint32_t CMD_LOGO = 0xFFFFFF31;
|
||||
}
|
||||
|
||||
namespace FTDI_FT810 {
|
||||
constexpr uint32_t CMD_SETROTATE = 0xFFFFFF36;
|
||||
constexpr uint32_t CMD_SNAPSHOT2 = 0xFFFFFF37;
|
||||
constexpr uint32_t CMD_SETBASE = 0xFFFFFF38;
|
||||
constexpr uint32_t CMD_MEDIAFIFO = 0xFFFFFF39;
|
||||
constexpr uint32_t CMD_PLAYVIDEO = 0xFFFFFF3A;
|
||||
constexpr uint32_t CMD_VIDEOSTART = 0xFFFFFF40;
|
||||
constexpr uint32_t CMD_VIDEOFRAME = 0xFFFFFF41;
|
||||
constexpr uint32_t CMD_SETBITMAP = 0xFFFFFF43;
|
||||
}
|
||||
|
||||
namespace FTDI {
|
||||
enum effect_t {
|
||||
SILENCE = 0x00,
|
||||
SQUARE_WAVE = 0x01,
|
||||
SINE_WAVE = 0x02,
|
||||
SAWTOOTH_WAVE = 0x03,
|
||||
TRIANGLE_WAVE = 0x04,
|
||||
BEEPING = 0x05,
|
||||
ALARM = 0x06,
|
||||
WARBLE = 0x07,
|
||||
CAROUSEL = 0x08,
|
||||
SHORT_PIPS_1 = 0x10,
|
||||
SHORT_PIPS_2 = 0x11,
|
||||
SHORT_PIPS_3 = 0x12,
|
||||
SHORT_PIPS_4 = 0x13,
|
||||
SHORT_PIPS_5 = 0x14,
|
||||
SHORT_PIPS_6 = 0x15,
|
||||
SHORT_PIPS_7 = 0x16,
|
||||
SHORT_PIPS_8 = 0x17,
|
||||
SHORT_PIPS_9 = 0x18,
|
||||
SHORT_PIPS_10 = 0x19,
|
||||
SHORT_PIPS_11 = 0x1A,
|
||||
SHORT_PIPS_12 = 0x1B,
|
||||
SHORT_PIPS_13 = 0x1C,
|
||||
SHORT_PIPS_14 = 0x1D,
|
||||
SHORT_PIPS_15 = 0x1E,
|
||||
SHORT_PIPS_16 = 0x1F,
|
||||
DTMF_POUND = 0x23,
|
||||
DTMF_STAR = 0x2C,
|
||||
DTMF_0 = 0x30,
|
||||
DTMF_1 = 0x31,
|
||||
DTMF_2 = 0x32,
|
||||
DTMF_3 = 0x33,
|
||||
DTMF_4 = 0x34,
|
||||
DTMF_5 = 0x35,
|
||||
DTMF_6 = 0x36,
|
||||
DTMF_7 = 0x37,
|
||||
DTMF_8 = 0x38,
|
||||
DTMF_9 = 0x39,
|
||||
HARP = 0x40,
|
||||
XYLOPHONE = 0x41,
|
||||
TUBA = 0x42,
|
||||
GLOCKENSPIEL = 0x43,
|
||||
ORGAN = 0x44,
|
||||
TRUMPET = 0x45,
|
||||
PIANO = 0x46,
|
||||
CHIMES = 0x47,
|
||||
MUSIC_BOX = 0x48,
|
||||
BELL = 0x49,
|
||||
CLICK = 0x50,
|
||||
SWITCH = 0x51,
|
||||
COWBELL = 0x52,
|
||||
NOTCH = 0x53,
|
||||
HIHAT = 0x54,
|
||||
KICKDRUM = 0x55,
|
||||
POP = 0x56,
|
||||
CLACK = 0x57,
|
||||
CHACK = 0x58,
|
||||
MUTE = 0x60,
|
||||
UNMUTE = 0x61
|
||||
};
|
||||
|
||||
enum note_t {
|
||||
END_SONG = 0xFF,
|
||||
REST = 0x00,
|
||||
|
||||
NOTE_C1 = 0x18, // 24
|
||||
NOTE_C1S = 0x19,
|
||||
NOTE_D1 = 0x1A,
|
||||
NOTE_D1S = 0x1B,
|
||||
NOTE_E1 = 0x1C,
|
||||
NOTE_F1 = 0x1D,
|
||||
NOTE_F1S = 0x1E,
|
||||
NOTE_G1 = 0x1F,
|
||||
NOTE_G1S = 0x20,
|
||||
NOTE_A1 = 0x21,
|
||||
NOTE_A1S = 0x22,
|
||||
NOTE_B1 = 0x23,
|
||||
|
||||
NOTE_C2 = 0x24, //36
|
||||
NOTE_C2S = 0x25,
|
||||
NOTE_D2 = 0x26,
|
||||
NOTE_D2S = 0x27,
|
||||
NOTE_E2 = 0x28,
|
||||
NOTE_F2 = 0x29,
|
||||
NOTE_F2S = 0x2A,
|
||||
NOTE_G2 = 0x2B,
|
||||
NOTE_G2S = 0x2C,
|
||||
NOTE_A2 = 0x2D,
|
||||
NOTE_A2S = 0x2E,
|
||||
NOTE_B2 = 0x2F,
|
||||
|
||||
NOTE_C3 = 0x30,
|
||||
NOTE_C3S = 0x31,
|
||||
NOTE_D3 = 0x32,
|
||||
NOTE_D3S = 0x33,
|
||||
NOTE_E3 = 0x34,
|
||||
NOTE_F3 = 0x35,
|
||||
NOTE_F3S = 0x36,
|
||||
NOTE_G3 = 0x37,
|
||||
NOTE_G3S = 0x38,
|
||||
NOTE_A3 = 0x39,
|
||||
NOTE_A3S = 0x3A,
|
||||
NOTE_B3 = 0x3B,
|
||||
|
||||
NOTE_C4 = 0x3C,
|
||||
NOTE_C4S = 0x3D,
|
||||
NOTE_D4 = 0x3E,
|
||||
NOTE_D4S = 0x3F,
|
||||
NOTE_E4 = 0x40,
|
||||
NOTE_F4 = 0x41,
|
||||
NOTE_F4S = 0x42,
|
||||
NOTE_G4 = 0x43,
|
||||
NOTE_G4S = 0x44,
|
||||
NOTE_A4 = 0x45,
|
||||
NOTE_A4S = 0x46,
|
||||
NOTE_B4 = 0x47,
|
||||
|
||||
NOTE_C5 = 0x48,
|
||||
NOTE_C5S = 0x49,
|
||||
NOTE_D5 = 0x4A,
|
||||
NOTE_D5S = 0x4B,
|
||||
NOTE_E5 = 0x4C,
|
||||
NOTE_F5 = 0x4D,
|
||||
NOTE_F5S = 0x4E,
|
||||
NOTE_G5 = 0x4F,
|
||||
NOTE_G5S = 0x50,
|
||||
NOTE_A5 = 0x51,
|
||||
NOTE_A5S = 0x52,
|
||||
NOTE_B5 = 0x53,
|
||||
};
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/******************
|
||||
* display_list.h *
|
||||
*****************/
|
||||
|
||||
/**********************************************************************************
|
||||
* Adapted from: *
|
||||
* https://github.com/RudolphRiedel/FT800-FT813 *
|
||||
* By Rudolph Riedel *
|
||||
* *
|
||||
* MIT License *
|
||||
* *
|
||||
* Copyright (c) 2017 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy *
|
||||
* of this software and associated documentation files (the "Software"), to deal *
|
||||
* in the Software without restriction, including without limitation the rights *
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
|
||||
* copies of the Software, and to permit persons to whom the Software is *
|
||||
* furnished to do so, subject to the following conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all *
|
||||
* copies or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *
|
||||
* SOFTWARE. *
|
||||
* *
|
||||
**********************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace FTDI {
|
||||
/* FT8xx graphics engine specific macros useful for static display list generation */
|
||||
inline uint32_t ALPHA_FUNC(uint8_t func, uint8_t ref) {return DL::ALPHA_FUNC|((func&7UL)<<8)|(ref&255UL);}
|
||||
inline uint32_t BEGIN(begin_t prim) {return DL::BEGIN|(prim&15UL);}
|
||||
|
||||
inline uint32_t BITMAP_SOURCE(uint32_t ram_g_addr) {return DL::BITMAP_SOURCE|(ram_g_addr & (FTDI::ftdi_memory_map::RAM_G_SIZE-1));}
|
||||
inline uint32_t BITMAP_HANDLE(uint8_t handle) {return DL::BITMAP_HANDLE|(handle&31UL);}
|
||||
inline uint32_t BITMAP_LAYOUT(uint8_t format, uint16_t linestride, uint16_t height)
|
||||
{return DL::BITMAP_LAYOUT|((format&31UL)<<19)|((linestride&1023UL)<<9)|(height&511UL);}
|
||||
|
||||
inline uint32_t BITMAP_SIZE(uint8_t filter, uint8_t wrapx, uint8_t wrapy, uint16_t width, uint16_t height)
|
||||
{return DL::BITMAP_SIZE|((filter&1UL)<<20)|((wrapx&1UL)<<19)|((wrapy&1UL)<<18)|((width&511UL)<<9)|(height&511UL);}
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
inline uint32_t BITMAP_LAYOUT_H(uint8_t linestride, uint8_t height)
|
||||
{return DL::BITMAP_LAYOUT_H|((linestride&3UL)<<2)|(height&3UL);}
|
||||
inline uint32_t BITMAP_SIZE_H(uint8_t width, uint8_t height)
|
||||
{return DL::BITMAP_SIZE_H|((width&3UL)<<2)|(height&3UL);}
|
||||
#endif
|
||||
inline uint32_t BITMAP_TRANSFORM_A(uint16_t a) {return DL::BITMAP_TRANSFORM_A|(a&131071UL);}
|
||||
inline uint32_t BITMAP_TRANSFORM_B(uint16_t b) {return DL::BITMAP_TRANSFORM_B|(b&131071UL);}
|
||||
inline uint32_t BITMAP_TRANSFORM_C(uint32_t c) {return DL::BITMAP_TRANSFORM_C|(c&16777215UL);}
|
||||
inline uint32_t BITMAP_TRANSFORM_D(uint16_t d) {return DL::BITMAP_TRANSFORM_D|(d&131071UL);}
|
||||
inline uint32_t BITMAP_TRANSFORM_E(uint16_t e) {return DL::BITMAP_TRANSFORM_E|(e&131071UL);}
|
||||
inline uint32_t BITMAP_TRANSFORM_F(uint32_t f) {return DL::BITMAP_TRANSFORM_F|(f&16777215UL);}
|
||||
inline uint32_t BLEND_FUNC(uint8_t src,uint8_t dst) {return DL::BLEND_FUNC|((src&7UL)<<3)|(dst&7UL);}
|
||||
inline uint32_t CALL(uint16_t dest) {return DL::CALL|(dest&65535UL);}
|
||||
inline uint32_t CELL(uint8_t cell) {return DL::CELL|(cell&127UL);}
|
||||
inline uint32_t CLEAR(bool c,bool s,bool t) {return DL::CLEAR|((c?1UL:0UL)<<2)|((s?1UL:0UL)<<1)|(t?1UL:0UL);}
|
||||
inline uint32_t CLEAR_COLOR_A(uint8_t alpha) {return DL::CLEAR_COLOR_A|(alpha&255UL);}
|
||||
inline uint32_t CLEAR_COLOR_RGB(uint8_t red, uint8_t green, uint8_t blue)
|
||||
{return DL::CLEAR_COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);}
|
||||
inline uint32_t CLEAR_COLOR_RGB(uint32_t rgb) {return DL::CLEAR_COLOR_RGB|rgb;}
|
||||
inline uint32_t CLEAR_STENCIL(uint8_t s) {return DL::CLEAR_STENCIL|(s&255UL);}
|
||||
inline uint32_t CLEAR_TAG(uint8_t s) {return DL::CLEAR_TAG|(s&255UL);}
|
||||
inline uint32_t COLOR_A(uint8_t alpha) {return DL::COLOR_A|(alpha&255UL);}
|
||||
inline uint32_t COLOR_MASK(bool r, bool g, bool b, bool a) {return DL::COLOR_MASK|((r?1UL:0UL)<<3)|((g?1UL:0UL)<<2)|((b?1UL:0UL)<<1)|(a?1UL:0UL);}
|
||||
inline uint32_t COLOR_RGB(uint8_t red,uint8_t green,uint8_t blue)
|
||||
{return DL::COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);}
|
||||
inline uint32_t COLOR_RGB(uint32_t rgb) {return DL::COLOR_RGB|rgb;}
|
||||
/* inline uint32_t DISPLAY() {return (0UL<<24)) */
|
||||
inline uint32_t END() {return DL::END;}
|
||||
inline uint32_t JUMP(uint16_t dest) {return DL::JUMP|(dest&65535UL);}
|
||||
inline uint32_t LINE_WIDTH(uint16_t width) {return DL::LINE_WIDTH|(width&4095UL);}
|
||||
inline uint32_t MACRO(uint8_t m) {return DL::MACRO|(m&1UL);}
|
||||
inline uint32_t POINT_SIZE(uint16_t size) {return DL::POINT_SIZE|(size&8191UL);}
|
||||
inline uint32_t RESTORE_CONTEXT() {return DL::RESTORE_CONTEXT;}
|
||||
inline uint32_t RETURN () {return DL::RETURN;}
|
||||
inline uint32_t SAVE_CONTEXT() {return DL::SAVE_CONTEXT;}
|
||||
inline uint32_t SCISSOR_XY(uint16_t x,uint16_t y) {
|
||||
return DL::SCISSOR_XY |
|
||||
(FTDI::ftdi_chip >= 810
|
||||
? ((x&2047UL)<<11)|(y&2047UL)
|
||||
: ((x& 511UL)<<10)|(y&511UL));
|
||||
}
|
||||
inline uint32_t SCISSOR_SIZE(uint16_t w,uint16_t h) {
|
||||
return DL::SCISSOR_SIZE |
|
||||
(FTDI::ftdi_chip >= 810
|
||||
? ((w&4095UL)<<12)|(h&4095UL)
|
||||
: ((w&1023UL)<<10)|(h&1023UL));
|
||||
}
|
||||
inline uint32_t SCISSOR_XY() {return DL::SCISSOR_XY;}
|
||||
inline uint32_t SCISSOR_SIZE() {
|
||||
return DL::SCISSOR_SIZE |
|
||||
(FTDI::ftdi_chip >= 810
|
||||
? (2048UL<<12)|(2048UL)
|
||||
: ( 512UL<<10)|( 512UL));
|
||||
}
|
||||
inline uint32_t STENCIL_FUNC(uint16_t func, uint8_t ref, uint8_t mask)
|
||||
{return DL::STENCIL_FUNC|((func&7UL)<<16)|((ref&255UL)<<8)|(mask&255UL);}
|
||||
inline uint32_t STENCIL_MASK(uint8_t mask) {return DL::STENCIL_MASK|(mask&255UL);}
|
||||
inline uint32_t STENCIL_OP(uint8_t sfail, uint8_t spass) {return DL::STENCIL_OP|(((sfail)&7UL)<<3)|(spass&7UL);}
|
||||
inline uint32_t TAG(uint8_t s) {return DL::TAG|(s&255UL);}
|
||||
inline uint32_t TAG_MASK(bool mask) {return DL::TAG_MASK|(mask?1:0);}
|
||||
inline uint32_t VERTEX2F(uint16_t x, uint16_t y) {return DL::VERTEX2F|((x&32767UL)<<15)|(y&32767UL);}
|
||||
inline uint32_t VERTEX2II(uint16_t x,uint16_t y, uint8_t handle = 0, uint8_t cell = 0)
|
||||
{return DL::VERTEX2II|((x&511UL)<<21)|((y&511UL)<<12)|((handle&31UL)<<7)|(cell&127UL);}
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
inline uint32_t VERTEX_FORMAT(uint8_t frac) {return DL::VERTEX_FORMAT|(frac&7UL);}
|
||||
inline uint32_t VERTEX_TRANSLATE_X(int32_t x) {return DL::VERTEX_TRANSLATE_X|(x&131071UL);}
|
||||
inline uint32_t VERTEX_TRANSLATE_Y(int32_t y) {return DL::VERTEX_TRANSLATE_Y|(y&131071UL);}
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/****************
|
||||
* ftdi_basic.h *
|
||||
****************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2019 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../compat.h"
|
||||
|
||||
#if !defined(__MARLIN_FIRMWARE__)
|
||||
#define FTDI_BASIC
|
||||
#endif
|
||||
|
||||
#ifdef FTDI_BASIC
|
||||
#include "registers_ft800.h"
|
||||
#include "registers_ft810.h"
|
||||
#include "constants.h"
|
||||
#include "boards.h"
|
||||
#include "commands.h"
|
||||
#include "spi.h"
|
||||
#include "display_list.h"
|
||||
#include "resolutions.h"
|
||||
#endif
|
|
@ -0,0 +1,150 @@
|
|||
/*********************
|
||||
* registers_ft800.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* This header defines registers for the FTDI FT800 LCD Driver chip. *
|
||||
****************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* FT810 *
|
||||
* *
|
||||
* START END ADDR SIZE NAME DESCRIPTION *
|
||||
* *
|
||||
* 0x000000 0x03FFFF 256 kB RAM_G Main Graphics RAM *
|
||||
* *
|
||||
* 0x0C0000 0x0C0003 4 B ROM_CHIPID [0:1] 0x800 Chip Id *
|
||||
* [1:2] 0x0100 Vers ID *
|
||||
* *
|
||||
* 0x0BB23C 0x0FFFFB 275 kB ROM_FONT Font table and bitmap *
|
||||
* *
|
||||
* 0x0FFFFC 0x0FFFFF 4 B ROM_FONT_ADDR Font table pointer address *
|
||||
* *
|
||||
* 0x100000 0x101FFF 8 kB RAM_DL Display List RAM *
|
||||
* *
|
||||
* 0x102000 0x1023FF 1 kB RAM_PAL Palette RAM *
|
||||
* *
|
||||
* 0x102400 0x10257F 380 B * Registers *
|
||||
* *
|
||||
* 0x108000 0x108FFF 4 kB RAM_CMD Command Buffer *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace FTDI {
|
||||
struct ft800_memory_map {
|
||||
|
||||
// MEMORY LOCATIONS FT800
|
||||
static constexpr uint32_t RAM_G = 0x000000; // Main Graphics RAM
|
||||
static constexpr uint32_t ROM_CHIPID = 0x0C0000; // Chip ID/Version ID
|
||||
static constexpr uint32_t ROM_FONT = 0x0BB23C; // Font ROM
|
||||
static constexpr uint32_t ROM_FONT_ADDR = 0x0FFFFC; // Font Table Pointer
|
||||
static constexpr uint32_t RAM_DL = 0x100000; // Display List RAM
|
||||
static constexpr uint32_t RAM_PAL = 0x102000; // Palette RAM
|
||||
static constexpr uint32_t RAM_REG = 0x102400; // Registers
|
||||
static constexpr uint32_t RAM_CMD = 0x108000; // Command Buffer
|
||||
|
||||
static constexpr uint32_t RAM_G_SIZE = 256*1024l; // 256k
|
||||
};
|
||||
|
||||
struct ft800_registers {
|
||||
// REGISTERS AND ADDRESSES FT800
|
||||
|
||||
// REGISTER ADDRESS SIZE RESET VALUE TYPE DESCRIPTION
|
||||
|
||||
static constexpr uint32_t ID = 0x102400; // 8 0x7C r Identification Register, Always 0x7C
|
||||
static constexpr uint32_t FRAMES = 0x102404; // 32 0x00000000 r Frame Counter, Since Reset
|
||||
static constexpr uint32_t CLOCK = 0x102408; // 32 0x00000000 r Clock cycles, Since Reset
|
||||
static constexpr uint32_t FREQUENCY = 0x10240C; // 28 0x03938700 r/w Main Clock Frequency
|
||||
static constexpr uint32_t RENDERMODE = 0x102410; // 1 0x00 r/w Rendering Mode: 0 = normal, 1 = single-line
|
||||
static constexpr uint32_t SNAPY = 0x102414; // 11 0x0000 r/w Scan Line Select for RENDERMODE 1
|
||||
static constexpr uint32_t SNAPSHOT = 0x102418; // 1 - r Trigger for RENDERMODE 1
|
||||
static constexpr uint32_t CPURESET = 0x10241C; // 3 0x02 r/w RESET Bit2 Audio - Bit1 Touch - Bit0 Graphics
|
||||
static constexpr uint32_t TAP_CRC = 0x102420; // 32 - r Live Video Tap
|
||||
static constexpr uint32_t TAP_MASK = 0x102424; // 32 0xFFFFFFFF r/w Live Video Tap Mask
|
||||
static constexpr uint32_t HCYCLE = 0x102428; // 12 0x224 r/w Horizontal Total Cycle Count
|
||||
static constexpr uint32_t HOFFSET = 0x10242C; // 12 0x02B r/w Horizontal Display Start Offset
|
||||
static constexpr uint32_t HSIZE = 0x102430; // 12 0x1E0 r/w Horizontal Display Pixel Count
|
||||
static constexpr uint32_t HSYNC0 = 0x102434; // 12 0x000 r/w Horizontal Sync Fall Offset
|
||||
static constexpr uint32_t HSYNC1 = 0x102438; // 12 0x029 r/w Horizontal Sync Rise Offset
|
||||
static constexpr uint32_t VCYCLE = 0x10243C; // 12 0x124 r/w Vertical Total Cycle Count
|
||||
static constexpr uint32_t VOFFSET = 0x102440; // 12 0x00C r/w Vertical Display Start Offset
|
||||
static constexpr uint32_t VSIZE = 0x102444; // 12 0x110 r/w Vertical Display Line Count
|
||||
static constexpr uint32_t VSYNC0 = 0x102448; // 10 0x000 r/w Vertical Sync Fall Offset
|
||||
static constexpr uint32_t VSYNC1 = 0x10244C; // 10 0x00A r/w Vertical Sync Rise Offset
|
||||
static constexpr uint32_t DLSWAP = 0x102450; // 2 0x00 r/w Display List Swap Control
|
||||
static constexpr uint32_t ROTATE = 0x102454; // 3 0x00 r/w Screen 90,180, 270 degree rotate
|
||||
static constexpr uint32_t OUTBITS = 0x102458; // 9 0x1B6 r/w Output Resolution, 3x3x3 Bits
|
||||
static constexpr uint32_t DITHER = 0x10245C; // 1 0x01 r/w Output Dither Enable
|
||||
static constexpr uint32_t SWIZZLE = 0x102460; // 4 0x00 r/w Output RGB Swizzle, Pin Change for PCB Routing
|
||||
static constexpr uint32_t CSPREAD = 0x102464; // 1 0x01 r/w Output Clock Spreading Enable
|
||||
static constexpr uint32_t PCLK_POL = 0x102468; // 1 0x00 r/w PCLK Polarity: 0 = Rising Edge, 1 = Falling Edge
|
||||
static constexpr uint32_t PCLK = 0x10246C; // 8 0x00 r/w PCLK Frequency Divider, 0 = Disable Clock
|
||||
static constexpr uint32_t TAG_X = 0x102470; // 11 0x000 r/w Tag Query X Coordinate
|
||||
static constexpr uint32_t TAG_Y = 0x102474; // 11 0x000 r/w Tag Query Y Coordinate
|
||||
static constexpr uint32_t TAG = 0x102478; // 8 0x00 r Tag Query Result
|
||||
static constexpr uint32_t VOL_PB = 0x10247C; // 8 0xFF r/w Audio Playback Volume
|
||||
static constexpr uint32_t VOL_SOUND = 0x102480; // 8 0xFF r/w Audio Synthesizer Volume
|
||||
static constexpr uint32_t SOUND = 0x102484; // 16 0x0000 r/w Audio Sound Effect Select
|
||||
static constexpr uint32_t PLAY = 0x102488; // 1 0x00 r/w Audio Start Effect Playback
|
||||
static constexpr uint32_t GPIO_DIR = 0x10248C; // 8 0x80 r/w GPIO Pin Direction: 0 = Input , 1 = Output
|
||||
static constexpr uint32_t GPIO = 0x102490; // 8 0x00 r/w GPIO Pin Values for 0, 1, 7 Drive Strength 2, 3, 4, 5, 6
|
||||
static constexpr uint32_t INT_FLAGS = 0x102498; // 8 0x00 r Interrupt Flags, Clear by Reading
|
||||
static constexpr uint32_t INT_EN = 0x10249C; // 1 0x00 r/w Global Interrupt Enable
|
||||
static constexpr uint32_t INT_MASK = 0x1024A0; // 8 0xFF r/w Interrupt Enable Mask
|
||||
static constexpr uint32_t PLAYBACK_START = 0x1024A4; // 20 0x00000 r/w Audio Playback RAM Start Address
|
||||
static constexpr uint32_t PLAYBACK_LENGTH = 0x1024A8; // 20 0x00000 r/w Audio Playback Sample Length (Bytes)
|
||||
static constexpr uint32_t PLAYBACK_READPTR = 0x1024AC; // 20 - r Audio Playback Read Pointer
|
||||
static constexpr uint32_t PLAYBACK_FREQ = 0x1024B0; // 16 0x1F40 r/w Audio Playback Frequency (Hz)
|
||||
static constexpr uint32_t PLAYBACK_FORMAT = 0x1024B4; // 2 0x00 r/w Audio Playback Format
|
||||
static constexpr uint32_t PLAYBACK_LOOP = 0x1024B8; // 1 0x00 r/w Audio Playback Loop Enable
|
||||
static constexpr uint32_t PLAYBACK_PLAY = 0x1024BC; // 1 0x00 r Audio Start Playback
|
||||
static constexpr uint32_t PWM_HZ = 0x1024C0; // 14 0x00FA r/w Backlight PWM Frequency (Hz)
|
||||
static constexpr uint32_t PWM_DUTY = 0x1024C4; // 8 0x80 r/w Backlight PWM Duty Cycle: 0 = 0%, 128 = 100%
|
||||
static constexpr uint32_t MACRO_0 = 0x1024C8; // 32 0x00000000 r/w Display List Macro Command 0
|
||||
static constexpr uint32_t MACRO_1 = 0x1024CC; // 32 0x00000000 r/w Display List Macro Command 1
|
||||
static constexpr uint32_t CMD_READ = 0x1024E4; // 12 0x000 r/w Command Buffer Read Pointer
|
||||
static constexpr uint32_t CMD_WRITE = 0x1024E8; // 12 0x000 r/w Command Buffer Write Pointer
|
||||
static constexpr uint32_t CMD_DL = 0x1024EC; // 13 0x0000 r/w Command Display List Offset
|
||||
static constexpr uint32_t TOUCH_MODE = 0x1024F0; // 2 0x03 r/w Touch-Screen Sampling Mode
|
||||
static constexpr uint32_t TOUCH_ADC_MODE = 0x1024F4; // 1 0x01 r/w Select Single Ended or Differential Sampling
|
||||
static constexpr uint32_t TOUCH_CHARGE = 0x1024F8; // 16 0x1770 r/w Touch Screen Charge Time, n x 6 Clocks
|
||||
static constexpr uint32_t TOUCH_SETTLE = 0x1024FC; // 4 0x03 r/w Touch-Screen Settle Time, n x 6 Clocks
|
||||
static constexpr uint32_t TOUCH_OVERSAMPLE = 0x102500; // 4 0x07 r/w Touch-Screen Oversample Factor
|
||||
static constexpr uint32_t TOUCH_RZTHRESH = 0x102504; // 16 0xFFFF r/w Touch-Screen Resistance Threshold
|
||||
static constexpr uint32_t TOUCH_RAW_XY = 0x102508; // 32 - r Touch-Screen Raw (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_RZ = 0x10250C; // 16 - r Touch-Screen Resistance
|
||||
static constexpr uint32_t TOUCH_SCREEN_XY = 0x102510; // 32 - r Touch-Screen Screen (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_TAG_XY = 0x102514; // 32 - r Touch-Screen Tag 0 Lookup (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_TAG = 0x102518; // 8 - r Touch-Screen Tag 0 Result
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_A = 0x10251C; // 32 0x00010000 r/w Touch-Screen Transform Coefficient A (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_B = 0x102520; // 32 0x00000000 r/w Touch-Screen Transform Coefficient B (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_C = 0x102524; // 32 0x00000000 r/w Touch-Screen Transform Coefficient C (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_D = 0x102528; // 32 0x00000000 r/w Touch-Screen Transform Coefficient D (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_E = 0x10252C; // 32 0x00010000 r/w Touch-Screen Transform Coefficient E (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_F = 0x102530; // 32 0x00000000 r/w Touch-Screen Transform Coefficient F (s15.16)
|
||||
// Reserved Addresses 0x102434 - 0x102470
|
||||
static constexpr uint32_t TOUCH_DIRECT_XY = 0x102574; // 32 - r Touch-Screen Direct Conversions XY (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_DIRECT_Z1Z2 = 0x102578; // 32 - r Touch-Screen Direct Conversions Z (z1-MSB16; z2-LSB16)
|
||||
static constexpr uint32_t TRACKER = 0x109000; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
};
|
||||
}
|
|
@ -0,0 +1,185 @@
|
|||
/*********************
|
||||
* registers_ft810.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* This header defines registers for the FTDI FT810 LCD Driver chip. *
|
||||
****************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* FT810 *
|
||||
* *
|
||||
* START END ADDR SIZE NAME DESCRIPTION *
|
||||
* *
|
||||
* 0x000000 0x0FFFFF 1024 kB RAM_G Main Graphics RAM (0 to 1048572) *
|
||||
* *
|
||||
* 0x0C0000 0x0C0003 4 B ROM_CHIPID [0:1] 0x800 Chip Id *
|
||||
* [1:2] 0x0100 Vers ID *
|
||||
* *
|
||||
* 0x1E0000 0x2FFFFB 1152 kB ROM_FONT Font table and bitmap *
|
||||
* *
|
||||
* 0x2FFFFC 0x2FFFFF 4 B ROM_FONT_ADDR Font table pointer address *
|
||||
* *
|
||||
* 0x300000 0x301FFF 8 kB RAM_DL Display List RAM *
|
||||
* *
|
||||
* 0x302000 0x302FFF 4 kB * Registers *
|
||||
* *
|
||||
* 0x308000 0x308FFF 4 kB RAM_CMD Command Buffer *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace FTDI {
|
||||
struct ft810_memory_map {
|
||||
// MEMORY LOCATIONS FT810
|
||||
static constexpr uint32_t RAM_G = 0x000000; // Main Graphics RAM
|
||||
static constexpr uint32_t ROM_CHIPID = 0x0C0000; // Chip ID/Version ID
|
||||
static constexpr uint32_t ROM_FONT = 0x1E0000; // Font ROM
|
||||
static constexpr uint32_t ROM_FONT_ADDR = 0x2FFFFC; // Font Table Pointer
|
||||
static constexpr uint32_t RAM_DL = 0x300000; // Display List RAM
|
||||
static constexpr uint32_t RAM_REG = 0x302000; // Registers
|
||||
static constexpr uint32_t RAM_CMD = 0x308000; // Command Buffer
|
||||
|
||||
static constexpr uint32_t RAM_G_SIZE = 1024*1024l; // 1024k
|
||||
};
|
||||
|
||||
struct ft810_registers {
|
||||
// REGISTERS AND ADDRESSES FT810
|
||||
|
||||
// REGISTER ADDRESS SIZE RESET VALUE TYPE DESCRIPTION
|
||||
|
||||
static constexpr uint32_t ID = 0x302000; // 8 0x7C r Identification Register, Always 0x7C
|
||||
static constexpr uint32_t FRAMES = 0x302004; // 32 0x00000000 r Frame Counter, Since Reset
|
||||
static constexpr uint32_t CLOCK = 0x302008; // 32 0x00000000 r Clock cycles, Since Reset
|
||||
static constexpr uint32_t FREQUENCY = 0x30200C; // 28 0x03938700 r/w Main Clock Frequency
|
||||
static constexpr uint32_t RENDERMODE = 0x302010; // 1 0x00 r/w Rendering Mode: 0 = normal, 1 = single-line
|
||||
static constexpr uint32_t SNAPY = 0x302014; // 11 0x0000 r/w Scan Line Select for RENDERMODE 1
|
||||
static constexpr uint32_t SNAPSHOT = 0x302018; // 1 - r Trigger for RENDERMODE 1
|
||||
static constexpr uint32_t SNAPFORMAT = 0x30201C; // 6 0x20 r/w Pixel Format for Scanline Readout
|
||||
static constexpr uint32_t CPURESET = 0x302020; // 3 0x02 r/w RESET Bit2 Audio - Bit1 Touch - Bit0 Graphics
|
||||
static constexpr uint32_t TAP_CRC = 0x302024; // 32 - r Live Video Tap
|
||||
static constexpr uint32_t TAP_MASK = 0x302028; // 32 0xFFFFFFFF r/w Live Video Tap Mask
|
||||
static constexpr uint32_t HCYCLE = 0x30202C; // 12 0x224 r/w Horizontal Total Cycle Count
|
||||
static constexpr uint32_t HOFFSET = 0x302030; // 12 0x02B r/w Horizontal Display Start Offset
|
||||
static constexpr uint32_t HSIZE = 0x302034; // 12 0x1E0 r/w Horizontal Display Pixel Count
|
||||
static constexpr uint32_t HSYNC0 = 0x302038; // 12 0x000 r/w Horizontal Sync Fall Offset
|
||||
static constexpr uint32_t HSYNC1 = 0x30203C; // 12 0x029 r/w Horizontal Sync Rise Offset
|
||||
static constexpr uint32_t VCYCLE = 0x302040; // 12 0x124 r/w Vertical Total Cycle Count
|
||||
static constexpr uint32_t VOFFSET = 0x302044; // 12 0x00C r/w Vertical Display Start Offset
|
||||
static constexpr uint32_t VSIZE = 0x302048; // 12 0x110 r/w Vertical Display Line Count
|
||||
static constexpr uint32_t VSYNC0 = 0x30204C; // 10 0x000 r/w Vertical Sync Fall Offset
|
||||
static constexpr uint32_t VSYNC1 = 0x302050; // 10 0x00A r/w Vertical Sync Rise Offset
|
||||
static constexpr uint32_t DLSWAP = 0x302054; // 2 0x00 r/w Display List Swap Control
|
||||
static constexpr uint32_t ROTATE = 0x302058; // 3 0x00 r/w Screen 90,180, 270 degree rotate
|
||||
static constexpr uint32_t OUTBITS = 0x30205C; // 9 0x1B6 r/w Output Resolution, 3x3x3 Bits
|
||||
static constexpr uint32_t DITHER = 0x302060; // 1 0x01 r/w Output Dither Enable
|
||||
static constexpr uint32_t SWIZZLE = 0x302064; // 4 0x00 r/w Output RGB Swizzle, Pin Change for PCB Routing
|
||||
static constexpr uint32_t CSPREAD = 0x302068; // 1 0x01 r/w Output Clock Spreading Enable
|
||||
static constexpr uint32_t PCLK_POL = 0x30206C; // 1 0x00 r/w PCLK Polarity: 0 = Rising Edge, 1 = Falling Edge
|
||||
static constexpr uint32_t PCLK = 0x302070; // 8 0x00 r/w PCLK Frequency Divider, 0 = Disable Clock
|
||||
static constexpr uint32_t TAG_X = 0x302074; // 11 0x000 r/w Tag Query X Coordinate
|
||||
static constexpr uint32_t TAG_Y = 0x302078; // 11 0x000 r/w Tag Query Y Coordinate
|
||||
static constexpr uint32_t TAG = 0x30207C; // 8 0x00 r Tag Query Result
|
||||
static constexpr uint32_t VOL_PB = 0x302080; // 8 0xFF r/w Audio Playback Volume
|
||||
static constexpr uint32_t VOL_SOUND = 0x302084; // 8 0xFF r/w Audio Synthesizer Volume
|
||||
static constexpr uint32_t SOUND = 0x302088; // 16 0x0000 r/w Audio Sound Effect Select
|
||||
static constexpr uint32_t PLAY = 0x30208C; // 1 0x00 r/w Audio Start Effect Playback
|
||||
static constexpr uint32_t GPIO_DIR = 0x302090; // 8 0x80 r/w GPIO Pin Direction: 0 = Input , 1 = Output
|
||||
static constexpr uint32_t GPIO = 0x302094; // 8 0x00 r/w GPIO Pin Values for 0, 1, 7 Drive Strength 2, 3, 4, 5, 6
|
||||
static constexpr uint32_t GPIOX_DIR = 0x302098; // 16 0x8000 r/w Extended GPIO Pin Direction
|
||||
static constexpr uint32_t GPIOX = 0x30209C; // 16 0x0080 r/w Extended GPIO Pin Values
|
||||
// Reserved Addr 0x3020A0
|
||||
// Reserved Addr 0x3020A4
|
||||
static constexpr uint32_t INT_FLAGS = 0x3020A8; // 8 0x00 r Interrupt Flags, Clear by Reading
|
||||
static constexpr uint32_t INT_EN = 0x3020AC; // 1 0x00 r/w Global Interrupt Enable
|
||||
static constexpr uint32_t INT_MASK = 0x3020B0; // 8 0xFF r/w Interrupt Enable Mask
|
||||
static constexpr uint32_t PLAYBACK_START = 0x3020B4; // 20 0x00000 r/w Audio Playback RAM Start Address
|
||||
static constexpr uint32_t PLAYBACK_LENGTH = 0x3020B8; // 20 0x00000 r/w Audio Playback Sample Length (Bytes)
|
||||
static constexpr uint32_t PLAYBACK_READPTR = 0x3020BC; // 20 - r Audio Playback Read Pointer
|
||||
static constexpr uint32_t PLAYBACK_FREQ = 0x3020C0; // 16 0x1F40 r/w Audio Playback Frequency (Hz)
|
||||
static constexpr uint32_t PLAYBACK_FORMAT = 0x3020C4; // 2 0x00 r/w Audio Playback Format
|
||||
static constexpr uint32_t PLAYBACK_LOOP = 0x3020C8; // 1 0x00 r/w Audio Playback Loop Enable
|
||||
static constexpr uint32_t PLAYBACK_PLAY = 0x3020CC; // 1 0x00 r Audio Start Playback
|
||||
static constexpr uint32_t PWM_HZ = 0x3020D0; // 14 0x00FA r/w Backlight PWM Frequency (Hz)
|
||||
static constexpr uint32_t PWM_DUTY = 0x3020D4; // 8 0x80 r/w Backlight PWM Duty Cycle: 0 = 0%, 128 = 100%
|
||||
static constexpr uint32_t MACRO_0 = 0x3020D8; // 32 0x00000000 r/w Display List Macro Command 0
|
||||
static constexpr uint32_t MACRO_1 = 0x3020DC; // 32 0x00000000 r/w Display List Macro Command 1
|
||||
// Reserved Addr 0x3020E0
|
||||
// Reserved Addr 0x3020E4
|
||||
// Reserved Addr 0x3020E8
|
||||
// Reserved Addr 0x3020EC
|
||||
// Reserved Addr 0x3020F0
|
||||
// Reserved Addr 0x3020F4
|
||||
static constexpr uint32_t CMD_READ = 0x3020F8; // 12 0x000 r/w Command Buffer Read Pointer
|
||||
static constexpr uint32_t CMD_WRITE = 0x3020FC; // 12 0x000 r/w Command Buffer Write Pointer
|
||||
static constexpr uint32_t CMD_DL = 0x302100; // 13 0x0000 r/w Command Display List Offset
|
||||
static constexpr uint32_t TOUCH_MODE = 0x302104; // 2 0x03 r/w Touch-Screen Sampling Mode
|
||||
static constexpr uint32_t TOUCH_ADC_MODE = 0x302108; // 1 0x01 r/w Select Single Ended or Differential Sampling
|
||||
static constexpr uint32_t TOUCH_CHARGE = 0x30210C; // 16 0x1770 r/w Touch Screen Charge Time, n x 6 Clocks
|
||||
static constexpr uint32_t TOUCH_SETTLE = 0x302110; // 4 0x03 r/w Touch-Screen Settle Time, n x 6 Clocks
|
||||
static constexpr uint32_t TOUCH_OVERSAMPLE = 0x302114; // 4 0x07 r/w Touch-Screen Oversample Factor
|
||||
static constexpr uint32_t TOUCH_RZTHRESH = 0x302118; // 16 0xFFFF r/w Touch-Screen Resistance Threshold
|
||||
static constexpr uint32_t TOUCH_RAW_XY = 0x30211C; // 32 - r Touch-Screen Raw (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_RZ = 0x302120; // 16 - r Touch-Screen Resistance
|
||||
static constexpr uint32_t TOUCH_SCREEN_XY = 0x302124; // 32 - r Touch-Screen Screen (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_TAG_XY = 0x302128; // 32 - r Touch-Screen Tag 0 Lookup (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_TAG = 0x30212C; // 8 - r Touch-Screen Tag 0 Result
|
||||
static constexpr uint32_t TOUCH_TAG1_XY = 0x302130; // 32 - r Touch-Screen Tag 1 Lookup
|
||||
static constexpr uint32_t TOUCH_TAG1 = 0x302134; // 8 - r Touch-Screen Tag 1 Result
|
||||
static constexpr uint32_t TOUCH_TAG2_XY = 0x302138; // 32 - r Touch-Screen Tag 2 Lookup
|
||||
static constexpr uint32_t TOUCH_TAG2 = 0x30213C; // 8 - r Touch-Screen Tag 2 Result
|
||||
static constexpr uint32_t TOUCH_TAG3_XY = 0x302140; // 32 - r Touch-Screen Tag 3 Lookup
|
||||
static constexpr uint32_t TOUCH_TAG3 = 0x302144; // 8 - r Touch-Screen Tag 3 Result
|
||||
static constexpr uint32_t TOUCH_TAG4_XY = 0x302148; // 32 - r Touch-Screen Tag 4 Lookup
|
||||
static constexpr uint32_t TOUCH_TAG4 = 0x30214C; // 8 - r Touch-Screen Tag 4 Result
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_A = 0x302150; // 32 0x00010000 r/w Touch-Screen Transform Coefficient A (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_B = 0x302154; // 32 0x00000000 r/w Touch-Screen Transform Coefficient B (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_C = 0x302158; // 32 0x00000000 r/w Touch-Screen Transform Coefficient C (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_D = 0x30215C; // 32 0x00000000 r/w Touch-Screen Transform Coefficient D (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_E = 0x302160; // 32 0x00010000 r/w Touch-Screen Transform Coefficient E (s15.16)
|
||||
static constexpr uint32_t TOUCH_TRANSFORM_F = 0x302164; // 32 0x00000000 r/w Touch-Screen Transform Coefficient F (s15.16)
|
||||
static constexpr uint32_t TOUCH_CONFIG = 0x302168; // 16 0x8381 r/w Touch Configuration
|
||||
static constexpr uint32_t CTOUCH_TOUCH4_X = 0x30216C; // 16 - r Extended Mode Touch Screen
|
||||
// Reserved Addresses 0x302170
|
||||
static constexpr uint32_t BIST_EN = 0x302174; // 1 0 r/w BIST Memory Mapping Enable
|
||||
// Reserved Addr 0x302178
|
||||
// Reserved Addr 0x30217C
|
||||
static constexpr uint32_t TRIM = 0x302180; // 8 0 r/w Internal Clock Trimming
|
||||
static constexpr uint32_t ANA_COMP = 0x302184; // 8 0 r/w Analog Control Register
|
||||
static constexpr uint32_t SPI_WIDTH = 0x302188; // 3 0 r/w QSPI Bus Width Setting
|
||||
static constexpr uint32_t TOUCH_DIRECT_XY = 0x30218C; // 32 - r Touch-Screen Direct Conversions XY (x-MSB16; y-LSB16)
|
||||
static constexpr uint32_t TOUCH_DIRECT_Z1Z2 = 0x302190; // 32 - r Touch-Screen Direct Conversions Z (z1-MSB16; z2-LSB16)
|
||||
// Reserved Addresses 0x302194 - 0x302560
|
||||
static constexpr uint32_t DATESTAMP = 0x320564; // 128 - r Stamp Date Code
|
||||
static constexpr uint32_t CMDB_SPACE = 0x302574; // 12 0xFFC r/w Command DL Space Available
|
||||
static constexpr uint32_t CMDB_WRITE = 0x302578; // 32 0 w Command DL Write
|
||||
|
||||
static constexpr uint32_t TRACKER = 0x309000; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
static constexpr uint32_t TRACKER_1 = 0x309004; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
static constexpr uint32_t TRACKER_2 = 0x309008; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
static constexpr uint32_t TRACKER_3 = 0x30900C; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
static constexpr uint32_t TRACKER_4 = 0x309010; // 32 0x00000000 r/w Track Register (Track Value MSB16; Tag Value - LSB8)
|
||||
|
||||
static constexpr uint32_t MEDIAFIFO_READ = 0x309014; // 32 0x00000000 r/w Media FIFO read pointer
|
||||
static constexpr uint32_t MEDIAFIFO_WRITE = 0x309018; // 32 0x00000000 r/w Media FIFO write pointer
|
||||
};
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/*****************
|
||||
* resolutions.h *
|
||||
*****************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2019 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/***
|
||||
* The FT8xx has odd registers that don't correspond to timing values in
|
||||
* display datasheets. This macro computes the register values using the
|
||||
* formulas given in the document:
|
||||
*
|
||||
* Bridgetek Application Note
|
||||
* AN_336 FT8xx
|
||||
* Selecting an LCD Display
|
||||
* Version 2.1
|
||||
* Issue Date: 2017-11-14
|
||||
*
|
||||
*/
|
||||
#define COMPUTE_REGS_FROM_DATASHEET \
|
||||
constexpr uint16_t Hoffset = thfp + thb - 1; \
|
||||
constexpr uint16_t Hcycle = th; \
|
||||
constexpr uint16_t Hsync0 = thfp - 1 ; \
|
||||
constexpr uint16_t Hsync1 = thfp + thpw - 1; \
|
||||
constexpr uint16_t Voffset = tvfp + tvb - 1; \
|
||||
constexpr uint16_t Vcycle = tv; \
|
||||
constexpr uint16_t Vsync0 = tvfp - 1; \
|
||||
constexpr uint16_t Vsync1 = tvfp + tvpw - 1; \
|
||||
static_assert(thfp + thb + Hsize == th, "Mismatch in display th"); \
|
||||
static_assert(tvfp + tvb + Vsize == tv, "Mismatch in display tv");
|
||||
|
||||
#ifdef TOUCH_UI_320x240
|
||||
namespace FTDI {
|
||||
constexpr uint8_t Pclk = 8;
|
||||
constexpr uint8_t Pclkpol = 0;
|
||||
constexpr uint16_t Hsize = 320;
|
||||
constexpr uint16_t Vsize = 240;
|
||||
constexpr uint16_t Vsync0 = 0;
|
||||
constexpr uint16_t Vsync1 = 2;
|
||||
constexpr uint16_t Voffset = 13;
|
||||
constexpr uint16_t Vcycle = 263;
|
||||
constexpr uint16_t Hsync0 = 0;
|
||||
constexpr uint16_t Hsync1 = 10;
|
||||
constexpr uint16_t Hoffset = 70;
|
||||
constexpr uint16_t Hcycle = 408;
|
||||
|
||||
constexpr uint32_t default_transform_a = 0x000054ad;
|
||||
constexpr uint32_t default_transform_b = 0xffffff52;
|
||||
constexpr uint32_t default_transform_c = 0xfff7f6e4;
|
||||
constexpr uint32_t default_transform_d = 0x00000065;
|
||||
constexpr uint32_t default_transform_e = 0xffffbe3b;
|
||||
constexpr uint32_t default_transform_f = 0x00f68e75;
|
||||
}
|
||||
|
||||
#elif defined(TOUCH_UI_480x272)
|
||||
namespace FTDI {
|
||||
constexpr uint8_t Pclk = 7;
|
||||
constexpr uint8_t Pclkpol = 1;
|
||||
constexpr uint16_t Hsize = 480;
|
||||
constexpr uint16_t Vsize = 272;
|
||||
|
||||
constexpr uint16_t th = 525; // One horizontal line
|
||||
constexpr uint16_t thfp = 43; // HS Front porch
|
||||
constexpr uint16_t thb = 2; // HS Back porch (blanking)
|
||||
constexpr uint16_t thpw = 41; // HS pulse width
|
||||
|
||||
constexpr uint16_t tv = 286; // Vertical period time
|
||||
constexpr uint16_t tvfp = 12; // VS Front porch
|
||||
constexpr uint16_t tvb = 2; // VS Back porch (blanking)
|
||||
constexpr uint16_t tvpw = 10; // VS pulse width
|
||||
|
||||
COMPUTE_REGS_FROM_DATASHEET
|
||||
|
||||
constexpr uint32_t default_transform_a = 0x00008100;
|
||||
constexpr uint32_t default_transform_b = 0x00000000;
|
||||
constexpr uint32_t default_transform_c = 0xFFF18000;
|
||||
constexpr uint32_t default_transform_d = 0x00000000;
|
||||
constexpr uint32_t default_transform_e = 0xFFFFB100;
|
||||
constexpr uint32_t default_transform_f = 0x0120D000;
|
||||
}
|
||||
|
||||
#elif defined(TOUCH_UI_800x480)
|
||||
namespace FTDI {
|
||||
constexpr uint8_t Pclk = 3;
|
||||
constexpr uint8_t Pclkpol = 1;
|
||||
constexpr uint16_t Hsize = 800;
|
||||
constexpr uint16_t Vsize = 480;
|
||||
|
||||
constexpr uint16_t th = 1056; // One horizontal line
|
||||
constexpr uint16_t thfp = 210; // HS Front porch
|
||||
constexpr uint16_t thb = 46; // HS Back porch (blanking)
|
||||
constexpr uint16_t thpw = 23; // HS pulse width
|
||||
|
||||
constexpr uint16_t tv = 525; // Vertical period time
|
||||
constexpr uint16_t tvfp = 22; // VS Front porch
|
||||
constexpr uint16_t tvb = 23; // VS Back porch (blanking)
|
||||
constexpr uint16_t tvpw = 10; // VS pulse width
|
||||
|
||||
COMPUTE_REGS_FROM_DATASHEET
|
||||
|
||||
constexpr uint32_t default_transform_a = 0x0000D8B9;
|
||||
constexpr uint32_t default_transform_b = 0x00000124;
|
||||
constexpr uint32_t default_transform_c = 0xFFE23926;
|
||||
constexpr uint32_t default_transform_d = 0xFFFFFF51;
|
||||
constexpr uint32_t default_transform_e = 0xFFFF7E4F;
|
||||
constexpr uint32_t default_transform_f = 0x01F0AF70;
|
||||
}
|
||||
|
||||
#else
|
||||
#error Unknown or no LULZBOT_TOUCH_UI display resolution specified. To add a display resolution, modify "ftdi_eve_resolutions.h"
|
||||
#endif
|
|
@ -0,0 +1,178 @@
|
|||
/***********
|
||||
* spi.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_basic.h"
|
||||
|
||||
#ifdef FTDI_BASIC
|
||||
|
||||
/********************************* SPI Functions *********************************/
|
||||
|
||||
namespace FTDI {
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
SPISettings SPI::spi_settings(SPI_FREQUENCY, MSBFIRST, SPI_MODE0);
|
||||
#endif
|
||||
|
||||
void SPI::spi_init (void) {
|
||||
SET_OUTPUT(CLCD_MOD_RESET); // Module Reset (a.k.a. PD, not SPI)
|
||||
WRITE(CLCD_MOD_RESET, 0); // start with module in power-down
|
||||
|
||||
SET_OUTPUT(CLCD_SPI_CS);
|
||||
WRITE(CLCD_SPI_CS, 1);
|
||||
|
||||
#ifdef SPI_FLASH_SS
|
||||
SET_OUTPUT(SPI_FLASH_SS);
|
||||
WRITE(SPI_FLASH_SS, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
SET_OUTPUT(CLCD_SOFT_SPI_MOSI);
|
||||
WRITE(CLCD_SOFT_SPI_MOSI, 1);
|
||||
|
||||
SET_OUTPUT(CLCD_SOFT_SPI_SCLK);
|
||||
WRITE(CLCD_SOFT_SPI_SCLK, 0);
|
||||
|
||||
SET_INPUT_PULLUP(CLCD_SOFT_SPI_MISO);
|
||||
#else
|
||||
::SPI.begin();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
uint8_t SPI::_soft_spi_xfer (uint8_t spiOutByte) {
|
||||
uint8_t spiIndex = 0x80;
|
||||
uint8_t spiInByte = 0;
|
||||
uint8_t k;
|
||||
|
||||
noInterrupts();
|
||||
for(k = 0; k <8; k++) { // Output and Read each bit of spiOutByte and spiInByte
|
||||
if (spiOutByte & spiIndex) { // Output MOSI Bit
|
||||
WRITE(CLCD_SOFT_SPI_MOSI, 1);
|
||||
}
|
||||
else {
|
||||
WRITE(CLCD_SOFT_SPI_MOSI, 0);
|
||||
}
|
||||
WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock
|
||||
WRITE(CLCD_SOFT_SPI_SCLK, 0);
|
||||
|
||||
if (READ(CLCD_SOFT_SPI_MISO)) {
|
||||
spiInByte |= spiIndex;
|
||||
}
|
||||
|
||||
spiIndex >>= 1;
|
||||
}
|
||||
interrupts();
|
||||
return spiInByte;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
void SPI::_soft_spi_send (uint8_t spiOutByte) {
|
||||
uint8_t spiIndex = 0x80;
|
||||
uint8_t k;
|
||||
|
||||
noInterrupts();
|
||||
for(k = 0; k <8; k++) { // Output each bit of spiOutByte
|
||||
if (spiOutByte & spiIndex) { // Output MOSI Bit
|
||||
WRITE(CLCD_SOFT_SPI_MOSI, 1);
|
||||
}
|
||||
else {
|
||||
WRITE(CLCD_SOFT_SPI_MOSI, 0);
|
||||
}
|
||||
WRITE(CLCD_SOFT_SPI_SCLK, 1); // Pulse Clock
|
||||
WRITE(CLCD_SOFT_SPI_SCLK, 0);
|
||||
|
||||
spiIndex >>= 1;
|
||||
}
|
||||
interrupts();
|
||||
}
|
||||
#endif
|
||||
|
||||
void SPI::spi_read_bulk (void *data, uint16_t len) {
|
||||
uint8_t* p = (uint8_t *)data;
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
::SPI.transfer(p, len);
|
||||
#else
|
||||
while (len--) *p++ = spi_recv();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SPI::spi_verify_bulk (const void *data, uint16_t len) {
|
||||
const uint8_t* p = (const uint8_t *)data;
|
||||
while (len--) if (*p++ != spi_recv()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// CLCD SPI - Chip Select
|
||||
void SPI::spi_ftdi_select (void) {
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
::SPI.beginTransaction(spi_settings);
|
||||
#endif
|
||||
WRITE(CLCD_SPI_CS, 0);
|
||||
delayMicroseconds(1);
|
||||
}
|
||||
|
||||
// CLCD SPI - Chip Deselect
|
||||
void SPI::spi_ftdi_deselect (void) {
|
||||
WRITE(CLCD_SPI_CS, 1);
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
::SPI.endTransaction();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef SPI_FLASH_SS
|
||||
// Serial SPI Flash SPI - Chip Select
|
||||
void SPI::spi_flash_select () {
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
::SPI.beginTransaction(spi_settings);
|
||||
#endif
|
||||
WRITE(SPI_FLASH_SS, 0);
|
||||
delayMicroseconds(1);
|
||||
}
|
||||
|
||||
// Serial SPI Flash SPI - Chip Deselect
|
||||
void SPI::spi_flash_deselect () {
|
||||
WRITE(SPI_FLASH_SS, 1);
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
::SPI.endTransaction();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Not really a SPI signal...
|
||||
void SPI::ftdi_reset (void) {
|
||||
WRITE(CLCD_MOD_RESET, 0);
|
||||
delay(6); /* minimum time for power-down is 5ms */
|
||||
WRITE(CLCD_MOD_RESET, 1);
|
||||
delay(21); /* minimum time to allow from rising PD_N to first access is 20ms */
|
||||
}
|
||||
|
||||
// Not really a SPI signal...
|
||||
void SPI::test_pulse(void)
|
||||
{
|
||||
#ifdef CLCD_AUX_0
|
||||
WRITE(CLCD_AUX_0, 1);
|
||||
delayMicroseconds(10);
|
||||
WRITE(CLCD_AUX_0, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif // FTDI_BASIC
|
|
@ -0,0 +1,128 @@
|
|||
/*********
|
||||
* spi.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
#include <SPI.h>
|
||||
#endif
|
||||
|
||||
namespace FTDI {
|
||||
namespace SPI {
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
extern SPISettings spi_settings;
|
||||
#endif
|
||||
|
||||
uint8_t _soft_spi_xfer (uint8_t val);
|
||||
void _soft_spi_send (uint8_t val);
|
||||
|
||||
void spi_init ();
|
||||
|
||||
void spi_ftdi_select ();
|
||||
void spi_ftdi_deselect ();
|
||||
|
||||
void spi_flash_select ();
|
||||
void spi_flash_deselect ();
|
||||
|
||||
inline uint8_t spi_recv() {
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
return _soft_spi_xfer(0x00);
|
||||
#else
|
||||
return ::SPI.transfer(0x00);
|
||||
#endif
|
||||
};
|
||||
|
||||
inline void spi_send (uint8_t val) {
|
||||
#ifdef CLCD_USE_SOFT_SPI
|
||||
_soft_spi_send(val);
|
||||
#else
|
||||
::SPI.transfer(val);
|
||||
#endif
|
||||
};
|
||||
|
||||
inline void spi_write_8 (uint8_t val) {spi_send(val);};
|
||||
inline uint8_t spi_read_8 () {return spi_recv();};
|
||||
|
||||
namespace least_significant_byte_first {
|
||||
inline void spi_write_16 (uint16_t val) {spi_send(val >> 0);
|
||||
spi_send(val >> 8);};
|
||||
inline void spi_write_32 (uint32_t val) {spi_send(val >> 0);
|
||||
spi_send(val >> 8);
|
||||
spi_send(val >> 16);
|
||||
spi_send(val >> 24);};
|
||||
|
||||
inline uint8_t spi_read_8 () {return spi_recv();};
|
||||
inline uint16_t spi_read_16 () {return (((uint16_t) spi_recv()) << 0) |
|
||||
(((uint16_t) spi_recv()) << 8);};
|
||||
inline uint32_t spi_read_32 () {return (((uint32_t) spi_recv()) << 0) |
|
||||
(((uint32_t) spi_recv()) << 8) |
|
||||
(((uint32_t) spi_recv()) << 16) |
|
||||
(((uint32_t) spi_recv()) << 24);};
|
||||
}
|
||||
|
||||
namespace most_significant_byte_first {
|
||||
inline void spi_write_16 (uint16_t val) {spi_send(val >> 8);
|
||||
spi_send(val >> 0);};
|
||||
inline void spi_write_24 (uint32_t val) {spi_send(val >> 16);
|
||||
spi_send(val >> 8);
|
||||
spi_send(val >> 0);};
|
||||
inline void spi_write_32 (uint32_t val) {spi_send(val >> 24);
|
||||
spi_send(val >> 16);
|
||||
spi_send(val >> 8);
|
||||
spi_send(val >> 0);};
|
||||
|
||||
inline uint16_t spi_read_16 () {return (((uint16_t) spi_recv()) << 8) |
|
||||
(((uint16_t) spi_recv()) << 0);};
|
||||
inline uint32_t spi_read_32 () {return (((uint32_t) spi_recv()) << 24) |
|
||||
(((uint32_t) spi_recv()) << 16) |
|
||||
(((uint32_t) spi_recv()) << 8) |
|
||||
(((uint32_t) spi_recv()) << 0);};
|
||||
}
|
||||
|
||||
inline uint8_t ram_write(const uint8_t *p) {return *p;}
|
||||
inline uint8_t pgm_write(const uint8_t *p) {return pgm_read_byte(p);}
|
||||
|
||||
typedef uint8_t (*bulk_write_op)(const uint8_t*);
|
||||
|
||||
// Generic template for function for writing multiple bytes, plus padding bytes.
|
||||
// The template parameter op is an inlineable function which is applied to each byte.
|
||||
|
||||
template<bulk_write_op byte_op>
|
||||
void spi_write_bulk(const void *data, uint16_t len, uint8_t padding) {
|
||||
const uint8_t* p = (const uint8_t *)data;
|
||||
while (len--) spi_send(byte_op(p++));
|
||||
while (padding--) spi_send(0);
|
||||
}
|
||||
|
||||
template<bulk_write_op byte_op>
|
||||
void spi_write_bulk(const void *data, uint16_t len) {
|
||||
const uint8_t* p = (const uint8_t *)data;
|
||||
while (len--) spi_send(byte_op(p++));
|
||||
}
|
||||
|
||||
void spi_read_bulk( void *data, uint16_t len);
|
||||
bool spi_verify_bulk(const void *data, uint16_t len);
|
||||
|
||||
void ftdi_reset(void);
|
||||
void test_pulse(void);
|
||||
}
|
||||
}
|
211
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h
Normal file
211
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/compat.h
Normal file
|
@ -0,0 +1,211 @@
|
|||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
// Marlin will define the I/O functions for us
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
#define FTDI_BASIC
|
||||
#define FTDI_EXTENDED
|
||||
#endif
|
||||
#else
|
||||
#include "Arduino.h"
|
||||
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
#include "SPI.h"
|
||||
#endif
|
||||
|
||||
namespace fast_io {
|
||||
|
||||
template<typename port_t,uint8_t bits>
|
||||
struct port_pin {
|
||||
typedef port_t port;
|
||||
static inline void set_high() {port::port() = (port::port() | bits);}
|
||||
static inline void set_low() {port::port() = (port::port() & (~bits));}
|
||||
static inline void set_input() {port::ddr() = (port::ddr() & (~bits));}
|
||||
static inline void set_input_pullup() {set_input(); set_high();}
|
||||
static inline void set_output() {port::ddr() = (port::ddr() | bits);}
|
||||
static inline uint8_t read() {return port::pin() & bits;}
|
||||
static inline void write(bool v) {if (v) set_high(); else set_low();}
|
||||
};
|
||||
|
||||
#define MAKE_AVR_PORT_PINS(ID) \
|
||||
struct port_##ID { \
|
||||
static volatile uint8_t &pin() {return PIN##ID;}; \
|
||||
static volatile uint8_t &port() {return PORT##ID;}; \
|
||||
static volatile uint8_t &ddr() {return DDR##ID;}; \
|
||||
}; \
|
||||
typedef port_pin<port_##ID, 0b00000001> AVR_##ID##0; \
|
||||
typedef port_pin<port_##ID, 0b00000010> AVR_##ID##1; \
|
||||
typedef port_pin<port_##ID, 0b00000100> AVR_##ID##2; \
|
||||
typedef port_pin<port_##ID, 0b00001000> AVR_##ID##3; \
|
||||
typedef port_pin<port_##ID, 0b00010000> AVR_##ID##4; \
|
||||
typedef port_pin<port_##ID, 0b00100000> AVR_##ID##5; \
|
||||
typedef port_pin<port_##ID, 0b01000000> AVR_##ID##6; \
|
||||
typedef port_pin<port_##ID, 0b10000000> AVR_##ID##7;
|
||||
|
||||
#ifdef PORTA
|
||||
MAKE_AVR_PORT_PINS(A);
|
||||
#endif
|
||||
#ifdef PORTB
|
||||
MAKE_AVR_PORT_PINS(B);
|
||||
#endif
|
||||
#ifdef PORTC
|
||||
MAKE_AVR_PORT_PINS(C);
|
||||
#endif
|
||||
#ifdef PORTD
|
||||
MAKE_AVR_PORT_PINS(D);
|
||||
#endif
|
||||
#ifdef PORTE
|
||||
MAKE_AVR_PORT_PINS(E);
|
||||
#endif
|
||||
#ifdef PORTF
|
||||
MAKE_AVR_PORT_PINS(F);
|
||||
#endif
|
||||
#ifdef PORTG
|
||||
MAKE_AVR_PORT_PINS(G);
|
||||
#endif
|
||||
#ifdef PORTH
|
||||
MAKE_AVR_PORT_PINS(H);
|
||||
#endif
|
||||
#ifdef PORTJ
|
||||
MAKE_AVR_PORT_PINS(J);
|
||||
#endif
|
||||
#ifdef PORTK
|
||||
MAKE_AVR_PORT_PINS(K);
|
||||
#endif
|
||||
#ifdef PORTL
|
||||
MAKE_AVR_PORT_PINS(L);
|
||||
#endif
|
||||
#ifdef PORTQ
|
||||
MAKE_AVR_PORT_PINS(Q);
|
||||
#endif
|
||||
#ifdef PORTR
|
||||
MAKE_AVR_PORT_PINS(R);
|
||||
#endif
|
||||
|
||||
#undef MAKE_AVR_PORT_PINS
|
||||
|
||||
template<uint8_t p>
|
||||
struct arduino_digital_pin {
|
||||
static constexpr uint8_t pin = p;
|
||||
static inline void set_high() {digitalWrite(p, HIGH);}
|
||||
static inline void set_low() {digitalWrite(p, LOW);}
|
||||
static inline void set_input() {pinMode(p, INPUT);}
|
||||
static inline void set_input_pullup() {pinMode(p, INPUT_PULLUP);}
|
||||
static inline void set_output() {pinMode(p, OUTPUT);}
|
||||
static inline uint8_t read() {return digitalRead(p);}
|
||||
static inline void write(bool v) {digitalWrite(p, v ? HIGH : LOW);}
|
||||
};
|
||||
|
||||
#define MAKE_ARDUINO_PINS(ID) typedef arduino_digital_pin<ID> ARDUINO_DIGITAL_##ID;
|
||||
MAKE_ARDUINO_PINS( 0);
|
||||
MAKE_ARDUINO_PINS( 1);
|
||||
MAKE_ARDUINO_PINS( 2);
|
||||
MAKE_ARDUINO_PINS( 3);
|
||||
MAKE_ARDUINO_PINS( 4);
|
||||
MAKE_ARDUINO_PINS( 5);
|
||||
MAKE_ARDUINO_PINS( 6);
|
||||
MAKE_ARDUINO_PINS( 7);
|
||||
MAKE_ARDUINO_PINS( 8);
|
||||
MAKE_ARDUINO_PINS( 9);
|
||||
MAKE_ARDUINO_PINS(10);
|
||||
MAKE_ARDUINO_PINS(11);
|
||||
MAKE_ARDUINO_PINS(12);
|
||||
MAKE_ARDUINO_PINS(13);
|
||||
MAKE_ARDUINO_PINS(14);
|
||||
MAKE_ARDUINO_PINS(15);
|
||||
MAKE_ARDUINO_PINS(16);
|
||||
MAKE_ARDUINO_PINS(17);
|
||||
MAKE_ARDUINO_PINS(18);
|
||||
MAKE_ARDUINO_PINS(19);
|
||||
MAKE_ARDUINO_PINS(10);
|
||||
MAKE_ARDUINO_PINS(21);
|
||||
MAKE_ARDUINO_PINS(22);
|
||||
MAKE_ARDUINO_PINS(23);
|
||||
MAKE_ARDUINO_PINS(24);
|
||||
MAKE_ARDUINO_PINS(25);
|
||||
MAKE_ARDUINO_PINS(26);
|
||||
MAKE_ARDUINO_PINS(27);
|
||||
MAKE_ARDUINO_PINS(28);
|
||||
MAKE_ARDUINO_PINS(29);
|
||||
MAKE_ARDUINO_PINS(30);
|
||||
MAKE_ARDUINO_PINS(31);
|
||||
MAKE_ARDUINO_PINS(32);
|
||||
MAKE_ARDUINO_PINS(33);
|
||||
MAKE_ARDUINO_PINS(34);
|
||||
MAKE_ARDUINO_PINS(35);
|
||||
MAKE_ARDUINO_PINS(36);
|
||||
MAKE_ARDUINO_PINS(37);
|
||||
MAKE_ARDUINO_PINS(38);
|
||||
MAKE_ARDUINO_PINS(39);
|
||||
MAKE_ARDUINO_PINS(40);
|
||||
MAKE_ARDUINO_PINS(41);
|
||||
MAKE_ARDUINO_PINS(42);
|
||||
MAKE_ARDUINO_PINS(43);
|
||||
MAKE_ARDUINO_PINS(44);
|
||||
MAKE_ARDUINO_PINS(45);
|
||||
MAKE_ARDUINO_PINS(46);
|
||||
MAKE_ARDUINO_PINS(47);
|
||||
MAKE_ARDUINO_PINS(48);
|
||||
MAKE_ARDUINO_PINS(49);
|
||||
MAKE_ARDUINO_PINS(50);
|
||||
MAKE_ARDUINO_PINS(51);
|
||||
MAKE_ARDUINO_PINS(52);
|
||||
MAKE_ARDUINO_PINS(53);
|
||||
#undef MAKE_ARDUINO_PINS
|
||||
} // namespace fast_io
|
||||
|
||||
#define SET_INPUT(pin) fast_io::pin::set_input()
|
||||
#define SET_INPUT_PULLUP(pin) fast_io::pin::set_input(); fast_io::pin::set_high()
|
||||
#define SET_OUTPUT(pin) fast_io::pin::set_output()
|
||||
#define READ(pin) fast_io::pin::read()
|
||||
#define WRITE(pin, value) fast_io::pin::write(value)
|
||||
|
||||
#ifndef pgm_read_word_far
|
||||
#define pgm_read_word_far pgm_read_word
|
||||
#endif
|
||||
|
||||
#ifndef pgm_read_dword_far
|
||||
#define pgm_read_dword_far pgm_read_dword
|
||||
#endif
|
||||
|
||||
#ifndef pgm_read_ptr_far
|
||||
#define pgm_read_ptr_far pgm_read_ptr
|
||||
#endif
|
||||
|
||||
#define SERIAL_ECHO_START()
|
||||
#define SERIAL_ECHOLNPGM(str) Serial.println(F(str))
|
||||
#define SERIAL_ECHOPGM(str) Serial.print(F(str))
|
||||
#define SERIAL_ECHOLNPAIR(str, val) {Serial.print(F(str)); Serial.println(val);}
|
||||
#define SERIAL_ECHOPAIR(str, val) {Serial.print(F(str)); Serial.print(val);}
|
||||
|
||||
#define safe_delay delay
|
||||
|
||||
// Remove compiler warning on an unused variable
|
||||
#ifndef UNUSED
|
||||
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
||||
#define UNUSED(X) (void)X
|
||||
#else
|
||||
#define UNUSED(x) ((void)(x))
|
||||
#endif
|
||||
#endif
|
||||
#endif //!defined(__MARLIN_FIRMWARE__)
|
|
@ -0,0 +1,49 @@
|
|||
/*****************
|
||||
* bitmap_info.h *
|
||||
*****************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef FORCEDINLINE
|
||||
#define FORCEDINLINE __attribute__((always_inline)) inline
|
||||
#endif
|
||||
|
||||
namespace FTDI {
|
||||
// The following functions *must* be inlined since we are relying on the compiler to do
|
||||
// substitution of the constants from the data structure rather than actually storing
|
||||
// it in PROGMEM (which would fail, since we are not using pgm_read to read them).
|
||||
// Plus, by inlining, all the equations are evaluated at compile-time as everything
|
||||
// should be a constant.
|
||||
|
||||
typedef struct {
|
||||
const uint8_t format;
|
||||
const uint16_t linestride;
|
||||
const uint8_t filter;
|
||||
const uint8_t wrapx;
|
||||
const uint8_t wrapy;
|
||||
const uint32_t RAMG_offset;
|
||||
const uint16_t width;
|
||||
const uint16_t height;
|
||||
} bitmap_info_t;
|
||||
|
||||
FORCEDINLINE uint32_t BITMAP_SOURCE (const bitmap_info_t& info) {return BITMAP_SOURCE (ftdi_memory_map::RAM_G + info.RAMG_offset);};
|
||||
FORCEDINLINE uint32_t BITMAP_LAYOUT (const bitmap_info_t& info) {return BITMAP_LAYOUT (info.format, info.linestride, info.height);};
|
||||
FORCEDINLINE uint32_t BITMAP_SIZE (const bitmap_info_t& info) {return BITMAP_SIZE (info.filter, info.wrapx, info.wrapy, info.width, info.height);}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/*************************
|
||||
* command_processor.cpp *
|
||||
*************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2018 *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
CommandProcessor::btn_style_func_t *CommandProcessor::_btn_style_callback = CommandProcessor::default_button_style_func;
|
||||
bool CommandProcessor::is_tracking = false;
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,347 @@
|
|||
/***********************
|
||||
* command_processor.h *
|
||||
***********************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
uint32_t bg;
|
||||
uint32_t grad;
|
||||
uint32_t fg;
|
||||
uint32_t rgb;
|
||||
} btn_colors;
|
||||
|
||||
/**************************** Enhanced Command Processor **************************/
|
||||
|
||||
/* The CommandProcessor class wraps the CommandFifo with several features to make
|
||||
* defining user interfaces much easier.
|
||||
*
|
||||
* - Implements chaining on all methods
|
||||
* - Automatically adds text to button, toggle, text and keys.
|
||||
* - Constrains all widgets to fit inside a box for ease of layout.
|
||||
* - Font size is specified using a chained modifier.
|
||||
* - Option argument is given the default OPT_3D value.
|
||||
*/
|
||||
|
||||
class CommandProcessor : public CLCD::CommandFifo {
|
||||
public:
|
||||
static constexpr uint8_t STYLE_DISABLED = 0x80;
|
||||
|
||||
private:
|
||||
static bool default_button_style_func(CommandProcessor &, uint8_t tag, uint8_t & /*style*/, uint16_t &options, bool) {
|
||||
if (tag != 0 && FTDI::EventLoop::get_pressed_tag() == tag) {
|
||||
options = FTDI::OPT_FLAT;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef bool btn_style_func_t(CommandProcessor &cmd, uint8_t tag, uint8_t &style, uint16_t &options, bool post);
|
||||
|
||||
static btn_style_func_t *_btn_style_callback;
|
||||
static bool is_tracking;
|
||||
int8_t _font = 26, _tag = 0;
|
||||
uint8_t _style = 0;
|
||||
|
||||
protected:
|
||||
// Returns the cannonical thickness of a widget (i.e. the height of a toggle element)
|
||||
uint16_t widget_thickness() {
|
||||
CLCD::FontMetrics fm(_font);
|
||||
return fm.height * 20.0/16;
|
||||
}
|
||||
|
||||
FORCEDINLINE void linear_widget_box(int16_t &x, int16_t &y, int16_t &w, int16_t &h, bool tracker = false) {
|
||||
const uint16_t th = widget_thickness()/2;
|
||||
if (w > h) {
|
||||
x += tracker ? th * 2.5 : th;
|
||||
y += h/2 - th/2;
|
||||
w -= tracker ? th * 5.0 : th * 2;
|
||||
h = th;
|
||||
} else {
|
||||
x += w/2 - th/2;
|
||||
y += tracker ? th * 2.5 : th;
|
||||
w = th;
|
||||
h -= tracker ? th * 5.0 : th * 2;
|
||||
}
|
||||
}
|
||||
|
||||
FORCEDINLINE uint16_t circular_widget_box(int16_t &x, int16_t &y, int16_t &w, int16_t &h) {
|
||||
const uint16_t r = min(w,h)/2;
|
||||
x += w/2;
|
||||
y += h/2;
|
||||
w = 1;
|
||||
h = 1;
|
||||
return r;
|
||||
}
|
||||
|
||||
public:
|
||||
// Helper method for setting all colors at once
|
||||
inline CommandProcessor& colors(const btn_colors &colors) {
|
||||
cmd(FTDI::COLOR_RGB(colors.rgb))
|
||||
.gradcolor(colors.grad)
|
||||
.fgcolor(colors.fg)
|
||||
.bgcolor(colors.bg);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CommandProcessor& bitmap_size(uint8_t filter, uint8_t wrapx, uint8_t wrapy, uint16_t width, uint16_t height) {
|
||||
cmd(FTDI::BITMAP_SIZE(filter, wrapx, wrapy, width, height));
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
if (FTDI::ftdi_chip >= 810)
|
||||
cmd(FTDI::BITMAP_SIZE_H(width >> 9, height >> 9));
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CommandProcessor& bitmap_layout(uint8_t format, uint16_t linestride, uint16_t height) {
|
||||
cmd(FTDI::BITMAP_LAYOUT(format, linestride, height));
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
if (FTDI::ftdi_chip >= 810)
|
||||
cmd(FTDI::BITMAP_LAYOUT_H(linestride >> 10, height >> 9));
|
||||
#endif
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CommandProcessor& set_button_style_callback(const btn_style_func_t *func) {
|
||||
_btn_style_callback = func ? func : default_button_style_func;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CommandProcessor& tag (uint8_t tag) {_tag = tag; cmd(FTDI::TAG(tag)); return *this;}
|
||||
|
||||
inline CommandProcessor& font (int16_t font) {_font = font; return *this;}
|
||||
|
||||
inline CommandProcessor& enabled (bool enabled) {
|
||||
if (enabled)
|
||||
_style &= ~STYLE_DISABLED;
|
||||
else
|
||||
_style |= STYLE_DISABLED;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline CommandProcessor& style (uint8_t style) {
|
||||
_style = (_style & STYLE_DISABLED) | style;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Wrap all the CommandFifo routines to allow method chaining
|
||||
|
||||
inline CommandProcessor& cmd (uint32_t cmd32) {CLCD::CommandFifo::cmd(cmd32); return *this;}
|
||||
inline CommandProcessor& cmd (void* data, uint16_t len) {CLCD::CommandFifo::cmd(data, len); return *this;}
|
||||
inline CommandProcessor& execute() {CLCD::CommandFifo::execute(); return *this;}
|
||||
|
||||
inline CommandProcessor& fgcolor (uint32_t rgb) {CLCD::CommandFifo::fgcolor(rgb); return *this;}
|
||||
inline CommandProcessor& bgcolor (uint32_t rgb) {CLCD::CommandFifo::bgcolor(rgb); return *this;}
|
||||
inline CommandProcessor& gradcolor(uint32_t rgb) {CLCD::CommandFifo::gradcolor(rgb); return *this;}
|
||||
|
||||
inline CommandProcessor& snapshot (uint32_t ptr) {CLCD::CommandFifo::snapshot(ptr); return *this;}
|
||||
|
||||
inline CommandProcessor& loadimage(uint32_t ptr, uint32_t options)
|
||||
{CLCD::CommandFifo::loadimage(ptr, options); return *this;}
|
||||
inline CommandProcessor& sketch (int16_t x, int16_t y, uint16_t w, uint16_t h, uint32_t ptr, uint16_t format)
|
||||
{CLCD::CommandFifo::sketch(x, y, w, h, ptr, format); return *this;}
|
||||
inline CommandProcessor& screensaver () {CLCD::CommandFifo::screensaver(); return *this;}
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
inline CommandProcessor& setbase (uint8_t base) {CLCD::CommandFifo::setbase(base); return *this;}
|
||||
#endif
|
||||
inline CommandProcessor& loadidentity () {CLCD::CommandFifo::loadidentity(); return *this;}
|
||||
inline CommandProcessor& scale (int32_t sx, int32_t sy) {CLCD::CommandFifo::scale(sx,sy); return *this;}
|
||||
inline CommandProcessor& rotate (int32_t a) {CLCD::CommandFifo::rotate(a); return *this;}
|
||||
inline CommandProcessor& translate(int32_t tx, int32_t ty) {CLCD::CommandFifo::translate(tx,ty); return *this;}
|
||||
inline CommandProcessor& setmatrix () {CLCD::CommandFifo::setmatrix(); return *this;}
|
||||
inline CommandProcessor& stop () {CLCD::CommandFifo::stop(); return *this;}
|
||||
|
||||
inline CommandProcessor& memzero (uint32_t ptr, uint32_t size)
|
||||
{CLCD::CommandFifo::memzero(ptr, size); return *this;}
|
||||
inline CommandProcessor& memset (uint32_t ptr, uint32_t val, uint32_t size)
|
||||
{CLCD::CommandFifo::memset(ptr, val, size); return *this;}
|
||||
inline CommandProcessor& memcpy (uint32_t src, uint32_t dst, uint32_t size)
|
||||
{CLCD::CommandFifo::memcpy(src, dst, size); return *this;}
|
||||
inline CommandProcessor& memcrc (uint32_t ptr, uint32_t num, uint32_t result)
|
||||
{CLCD::CommandFifo::memcrc(ptr, num, result); return *this;}
|
||||
inline CommandProcessor& memwrite (uint32_t ptr, uint32_t value)
|
||||
{CLCD::CommandFifo::memwrite(ptr, value); return *this;}
|
||||
inline CommandProcessor& inflate (uint32_t ptr)
|
||||
{CLCD::CommandFifo::inflate(ptr); return *this;}
|
||||
inline CommandProcessor& getptr (uint32_t result)
|
||||
{CLCD::CommandFifo::getptr(result); return *this;}
|
||||
inline CommandProcessor& getprops (uint32_t ptr, uint32_t width, uint32_t height)
|
||||
{CLCD::CommandFifo::getprops(ptr, width, height); return *this;}
|
||||
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
inline CommandProcessor& setbitmap (uint32_t ptr, uint16_t fmt, uint16_t w, uint16_t h)
|
||||
{CLCD::CommandFifo::setbitmap(ptr,fmt,w,h); return *this;}
|
||||
inline CommandProcessor& snapshot2 (uint32_t fmt, uint32_t ptr, int16_t x, int16_t y, uint16_t w, uint16_t h)
|
||||
{CLCD::CommandFifo::snapshot2(fmt,ptr,x,y,w,h); return *this;}
|
||||
inline CommandProcessor& mediafifo (uint32_t p, uint32_t s) {CLCD::CommandFifo::mediafifo(p, s); return *this;}
|
||||
inline CommandProcessor& playvideo(uint32_t options) {CLCD::CommandFifo::playvideo(options); return *this;}
|
||||
#endif
|
||||
|
||||
inline CommandProcessor& gradient(int16_t x0, int16_t y0, uint32_t rgb0, int16_t x1, int16_t y1, uint32_t rgb1)
|
||||
{CLCD::CommandFifo::gradient(x0,y0,rgb0,x1,y1,rgb1); return *this;}
|
||||
|
||||
inline CommandProcessor& rectangle(int16_t x, int16_t y, int16_t w, int16_t h) {
|
||||
using namespace FTDI;
|
||||
CLCD::CommandFifo::cmd(BEGIN(RECTS));
|
||||
CLCD::CommandFifo::cmd(VERTEX2F(x*16,y*16));
|
||||
CLCD::CommandFifo::cmd(VERTEX2F((x+w)*16,(y+h)*16));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
FORCEDINLINE CommandProcessor& toggle(int16_t x, int16_t y, int16_t w, int16_t h, T text, bool state, uint16_t options = FTDI::OPT_3D) {
|
||||
CLCD::FontMetrics fm(_font);
|
||||
const int16_t widget_h = fm.height * 20.0/16;
|
||||
//const int16_t outer_bar_r = widget_h / 2;
|
||||
//const int16_t knob_r = outer_bar_r - 1.5;
|
||||
// The y coordinate of the toggle is the baseline of the text,
|
||||
// so we must introduce a fudge factor based on the line height to
|
||||
// actually center the control.
|
||||
const int16_t fudge_y = fm.height*5/16;
|
||||
CLCD::CommandFifo::toggle(x + h/2, y + h/2 - widget_h/2 + fudge_y, w - h, _font, options, state);
|
||||
CLCD::CommandFifo::str(text);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Contrained drawing routines. These constrain the widget inside a box for easier layout.
|
||||
// The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time.
|
||||
|
||||
FORCEDINLINE CommandProcessor& track_linear(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) {
|
||||
linear_widget_box(x, y, w, h, true);
|
||||
CLCD::CommandFifo::track(x, y, w, h, tag);
|
||||
is_tracking = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& track_circular(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) {
|
||||
circular_widget_box(x,y, w, h);
|
||||
CLCD::CommandFifo::track(x, y, w, h, tag);
|
||||
is_tracking = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
uint8_t track_tag (uint16_t &value) {
|
||||
if (is_tracking) {
|
||||
if (FTDI::EventLoop::is_touch_held()) {
|
||||
return CLCD::get_tracker(value);
|
||||
} else {
|
||||
CLCD::CommandFifo::track(0, 0, 0, 0, 0);
|
||||
CLCD::CommandFifo::execute();
|
||||
is_tracking = false;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& clock(int16_t x, int16_t y, int16_t w, int16_t h, int16_t hr, int16_t m, int16_t s, int16_t ms, uint16_t options = FTDI::OPT_3D) {
|
||||
const uint16_t r = circular_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::clock(x, y, r, options, hr, m, s, ms);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& gauge(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t major, uint16_t minor, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) {
|
||||
const uint16_t r = circular_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::gauge(x, y, r, options, major, minor, val, range);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& dial(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t options = FTDI::OPT_3D) {
|
||||
const uint16_t r = circular_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::dial(x, y, r, options, val);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& slider(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) {
|
||||
linear_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::slider(x, y, w, h, options, val, range);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& progress(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t range, uint16_t options = FTDI::OPT_3D) {
|
||||
linear_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::progress(x, y, w, h, options, val, range);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& scrollbar(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t val, uint16_t size, uint16_t range, uint16_t options = 0) {
|
||||
linear_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::scrollbar(x, y, w, h, options, val, size, range);
|
||||
return *this;
|
||||
}
|
||||
|
||||
CommandProcessor& number(int16_t x, int16_t y, int16_t w, int16_t h, int32_t n, uint16_t options = FTDI::OPT_CENTER) {
|
||||
using namespace FTDI;
|
||||
CLCD::CommandFifo::number(
|
||||
x + ((options & OPT_CENTERX) ? w/2 : ((options & OPT_RIGHTX) ? w : 0)),
|
||||
y + ((options & OPT_CENTERY) ? h/2 : h),
|
||||
_font, options, n);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T> FORCEDINLINE
|
||||
CommandProcessor& text(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_CENTER) {
|
||||
using namespace FTDI;
|
||||
CLCD::CommandFifo::text(
|
||||
x + ((options & OPT_CENTERX) ? w/2 : ((options & OPT_RIGHTX) ? w : 0)),
|
||||
y + ((options & OPT_CENTERY) ? h/2 : h),
|
||||
_font, options);
|
||||
CLCD::CommandFifo::str(text);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& icon(int16_t x, int16_t y, int16_t w, int16_t h, const FTDI::bitmap_info_t& info, const float scale = 1) {
|
||||
using namespace FTDI;
|
||||
cmd(BEGIN(BITMAPS));
|
||||
if (scale != 1) {
|
||||
cmd(BITMAP_TRANSFORM_A(uint32_t(float(256)/scale)));
|
||||
cmd(BITMAP_TRANSFORM_E(uint32_t(float(256)/scale)));
|
||||
}
|
||||
cmd(BITMAP_SIZE(info.filter, info.wrapx, info.wrapy, info.width*scale, info.height*scale));
|
||||
cmd(VERTEX2F((x + w/2 - info.width*scale/2)*16, (y + h/2 - info.height*scale/2)*16));
|
||||
if (scale != 1) {
|
||||
cmd(BITMAP_TRANSFORM_A(256));
|
||||
cmd(BITMAP_TRANSFORM_E(256));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
CommandProcessor& button(int16_t x, int16_t y, int16_t w, int16_t h, T text, uint16_t options = FTDI::OPT_3D) {
|
||||
using namespace FTDI;
|
||||
bool styleModified = false;
|
||||
if (_btn_style_callback) styleModified = _btn_style_callback(*this, _tag, _style, options, false);
|
||||
CLCD::CommandFifo::button(x, y, w, h, _font, options);
|
||||
CLCD::CommandFifo::str(text);
|
||||
if (_btn_style_callback && styleModified) _btn_style_callback(*this, _tag, _style, options, true);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
CommandProcessor& keys(int16_t x, int16_t y, int16_t w, int16_t h, T keys, uint16_t options = FTDI::OPT_3D) {
|
||||
CLCD::CommandFifo::keys(x, y, w, h, _font, options);
|
||||
CLCD::CommandFifo::str(keys);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCEDINLINE CommandProcessor& spinner(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t style = 0, uint16_t scale = 0) {
|
||||
circular_widget_box(x, y, w, h);
|
||||
CLCD::CommandFifo::spinner(x, y, style, scale);
|
||||
return *this;
|
||||
}
|
||||
};
|
|
@ -0,0 +1,176 @@
|
|||
/****************
|
||||
* dl_cache.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
/* The Display List Cache mechanism stores the display list corresponding
|
||||
* to a menu into RAM_G so that on subsequent calls drawing the menu does
|
||||
* not require as much SPI traffic.
|
||||
*
|
||||
* Layout of Cache memory:
|
||||
*
|
||||
* The cache memory begins with a table at
|
||||
* DL_CACHE_START: each table entry contains
|
||||
* an address and size for a cached DL slot.
|
||||
*
|
||||
* Immediately following the table is the
|
||||
* DL_FREE_ADDR, which points to free cache
|
||||
* space; following this is occupied DL space,
|
||||
* and after that free space that is yet to
|
||||
* be used.
|
||||
*
|
||||
* location data sizeof
|
||||
*
|
||||
* DL_CACHE_START slot0_addr 4
|
||||
* slot0_size 4
|
||||
* slot1_addr 4
|
||||
* slot1_size 4
|
||||
* ...
|
||||
* slotN_addr 4
|
||||
* slotN_size 4
|
||||
* DL_FREE_ADDR dl_free_ptr 4
|
||||
* cached data
|
||||
* ...
|
||||
* dl_free_ptr empty space
|
||||
* ...
|
||||
*/
|
||||
|
||||
#define DL_CACHE_START MAP::RAM_G_SIZE - 0xFFFF
|
||||
#define DL_FREE_ADDR DL_CACHE_START + DL_CACHE_SLOTS * 8
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
// The init function ensures all cache locations are marked as empty
|
||||
|
||||
void DLCache::init() {
|
||||
CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4);
|
||||
for(uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++) {
|
||||
save_slot(slot, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
bool DLCache::has_data() {
|
||||
return dl_size != 0;
|
||||
}
|
||||
|
||||
bool DLCache::wait_until_idle() {
|
||||
const unsigned long startTime = millis();
|
||||
do {
|
||||
if ((millis() - startTime) > 250) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Timeout on DL_Cache::Wait_Until_Idle()");
|
||||
CLCD::CommandFifo::reset();
|
||||
return false;
|
||||
}
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
ExtUI::yield();
|
||||
#endif
|
||||
} while (CLCD::CommandFifo::is_processing());
|
||||
return true;
|
||||
}
|
||||
|
||||
/* This caches the current display list in RAMG so
|
||||
* that it can be appended later. The memory is
|
||||
* dynamically allocated following DL_FREE_ADDR.
|
||||
*
|
||||
* If num_bytes is provided, then that many bytes
|
||||
* will be reserved so that the cache may be re-written
|
||||
* later with potentially a bigger DL.
|
||||
*/
|
||||
|
||||
bool DLCache::store(uint32_t num_bytes /* = 0*/) {
|
||||
CLCD::CommandFifo cmd;
|
||||
|
||||
// Execute any commands already in the FIFO
|
||||
cmd.execute();
|
||||
if (!wait_until_idle())
|
||||
return false;
|
||||
|
||||
// Figure out how long the display list is
|
||||
uint32_t new_dl_size = CLCD::mem_read_32(REG::CMD_DL) & 0x1FFF;
|
||||
uint32_t free_space = 0;
|
||||
uint32_t dl_alloc = 0;
|
||||
|
||||
if (dl_addr == 0) {
|
||||
// If we are allocating new space...
|
||||
dl_addr = CLCD::mem_read_32(DL_FREE_ADDR);
|
||||
free_space = MAP::RAM_G_SIZE - dl_addr;
|
||||
dl_alloc = num_bytes ? num_bytes : new_dl_size;
|
||||
dl_size = new_dl_size;
|
||||
} else {
|
||||
// Otherwise, we can only store as much space
|
||||
// as was previously allocated.
|
||||
free_space = num_bytes ? num_bytes : dl_size;
|
||||
dl_alloc = 0;
|
||||
dl_size = new_dl_size;
|
||||
}
|
||||
|
||||
if (dl_size > free_space) {
|
||||
// Not enough memory to cache the display list.
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Not enough space in GRAM to cache display list, free space: ", free_space);
|
||||
SERIAL_ECHOLNPAIR(" Required: ", dl_size);
|
||||
#endif
|
||||
return false;
|
||||
} else {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Saving DL to RAMG cache, bytes: ", dl_size);
|
||||
SERIAL_ECHOLNPAIR(" Free space: ", free_space);
|
||||
#endif
|
||||
cmd.memcpy(dl_addr, MAP::RAM_DL, dl_size);
|
||||
cmd.execute();
|
||||
save_slot(dl_slot, dl_addr, dl_size);
|
||||
if (dl_alloc > 0) {
|
||||
// If we allocated space dynamically, then adjust dl_free_addr.
|
||||
CLCD::mem_write_32(DL_FREE_ADDR, dl_addr + dl_alloc);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void DLCache::save_slot(uint8_t dl_slot, uint32_t dl_addr, uint32_t dl_size) {
|
||||
CLCD::mem_write_32(DL_CACHE_START + dl_slot * 8 + 0, dl_addr);
|
||||
CLCD::mem_write_32(DL_CACHE_START + dl_slot * 8 + 4, dl_size);
|
||||
}
|
||||
|
||||
void DLCache::load_slot() {
|
||||
dl_addr = CLCD::mem_read_32(DL_CACHE_START + dl_slot * 8 + 0);
|
||||
dl_size = CLCD::mem_read_32(DL_CACHE_START + dl_slot * 8 + 4);
|
||||
}
|
||||
|
||||
void DLCache::append() {
|
||||
CLCD::CommandFifo cmd;
|
||||
cmd.append(dl_addr, dl_size);
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
cmd.execute();
|
||||
wait_until_idle();
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Appending to DL from RAMG cache, bytes: ", dl_size);
|
||||
SERIAL_ECHOLNPAIR(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,69 @@
|
|||
/**************
|
||||
* dl_cache.h *
|
||||
**************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/******************* DISPLAY LIST CACHE MANAGEMENT ************************/
|
||||
/* The Display List Cache mechanism stores the display list corresponding
|
||||
* to a menu into RAM_G so that on subsequent calls drawing the menu does
|
||||
* not require as much SPI traffic. Dynamic content, such as indicators,
|
||||
* should not be cached.
|
||||
*
|
||||
* The DLCache can be used like so:
|
||||
*
|
||||
* void some_function() {
|
||||
* DLCache dlcache(UNIQUE_ID);
|
||||
*
|
||||
* if (dlcache.hasData()) {
|
||||
* dlcache.append();
|
||||
* } else {
|
||||
* // Add stuff to the DL
|
||||
* dlcache.store();
|
||||
* }
|
||||
*/
|
||||
class DLCache {
|
||||
private:
|
||||
typedef FTDI::ftdi_registers REG;
|
||||
typedef FTDI::ftdi_memory_map MAP;
|
||||
|
||||
uint8_t dl_slot;
|
||||
uint32_t dl_addr;
|
||||
uint16_t dl_size;
|
||||
|
||||
void load_slot();
|
||||
static void save_slot(uint8_t dl_slot, uint32_t dl_addr, uint32_t dl_size);
|
||||
|
||||
bool wait_until_idle();
|
||||
|
||||
public:
|
||||
static void init();
|
||||
|
||||
DLCache(uint8_t slot) {
|
||||
dl_slot = slot;
|
||||
load_slot();
|
||||
}
|
||||
|
||||
bool has_data();
|
||||
bool store(uint32_t num_bytes = 0);
|
||||
void append();
|
||||
};
|
||||
|
||||
#define DL_CACHE_SLOTS 250
|
|
@ -0,0 +1,230 @@
|
|||
/******************
|
||||
* event_loop.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
using namespace FTDI;
|
||||
|
||||
enum {
|
||||
UNPRESSED = 0x00
|
||||
};
|
||||
|
||||
tiny_timer_t touch_timer;
|
||||
UIData::flags_t UIData::flags;
|
||||
uint8_t pressed_tag = UNPRESSED;
|
||||
|
||||
uint8_t UIData::get_persistent_data_mask() {
|
||||
// A bit mask for flags that should be stored to the EEPROM.
|
||||
// Others are considered temporarily values that need not be
|
||||
// saved.
|
||||
constexpr flags_t persistent_flags = {
|
||||
bits: {
|
||||
touch_start_sound: true,
|
||||
touch_end_sound: true,
|
||||
touch_repeat_sound: true,
|
||||
show_animations: true
|
||||
}
|
||||
};
|
||||
return persistent_flags.value;
|
||||
}
|
||||
|
||||
void UIData::reset_persistent_data() {
|
||||
// Default values for persistent data
|
||||
constexpr flags_t default_flags = {
|
||||
bits: {
|
||||
touch_start_sound: true,
|
||||
touch_end_sound: true,
|
||||
touch_repeat_sound: true,
|
||||
show_animations: true,
|
||||
touch_debouncing: false,
|
||||
ignore_unpress: false
|
||||
}
|
||||
};
|
||||
flags.value = default_flags.value;
|
||||
}
|
||||
|
||||
uint8_t UIData::get_persistent_data() {
|
||||
return flags.value & get_persistent_data_mask();
|
||||
}
|
||||
|
||||
void UIData::set_persistent_data(uint8_t value) {
|
||||
flags.value = value & get_persistent_data_mask();
|
||||
}
|
||||
|
||||
|
||||
void UIData::enable_touch_sounds(bool enabled) {
|
||||
UIData::flags.bits.touch_start_sound = enabled;
|
||||
UIData::flags.bits.touch_end_sound = enabled;
|
||||
UIData::flags.bits.touch_repeat_sound = enabled;
|
||||
}
|
||||
|
||||
bool UIData::touch_sounds_enabled() {
|
||||
return UIData::flags.bits.touch_start_sound || UIData::flags.bits.touch_end_sound || UIData::flags.bits.touch_repeat_sound;
|
||||
}
|
||||
|
||||
void UIData::enable_animations(bool enabled) {
|
||||
UIData::flags.bits.show_animations = enabled;
|
||||
}
|
||||
|
||||
bool UIData::animations_enabled() {
|
||||
return UIData::flags.bits.show_animations;
|
||||
}
|
||||
|
||||
namespace FTDI {
|
||||
uint8_t EventLoop::get_pressed_tag() {
|
||||
return pressed_tag;
|
||||
}
|
||||
|
||||
bool EventLoop::is_touch_held() {
|
||||
return pressed_tag != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* process_events(): Process events from the touch panel.
|
||||
*
|
||||
* This function consists of a state machine that accomplishes the following:
|
||||
*
|
||||
* - Reads the tag register from the touch panel
|
||||
* - Dispatches onTouchStart and onTouchEnd events to the active screen.
|
||||
* - Handles auto-repetition by sending onTouchHeld to the active screen periodically.
|
||||
* - Plays touch feedback "click" sounds when appropriate.
|
||||
* - Performs debouncing to supress spurious touch events.
|
||||
*
|
||||
*/
|
||||
void EventLoop::process_events() {
|
||||
// If the LCD is processing commands, don't check
|
||||
// for tags since they may be changing and could
|
||||
// cause spurious events.
|
||||
if (!touch_timer.elapsed(TOUCH_UPDATE_INTERVAL) || CLCD::CommandFifo::is_processing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const uint8_t tag = CLCD::get_tag();
|
||||
|
||||
switch (pressed_tag) {
|
||||
case UNPRESSED:
|
||||
if (tag != 0) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("Touch start: ", tag);
|
||||
#endif
|
||||
|
||||
pressed_tag = tag;
|
||||
current_screen.onRefresh();
|
||||
|
||||
// When the user taps on a button, activate the onTouchStart handler
|
||||
const uint8_t lastScreen = current_screen.getScreen();
|
||||
|
||||
if (current_screen.onTouchStart(tag)) {
|
||||
touch_timer.start();
|
||||
if (UIData::flags.bits.touch_start_sound) sound.play(press_sound);
|
||||
}
|
||||
|
||||
if (lastScreen != current_screen.getScreen()) {
|
||||
// In the case in which a touch event triggered a new screen to be
|
||||
// drawn, we don't issue a touchEnd since it would be sent to the
|
||||
// wrong screen.
|
||||
UIData::flags.bits.ignore_unpress = true;
|
||||
} else {
|
||||
UIData::flags.bits.ignore_unpress = false;
|
||||
}
|
||||
} else {
|
||||
touch_timer.start();
|
||||
}
|
||||
break;
|
||||
default: // PRESSED
|
||||
if (!UIData::flags.bits.touch_debouncing) {
|
||||
if (tag == pressed_tag) {
|
||||
// The user is holding down a button.
|
||||
if (touch_timer.elapsed(1000 / TOUCH_REPEATS_PER_SECOND) && current_screen.onTouchHeld(tag)) {
|
||||
current_screen.onRefresh();
|
||||
if (UIData::flags.bits.touch_repeat_sound) sound.play(repeat_sound);
|
||||
touch_timer.start();
|
||||
}
|
||||
}
|
||||
else if (tag == 0) {
|
||||
touch_timer.start();
|
||||
UIData::flags.bits.touch_debouncing = true;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// Debouncing...
|
||||
|
||||
if (tag == pressed_tag) {
|
||||
// If while debouncing, we detect a press, then cancel debouncing.
|
||||
UIData::flags.bits.touch_debouncing = false;
|
||||
}
|
||||
|
||||
else if (touch_timer.elapsed(DEBOUNCE_PERIOD)) {
|
||||
UIData::flags.bits.touch_debouncing = false;
|
||||
|
||||
if (UIData::flags.bits.ignore_unpress) {
|
||||
UIData::flags.bits.ignore_unpress = false;
|
||||
pressed_tag = UNPRESSED;
|
||||
break;
|
||||
}
|
||||
|
||||
if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound);
|
||||
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("Touch end: ", tag);
|
||||
#endif
|
||||
|
||||
const uint8_t saved_pressed_tag = pressed_tag;
|
||||
pressed_tag = UNPRESSED;
|
||||
current_screen.onTouchEnd(saved_pressed_tag);
|
||||
current_screen.onRefresh();
|
||||
}
|
||||
}
|
||||
break;
|
||||
} // switch (pressed_tag)
|
||||
|
||||
} // processEvents()
|
||||
|
||||
void EventLoop::setup() {
|
||||
CLCD::init();
|
||||
DLCache::init();
|
||||
UIData::reset_persistent_data();
|
||||
current_screen.start();
|
||||
}
|
||||
|
||||
void EventLoop::loop() {
|
||||
sound.onIdle();
|
||||
|
||||
/**
|
||||
* Guard against re-entry of UI methods, which can
|
||||
* crash. Re-entry can happen because some functions
|
||||
* (e.g. planner.synchronize) call idle().
|
||||
*/
|
||||
if (!UIData::flags.bits.prevent_reentry) {
|
||||
UIData::flags.bits.prevent_reentry = true;
|
||||
current_screen.onIdle();
|
||||
process_events();
|
||||
UIData::flags.bits.prevent_reentry = false;
|
||||
}
|
||||
}
|
||||
} // namespace FTDI
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,74 @@
|
|||
/****************
|
||||
* event_loop.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define STATUS_UPDATE_INTERVAL 1000
|
||||
#define TOUCH_UPDATE_INTERVAL 50
|
||||
#define TOUCH_REPEATS_PER_SECOND 4
|
||||
#define DEBOUNCE_PERIOD 150
|
||||
|
||||
class UIData {
|
||||
private:
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t touch_start_sound : 1;
|
||||
uint8_t touch_end_sound : 1;
|
||||
uint8_t touch_repeat_sound : 1;
|
||||
uint8_t show_animations : 1;
|
||||
uint8_t touch_debouncing : 1;
|
||||
uint8_t ignore_unpress : 1;
|
||||
uint8_t prevent_reentry : 1;
|
||||
} bits;
|
||||
uint8_t value;
|
||||
} flags_t;
|
||||
|
||||
public:
|
||||
static flags_t flags;
|
||||
|
||||
static uint8_t get_persistent_data_mask();
|
||||
static uint8_t get_persistent_data();
|
||||
static void set_persistent_data(uint8_t value);
|
||||
static void reset_persistent_data();
|
||||
|
||||
static void enable_touch_sounds(bool enabled);
|
||||
static bool touch_sounds_enabled();
|
||||
static void enable_animations(bool enabled);
|
||||
static bool animations_enabled();
|
||||
};
|
||||
|
||||
namespace FTDI {
|
||||
class EventLoop {
|
||||
private:
|
||||
static constexpr FTDI::effect_t press_sound = FTDI::CHACK;
|
||||
static constexpr FTDI::effect_t repeat_sound = FTDI::CHACK;
|
||||
static constexpr FTDI::effect_t unpress_sound = FTDI::POP;
|
||||
static void process_events();
|
||||
|
||||
public:
|
||||
static void setup();
|
||||
static void loop();
|
||||
|
||||
static uint8_t get_pressed_tag();
|
||||
static bool is_touch_held();
|
||||
};
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
/*******************
|
||||
* ftdi_extended.h *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2019 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 201( - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../compat.h"
|
||||
#include "../basic/ftdi_basic.h"
|
||||
|
||||
#if !defined(__MARLIN_FIRMWARE__)
|
||||
#define FTDI_EXTENDED
|
||||
#endif
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
#include "rgb_t.h"
|
||||
#include "bitmap_info.h"
|
||||
#include "tiny_timer.h"
|
||||
#include "grid_layout.h"
|
||||
#include "dl_cache.h"
|
||||
#include "screen_types.h"
|
||||
#include "event_loop.h"
|
||||
#include "command_processor.h"
|
||||
#include "sound_player.h"
|
||||
#include "sound_list.h"
|
||||
#include "polygon.h"
|
||||
#include "text_box.h"
|
||||
#endif
|
|
@ -0,0 +1,98 @@
|
|||
/*****************
|
||||
* grid_layout.h *
|
||||
*****************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* The grid layout macros allow buttons to be arranged on a grid so
|
||||
* that their locations become independent of the display size. The
|
||||
* layout model is similar to that of HTML TABLEs.
|
||||
*
|
||||
* These macros are meant to be evaluated into constants at compile
|
||||
* time, so resolution independence can be as efficient as using
|
||||
* hard-coded coordinates.
|
||||
*/
|
||||
|
||||
// Margin defines the margin (in pixels) on each side of a button in
|
||||
// the layout
|
||||
|
||||
#ifdef TOUCH_UI_800x480
|
||||
#define MARGIN_L 5
|
||||
#define MARGIN_R 5
|
||||
#define MARGIN_T 5
|
||||
#define MARGIN_B 5
|
||||
#define MARGIN_DEFAULT 5
|
||||
#else
|
||||
#define MARGIN_L 3
|
||||
#define MARGIN_R 3
|
||||
#define MARGIN_T 3
|
||||
#define MARGIN_B 3
|
||||
#define MARGIN_DEFAULT 3
|
||||
#endif
|
||||
|
||||
// EDGE_R adds some black space on the right edge of the display
|
||||
// This shifts some of the screens left to visually center them.
|
||||
|
||||
#define EDGE_R 0
|
||||
|
||||
// GRID_X and GRID_Y computes the positions of the divisions on
|
||||
// the layout grid.
|
||||
#define GRID_X(x) ((x)*(FTDI::display_width-EDGE_R)/GRID_COLS)
|
||||
#define GRID_Y(y) ((y)*FTDI::display_height/GRID_ROWS)
|
||||
|
||||
// BTN_X, BTN_Y, BTN_W and BTN_X returns the top-left and width
|
||||
// and height of a button, taking into account the button margins.
|
||||
|
||||
#define BTN_X(x) (GRID_X((x)-1) + MARGIN_L)
|
||||
#define BTN_Y(y) (GRID_Y((y)-1) + MARGIN_T)
|
||||
#define BTN_W(w) (GRID_X(w) - MARGIN_L - MARGIN_R)
|
||||
#define BTN_H(h) (GRID_Y(h) - MARGIN_T - MARGIN_B)
|
||||
|
||||
// Abbreviations for common phrases, to allow a button to be
|
||||
// defined in one line of source.
|
||||
#define BTN_POS(x,y) BTN_X(x), BTN_Y(y)
|
||||
#define BTN_SIZE(w,h) BTN_W(w), BTN_H(h)
|
||||
|
||||
// Draw a reference grid for ease of spacing out widgets.
|
||||
#define DRAW_LAYOUT_GRID \
|
||||
{ \
|
||||
cmd.cmd(LINE_WIDTH(4)); \
|
||||
for(int i = 1; i <= GRID_COLS; i++) { \
|
||||
cmd.cmd(BEGIN(LINES)); \
|
||||
cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \
|
||||
cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \
|
||||
} \
|
||||
for(int i = 1; i < GRID_ROWS; i++) { \
|
||||
cmd.cmd(BEGIN(LINES)); \
|
||||
cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \
|
||||
cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \
|
||||
} \
|
||||
cmd.cmd(LINE_WIDTH(16)); \
|
||||
}
|
||||
|
||||
namespace FTDI {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr uint16_t display_width = Vsize;
|
||||
constexpr uint16_t display_height = Hsize;
|
||||
#else
|
||||
constexpr uint16_t display_width = Hsize;
|
||||
constexpr uint16_t display_height = Vsize;
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
/*************
|
||||
* polygon.h *
|
||||
*************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* The Polygon class helps drawing filled or stroked polygons on the FTDI EVE:
|
||||
*
|
||||
* CommandProcessor cmd;
|
||||
* cmd.cmd(COLOR_RGB(0x00FF00));
|
||||
*
|
||||
* Polygon p(cmd);
|
||||
* p.begin_fill();
|
||||
* p.begin_loop();
|
||||
* p(10,10);
|
||||
* p(20,10);
|
||||
* p(20,20);
|
||||
* p(10,20);
|
||||
* p.end_loop();
|
||||
* p.begin_loop();
|
||||
* ... // Additional closed paths
|
||||
* p.end_loop();
|
||||
* ...
|
||||
* p.end_fill();
|
||||
*
|
||||
* Based on the example from "Applicaton Note AN_334, FT801 Polygon Application":
|
||||
*
|
||||
* https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf
|
||||
*/
|
||||
|
||||
namespace FTDI {
|
||||
class Polygon {
|
||||
private:
|
||||
FTDI::begin_t path_initiator = FTDI::LINE_STRIP;
|
||||
|
||||
public:
|
||||
CommandProcessor &cmd;
|
||||
|
||||
Polygon(CommandProcessor &c) : cmd(c) {}
|
||||
|
||||
void begin_fill() {
|
||||
using namespace FTDI;
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(TAG_MASK(0));
|
||||
cmd.cmd(CLEAR(0,1,0));
|
||||
cmd.cmd(COLOR_MASK(0,0,0,0));
|
||||
cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT));
|
||||
cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255));
|
||||
// Drawing the edge strip along scan lines
|
||||
// seems to yield the best performance
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
path_initiator = EDGE_STRIP_B;
|
||||
#else
|
||||
path_initiator = EDGE_STRIP_R;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Specify a clipping rectangle to paint fewer pixels and reduce rendering time, otherwise all pixels will be painted.
|
||||
void end_fill(const int16_t x1 = 0, const int16_t y1 = 0, const int16_t x2 = display_width * 16, const int16_t y2 = display_height * 16) {
|
||||
using namespace FTDI;
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255));
|
||||
cmd.cmd(BEGIN(RECTS));
|
||||
cmd.cmd(VERTEX2F(x1, y1));
|
||||
cmd.cmd(VERTEX2F(x2, y2));
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
||||
|
||||
void begin_stroke() {path_initiator = FTDI::LINE_STRIP;}
|
||||
void begin_loop() {cmd.cmd(FTDI::BEGIN(path_initiator));}
|
||||
void end_stroke() {}
|
||||
void end_loop() {}
|
||||
|
||||
void operator()(const uint16_t x, const uint16_t y) {cmd.cmd(FTDI::VERTEX2F(x, y));}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/***********
|
||||
* rgb_t.h *
|
||||
***********/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
struct rgb_t {
|
||||
union {
|
||||
struct {
|
||||
uint8_t b,g,r,a;
|
||||
};
|
||||
uint32_t packed;
|
||||
};
|
||||
|
||||
rgb_t() : packed(0) {}
|
||||
rgb_t(uint32_t rgb) : packed(rgb) {}
|
||||
rgb_t(uint8_t r, uint8_t g, uint8_t b) : b(b), g(g), r(r), a(0) {}
|
||||
operator uint32_t() const {return packed;};
|
||||
|
||||
static void lerp(float t, const rgb_t a, const rgb_t b, rgb_t &c) {
|
||||
c.r = a.r + t * (b.r - a.r);
|
||||
c.g = a.g + t * (b.g - a.g);
|
||||
c.b = a.b + t * (b.b - a.b);
|
||||
}
|
||||
|
||||
uint8_t luminance() const {return 0.299*r + 0.587*g + 0.114*b;}
|
||||
};
|
|
@ -0,0 +1,106 @@
|
|||
/******************
|
||||
* screen_types.h *
|
||||
******************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
/********************** VIRTUAL DISPATCH DATA TYPE ******************************/
|
||||
|
||||
uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
|
||||
for(uint8_t type = 0; type < functionTableSize; type++) {
|
||||
if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Screen not found: ", (uintptr_t) onRedraw_ptr);
|
||||
#endif
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
|
||||
uint8_t type = lookupScreen(onRedraw_ptr);
|
||||
if (type != 0xFF) {
|
||||
setType(type);
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("New screen: ", type);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenRef::initializeAll() {
|
||||
for(uint8_t type = 0; type < functionTableSize; type++) {
|
||||
GET_METHOD(type, onStartup)();
|
||||
}
|
||||
}
|
||||
|
||||
/********************** SCREEN STACK ******************************/
|
||||
|
||||
void ScreenStack::start() {
|
||||
initializeAll();
|
||||
onEntry();
|
||||
}
|
||||
|
||||
void ScreenStack::push(onRedraw_func_t onRedraw_ptr) {
|
||||
stack[3] = stack[2];
|
||||
stack[2] = stack[1];
|
||||
stack[1] = stack[0];
|
||||
stack[0] = lookupScreen(onRedraw_ptr);
|
||||
}
|
||||
|
||||
void ScreenStack::push() {
|
||||
stack[3] = stack[2];
|
||||
stack[2] = stack[1];
|
||||
stack[1] = stack[0];
|
||||
stack[0] = getType();
|
||||
}
|
||||
|
||||
void ScreenStack::pop() {
|
||||
setType(stack[0]);
|
||||
forget();
|
||||
}
|
||||
|
||||
void ScreenStack::forget() {
|
||||
stack[0] = stack[1];
|
||||
stack[1] = stack[2];
|
||||
stack[2] = stack[3];
|
||||
stack[3] = 0;
|
||||
}
|
||||
|
||||
void ScreenStack::goTo(onRedraw_func_t s) {
|
||||
push();
|
||||
onExit();
|
||||
setScreen(s);
|
||||
onEntry();
|
||||
}
|
||||
|
||||
void ScreenStack::goBack() {
|
||||
onExit();
|
||||
pop();
|
||||
onEntry();
|
||||
}
|
||||
|
||||
ScreenStack current_screen;
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,215 @@
|
|||
/********************
|
||||
* screen_types.cpp *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
typedef enum {
|
||||
BACKGROUND = 1,
|
||||
FOREGROUND = 2,
|
||||
BOTH = 3
|
||||
} draw_mode_t;
|
||||
|
||||
/********************** VIRTUAL DISPATCH DATA TYPE ******************************/
|
||||
|
||||
// True virtual classes are extremely expensive on the Arduino
|
||||
// as the compiler stores the virtual function tables in RAM.
|
||||
// We invent a data type called ScreenRef that gives us
|
||||
// polymorphism by mapping an ID to virtual methods on various
|
||||
// classes. This works by keeping a table in PROGMEM of pointers
|
||||
// to static methods.
|
||||
|
||||
#define DECL_SCREEN(className) { \
|
||||
className::onStartup, \
|
||||
className::onEntry, \
|
||||
className::onExit, \
|
||||
className::onIdle, \
|
||||
className::onRefresh, \
|
||||
className::onRedraw, \
|
||||
className::onTouchStart, \
|
||||
className::onTouchHeld, \
|
||||
className::onTouchEnd \
|
||||
}
|
||||
|
||||
#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]);
|
||||
|
||||
class ScreenRef {
|
||||
protected:
|
||||
typedef void onStartup_func_t(void);
|
||||
typedef void onEntry_func_t(void);
|
||||
typedef void onExit_func_t(void);
|
||||
typedef void onIdle_func_t(void);
|
||||
typedef void onRefresh_func_t(void);
|
||||
typedef void onRedraw_func_t(draw_mode_t);
|
||||
typedef bool onTouchStart_func_t(uint8_t);
|
||||
typedef bool onTouchHeld_func_t(uint8_t);
|
||||
typedef bool onTouchEnd_func_t(uint8_t);
|
||||
|
||||
private:
|
||||
typedef struct {
|
||||
onStartup_func_t *onStartup_ptr;
|
||||
onEntry_func_t *onEntry_ptr;
|
||||
onExit_func_t *onExit_ptr;
|
||||
onIdle_func_t *onIdle_ptr;
|
||||
onRefresh_func_t *onRefresh_ptr;
|
||||
onRedraw_func_t *onRedraw_ptr;
|
||||
onTouchStart_func_t *onTouchStart_ptr;
|
||||
onTouchHeld_func_t *onTouchHeld_ptr;
|
||||
onTouchEnd_func_t *onTouchEnd_ptr;
|
||||
} table_t;
|
||||
|
||||
uint8_t type = 0;
|
||||
static PROGMEM const table_t functionTable[];
|
||||
static const uint8_t functionTableSize;
|
||||
|
||||
public:
|
||||
uint8_t getType() {return type;}
|
||||
|
||||
void setType(uint8_t t) {
|
||||
type = t;
|
||||
}
|
||||
|
||||
uint8_t lookupScreen(onRedraw_func_t onRedraw_ptr);
|
||||
|
||||
void setScreen(onRedraw_func_t onRedraw_ptr);
|
||||
|
||||
void onStartup() {GET_METHOD(type, onStartup)();}
|
||||
void onEntry() {GET_METHOD(type, onEntry)();}
|
||||
void onExit() {GET_METHOD(type, onExit)();}
|
||||
void onIdle() {GET_METHOD(type, onIdle)();}
|
||||
void onRefresh() {GET_METHOD(type, onRefresh)();}
|
||||
void onRedraw(draw_mode_t dm) {GET_METHOD(type, onRedraw)(dm);}
|
||||
bool onTouchStart(uint8_t tag) {return GET_METHOD(type, onTouchStart)(tag);}
|
||||
bool onTouchHeld(uint8_t tag) {return GET_METHOD(type, onTouchHeld)(tag);}
|
||||
bool onTouchEnd(uint8_t tag) {return GET_METHOD(type, onTouchEnd)(tag);}
|
||||
|
||||
void initializeAll();
|
||||
};
|
||||
|
||||
/********************** SCREEN STACK ******************************/
|
||||
|
||||
// To conserve dynamic memory, the screen stack is hard-coded to
|
||||
// have four values, allowing a menu of up to four levels.
|
||||
|
||||
class ScreenStack : public ScreenRef {
|
||||
private:
|
||||
uint8_t stack[4];
|
||||
|
||||
public:
|
||||
void start();
|
||||
void push(onRedraw_func_t);
|
||||
void push();
|
||||
void pop();
|
||||
void forget();
|
||||
void goTo(onRedraw_func_t);
|
||||
void goBack();
|
||||
|
||||
uint8_t peek() {return stack[0];}
|
||||
uint8_t getScreen() {return getType();}
|
||||
};
|
||||
|
||||
extern ScreenStack current_screen;
|
||||
|
||||
/********************** BASE SCREEN CLASS ******************************/
|
||||
|
||||
/* UIScreen is the base class for all user interface screens.
|
||||
*/
|
||||
class UIScreen {
|
||||
public:
|
||||
static void onStartup() {}
|
||||
static void onEntry() {current_screen.onRefresh();}
|
||||
static void onExit() {}
|
||||
static void onIdle() {}
|
||||
static bool onTouchStart(uint8_t) {return true;}
|
||||
static bool onTouchHeld(uint8_t) {return false;}
|
||||
static bool onTouchEnd(uint8_t) {return true;}
|
||||
};
|
||||
|
||||
#define PUSH_SCREEN(screen) current_screen.push(screen::onRedraw);
|
||||
#define GOTO_SCREEN(screen) current_screen.goTo(screen::onRedraw);
|
||||
#define GOTO_PREVIOUS() current_screen.goBack();
|
||||
#define AT_SCREEN(screen) (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw))
|
||||
#define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw))
|
||||
|
||||
/************************** CACHED VS UNCHACHED SCREENS ***************************/
|
||||
|
||||
class UncachedScreen {
|
||||
public:
|
||||
static void onRefresh() {
|
||||
using namespace FTDI;
|
||||
CLCD::CommandFifo cmd;
|
||||
cmd.cmd(CMD_DLSTART);
|
||||
|
||||
current_screen.onRedraw(BOTH);
|
||||
|
||||
cmd.cmd(DL::DL_DISPLAY);
|
||||
cmd.cmd(CMD_SWAP);
|
||||
cmd.execute();
|
||||
}
|
||||
};
|
||||
|
||||
template<uint8_t DL_SLOT,uint32_t DL_SIZE = 0>
|
||||
class CachedScreen {
|
||||
protected:
|
||||
static bool storeBackground(){
|
||||
DLCache dlcache(DL_SLOT);
|
||||
if (!dlcache.store(DL_SIZE)) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("CachedScreen::storeBackground() failed: not enough DL cache space");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void repaintBackground(){
|
||||
using namespace FTDI;
|
||||
DLCache dlcache(DL_SLOT);
|
||||
CLCD::CommandFifo cmd;
|
||||
|
||||
cmd.cmd(CMD_DLSTART);
|
||||
current_screen.onRedraw(BACKGROUND);
|
||||
|
||||
dlcache.store(DL_SIZE);
|
||||
}
|
||||
|
||||
public:
|
||||
static void onRefresh(){
|
||||
using namespace FTDI;
|
||||
DLCache dlcache(DL_SLOT);
|
||||
CLCD::CommandFifo cmd;
|
||||
|
||||
cmd.cmd(CMD_DLSTART);
|
||||
|
||||
if (dlcache.has_data()) {
|
||||
dlcache.append();
|
||||
} else {
|
||||
current_screen.onRedraw(BACKGROUND);
|
||||
dlcache.store(DL_SIZE);
|
||||
}
|
||||
|
||||
current_screen.onRedraw(FOREGROUND);
|
||||
|
||||
cmd.cmd(DL::DL_DISPLAY);
|
||||
cmd.cmd(CMD_SWAP);
|
||||
cmd.execute();
|
||||
}
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
/****************
|
||||
* sound_list.h *
|
||||
****************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
class SoundList {
|
||||
private:
|
||||
static PROGMEM const struct list_t {
|
||||
const char *const PROGMEM name;
|
||||
const FTDI::SoundPlayer::sound_t* data;
|
||||
} list[];
|
||||
public:
|
||||
static const uint8_t n;
|
||||
static inline const char* name(uint8_t val) {
|
||||
return (const char* ) pgm_read_ptr_near(&list[val].name);
|
||||
}
|
||||
static inline FTDI::SoundPlayer::sound_t* data(uint8_t val) {
|
||||
return (FTDI::SoundPlayer::sound_t*) pgm_read_ptr_near(&list[val].data);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,111 @@
|
|||
/********************
|
||||
* sound_player.cpp *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
namespace FTDI {
|
||||
SoundPlayer sound; // Global sound player object
|
||||
|
||||
void SoundPlayer::set_volume(uint8_t vol) {
|
||||
CLCD::mem_write_8(REG::VOL_SOUND, vol);
|
||||
}
|
||||
|
||||
uint8_t SoundPlayer::get_volume() {
|
||||
return CLCD::mem_read_8(REG::VOL_SOUND);
|
||||
}
|
||||
|
||||
void SoundPlayer::play(effect_t effect, note_t note) {
|
||||
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR("Playing note ", note);
|
||||
SERIAL_ECHOLNPAIR(", instrument ", effect);
|
||||
#endif
|
||||
|
||||
// Play the note
|
||||
CLCD::mem_write_16(REG::SOUND, (note == REST) ? 0 : (((note ? note : NOTE_C4) << 8) | effect));
|
||||
CLCD::mem_write_8(REG::PLAY, 1);
|
||||
}
|
||||
|
||||
note_t SoundPlayer::frequency_to_midi_note(const uint16_t frequency_hz) {
|
||||
const float f0 = 440;
|
||||
return note_t(NOTE_A4 + (log(frequency_hz)-log(f0))*12/log(2) + 0.5);
|
||||
}
|
||||
|
||||
// Plays a tone of a given frequency and duration. Since the FTDI FT810 only
|
||||
// supports MIDI notes, we round down to the nearest note.
|
||||
|
||||
void SoundPlayer::play_tone(const uint16_t frequency_hz, const uint16_t duration_ms) {
|
||||
play(ORGAN, frequency_to_midi_note(frequency_hz));
|
||||
|
||||
// Schedule silence to squelch the note after the duration expires.
|
||||
sequence = silence;
|
||||
wait = duration_ms;
|
||||
timer.start();
|
||||
}
|
||||
|
||||
void SoundPlayer::play(const sound_t* seq, play_mode_t mode) {
|
||||
sequence = seq;
|
||||
wait = 250; // Adding this delay causes the note to not be clipped, not sure why.
|
||||
timer.start();
|
||||
|
||||
if (mode == PLAY_ASYNCHRONOUS) return;
|
||||
|
||||
// If playing synchronously, then play all the notes here
|
||||
|
||||
while (has_more_notes()) {
|
||||
onIdle();
|
||||
#ifdef EXTENSIBLE_UI
|
||||
ExtUI::yield();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool SoundPlayer::is_sound_playing() {
|
||||
return CLCD::mem_read_8( REG::PLAY ) & 0x1;
|
||||
}
|
||||
|
||||
void SoundPlayer::onIdle() {
|
||||
if (!sequence) return;
|
||||
|
||||
const bool ready_for_next_note = (wait == 0) ? !is_sound_playing() : timer.elapsed(wait);
|
||||
|
||||
if (ready_for_next_note) {
|
||||
const effect_t fx = effect_t(pgm_read_byte(&sequence->effect));
|
||||
const note_t nt = note_t(pgm_read_byte(&sequence->note));
|
||||
const uint32_t ms = uint32_t(pgm_read_byte(&sequence->sixteenths)) * 1000 / 16;
|
||||
|
||||
if (ms == 0 && fx == SILENCE && nt == END_SONG) {
|
||||
sequence = 0;
|
||||
play(SILENCE, REST);
|
||||
} else {
|
||||
wait = ms;
|
||||
timer.start();
|
||||
play(fx, nt);
|
||||
sequence++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace FTDI
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,70 @@
|
|||
/******************
|
||||
* sound_player.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace FTDI {
|
||||
typedef enum {
|
||||
PLAY_ASYNCHRONOUS,
|
||||
PLAY_SYNCHRONOUS
|
||||
} play_mode_t;
|
||||
|
||||
class SoundPlayer {
|
||||
typedef FTDI::ftdi_registers REG;
|
||||
typedef FTDI::ftdi_memory_map MAP;
|
||||
|
||||
public:
|
||||
struct sound_t {
|
||||
effect_t effect; // The sound effect number
|
||||
note_t note; // The MIDI note value
|
||||
uint16_t sixteenths; // Duration of note, in sixteeths of a second, or zero to play to completion
|
||||
};
|
||||
|
||||
const uint8_t WAIT = 0;
|
||||
|
||||
private:
|
||||
const sound_t *sequence;
|
||||
tiny_timer_t timer;
|
||||
tiny_time_t wait;
|
||||
|
||||
note_t frequency_to_midi_note(const uint16_t frequency);
|
||||
|
||||
public:
|
||||
static void set_volume(uint8_t volume);
|
||||
static uint8_t get_volume();
|
||||
|
||||
static void play(effect_t effect, note_t note = NOTE_C4);
|
||||
static bool is_sound_playing();
|
||||
|
||||
void play(const sound_t* seq, play_mode_t mode = PLAY_SYNCHRONOUS);
|
||||
void play_tone(const uint16_t frequency_hz, const uint16_t duration_ms);
|
||||
bool has_more_notes() {return sequence != 0;};
|
||||
|
||||
void onIdle();
|
||||
};
|
||||
|
||||
extern SoundPlayer sound;
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t silence[] = {
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/****************
|
||||
* text_box.cpp *
|
||||
****************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
namespace FTDI {
|
||||
/**
|
||||
* Given a str, end will be set to the position at which a line needs to
|
||||
* be broken so that the display width is less than w. The line will also
|
||||
* be broken after a '\n'. Returns the display width of the line.
|
||||
*/
|
||||
static uint16_t find_line_break(const CLCD::FontMetrics &fm, uint16_t w, const char *str, const char *&end) {
|
||||
const char *p = str;
|
||||
end = str + strlen(str);
|
||||
uint16_t width = fm.get_text_width(str);
|
||||
for(;;) {
|
||||
// Find next tentative line break.
|
||||
char delim = *(p);
|
||||
while (delim && delim != ' ' && delim != '\n') {
|
||||
delim = *(++p);
|
||||
}
|
||||
// Check to see whether to break the line.
|
||||
const uint16_t margin = fm.get_text_width(" ");
|
||||
const uint16_t lw = p > str ? fm.get_text_width(str, p - str) + margin : 0;
|
||||
if (lw < w) {
|
||||
width = lw;
|
||||
switch (delim) {
|
||||
case '\0':
|
||||
end = p;
|
||||
break;
|
||||
case '\n':
|
||||
end = ++p;
|
||||
break;
|
||||
case ' ':
|
||||
end = ++p;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function returns a measurements of the word-wrapped text box.
|
||||
*/
|
||||
static void measure_text_box(const CLCD::FontMetrics &fm, const char *str, uint16_t &width, uint16_t &height) {
|
||||
const char *line_start = (const char*)str;
|
||||
const char *line_end;
|
||||
const uint16_t wrap_width = width;
|
||||
width = height = 0;
|
||||
for(;;) {
|
||||
uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
|
||||
if (line_end == line_start) break;
|
||||
width = max(width, line_width);
|
||||
height += fm.height;
|
||||
line_start = line_end;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit.
|
||||
*/
|
||||
void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options, uint8_t font) {
|
||||
CLCD::FontMetrics fm(font);
|
||||
|
||||
uint16_t box_width, box_height;
|
||||
|
||||
for(;;) {
|
||||
box_width = w;
|
||||
measure_text_box(fm, str, box_width, box_height);
|
||||
if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
|
||||
fm.load(--font);
|
||||
if (font == 26) break;
|
||||
}
|
||||
|
||||
const uint16_t dx = (options & OPT_RIGHTX) ? w : (options & OPT_CENTERX) ? w/2 : 0;
|
||||
const uint16_t dy = (options & OPT_CENTERY) ? (h - box_height)/2 : 0;
|
||||
|
||||
const char *line_start = str;
|
||||
const char *line_end;
|
||||
for(;;) {
|
||||
find_line_break(fm, w, line_start, line_end);
|
||||
if (line_end == line_start) break;
|
||||
|
||||
const size_t line_len = line_end - line_start;
|
||||
if (line_len) {
|
||||
char line[line_len + 1];
|
||||
strncpy(line, line_start, line_len);
|
||||
line[line_len] = 0;
|
||||
if (line[line_len - 1] == '\n' || line[line_len - 1] == ' ')
|
||||
line[line_len - 1] = 0;
|
||||
|
||||
cmd.CLCD::CommandFifo::text(x + dx, y + dy, font, options & ~OPT_CENTERY);
|
||||
cmd.CLCD::CommandFifo::str(line);
|
||||
}
|
||||
y += fm.height;
|
||||
|
||||
line_start = line_end;
|
||||
}
|
||||
}
|
||||
|
||||
void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) {
|
||||
char str[strlen_P((const char*)pstr) + 1];
|
||||
strcpy_P(str, (const char*)pstr);
|
||||
draw_text_box(cmd, x, y, w, h, (const char*) str, options, font);
|
||||
}
|
||||
} // namespace FTDI
|
||||
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,30 @@
|
|||
/**************
|
||||
* text_box.h *
|
||||
**************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit.
|
||||
*/
|
||||
namespace FTDI {
|
||||
void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31);
|
||||
void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31);
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/******************
|
||||
* tiny_timer.cpp *
|
||||
******************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "ftdi_extended.h"
|
||||
|
||||
#ifdef FTDI_EXTENDED
|
||||
|
||||
bool tiny_timer_t::elapsed(tiny_time_t duration) {
|
||||
uint8_t now = tiny_time_t::tiny_time(
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
ExtUI::safe_millis()
|
||||
#else
|
||||
millis()
|
||||
#endif
|
||||
);
|
||||
uint8_t elapsed = now - _start;
|
||||
if (elapsed >= duration._duration) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void tiny_timer_t::start() {
|
||||
_start = tiny_time_t::tiny_time(
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
ExtUI::safe_millis()
|
||||
#else
|
||||
millis()
|
||||
#endif
|
||||
);
|
||||
}
|
||||
#endif // FTDI_EXTENDED
|
|
@ -0,0 +1,56 @@
|
|||
/****************
|
||||
* tiny_timer.h *
|
||||
****************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Helpful Reference:
|
||||
*
|
||||
* https://arduino.stackexchange.com/questions/12587/how-can-i-handle-the-millis-rollover
|
||||
*/
|
||||
|
||||
/* tiny_interval_t downsamples a 32-bit millis() value
|
||||
into a 8-bit value which can record periods of
|
||||
a few seconds with a rougly 1/16th of second
|
||||
resolution. This allows us to measure small
|
||||
intervals without needing to use four-byte counters.
|
||||
*/
|
||||
class tiny_time_t {
|
||||
private:
|
||||
friend class tiny_timer_t;
|
||||
uint8_t _duration;
|
||||
|
||||
static uint8_t tiny_time(uint32_t ms) {return ceil(float(ms) / 64);};
|
||||
|
||||
public:
|
||||
tiny_time_t() : _duration(0) {}
|
||||
tiny_time_t(uint32_t ms) : _duration(tiny_time(ms)) {}
|
||||
tiny_time_t & operator= (uint32_t ms) {_duration = tiny_time(ms); return *this;}
|
||||
bool operator == (uint32_t ms) {return _duration == tiny_time(ms);}
|
||||
};
|
||||
|
||||
class tiny_timer_t {
|
||||
private:
|
||||
uint8_t _start;
|
||||
|
||||
public:
|
||||
void start();
|
||||
bool elapsed(tiny_time_t interval);
|
||||
};
|
|
@ -0,0 +1,100 @@
|
|||
/***********************
|
||||
* circular_progress.h *
|
||||
***********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* This function draws a circular progress "ring" */
|
||||
|
||||
void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, uint8_t percent, uint32_t bgcolor, uint32_t fgcolor, float rim = 0.3) {
|
||||
using namespace FTDI;
|
||||
|
||||
const float a = float(percent)/100.0*2.0*PI;
|
||||
const float a1 = min(PI/2, a);
|
||||
const float a2 = min(PI/2, a-a1);
|
||||
const float a3 = min(PI/2, a-a1-a2);
|
||||
const float a4 = min(PI/2, a-a1-a2-a3);
|
||||
|
||||
const int ro = min(w,h) * 8;
|
||||
const int rr = ro * rim;
|
||||
const int cx = x * 16 + w * 8;
|
||||
const int cy = y * 16 + h * 8;
|
||||
|
||||
// Load a rim shape into stencil buffer
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(TAG_MASK(0));
|
||||
cmd.cmd(CLEAR(0,1,0));
|
||||
cmd.cmd(COLOR_MASK(0,0,0,0));
|
||||
cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT));
|
||||
cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255));
|
||||
cmd.cmd(BEGIN(POINTS));
|
||||
cmd.cmd(POINT_SIZE(ro));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(POINT_SIZE(ro - rr));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
|
||||
// Mask further drawing by stencil buffer
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255));
|
||||
|
||||
// Fill the background
|
||||
cmd.cmd(COLOR_RGB(bgcolor));
|
||||
cmd.cmd(BEGIN(POINTS));
|
||||
cmd.cmd(POINT_SIZE(ro));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(COLOR_RGB(fgcolor));
|
||||
|
||||
// Paint upper-right quadrant
|
||||
cmd.cmd(BEGIN(EDGE_STRIP_A));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8));
|
||||
|
||||
// Paint lower-right quadrant
|
||||
if (a > PI/2) {
|
||||
cmd.cmd(BEGIN(EDGE_STRIP_R));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16));
|
||||
}
|
||||
|
||||
// Paint lower-left quadrant
|
||||
if (a > PI) {
|
||||
cmd.cmd(BEGIN(EDGE_STRIP_B));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3)));
|
||||
}
|
||||
|
||||
// Paint upper-left quadrant
|
||||
if (a > 1.5*PI) {
|
||||
cmd.cmd(BEGIN(EDGE_STRIP_L));
|
||||
cmd.cmd(VERTEX2F(cx, cy));
|
||||
cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4)));
|
||||
}
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
|
||||
// Draw the text
|
||||
char str[5];
|
||||
sprintf(str,"%d\%%",percent);
|
||||
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(COLOR_RGB(fgcolor));
|
||||
cmd.text(x,y,w,h,str, OPT_CENTERX | OPT_CENTERY);
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
|
@ -0,0 +1,395 @@
|
|||
/*************
|
||||
* poly_ui.h *
|
||||
*************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* The PolyReader class iterates over an array of (x,y) pairs.
|
||||
* For supporting polygons with holes an end-of-loop marker may
|
||||
* be embedded into the data stream:
|
||||
*
|
||||
* const PROGMEM uint16_t data[] = {
|
||||
* x, y, x, y, ..., eol,
|
||||
* ...
|
||||
* x, y, x, y, ..., eol
|
||||
* }
|
||||
*
|
||||
* The PolyReader object can be used to iterate over the points.
|
||||
*
|
||||
* PolyReader r(data, N_ELEMENTS(data));
|
||||
*
|
||||
* for(r.start();r.has_more(); r.next()) {
|
||||
* uint16_t x = r.x;
|
||||
* uint16_t y = r.y;
|
||||
*
|
||||
* // Do something with the point
|
||||
* ...
|
||||
*
|
||||
* // Do something else if this point
|
||||
* // closes a loop.
|
||||
* if (r.end_of_loop()) {
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
class PolyReader {
|
||||
private:
|
||||
typedef uint16_t type_t;
|
||||
|
||||
static constexpr type_t eol = 0xFFFF;
|
||||
|
||||
const type_t *p, *top, *end;
|
||||
type_t start_x, start_y;
|
||||
|
||||
void close_loop() {
|
||||
x = start_x;
|
||||
y = start_y;
|
||||
start_x = eol;
|
||||
start_y = eol;
|
||||
}
|
||||
|
||||
public:
|
||||
type_t x, y;
|
||||
|
||||
// Begin reading a polygon data structure
|
||||
PolyReader(const uint16_t data[], const size_t n_elements) : top(data), end(data + n_elements) {
|
||||
start();
|
||||
}
|
||||
|
||||
void start() {
|
||||
p = top;
|
||||
start_x = eol;
|
||||
next();
|
||||
}
|
||||
|
||||
// Reads the next point in the polygon data structure
|
||||
void next() {
|
||||
if (!p) return;
|
||||
|
||||
if (p == end) {
|
||||
if (start_x != eol)
|
||||
close_loop();
|
||||
else
|
||||
p = NULL;
|
||||
} else {
|
||||
x = pgm_read_word_far(p++);
|
||||
if (x == eol)
|
||||
close_loop();
|
||||
else {
|
||||
y = pgm_read_word_far(p++);
|
||||
if (start_x == eol) {
|
||||
start_x = x;
|
||||
start_y = y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool has_more() {return p != NULL;}
|
||||
bool end_of_loop() {return start_x == eol;}
|
||||
};
|
||||
|
||||
/**
|
||||
* The TransformedPolyReader class works like the PolyReader,
|
||||
* but the (x,y) input is assumed to be normalized onto a
|
||||
* unit square and then mapped to the full 16-bits, i.e.
|
||||
* (0.0,1.0) => (0x0000,0xFFFE). This class will scale the
|
||||
* data to fit the entire display, a bounding box, or apply
|
||||
* some arbitrary affine transform.
|
||||
*
|
||||
* This class is suitable for reading data from "svg2cpp.py"
|
||||
*/
|
||||
class TransformedPolyReader : public PolyReader {
|
||||
private:
|
||||
/**
|
||||
* Fixed point type for fast transformations, supports
|
||||
* values from 0 to 1024, with 1/32 precision.
|
||||
*/
|
||||
static constexpr uint8_t fract_bits = 5;
|
||||
typedef int16_t fix_t;
|
||||
fix_t makefix(float f) {return f * (1 << fract_bits);}
|
||||
|
||||
// First two rows of 3x3 transformation matrix
|
||||
fix_t a, b, c;
|
||||
fix_t d, e, f;
|
||||
|
||||
void transform() {
|
||||
/**
|
||||
* Values from PolyReader vary from 0 to FFFE.
|
||||
* As an approximation to dividing by FFFE,
|
||||
* we perform a bit shift right by 16.
|
||||
*/
|
||||
const int32_t px = PolyReader::x;
|
||||
const int32_t py = PolyReader::y;
|
||||
const int32_t round = 1 << (fract_bits-1);
|
||||
x = (((((a * px) + (b * py)) >> 16) + c) + round) >> fract_bits;
|
||||
y = (((((d * px) + (e * py)) >> 16) + f) + round) >> fract_bits;
|
||||
}
|
||||
|
||||
void set_transform(
|
||||
fix_t A, fix_t B, fix_t C,
|
||||
fix_t D, fix_t E, fix_t F
|
||||
) {
|
||||
a = A; b = B; c = C;
|
||||
d = D; e = E; f = F;
|
||||
}
|
||||
|
||||
public:
|
||||
typedef int16_t type_t;
|
||||
|
||||
type_t x, y;
|
||||
|
||||
TransformedPolyReader(const uint16_t data[], const size_t n) : PolyReader(data, n) {
|
||||
scale_to_fit();
|
||||
transform();
|
||||
}
|
||||
|
||||
// Set an arbitrary affine transform
|
||||
void set_transform(
|
||||
float A, float B, float C,
|
||||
float D, float E, float F
|
||||
) {
|
||||
set_transform(
|
||||
makefix(A), makefix(B), makefix(C),
|
||||
makefix(D), makefix(E), makefix(F)
|
||||
);
|
||||
}
|
||||
|
||||
// Scale the data to fit a specified bounding box
|
||||
void scale_to_fit(type_t x_min, type_t y_min, type_t x_max, type_t y_max) {
|
||||
fix_t sx = makefix(x_max - x_min);
|
||||
fix_t sy = makefix(y_max - y_min);
|
||||
fix_t tx = makefix(x_min);
|
||||
fix_t ty = makefix(y_min);
|
||||
set_transform(
|
||||
sx, 0, tx,
|
||||
0, sy, ty
|
||||
);
|
||||
}
|
||||
|
||||
// Scale to fit the entire display (default)
|
||||
void scale_to_fit() {
|
||||
scale_to_fit(0, 0, FTDI::display_width, FTDI::display_height);
|
||||
}
|
||||
|
||||
void next() {
|
||||
PolyReader::next();
|
||||
transform();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The DeduplicatedPolyReader wraps around another PolyReader
|
||||
* class to remove repeated points from the data. This could
|
||||
* happen when scaling down using TransformedPolyReader, for
|
||||
* example.
|
||||
*/
|
||||
template<class POLY_READER>
|
||||
class DeduplicatedPolyReader : public POLY_READER {
|
||||
private:
|
||||
typename POLY_READER::type_t last_x, last_y;
|
||||
|
||||
static constexpr typename POLY_READER::type_t eol = 0xFFFF;
|
||||
|
||||
public:
|
||||
DeduplicatedPolyReader(const uint16_t data[], const size_t n) : POLY_READER(data, n) {
|
||||
last_x = POLY_READER::x;
|
||||
last_y = POLY_READER::y;
|
||||
}
|
||||
|
||||
void next() {
|
||||
do {
|
||||
if (!POLY_READER::has_more()) return;
|
||||
POLY_READER::next();
|
||||
} while (POLY_READER::x == last_x && POLY_READER::y == last_y && !POLY_READER::end_of_loop());
|
||||
if (POLY_READER::end_of_loop()) {
|
||||
last_x = last_y = eol;
|
||||
} else {
|
||||
last_x = POLY_READER::x;
|
||||
last_y = POLY_READER::y;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The helper class allows you to build an interface based on arbitrary
|
||||
* shapes.
|
||||
*/
|
||||
template<class POLY_READER=DeduplicatedPolyReader<TransformedPolyReader>>
|
||||
class GenericPolyUI {
|
||||
private:
|
||||
CommandProcessor &cmd;
|
||||
|
||||
// Attributes used to paint buttons
|
||||
|
||||
uint32_t btn_fill_color = 0x000000;
|
||||
uint32_t btn_shadow_color = 0xF3E0E0;
|
||||
uint8_t btn_shadow_depth = 5;
|
||||
uint32_t btn_stroke_color = 0x000000;
|
||||
uint8_t btn_stroke_width = 28;
|
||||
|
||||
draw_mode_t mode;
|
||||
|
||||
public:
|
||||
typedef POLY_READER poly_reader_t;
|
||||
|
||||
GenericPolyUI(CommandProcessor &c, draw_mode_t what = BOTH) : cmd(c), mode(what) {}
|
||||
|
||||
// Fills a polygon with the current COLOR_RGB
|
||||
void fill(poly_reader_t r, bool clip = true) {
|
||||
using namespace FTDI;
|
||||
int16_t x, y, w, h;
|
||||
|
||||
if (clip) {
|
||||
// Clipping reduces the number of pixels that are
|
||||
// filled, allowing more complex shapes to be drawn
|
||||
// in the alloted time.
|
||||
bounds(r, x, y, w, h);
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(SCISSOR_XY(x, y));
|
||||
cmd.cmd(SCISSOR_SIZE(w, h));
|
||||
}
|
||||
|
||||
Polygon p(cmd);
|
||||
p.begin_fill();
|
||||
p.begin_loop();
|
||||
for(r.start();r.has_more();r.next()) {
|
||||
p(r.x * 16, r.y * 16);
|
||||
if (r.end_of_loop()) {
|
||||
p.end_loop();
|
||||
p.begin_loop();
|
||||
}
|
||||
}
|
||||
p.end_loop();
|
||||
p.end_fill();
|
||||
if (clip)
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
||||
|
||||
void shadow(poly_reader_t r, uint8_t offset) {
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
using namespace FTDI;
|
||||
cmd.cmd(VERTEX_TRANSLATE_X(offset * 16));
|
||||
cmd.cmd(VERTEX_TRANSLATE_Y(offset * 16));
|
||||
fill(r, false);
|
||||
cmd.cmd(VERTEX_TRANSLATE_X(0));
|
||||
cmd.cmd(VERTEX_TRANSLATE_Y(0));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Strokes a polygon with the current COLOR_RGB
|
||||
void stroke(poly_reader_t r) {
|
||||
using namespace FTDI;
|
||||
Polygon p(cmd);
|
||||
p.begin_stroke();
|
||||
p.begin_loop();
|
||||
for(r.start();r.has_more(); r.next()) {
|
||||
p(r.x * 16, r.y * 16);
|
||||
if (r.end_of_loop()) {
|
||||
p.end_loop();
|
||||
p.begin_loop();
|
||||
}
|
||||
}
|
||||
p.end_loop();
|
||||
p.end_stroke();
|
||||
}
|
||||
|
||||
// Compute the bounds of a polygon
|
||||
void bounds(poly_reader_t r, int16_t &x, int16_t &y, int16_t &w, int16_t &h) {
|
||||
int16_t x_min = INT16_MAX;
|
||||
int16_t y_min = INT16_MAX;
|
||||
int16_t x_max = INT16_MIN;
|
||||
int16_t y_max = INT16_MIN;
|
||||
for(r.start(); r.has_more(); r.next()) {
|
||||
x_min = min(x_min, r.x);
|
||||
x_max = max(x_max, r.x);
|
||||
y_min = min(y_min, r.y);
|
||||
y_max = max(y_max, r.y);
|
||||
}
|
||||
x = x_min;
|
||||
y = y_min;
|
||||
w = x_max - x_min;
|
||||
h = y_max - y_min;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw shaped buttons. Buttons are drawn out of a polygon which is
|
||||
* filled and stroked on top of a drop shadow. The button will
|
||||
* become "pushed" when touched.
|
||||
*/
|
||||
|
||||
void button_fill(const uint32_t color) {
|
||||
btn_fill_color = color;
|
||||
}
|
||||
|
||||
void button_stroke(const uint32_t color, const uint8_t width) {
|
||||
btn_stroke_color = color;
|
||||
btn_stroke_width = width;
|
||||
}
|
||||
|
||||
void button_shadow(const uint32_t color, const uint8_t depth) {
|
||||
btn_shadow_color = color;
|
||||
btn_shadow_depth = depth;
|
||||
}
|
||||
|
||||
void button(const uint8_t tag, poly_reader_t r) {
|
||||
using namespace FTDI;
|
||||
// Draw the shadow
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
if (mode & BACKGROUND) {
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(TAG(tag));
|
||||
cmd.cmd(VERTEX_TRANSLATE_X(btn_shadow_depth * 16));
|
||||
cmd.cmd(VERTEX_TRANSLATE_Y(btn_shadow_depth * 16));
|
||||
cmd.cmd(COLOR_RGB(btn_shadow_color));
|
||||
fill(r, false);
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mode & FOREGROUND) {
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
if (EventLoop::get_pressed_tag() == tag) {
|
||||
// "Push" the button
|
||||
cmd.cmd(VERTEX_TRANSLATE_X(btn_shadow_depth * 16));
|
||||
cmd.cmd(VERTEX_TRANSLATE_Y(btn_shadow_depth * 16));
|
||||
}
|
||||
#endif
|
||||
// Draw the fill and stroke
|
||||
cmd.cmd(TAG(tag));
|
||||
cmd.cmd(COLOR_RGB(btn_fill_color));
|
||||
fill(r, false);
|
||||
cmd.cmd(COLOR_RGB(btn_stroke_color));
|
||||
cmd.cmd(LINE_WIDTH(btn_stroke_width));
|
||||
stroke(r);
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
||||
}
|
||||
|
||||
void color(const uint32_t color) {
|
||||
cmd.cmd(FTDI::COLOR_RGB(color));
|
||||
}
|
||||
};
|
||||
|
||||
typedef GenericPolyUI<> PolyUI;
|
278
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py
Executable file
278
Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/extras/svg2cpp.py
Executable file
|
@ -0,0 +1,278 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# 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: <http://www.gnu.org/licenses/>.
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse, re, sys
|
||||
|
||||
usage = '''
|
||||
This program extracts line segments from a SVG file and writes
|
||||
them as coordinates in a C array. The x and y values will be
|
||||
scaled from 0x0000 to 0xFFFE. 0xFFFF is used as path separator.
|
||||
|
||||
This program can only interpret straight segments, not curves.
|
||||
It also cannot handle SVG transform attributes. To convert an
|
||||
SVG file into the proper format, use the following procedure:
|
||||
|
||||
- Load SVG file into Inkscape
|
||||
- Convert all Objects to Paths (Path -> Object to Path)
|
||||
- Convert all Strokes to Paths (Path -> Stroke to Path)
|
||||
- Combine all paths into one (Path -> Combine) [1]
|
||||
- Convert all curves into short line segments
|
||||
(Extensions -> Modify Paths -> Flatten Beziers...)
|
||||
- Save as new SVG
|
||||
- Convert into a header file using this utility
|
||||
- To give paths individual names, break apart paths and
|
||||
use the XML Editor to set the "id" attributes.
|
||||
|
||||
[1] Combining paths is necessary to remove transforms. You
|
||||
could also use inkscape-applytransforms Inkscape extension.
|
||||
|
||||
'''
|
||||
|
||||
header = '''
|
||||
/****************************************************************************
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* This file was auto-generated using "svg2cpp.pl"
|
||||
*
|
||||
* The encoding consists of x,y pairs with the min and max scaled to
|
||||
* 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the
|
||||
* start of a new closed path.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
'''
|
||||
|
||||
class ComputeBoundingBox:
|
||||
def reset(self):
|
||||
self.x_min = float(" inf")
|
||||
self.y_min = float(" inf")
|
||||
self.x_max = float("-inf")
|
||||
self.y_max = float("-inf")
|
||||
self.n_points = 0
|
||||
self.n_paths = 0
|
||||
|
||||
def command(self, type, x, y):
|
||||
self.x_min = min(self.x_min, x)
|
||||
self.x_max = max(self.x_max, x)
|
||||
self.y_min = min(self.y_min, y)
|
||||
self.y_max = max(self.y_max, y)
|
||||
|
||||
if type == "M":
|
||||
self.n_paths += 1
|
||||
self.n_points += 1
|
||||
|
||||
def scale(self, x, y):
|
||||
x -= self.x_min
|
||||
y -= self.y_min
|
||||
x /= self.x_max - self.x_min
|
||||
y /= self.y_max - self.y_min
|
||||
#y = 1 - y # Flip upside down
|
||||
return (x, y)
|
||||
|
||||
def path_finished(self, id):
|
||||
pass
|
||||
|
||||
def write(self):
|
||||
print("constexpr float x_min = %f;\n" % self.x_min)
|
||||
print("constexpr float x_max = %f;\n" % self.x_max)
|
||||
print("constexpr float y_min = %f;\n" % self.y_min)
|
||||
print("constexpr float y_max = %f;\n" % self.y_max)
|
||||
|
||||
def from_svg_view_box(self, svg):
|
||||
s = re.search('<svg[^>]+>', svg);
|
||||
if s:
|
||||
m = re.search('viewBox="([0-9-.]+) ([0-9-.]+) ([0-9-.]+) ([0-9-.]+)"', svg)
|
||||
if m:
|
||||
self.x_min = float(m.group(1))
|
||||
self.y_min = float(m.group(2))
|
||||
self.x_max = float(m.group(3))
|
||||
self.y_max = float(m.group(4))
|
||||
return True
|
||||
return False
|
||||
|
||||
class WriteDataStructure:
|
||||
def __init__(self, bounding_box):
|
||||
self.bounds = bounding_box
|
||||
|
||||
def reset(self, ):
|
||||
self.hex_words = []
|
||||
|
||||
def push(self, value):
|
||||
self.hex_words.append("0x%04X" % value)
|
||||
|
||||
def command(self, type, x, y):
|
||||
if type == "M":
|
||||
self.push(0xFFFF)
|
||||
x, y = self.bounds.scale(x,y)
|
||||
self.push(x * 0xFFFE)
|
||||
self.push(y * 0xFFFE)
|
||||
|
||||
def path_finished(self, id):
|
||||
if self.hex_words and self.hex_words[0] == "0xFFFF":
|
||||
self.hex_words.pop(0)
|
||||
print("const PROGMEM uint16_t", id + "[] = {" + ", ".join (self.hex_words) + "};\n")
|
||||
self.hex_words = []
|
||||
|
||||
class Parser:
|
||||
def __init__(self, op):
|
||||
self.op = op
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
self.last_x = 0
|
||||
self.last_y = 0
|
||||
self.initial_x = 0
|
||||
self.initial_y = 0
|
||||
|
||||
def process_svg_path_L_or_M(self, cmd, x, y):
|
||||
self.op.command(cmd, x, y)
|
||||
self.last_x = x
|
||||
self.last_y = y
|
||||
if cmd == "M":
|
||||
self.initial_x = x
|
||||
self.initial_y = y
|
||||
|
||||
def process_svg_path_data_cmd(self, id, cmd, a, b):
|
||||
"""Converts the various types of moves into L or M commands
|
||||
and dispatches to process_svg_path_L_or_M for futher processing."""
|
||||
if cmd == "Z" or cmd == "z":
|
||||
self.process_svg_path_L_or_M("L", self.initial_x, self.initial_y)
|
||||
elif cmd == "H":
|
||||
self.process_svg_path_L_or_M("L", a, self.last_y)
|
||||
elif cmd == "V":
|
||||
self.process_svg_path_L_or_M("L", self.last_x, a)
|
||||
elif cmd == "h":
|
||||
self.process_svg_path_L_or_M("L", self.last_x + a, self.last_y)
|
||||
elif cmd == "v":
|
||||
self.process_svg_path_L_or_M("L", self.last_x, self.last_y + a)
|
||||
elif cmd == "L":
|
||||
self.process_svg_path_L_or_M("L", a, b)
|
||||
elif cmd == "l":
|
||||
self.process_svg_path_L_or_M("L", self.last_x + a, self.last_y + b)
|
||||
elif cmd == "M":
|
||||
self.process_svg_path_L_or_M("M", a, b)
|
||||
elif cmd == "m":
|
||||
self.process_svg_path_L_or_M("M", self.last_x + a, self.last_y + b)
|
||||
else:
|
||||
print("Unsupported path data command:", cmd, "in path", id, "\n", file=sys.stderr)
|
||||
quit()
|
||||
|
||||
def eat_token(self, regex):
|
||||
"""Looks for a token at the start of self.d.
|
||||
If found, the token is removed."""
|
||||
self.m = re.match(regex,self.d)
|
||||
if self.m:
|
||||
self.d = self.d[self.m.end():]
|
||||
return self.m
|
||||
|
||||
def process_svg_path_data(self, id, d):
|
||||
"""Breaks up the "d" attribute into individual commands
|
||||
and calls "process_svg_path_data_cmd" for each"""
|
||||
|
||||
self.d = d
|
||||
while (self.d):
|
||||
if self.eat_token('\s+'):
|
||||
pass # Just eat the spaces
|
||||
|
||||
elif self.eat_token('([LMHVZlmhvz])'):
|
||||
cmd = self.m.group(1)
|
||||
# The following commands take no arguments
|
||||
if cmd == "Z" or cmd == "z":
|
||||
self.process_svg_path_data_cmd(id, cmd, 0, 0)
|
||||
|
||||
elif self.eat_token('([CScsQqTtAa])'):
|
||||
print("Unsupported path data command:", self.m.group(1), "in path", id, "\n", file=sys.stderr)
|
||||
quit()
|
||||
|
||||
elif self.eat_token('([ ,]*[-0-9e.]+)+'):
|
||||
# Process list of coordinates following command
|
||||
coords = re.split('[ ,]+', self.m.group(0))
|
||||
# The following commands take two arguments
|
||||
if cmd == "L" or cmd == "l":
|
||||
while coords:
|
||||
self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0)))
|
||||
elif cmd == "M":
|
||||
while coords:
|
||||
self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0)))
|
||||
# If a MOVETO has multiple points, the subsequent ones are assumed to be LINETO
|
||||
cmd = "L"
|
||||
elif cmd == "m":
|
||||
while coords:
|
||||
self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), float(coords.pop(0)))
|
||||
# If a MOVETO has multiple points, the subsequent ones are assumed to be LINETO
|
||||
cmd = "l"
|
||||
# Assume all other commands are single argument
|
||||
else:
|
||||
while coords:
|
||||
self.process_svg_path_data_cmd(id, cmd, float(coords.pop(0)), 0)
|
||||
else:
|
||||
print("Syntax error:", d, "in path", id, "\n", file=sys.stderr)
|
||||
quit()
|
||||
|
||||
def process_svg_paths(self, svg):
|
||||
self.op.reset()
|
||||
for path in re.findall('<path[^>]+>', svg):
|
||||
id = "<none>"
|
||||
m = re.search(' id="(.*)"', path)
|
||||
if m:
|
||||
id = m.group(1)
|
||||
|
||||
m = re.search(' transform="(.*)"', path)
|
||||
if m:
|
||||
print("Found transform in path", id, "! Cannot process file!", file=sys.stderr)
|
||||
quit()
|
||||
|
||||
m = re.search(' d="(.*)"', path)
|
||||
if m:
|
||||
self.process_svg_path_data(id, m.group(1))
|
||||
self.op.path_finished(id)
|
||||
self.reset()
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("filename")
|
||||
args = parser.parse_args()
|
||||
|
||||
f = open(args.filename, "r")
|
||||
data = f.read()
|
||||
|
||||
print(header)
|
||||
|
||||
b = ComputeBoundingBox()
|
||||
if not b.from_svg_view_box(data):
|
||||
# Can't find the view box, so use the bounding box of the elements themselves.
|
||||
p = Parser(b)
|
||||
p.process_svg_paths(data)
|
||||
b.write()
|
||||
|
||||
w = WriteDataStructure(b)
|
||||
p = Parser(w)
|
||||
p.process_svg_paths(data)
|
|
@ -0,0 +1,27 @@
|
|||
/******************
|
||||
* ftdi_eve_lib.h *
|
||||
******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2019 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2019 - 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "compat.h"
|
||||
#include "basic/ftdi_basic.h"
|
||||
#include "extended/ftdi_extended.h"
|
128
Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp
Normal file
128
Marlin/src/lcd/extensible_ui/lib/lulzbot/marlin_events.cpp
Normal file
|
@ -0,0 +1,128 @@
|
|||
/*********************
|
||||
* marlin_events.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens/screens.h"
|
||||
|
||||
namespace ExtUI {
|
||||
using namespace Theme;
|
||||
using namespace FTDI;
|
||||
|
||||
void onStartup() {
|
||||
EventLoop::setup();
|
||||
}
|
||||
|
||||
void onIdle() {
|
||||
EventLoop::loop();
|
||||
}
|
||||
|
||||
void onPrinterKilled(PGM_P lcd_msg) {
|
||||
KillScreen::show(progmem_str(lcd_msg));
|
||||
}
|
||||
|
||||
void onMediaInserted() {
|
||||
if (AT_SCREEN(StatusScreen))
|
||||
StatusScreen::setStatusMessage(F(MSG_MEDIA_INSERTED));
|
||||
sound.play(media_inserted, PLAY_ASYNCHRONOUS);
|
||||
}
|
||||
|
||||
void onMediaRemoved() {
|
||||
if (AT_SCREEN(StatusScreen))
|
||||
StatusScreen::setStatusMessage(F(MSG_MEDIA_REMOVED));
|
||||
sound.play(media_removed, PLAY_ASYNCHRONOUS);
|
||||
if (AT_SCREEN(FilesScreen)) {
|
||||
GOTO_SCREEN(StatusScreen)
|
||||
}
|
||||
}
|
||||
|
||||
void onMediaError() {
|
||||
sound.play(sad_trombone, PLAY_ASYNCHRONOUS);
|
||||
AlertDialogBox::showError(F("Unable to read media."));
|
||||
}
|
||||
|
||||
void onStatusChanged(const char* lcd_msg) {
|
||||
StatusScreen::setStatusMessage(lcd_msg);
|
||||
}
|
||||
|
||||
void onStatusChanged(progmem_str lcd_msg) {
|
||||
StatusScreen::setStatusMessage(lcd_msg);
|
||||
}
|
||||
|
||||
void onPrintTimerStarted() {
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_STARTED);
|
||||
}
|
||||
|
||||
void onPrintTimerStopped() {
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FINISHED);
|
||||
}
|
||||
|
||||
void onPrintTimerPaused() {
|
||||
}
|
||||
|
||||
void onFilamentRunout(const extruder_t extruder) {
|
||||
char lcd_msg[30];
|
||||
sprintf_P(lcd_msg, PSTR("Extruder %d Filament Error"), extruder + 1);
|
||||
StatusScreen::setStatusMessage(lcd_msg);
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
|
||||
}
|
||||
|
||||
void onFactoryReset() {
|
||||
InterfaceSettingsScreen::defaultSettings();
|
||||
}
|
||||
|
||||
void onStoreSettings(char *buff) {
|
||||
InterfaceSettingsScreen::saveSettings(buff);
|
||||
}
|
||||
|
||||
void onLoadSettings(const char *buff) {
|
||||
InterfaceSettingsScreen::loadSettings(buff);
|
||||
}
|
||||
|
||||
void onConfigurationStoreWritten(bool success) {
|
||||
#ifdef LULZBOT_EEPROM_BACKUP_SIZE
|
||||
if (success && InterfaceSettingsScreen::backupEEPROM()) {
|
||||
SERIAL_ECHOLNPGM("Made backup of EEPROM to SPI Flash");
|
||||
}
|
||||
#else
|
||||
UNUSED(success);
|
||||
#endif
|
||||
}
|
||||
|
||||
void onConfigurationStoreRead(bool) {
|
||||
}
|
||||
|
||||
void onPlayTone(const uint16_t frequency, const uint16_t duration) {
|
||||
sound.play_tone(frequency, duration);
|
||||
}
|
||||
|
||||
void onUserConfirmRequired(const char * const msg) {
|
||||
if (msg)
|
||||
ConfirmUserRequestAlertBox::show(msg);
|
||||
else
|
||||
ConfirmUserRequestAlertBox::hide();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
142
Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h
Normal file
142
Marlin/src/lcd/extensible_ui/lib/lulzbot/pin_mappings.h
Normal file
|
@ -0,0 +1,142 @@
|
|||
/******************
|
||||
* pin_mappings.h *
|
||||
******************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* This file defines mappings from the ULTRA_LCD pins functions to new
|
||||
* functions for the FTDI display. These mappings allows any board that
|
||||
* support ULTRA_LCD via EXP1 and EXP2 connectors to use FTDI modules
|
||||
* without adding new pin definitions to the board.
|
||||
*/
|
||||
|
||||
#ifdef CR10_TFT_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#endif
|
||||
|
||||
#define CLCD_USE_SOFT_SPI
|
||||
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D4 // PORTA1 Pin 6
|
||||
#define CLCD_SOFT_SPI_MOSI LCD_PINS_ENABLE // PORTC1 Pin 8
|
||||
#define CLCD_SPI_CS LCD_PINS_RS // PORTA3 Pin 7
|
||||
#define CLCD_SOFT_SPI_MISO 16 // PORTC0 BTN_ENC Pin 2
|
||||
#define CLCD_MOD_RESET 11 // PORTD3 BTN_EN1 Pin 3
|
||||
#define CLCD_AUX_0 10 // PORTD2 BTN_EN2 Pin 5
|
||||
#define CLCD_AUX_1 BEEPER_PIN // PORTA4 Pin 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The AlephObjects pinout for re-purposing the UltraLCD
|
||||
* connector EXP1 for software SPI (rev B, obsolete)
|
||||
*/
|
||||
|
||||
#ifdef AO_EXP1_DEPRECATED_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#endif
|
||||
|
||||
#define CLCD_MOD_RESET LCD_PINS_D4
|
||||
#define CLCD_SPI_CS LCD_PINS_D5
|
||||
|
||||
#define CLCD_AUX_0 LCD_PINS_ENABLE
|
||||
#define CLCD_AUX_1 BTN_ENC
|
||||
#define CLCD_AUX_2 BEEPER_PIN
|
||||
|
||||
#define CLCD_USE_SOFT_SPI
|
||||
#define CLCD_SOFT_SPI_SCLK LCD_PINS_D7
|
||||
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D6
|
||||
#define CLCD_SOFT_SPI_MISO LCD_PINS_RS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* AO_EXP1_PINMAP
|
||||
*
|
||||
* The AlephObjects mapping for re-purposing the UltraLCD
|
||||
* connector EXP1 for software SPI for display (rev C):
|
||||
*
|
||||
* EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD:
|
||||
* 1 MISO MISO MISO --> BEEPER
|
||||
* 2 SCLK SCLK SCLK --> BTN_ENC
|
||||
* 3 PD_N - - --> LCDE
|
||||
* 4 - CS_N CS_N --> LCDRS
|
||||
* 5 CS_N - - --> LCD4
|
||||
* 6 MOSI MOSI MOSI --> LCD5
|
||||
* 7 - SD_DET INT --> LCD6
|
||||
* 8 RESET - RESET --> LCD4
|
||||
* 9 GND GND GND --> GND
|
||||
* 10 5V 5V 5V --> 5V
|
||||
*
|
||||
* [1] At the moment, Marlin does not support SD or USB
|
||||
* functionality over software SPI.
|
||||
*/
|
||||
|
||||
#ifdef AO_EXP1_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#endif
|
||||
|
||||
#define CLCD_MOD_RESET LCD_PINS_ENABLE
|
||||
#define CLCD_SPI_CS LCD_PINS_D4
|
||||
|
||||
#define CLCD_USE_SOFT_SPI
|
||||
#define CLCD_SOFT_SPI_SCLK BTN_ENC
|
||||
#define CLCD_SOFT_SPI_MOSI LCD_PINS_D5
|
||||
#define CLCD_SOFT_SPI_MISO BEEPER_PIN
|
||||
#endif
|
||||
|
||||
/**
|
||||
* AO_EXP2_PINMAP
|
||||
*
|
||||
* The AlephObjects mapping for re-purposing the UltraLCD
|
||||
* connector EXP2 for hardware SPI for display and SD card
|
||||
* or USB (rev C):
|
||||
*
|
||||
* EXP2: FTDI: SD -or- USB: ULTRA_LCD:
|
||||
* 1 MISO MISO MISO --> MISO
|
||||
* 2 SCLK SCLK SCLK --> SCLK
|
||||
* 3 PD_N - - --> BTN_EN2
|
||||
* 4 - CS_N CS_N --> SD_CSEL
|
||||
* 5 CS_N - - --> BTN_EN1
|
||||
* 6 MOSI MOSI MOSI --> MOSI
|
||||
* 7 - SD_DET INT --> SD_DET
|
||||
* 8 RESET - RESET --> RESET
|
||||
* 9 GND GND GND --> GND
|
||||
* 10 5V 5V 5V --> KILL [3]
|
||||
*
|
||||
* [1] This configuration is not compatible with the
|
||||
* EinsyRetro 1.1a because there is a level shifter
|
||||
* on MISO enabled by SD/USB chip select.
|
||||
*
|
||||
* [2] This configuration allows daisy-chaining of the
|
||||
* display and SD/USB on EXP2.
|
||||
*
|
||||
* [3] Archim Rambo provides 5V on this pin. On any other
|
||||
* board, divert this wire from the ribbon cable and
|
||||
* connect it to 5V at an endstop.
|
||||
*/
|
||||
|
||||
#ifdef AO_EXP2_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#endif
|
||||
|
||||
#define CLCD_SPI_CS BTN_EN1
|
||||
#define CLCD_MOD_RESET BTN_EN2
|
||||
#endif
|
|
@ -0,0 +1,80 @@
|
|||
/********************
|
||||
* about_screen.cpp *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 9
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void AboutScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
sound.play(chimes, PLAY_ASYNCHRONOUS);
|
||||
}
|
||||
|
||||
void AboutScreen::onRedraw(draw_mode_t) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.tag(0);
|
||||
|
||||
draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(4,1), F(
|
||||
#ifdef LULZBOT_LCD_MACHINE_NAME
|
||||
LULZBOT_LCD_MACHINE_NAME
|
||||
#else
|
||||
"Color Touch Panel"
|
||||
#endif
|
||||
), OPT_CENTER, font_xlarge);
|
||||
|
||||
cmd.tag(2);
|
||||
draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3), F(
|
||||
#ifdef LULZBOT_LCD_TOOLHEAD_NAME
|
||||
"Firmware for toolhead:\n" LULZBOT_LCD_TOOLHEAD_NAME "\n\n"
|
||||
#endif
|
||||
"(C) 2019 Aleph Objects, Inc.\n\nwww.lulzbot.com"
|
||||
), OPT_CENTER, font_medium);
|
||||
|
||||
cmd.tag(0);
|
||||
draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
|
||||
|
||||
cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), F("Okay"));
|
||||
}
|
||||
|
||||
bool AboutScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
#if ENABLED(DEVELOPER_SCREENS)
|
||||
case 2: GOTO_SCREEN(DeveloperMenu); return true;
|
||||
#endif
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,191 @@
|
|||
/*****************************
|
||||
* advance_settings_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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(Theme::font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 9
|
||||
#define GRID_COLS 2
|
||||
#if HAS_BED_PROBE
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Z Offset "))
|
||||
.enabled(1)
|
||||
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(13).button( BTN_POS(1,5), BTN_SIZE(1,1), F("Motor mA"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(14).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Bump Sense"))
|
||||
#if HOTENDS > 1
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset"))
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Filament"))
|
||||
.tag(12).button( BTN_POS(1,6), BTN_SIZE(1,1), F("Endstops"))
|
||||
.tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), F("Display"))
|
||||
.tag(9) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings"))
|
||||
.tag(10).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults"))
|
||||
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
|
||||
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
|
||||
#else
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
|
||||
#endif
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash"))
|
||||
.colors(action_btn)
|
||||
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
#else
|
||||
#define GRID_ROWS 6
|
||||
#define GRID_COLS 3
|
||||
#if HAS_BED_PROBE
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,2), F("Z Offset "))
|
||||
.enabled(1)
|
||||
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), F("Motor mA"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), F("Bump Sense"))
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), F("Backlash"))
|
||||
#if HOTENDS > 1
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Nozzle Offsets"))
|
||||
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), F("Endstops"))
|
||||
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
|
||||
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
|
||||
#else
|
||||
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
|
||||
#endif
|
||||
.tag(11).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament"))
|
||||
.tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), F("Display"))
|
||||
.tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings"))
|
||||
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Restore Defaults"))
|
||||
.colors(action_btn)
|
||||
.tag(1) .button( BTN_POS(3,6), BTN_SIZE(1,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: SaveSettingsDialogBox::promptToSaveSettings(); break;
|
||||
#if HAS_BED_PROBE
|
||||
case 2: GOTO_SCREEN(ZOffsetScreen); break;
|
||||
#endif
|
||||
case 3: GOTO_SCREEN(StepsScreen); break;
|
||||
#if HOTENDS > 1
|
||||
case 4: GOTO_SCREEN(NozzleOffsetScreen); break;
|
||||
#endif
|
||||
case 5: GOTO_SCREEN(MaxVelocityScreen); break;
|
||||
case 6: GOTO_SCREEN(DefaultAccelerationScreen); break;
|
||||
case 7:
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
GOTO_SCREEN(JunctionDeviationScreen);
|
||||
#else
|
||||
GOTO_SCREEN(JerkScreen);
|
||||
#endif
|
||||
break;
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
case 8: GOTO_SCREEN(BacklashCompensationScreen); break;
|
||||
#endif
|
||||
case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break;
|
||||
case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break;
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
case 11: GOTO_SCREEN(FilamentMenu); break;
|
||||
#endif
|
||||
case 12: GOTO_SCREEN(EndstopStatesScreen); break;
|
||||
#if HAS_TRINAMIC
|
||||
case 13: GOTO_SCREEN(StepperCurrentScreen); break;
|
||||
case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
|
||||
#endif
|
||||
case 15: GOTO_SCREEN(DisplayTuningScreen); break;
|
||||
default: return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,70 @@
|
|||
/************************
|
||||
* alert_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void AlertDialogBox::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
sound.play(screen_data.AlertDialogBox.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS);
|
||||
}
|
||||
|
||||
void AlertDialogBox::onRedraw(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
drawOkayButton();
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void AlertDialogBox::show(const T message) {
|
||||
drawMessage(message);
|
||||
storeBackground();
|
||||
screen_data.AlertDialogBox.isError = false;
|
||||
GOTO_SCREEN(AlertDialogBox);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void AlertDialogBox::showError(const T message) {
|
||||
drawMessage(message);
|
||||
storeBackground();
|
||||
screen_data.AlertDialogBox.isError = true;
|
||||
GOTO_SCREEN(AlertDialogBox);
|
||||
}
|
||||
|
||||
void AlertDialogBox::hide() {
|
||||
if (AT_SCREEN(AlertDialogBox))
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
|
||||
template void AlertDialogBox::show(const char *);
|
||||
template void AlertDialogBox::show(const progmem_str);
|
||||
template void AlertDialogBox::showError(const char *);
|
||||
template void AlertDialogBox::showError(const progmem_str);
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,72 @@
|
|||
/************************************
|
||||
* backlash_compensation_screen.cpp *
|
||||
************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BACKLASH_GCODE)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void BacklashCompensationScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2).units(PSTR("mm"));
|
||||
w.heading( PSTR("Axis Backlash"));
|
||||
w.color(x_axis).adjuster(2, PSTR("X:"), getAxisBacklash_mm(X));
|
||||
w.color(y_axis).adjuster(4, PSTR("Y:"), getAxisBacklash_mm(Y));
|
||||
w.color(z_axis).adjuster(6, PSTR("Z:"), getAxisBacklash_mm(Z));
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
w.button(12, PSTR("Measure automatically"));
|
||||
#endif
|
||||
w.color(other).adjuster(8, PSTR("Smoothing:"), getBacklashSmoothing_mm());
|
||||
w.precision(0).units(PSTR("%"))
|
||||
.adjuster(10, PSTR("Correction:"), getBacklashCorrection_percent());
|
||||
w.precision(2).increments();
|
||||
}
|
||||
|
||||
bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisBacklash_mm, X); break;
|
||||
case 3: UI_INCREMENT(AxisBacklash_mm, X); break;
|
||||
case 4: UI_DECREMENT(AxisBacklash_mm, Y); break;
|
||||
case 5: UI_INCREMENT(AxisBacklash_mm, Y); break;
|
||||
case 6: UI_DECREMENT(AxisBacklash_mm, Z); break;
|
||||
case 7: UI_INCREMENT(AxisBacklash_mm, Z); break;
|
||||
case 8: UI_DECREMENT(BacklashSmoothing_mm); break;
|
||||
case 9: UI_INCREMENT(BacklashSmoothing_mm); break;
|
||||
case 10: UI_DECREMENT_BY(BacklashCorrection_percent, increment*100); break;
|
||||
case 11: UI_INCREMENT_BY(BacklashCorrection_percent, increment*100); break;
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
case 12: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,342 @@
|
|||
/**************************************
|
||||
* base_numeric_adjustment_screen.cpp *
|
||||
**************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 13
|
||||
#define GRID_ROWS 10
|
||||
#else
|
||||
#define GRID_COLS 18
|
||||
#define GRID_ROWS 7
|
||||
#endif
|
||||
|
||||
BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_medium)
|
||||
.colors(action_btn)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(1).button( BTN_POS(1,10), BTN_SIZE(13,1), F("Back"))
|
||||
#else
|
||||
.tag(1).button( BTN_POS(15,7), BTN_SIZE(4,1), F("Back"))
|
||||
#endif
|
||||
.colors(normal_btn);
|
||||
}
|
||||
|
||||
_line = 1;
|
||||
_units = PSTR("");
|
||||
}
|
||||
|
||||
BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) {
|
||||
_decimals = decimals;
|
||||
if (screen_data.BaseNumericAdjustmentScreen.increment == 0) {
|
||||
screen_data.BaseNumericAdjustmentScreen.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::heading(const char *label) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_medium).cmd(COLOR_RGB(bg_text_enabled));
|
||||
if (_what & BACKGROUND) {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(1, _line), BTN_SIZE(12,1), progmem_str(label), OPT_FLAT);
|
||||
#else
|
||||
cmd.tag(0).fgcolor(bg_color).button( BTN_POS(5, _line), BTN_SIZE(8,1), progmem_str(label), OPT_FLAT);
|
||||
#endif
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#ifdef TOUCH_UI_800x480
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 20
|
||||
#else
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 10
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(uint8_t, const uint8_t tag) {
|
||||
CommandProcessor cmd;
|
||||
const char *label = PSTR("?");
|
||||
uint8_t pos;
|
||||
uint8_t & increment = screen_data.BaseNumericAdjustmentScreen.increment;
|
||||
|
||||
if (increment == 0) {
|
||||
increment = tag; // Set the default value to be the first.
|
||||
}
|
||||
|
||||
switch (tag) {
|
||||
case 240: label = PSTR( ".001"); pos = _decimals - 3; break;
|
||||
case 241: label = PSTR( ".01" ); pos = _decimals - 2; break;
|
||||
case 242: label = PSTR( "0.1" ); pos = _decimals - 1; break;
|
||||
case 243: label = PSTR( "1" ); pos = _decimals + 0; break;
|
||||
case 244: label = PSTR( "10" ); pos = _decimals + 1; break;
|
||||
default: label = PSTR("100" ); pos = _decimals + 2; break;
|
||||
}
|
||||
|
||||
cmd.tag(tag)
|
||||
.colors(increment == tag ? action_btn : normal_btn)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_small);
|
||||
#else
|
||||
.font(font_medium);
|
||||
#endif
|
||||
switch (pos) {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
case 0: cmd.button( BTN_POS(5,_line), BTN_SIZE(2,1), progmem_str(label)); break;
|
||||
case 1: cmd.button( BTN_POS(7,_line), BTN_SIZE(2,1), progmem_str(label)); break;
|
||||
case 2: cmd.button( BTN_POS(9,_line), BTN_SIZE(2,1), progmem_str(label)); break;
|
||||
#else
|
||||
case 0: cmd.button( BTN_POS(15,2), BTN_SIZE(4,1), progmem_str(label)); break;
|
||||
case 1: cmd.button( BTN_POS(15,3), BTN_SIZE(4,1), progmem_str(label)); break;
|
||||
case 2: cmd.button( BTN_POS(15,4), BTN_SIZE(4,1), progmem_str(label)); break;
|
||||
#endif
|
||||
}
|
||||
cmd.colors(normal_btn);
|
||||
}
|
||||
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::increments() {
|
||||
if (_what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.fgcolor(bg_color)
|
||||
.tag(0)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_small).button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT);
|
||||
#else
|
||||
.font(font_medium).button( BTN_POS(15,1), BTN_SIZE(4,1), F("Increment:"), OPT_FLAT);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
_draw_increment_btn(_line+1, 245 - _decimals);
|
||||
_draw_increment_btn(_line+1, 244 - _decimals);
|
||||
_draw_increment_btn(_line+1, 243 - _decimals);
|
||||
}
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
_line++;
|
||||
#endif
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, const char *label, const char *value, bool is_enabled) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (_what & BACKGROUND) {
|
||||
cmd.enabled(1)
|
||||
.font(font_small)
|
||||
.fgcolor(_color) .tag(0).button( BTN_POS(5,_line), BTN_SIZE(5,1), F(""), OPT_FLAT)
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), (progmem_str) label, OPT_FLAT);
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.tag(is_enabled ? tag : 0).enabled(is_enabled).button( BTN_POS(10,_line), BTN_SIZE(2,1), F("-"))
|
||||
.tag(is_enabled ? tag+1 : 0).enabled(is_enabled).button( BTN_POS(12,_line), BTN_SIZE(2,1), F("+"))
|
||||
.tag(0).font(font_small) .text ( BTN_POS(5,_line), BTN_SIZE(5,1), is_enabled ? value : "-");
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, const char *value, bool is_enabled) {
|
||||
if (_what & BACKGROUND) {
|
||||
adjuster_sram_val(tag, label, nullptr);
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
char b[strlen_P(value)+1];
|
||||
strcpy_P(b,value);
|
||||
adjuster_sram_val(tag, label, b, is_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, const char *label, float value, bool is_enabled) {
|
||||
if (_what & BACKGROUND) {
|
||||
adjuster_sram_val(tag, label, nullptr);
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
char b[32];
|
||||
dtostrf(value, 5, _decimals, b);
|
||||
strcat_P(b, PSTR(" "));
|
||||
strcat_P(b, (const char*) _units);
|
||||
adjuster_sram_val(tag, label, b, is_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, const char *label, bool is_enabled) {
|
||||
if (_what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.tag(is_enabled ? tag : 0)
|
||||
.enabled(is_enabled)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_small)
|
||||
#else
|
||||
.font(font_medium)
|
||||
#endif
|
||||
.button(BTN_POS(5,_line), BTN_SIZE(9,1), progmem_str(label));
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, const char *label, const char *value, bool is_enabled) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (_what & BACKGROUND) {
|
||||
cmd.enabled(1)
|
||||
.font(font_small)
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.fgcolor(_color).tag(0).button( BTN_POS(5,_line), BTN_SIZE(9,1), F(""), OPT_FLAT)
|
||||
.fgcolor(bg_color) .tag(0).button( BTN_POS(1,_line), BTN_SIZE(4,1), (progmem_str) label, OPT_FLAT);
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.tag(tag).font(font_small).text ( BTN_POS(5,_line), BTN_SIZE(9,1), is_enabled ? value : "-");
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, const char *label1, uint8_t tag2, const char *label2, bool is_enabled) {
|
||||
if (_what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.enabled(is_enabled)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_small)
|
||||
#else
|
||||
.font(font_medium)
|
||||
#endif
|
||||
.tag(is_enabled ? tag1: 0).button(BTN_POS(5,_line), BTN_SIZE(4.5,1), progmem_str(label1))
|
||||
.tag(is_enabled ? tag2: 0).button(BTN_POS(9.5,_line), BTN_SIZE(4.5,1), progmem_str(label2));
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, const char *label, const char *text, bool value, bool is_enabled) {
|
||||
if (_what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.fgcolor(bg_color)
|
||||
.tag(0)
|
||||
.font(font_small)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.button( BTN_POS(1, _line), BTN_SIZE( 8,1), progmem_str(label), OPT_FLAT);
|
||||
#else
|
||||
.button( BTN_POS(1, _line), BTN_SIZE(10,1), progmem_str(label), OPT_FLAT);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.tag(is_enabled ? tag : 0)
|
||||
.enabled(is_enabled)
|
||||
.font(font_small)
|
||||
.colors(ui_toggle)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.toggle(BTN_POS( 9,_line), BTN_SIZE(5,1), progmem_str(text), value);
|
||||
#else
|
||||
.toggle(BTN_POS(10,_line), BTN_SIZE(4,1), progmem_str(text), value);
|
||||
#endif
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
|
||||
if (_what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.fgcolor(bg_color)
|
||||
.tag(0)
|
||||
.font(font_small)
|
||||
.button( BTN_POS(1, _line), BTN_SIZE(4,1), F("Home:"), OPT_FLAT);
|
||||
}
|
||||
|
||||
if (_what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_small)
|
||||
#else
|
||||
.font(font_medium)
|
||||
#endif
|
||||
.tag(tag+0).button(BTN_POS(5,_line), BTN_SIZE(2,1), F("X"))
|
||||
.tag(tag+1).button(BTN_POS(7,_line), BTN_SIZE(2,1), F("Y"))
|
||||
.tag(tag+2).button(BTN_POS(9,_line), BTN_SIZE(2,1), F("Z"))
|
||||
.tag(tag+3).button(BTN_POS(11,_line), BTN_SIZE(3,1), F("All"));
|
||||
}
|
||||
|
||||
_line++;
|
||||
}
|
||||
|
||||
void BaseNumericAdjustmentScreen::onEntry() {
|
||||
screen_data.BaseNumericAdjustmentScreen.increment = 0; // This will force the increment to be picked while drawing.
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
case 240 ... 245: screen_data.BaseNumericAdjustmentScreen.increment = tag; break;
|
||||
default: return current_screen.onTouchHeld(tag);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
float BaseNumericAdjustmentScreen::getIncrement() {
|
||||
switch (screen_data.BaseNumericAdjustmentScreen.increment) {
|
||||
case 240: return 0.001;
|
||||
case 241: return 0.01;
|
||||
case 242: return 0.1;
|
||||
case 243: return 1.0;
|
||||
case 244: return 10.0;
|
||||
case 245: return 100.0;
|
||||
default: return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,83 @@
|
|||
/*******************
|
||||
* base_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void BaseScreen::onEntry() {
|
||||
CommandProcessor cmd;
|
||||
cmd.set_button_style_callback(buttonStyleCallback);
|
||||
UIScreen::onEntry();
|
||||
}
|
||||
|
||||
bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t &style, uint16_t &options, bool post) {
|
||||
if (post) {
|
||||
cmd.colors(normal_btn);
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
if (EventLoop::get_pressed_tag() != 0) {
|
||||
reset_menu_timeout();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (tag != 0 && EventLoop::get_pressed_tag() == tag) {
|
||||
options = OPT_FLAT;
|
||||
}
|
||||
|
||||
if (style & cmd.STYLE_DISABLED) {
|
||||
cmd.tag(0);
|
||||
style &= ~cmd.STYLE_DISABLED;
|
||||
cmd.colors(disabled_btn);
|
||||
return true; // Call me again to reset the colors
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void BaseScreen::onIdle() {
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
const uint32_t elapsed = millis() - last_interaction;
|
||||
if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS) * 1000) {
|
||||
reset_menu_timeout();
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void BaseScreen::reset_menu_timeout() {
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
last_interaction = millis();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
uint32_t BaseScreen::last_interaction;
|
||||
#endif
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,137 @@
|
|||
/*****************************
|
||||
* bio_advanced_settings.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(Theme::font_medium)
|
||||
#define GRID_ROWS 9
|
||||
#define GRID_COLS 2
|
||||
|
||||
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Display"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(3) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Motor mA"))
|
||||
#if HAS_TRINAMIC
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(4) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Bump Sense"))
|
||||
.tag(5) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Endstops"))
|
||||
#if HOTENDS > 1
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(6) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Nozzle Offset"))
|
||||
|
||||
|
||||
.tag(7) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Steps/mm"))
|
||||
.tag(8) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Velocity "))
|
||||
.tag(9) .button( BTN_POS(2,3), BTN_SIZE(1,1), F("Acceleration"))
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Junc Dev"))
|
||||
#else
|
||||
.tag(10) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Jerk"))
|
||||
#endif
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(11) .button( BTN_POS(2,5), BTN_SIZE(1,1), F("Backlash"))
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), F("Linear Advance"))
|
||||
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Interface Settings"))
|
||||
.tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), F("Restore Factory Defaults"))
|
||||
.colors(action_btn)
|
||||
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
}
|
||||
|
||||
bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
|
||||
switch (tag) {
|
||||
case 1: SaveSettingsDialogBox::promptToSaveSettings(); break;
|
||||
case 2: GOTO_SCREEN(DisplayTuningScreen); break;
|
||||
#if HAS_TRINAMIC
|
||||
case 3: GOTO_SCREEN(StepperCurrentScreen); break;
|
||||
case 4: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
|
||||
#endif
|
||||
case 5: GOTO_SCREEN(EndstopStatesScreen); break;
|
||||
#if HOTENDS > 1
|
||||
case 6: GOTO_SCREEN(NozzleOffsetScreen); break;
|
||||
#endif
|
||||
|
||||
case 7: GOTO_SCREEN(StepsScreen); break;
|
||||
case 8: GOTO_SCREEN(MaxVelocityScreen); break;
|
||||
case 9: GOTO_SCREEN(DefaultAccelerationScreen); break;
|
||||
case 10:
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
GOTO_SCREEN(JunctionDeviationScreen);
|
||||
#else
|
||||
GOTO_SCREEN(JerkScreen);
|
||||
#endif
|
||||
break;
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
case 11: GOTO_SCREEN(BacklashCompensationScreen); break;
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
case 12: GOTO_SCREEN(LinearAdvanceScreen); break;
|
||||
#endif
|
||||
case 13: GOTO_SCREEN(InterfaceSettingsScreen); break;
|
||||
case 14: GOTO_SCREEN(RestoreFailsafeDialogBox); break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,56 @@
|
|||
/****************************
|
||||
* bio_confirm_home_xyz.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void BioConfirmHomeE::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?"));
|
||||
drawYesNoButtons(1);
|
||||
}
|
||||
|
||||
bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
SpinnerDialogBox::enqueueAndWait_P(F(
|
||||
"G112\n" /* Home extruder */
|
||||
LULZBOT_AXIS_LEVELING_COMMANDS /* Level X axis */
|
||||
"G0 X115 Z50 F6000\n" /* Goto loading position */
|
||||
"M400\n" /* Wait for moves to finish */
|
||||
"M18 X Y" /* Unlock motors */
|
||||
));
|
||||
current_screen.forget();
|
||||
break;
|
||||
case 2:
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
break;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,53 @@
|
|||
/****************************
|
||||
* bio_confirm_home_xyz.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("About to home to loading position.\nEnsure the top and the bed of the printer are clear.\n\nContinue?"));
|
||||
drawYesNoButtons(1);
|
||||
}
|
||||
|
||||
bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
SpinnerDialogBox::enqueueAndWait_P(F(
|
||||
"G28 X Y Z\n" /* Home all axis */
|
||||
"G0 X115 Z50 F6000" /* Move to park position */
|
||||
));
|
||||
current_screen.forget();
|
||||
break;
|
||||
case 2:
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
break;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,79 @@
|
|||
/*********************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void MainMenu::onRedraw(draw_mode_t what) {
|
||||
#define GRID_ROWS 8
|
||||
#define GRID_COLS 2
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.font(font_large).text( BTN_POS(1,1), BTN_SIZE(2,1), F("Main Menu"))
|
||||
.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Load Syringe"))
|
||||
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Unlock XY Axis"))
|
||||
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature"))
|
||||
.tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Interface Settings"))
|
||||
.tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Advanced Settings"))
|
||||
.tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("About Printer"))
|
||||
.colors(action_btn)
|
||||
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
|
||||
}
|
||||
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
bool MainMenu::onTouchEnd(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
|
||||
switch (tag) {
|
||||
case 1: SaveSettingsDialogBox::promptToSaveSettings(); break;
|
||||
case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break;
|
||||
case 3: StatusScreen::unlockMotors(); break;
|
||||
case 4: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 5: GOTO_SCREEN(InterfaceSettingsScreen); break;
|
||||
case 6: GOTO_SCREEN(AdvancedSettingsMenu); break;
|
||||
case 7: GOTO_SCREEN(AboutScreen); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,75 @@
|
|||
|
||||
/****************************************************************************
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* This file was auto-generated using "svg2cpp.pl"
|
||||
*
|
||||
* The encoding consists of x,y pairs with the min and max scaled to
|
||||
* 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the
|
||||
* start of a new closed path.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
constexpr float x_min = 0.000000;
|
||||
|
||||
constexpr float x_max = 272.000000;
|
||||
|
||||
constexpr float y_min = 0.000000;
|
||||
|
||||
constexpr float y_max = 480.000000;
|
||||
|
||||
const PROGMEM uint16_t z_neg[] = {0xC9B1, 0x96B3, 0xD990, 0x96B3, 0xD990, 0xA8D0, 0xE17F, 0xA8D0, 0xD1A0, 0xB1DF, 0xC1C2, 0xA8D0, 0xC9B1, 0xA8D0, 0xC9B1, 0x96B3};
|
||||
|
||||
const PROGMEM uint16_t z_pos[] = {0xC9B1, 0x8DA4, 0xD990, 0x8DA4, 0xD990, 0x7B86, 0xE17F, 0x7B86, 0xD1A0, 0x7277, 0xC1C2, 0x7B86, 0xC9B1, 0x7B86, 0xC9B1, 0x8DA4};
|
||||
|
||||
const PROGMEM uint16_t y_neg[] = {0x5037, 0x9979, 0x6264, 0x9979, 0x5529, 0xA92A, 0x5E3F, 0xA92A, 0x4575, 0xB103, 0x39E6, 0xA92A, 0x42FC, 0xA92A, 0x5037, 0x9979};
|
||||
|
||||
const PROGMEM uint16_t y_pos[] = {0x5D72, 0x89C7, 0x6F9F, 0x89C7, 0x7CDA, 0x7A15, 0x85F0, 0x7A15, 0x7A61, 0x723D, 0x6197, 0x7A15, 0x6AAD, 0x7A15, 0x5D72, 0x89C7};
|
||||
|
||||
const PROGMEM uint16_t x_neg[] = {0x513D, 0x8DB3, 0x4AA0, 0x958C, 0x2647, 0x958C, 0x22F8, 0x9979, 0x1769, 0x91A0, 0x3033, 0x89C7, 0x2CE4, 0x8DB3, 0x513D, 0x8DB3};
|
||||
|
||||
const PROGMEM uint16_t x_pos[] = {0x7566, 0x8DB3, 0x6EC9, 0x958C, 0x9322, 0x958C, 0x8FD4, 0x9979, 0xA89E, 0x91A0, 0x9D0E, 0x89C7, 0x99C0, 0x8DB3, 0x7566, 0x8DB3};
|
||||
|
||||
const PROGMEM uint16_t syringe_fluid[] = {0x7D1D, 0x4A0F, 0x87FC, 0x4C0E, 0x8CF4, 0x4C0E, 0x9801, 0x4A0F, 0x9801, 0x1AA2, 0x7D1D, 0x1AA2, 0x7D1D, 0x4A0F};
|
||||
|
||||
const PROGMEM uint16_t syringe[] = {0x83C2, 0x42AA, 0x83C2, 0x43FF, 0x8D2C, 0x43FF, 0x8D2C, 0x42AA, 0xFFFF, 0x83C2, 0x3D54, 0x83C2, 0x3EAA, 0x8D2C, 0x3EAA, 0x8D2C, 0x3D54, 0xFFFF, 0x83C2, 0x37FF, 0x83C2, 0x3954, 0x8D2C, 0x3954, 0x8D2C, 0x37FF, 0xFFFF, 0x83C2, 0x32AA, 0x83C2, 0x33FF, 0x8D2C, 0x33FF, 0x8D2C, 0x32AA, 0xFFFF, 0x83C2, 0x2D54, 0x83C2, 0x2EAA, 0x8D2C, 0x2EAA, 0x8D2C, 0x2D54, 0xFFFF, 0x83C2, 0x27FF, 0x83C2, 0x2955, 0x8D2C, 0x2955, 0x8D2C, 0x27FF, 0xFFFF, 0x83C2, 0x22AA, 0x83C2, 0x23FF, 0x8D2C, 0x23FF, 0x8D2C, 0x22AA, 0xFFFF, 0x7AC7, 0x0F4B, 0x7AC7, 0x134A, 0x855B, 0x134A, 0x855B, 0x1949, 0x7AC7, 0x1949, 0x7AC7, 0x4B40, 0x855B, 0x4D40, 0x855B, 0x533F, 0x88E2, 0x533F, 0x88E2, 0x653C, 0x8C69, 0x673C, 0x8C69, 0x533F, 0x8FF0, 0x533F, 0x8FF0, 0x4D40, 0x9A85, 0x4B40, 0x9A85, 0x1949, 0x8FF0, 0x1949, 0x8FF0, 0x134A, 0x9A85, 0x134A, 0x9A85, 0x0F4B, 0xFFFF, 0x88E2, 0x134A, 0x8C69, 0x134A, 0x8C69, 0x1949, 0x88E2, 0x1949, 0x88E2, 0x134A, 0xFFFF, 0x7E4D, 0x1B49, 0x96FE, 0x1B49, 0x96FE, 0x4941, 0x8C69, 0x4B40, 0x88E2, 0x4B40, 0x7E4D, 0x4941, 0x7E4D, 0x1B49};
|
||||
|
||||
const PROGMEM uint16_t syringe_outline[] = {0x7AC7, 0x0F4B, 0x7AC7, 0x134A, 0x855B, 0x134A, 0x855B, 0x1949, 0x7AC7, 0x1949, 0x7AC7, 0x4B40, 0x855B, 0x4D40, 0x855B, 0x533F, 0x88E2, 0x533F, 0x88E2, 0x653C, 0x8C69, 0x673C, 0x8C69, 0x533F, 0x8FF0, 0x533F, 0x8FF0, 0x4D40, 0x9A85, 0x4B40, 0x9A85, 0x1949, 0x8FF0, 0x1949, 0x8FF0, 0x134A, 0x9A85, 0x134A, 0x9A85, 0x0F4B, 0x7AC7, 0x0F4B};
|
||||
|
||||
const PROGMEM uint16_t padlock[] = {0x645A, 0x8017, 0x5F9E, 0x80A1, 0x5BBA, 0x821B, 0x5911, 0x844A, 0x580A, 0x86F7, 0x580A, 0x8931, 0x5970, 0x8A98, 0x5C49, 0x8A98, 0x5DB0, 0x8931, 0x5DB0, 0x8703, 0x5E3C, 0x858E, 0x5FAA, 0x845F, 0x61C5, 0x8394, 0x645A, 0x834A, 0x66F0, 0x8394, 0x690C, 0x845F, 0x6A7A, 0x858D, 0x6B07, 0x8703, 0x6B07, 0x8F23, 0x57C8, 0x8F23, 0x551E, 0x8FC3, 0x5404, 0x9145, 0x5404, 0x9C8F, 0x551E, 0x9E11, 0x57C8, 0x9EB1, 0x70EE, 0x9EB1, 0x7398, 0x9E11, 0x74B2, 0x9C8F, 0x74B2, 0x9145, 0x7398, 0x8FC3, 0x70EE, 0x8F23, 0x70AC, 0x86FA, 0x6FA5, 0x844A, 0x6CFD, 0x821B, 0x6917, 0x80A1};
|
||||
|
||||
const PROGMEM uint16_t home_z[] = {0xD6C9, 0x80CC, 0xBB53, 0x905B, 0xC231, 0x905B, 0xC231, 0x9FEB, 0xCFEC, 0x9FEB, 0xCFEC, 0x9823, 0xDDA7, 0x9823, 0xDDA7, 0x9FEB, 0xEB62, 0x9FEB, 0xEB62, 0x905B, 0xF240, 0x905B, 0xE7A3, 0x8A58, 0xE7A3, 0x82CD, 0xE0C6, 0x82CD, 0xE0C6, 0x8674};
|
||||
|
||||
const PROGMEM uint16_t home_e[] = {0xB94F, 0x25AA, 0x9DD8, 0x353A, 0xA4B6, 0x353A, 0xA4B6, 0x44C9, 0xB271, 0x44C9, 0xB271, 0x3D02, 0xC02C, 0x3D02, 0xC02C, 0x44C9, 0xCDE7, 0x44C9, 0xCDE7, 0x353A, 0xD4C5, 0x353A, 0xCA28, 0x2F36, 0xCA28, 0x27AB, 0xC34B, 0x27AB, 0xC34B, 0x2B53};
|
||||
|
||||
const PROGMEM uint16_t bed_icon[] = {0x1764, 0x2C4C, 0x6135, 0x2C4C, 0x6135, 0x40A8, 0x1764, 0x40A8};
|
||||
|
||||
const PROGMEM uint16_t actual_temp[] = {0x1764, 0x466F, 0x6135, 0x466F, 0x6135, 0x5ACB, 0x1764, 0x5ACB};
|
||||
|
||||
const PROGMEM uint16_t target_temp[] = {0x1764, 0x1228, 0x6135, 0x1228, 0x6135, 0x2684, 0x1764, 0x2684};
|
||||
|
||||
const PROGMEM uint16_t fine_label[] = {0x1AA7, 0xC6D2, 0x9387, 0xC6D2, 0x9387, 0xD316, 0x1AA7, 0xD316};
|
||||
|
||||
const PROGMEM uint16_t fine_toggle[] = {0x9C10, 0xC6D2, 0xE4A3, 0xC6D2, 0xE4A3, 0xD316, 0x9C10, 0xD316};
|
||||
|
||||
const PROGMEM uint16_t usb_btn[] = {0x0B68, 0xE880, 0x7B1A, 0xE880, 0x7B1A, 0xF94B, 0x0B68, 0xF94B, 0x0B68, 0xE880};
|
||||
|
||||
const PROGMEM uint16_t menu_btn[] = {0x84E3, 0xE880, 0xF495, 0xE880, 0xF495, 0xF94B, 0x84E3, 0xF94B, 0x84E3, 0xE880};
|
||||
|
||||
const PROGMEM uint16_t e_pos[] = {0xC9B1, 0x3B2D, 0xD990, 0x3B2D, 0xD990, 0x4D4B, 0xE17F, 0x4D4B, 0xD1A0, 0x565A, 0xC1C2, 0x4D4B, 0xC9B1, 0x4D4B, 0xC9B1, 0x3B2D};
|
||||
|
||||
const PROGMEM uint16_t e_neg[] = {0xC9B1, 0x321E, 0xD990, 0x321E, 0xD990, 0x2000, 0xE17F, 0x2000, 0xD1A0, 0x16F1, 0xC1C2, 0x2000, 0xC9B1, 0x2000, 0xC9B1, 0x321E};
|
|
@ -0,0 +1,155 @@
|
|||
/*******************************
|
||||
* bio_printing_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../ftdi_eve_lib/extras/circular_progress.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
#define GRID_COLS 2
|
||||
#define GRID_ROWS 9
|
||||
|
||||
void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char* message) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled));
|
||||
draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(2,2), message, OPT_CENTER, font_large);
|
||||
}
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::draw_progress(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_large)
|
||||
.text(BTN_POS(1,1), BTN_SIZE(2,2), isPrinting() ? F("Printing...") : F("Finished."))
|
||||
.tag(1)
|
||||
.font(font_xlarge);
|
||||
|
||||
draw_circular_progress(cmd, BTN_POS(1,4), BTN_SIZE(2,3), getProgress_percent(), theme_dark, theme_darkest);
|
||||
}
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::draw_time_remaining(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
const uint32_t elapsed = getProgress_seconds_elapsed();
|
||||
const uint8_t hrs = elapsed/3600;
|
||||
const uint8_t min = (elapsed/60)%60;
|
||||
|
||||
char time_str[10];
|
||||
sprintf_P(time_str, PSTR("%02dh %02dm"), hrs, min);
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_large)
|
||||
.text(BTN_POS(1,7), BTN_SIZE(2,2), time_str);
|
||||
}
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::draw_interaction_buttons(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.colors(isPrinting() ? action_btn : normal_btn)
|
||||
.tag(2).button(BTN_POS(1,9), BTN_SIZE(1,1), F("Menu"))
|
||||
#if ENABLED(SDSUPPORT)
|
||||
.enabled(isPrinting() ? isPrintingFromMedia() : 1)
|
||||
#else
|
||||
.enabled(isPrinting() ? 0 : 1)
|
||||
#endif
|
||||
.tag(3)
|
||||
.colors(isPrinting() ? normal_btn : action_btn)
|
||||
.button( BTN_POS(2,9), BTN_SIZE(1,1), isPrinting() ? F("Cancel") : F("Back"));
|
||||
}
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::onRedraw(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
draw_progress(FOREGROUND);
|
||||
draw_time_remaining(FOREGROUND);
|
||||
draw_interaction_buttons(FOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_SCREEN(FeedratePercentScreen); break;
|
||||
case 2: GOTO_SCREEN(TuneMenu); break;
|
||||
case 3:
|
||||
if (isPrinting()) {
|
||||
GOTO_SCREEN(ConfirmAbortPrintDialogBox);
|
||||
} else {
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
break;
|
||||
default: return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
|
||||
char buff[strlen_P((const char * const)message)+1];
|
||||
strcpy_P(buff, (const char * const) message);
|
||||
setStatusMessage(buff);
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::setStatusMessage(const char* message) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
|
||||
draw_status_message(BACKGROUND, message);
|
||||
draw_progress(BACKGROUND);
|
||||
draw_time_remaining(BACKGROUND);
|
||||
draw_interaction_buttons(BACKGROUND);
|
||||
storeBackground();
|
||||
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("New status message: ", message);
|
||||
#endif
|
||||
|
||||
if (AT_SCREEN(BioPrintingDialogBox)) {
|
||||
current_screen.onRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::onIdle() {
|
||||
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
void BioPrintingDialogBox::show() {
|
||||
GOTO_SCREEN(BioPrintingDialogBox);
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,349 @@
|
|||
/*************************
|
||||
* bio_status_screen.cpp *
|
||||
*************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../ftdi_eve_lib/extras/poly_ui.h"
|
||||
#include "bio_printer_ui.h"
|
||||
|
||||
#define E_TRAVEL_LIMIT 60
|
||||
|
||||
#define GRID_COLS 2
|
||||
#define GRID_ROWS 9
|
||||
|
||||
#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
|
||||
|
||||
#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
#include "../../../../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
const uint8_t shadow_depth = 5;
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
float StatusScreen::increment;
|
||||
bool StatusScreen::jog_xy;
|
||||
bool StatusScreen::fine_motion;
|
||||
|
||||
void StatusScreen::unlockMotors() {
|
||||
injectCommands_P(PSTR("M84 XY"));
|
||||
jog_xy = false;
|
||||
}
|
||||
|
||||
void StatusScreen::draw_temperature(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
PolyUI ui(cmd, what);
|
||||
|
||||
int16_t x, y, h, v;
|
||||
|
||||
cmd.tag(15);
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.cmd(COLOR_RGB(bg_color));
|
||||
|
||||
// Draw touch surfaces
|
||||
ui.bounds(POLY(target_temp), x, y, h, v);
|
||||
cmd.rectangle(x, y, h, v);
|
||||
ui.bounds(POLY(actual_temp), x, y, h, v);
|
||||
cmd.rectangle(x, y, h, v);
|
||||
ui.bounds(POLY(bed_icon), x, y, h, v);
|
||||
cmd.rectangle(x, y, h, v);
|
||||
|
||||
// Draw bed icon
|
||||
cmd.cmd(BITMAP_SOURCE(Bed_Heat_Icon_Info))
|
||||
.cmd(BITMAP_LAYOUT(Bed_Heat_Icon_Info))
|
||||
.cmd(BITMAP_SIZE (Bed_Heat_Icon_Info))
|
||||
.cmd(COLOR_RGB(shadow_rgb))
|
||||
.icon (x + 2, y + 2, h, v, Bed_Heat_Icon_Info, icon_scale * 2)
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.icon (x, y, h, v, Bed_Heat_Icon_Info, icon_scale * 2);
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
char bed_str[15];
|
||||
|
||||
cmd.font(font_xlarge)
|
||||
.cmd(COLOR_RGB(bg_text_enabled));
|
||||
|
||||
if (!isHeaterIdle(BED) && getTargetTemp_celsius(BED) > 0) {
|
||||
sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getTargetTemp_celsius(BED)));
|
||||
ui.bounds(POLY(target_temp), x, y, h, v);
|
||||
cmd.text(x, y, h, v, bed_str);
|
||||
}
|
||||
|
||||
sprintf_P(bed_str, PSTR("%-3d C"), ROUND(getActualTemp_celsius(BED)));
|
||||
ui.bounds(POLY(actual_temp), x, y, h, v);
|
||||
cmd.text(x, y, h, v, bed_str);
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_syringe(draw_mode_t what) {
|
||||
int16_t x, y, h, v;
|
||||
const float fill_level = 1.0 - min(1.0, max(0.0, getAxisPosition_mm(E0) / E_TRAVEL_LIMIT));
|
||||
const bool e_homed = isAxisPositionKnown(E0);
|
||||
|
||||
CommandProcessor cmd;
|
||||
PolyUI ui(cmd, what);
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
// Paint the shadow for the syringe
|
||||
ui.color(shadow_rgb);
|
||||
ui.shadow(POLY(syringe_outline), shadow_depth);
|
||||
}
|
||||
|
||||
if (what & FOREGROUND && e_homed) {
|
||||
// Paint the syringe icon
|
||||
ui.color(syringe_rgb);
|
||||
ui.fill(POLY(syringe_outline));
|
||||
|
||||
ui.color(fill_rgb);
|
||||
ui.bounds(POLY(syringe_fluid), x, y, h, v);
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(SCISSOR_XY(x,y + v * (1.0 - fill_level)));
|
||||
cmd.cmd(SCISSOR_SIZE(h, v * fill_level));
|
||||
ui.fill(POLY(syringe_fluid), false);
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
|
||||
ui.color(stroke_rgb);
|
||||
ui.fill(POLY(syringe));
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_arrows(draw_mode_t what) {
|
||||
const bool e_homed = isAxisPositionKnown(E0);
|
||||
const bool z_homed = isAxisPositionKnown(Z);
|
||||
|
||||
CommandProcessor cmd;
|
||||
PolyUI ui(cmd, what);
|
||||
|
||||
ui.button_fill (fill_rgb);
|
||||
ui.button_stroke(stroke_rgb, 28);
|
||||
ui.button_shadow(shadow_rgb, shadow_depth);
|
||||
|
||||
if ((what & BACKGROUND) || jog_xy) {
|
||||
ui.button(1, POLY(x_neg));
|
||||
ui.button(2, POLY(x_pos));
|
||||
ui.button(3, POLY(y_neg));
|
||||
ui.button(4, POLY(y_pos));
|
||||
}
|
||||
|
||||
if ((what & BACKGROUND) || z_homed) {
|
||||
ui.button(5, POLY(z_neg));
|
||||
ui.button(6, POLY(z_pos));
|
||||
}
|
||||
|
||||
if ((what & BACKGROUND) || e_homed) {
|
||||
ui.button(7, POLY(e_neg));
|
||||
ui.button(8, POLY(e_pos));
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_fine_motion(draw_mode_t what) {
|
||||
int16_t x, y, h, v;
|
||||
CommandProcessor cmd;
|
||||
PolyUI ui(cmd, what);
|
||||
|
||||
cmd.font(font_medium)
|
||||
.tag(16);
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
|
||||
ui.bounds(POLY(fine_label), x, y, h, v);
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.text(x, y, h, v, F("Fine motion:"));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
ui.bounds(POLY(fine_toggle), x, y, h, v);
|
||||
cmd.colors(ui_toggle)
|
||||
.toggle(x, y, h, v, F("no\xFFyes"), fine_motion);
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_overlay_icons(draw_mode_t what) {
|
||||
const bool e_homed = isAxisPositionKnown(E0);
|
||||
const bool z_homed = isAxisPositionKnown(Z);
|
||||
|
||||
CommandProcessor cmd;
|
||||
PolyUI ui(cmd, what);
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
ui.button_fill (fill_rgb);
|
||||
ui.button_stroke(stroke_rgb, 28);
|
||||
ui.button_shadow(shadow_rgb, shadow_depth);
|
||||
|
||||
if (!jog_xy) {
|
||||
ui.button(12, POLY(padlock));
|
||||
}
|
||||
|
||||
if (!e_homed) {
|
||||
ui.button(13, POLY(home_e));
|
||||
}
|
||||
|
||||
if (!z_homed) {
|
||||
ui.button(14, POLY(home_z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_buttons(draw_mode_t) {
|
||||
const bool has_media = isMediaInserted() && !isPrintingFromMedia();
|
||||
|
||||
CommandProcessor cmd;
|
||||
|
||||
cmd.font(font_medium)
|
||||
.colors(normal_btn)
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
.enabled(!Sd2Card::ready() || has_media)
|
||||
#else
|
||||
.enabled(has_media)
|
||||
#endif
|
||||
.colors(has_media ? action_btn : normal_btn)
|
||||
.tag(9).button(BTN_POS(1,9), BTN_SIZE(1,1),
|
||||
isPrintingFromMedia() ?
|
||||
F("Printing") :
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
||||
#ifdef LULZBOT_MANUAL_USB_STARTUP
|
||||
(Sd2Card::ready() ? F("USB Drive") : F("Enable USB"))
|
||||
#else
|
||||
F("USB Drive")
|
||||
#endif
|
||||
#else
|
||||
F("SD Card")
|
||||
#endif
|
||||
);
|
||||
|
||||
cmd.colors(!has_media ? action_btn : normal_btn).tag(10).button(BTN_POS(2,9), BTN_SIZE(1,1), F("Menu"));
|
||||
}
|
||||
|
||||
void StatusScreen::onStartup() {
|
||||
// Load the bitmaps for the status screen
|
||||
constexpr uint32_t base = ftdi_memory_map::RAM_G;
|
||||
CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
|
||||
}
|
||||
|
||||
void StatusScreen::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color));
|
||||
cmd.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
draw_syringe(what);
|
||||
draw_temperature(what);
|
||||
draw_arrows(what);
|
||||
draw_overlay_icons(what);
|
||||
draw_buttons(what);
|
||||
draw_fine_motion(what);
|
||||
}
|
||||
|
||||
bool StatusScreen::onTouchStart(uint8_t) {
|
||||
increment = fine_motion ? 0.25 : 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool StatusScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 12:
|
||||
if (!jog_xy) {
|
||||
jog_xy = true;
|
||||
injectCommands_P(PSTR("M17"));
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
if (!Sd2Card::ready()) {
|
||||
StatusScreen::setStatusMessage(F("Insert USB drive..."));
|
||||
Sd2Card::usbStartup();
|
||||
} else {
|
||||
GOTO_SCREEN(FilesScreen);
|
||||
}
|
||||
#else
|
||||
GOTO_SCREEN(FilesScreen);
|
||||
#endif
|
||||
break;
|
||||
case 10: GOTO_SCREEN(MainMenu); break;
|
||||
case 13: SpinnerDialogBox::enqueueAndWait_P(F("G112")); break;
|
||||
case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28 Z")); break;
|
||||
case 15: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 16: fine_motion = !fine_motion; break;
|
||||
default: return false;
|
||||
}
|
||||
// If a passcode is enabled, the LockScreen will prevent the
|
||||
// user from proceeding.
|
||||
LockScreen::check_passcode();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool StatusScreen::onTouchHeld(uint8_t tag) {
|
||||
if (tag >= 1 && tag <= 4 && !jog_xy) return false;
|
||||
if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate
|
||||
#define UI_INCREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis);
|
||||
#define UI_DECREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis);
|
||||
switch (tag) {
|
||||
case 1: UI_DECREMENT_AXIS(X); break;
|
||||
case 2: UI_INCREMENT_AXIS(X); break;
|
||||
case 4: UI_DECREMENT_AXIS(Y); break; // NOTE: Y directions inverted because bed rather than needle moves
|
||||
case 3: UI_INCREMENT_AXIS(Y); break;
|
||||
case 5: UI_DECREMENT_AXIS(Z); break;
|
||||
case 6: UI_INCREMENT_AXIS(Z); break;
|
||||
case 7: UI_DECREMENT_AXIS(E0); break;
|
||||
case 8: UI_INCREMENT_AXIS(E0); break;
|
||||
default: return false;
|
||||
}
|
||||
#undef UI_DECREMENT_AXIS
|
||||
#undef UI_INCREMENT_AXIS
|
||||
if (increment < 10 && !fine_motion)
|
||||
increment += 0.5;
|
||||
current_screen.onRefresh();
|
||||
return false;
|
||||
}
|
||||
|
||||
void StatusScreen::setStatusMessage(progmem_str pstr) {
|
||||
BioPrintingDialogBox::setStatusMessage(pstr);
|
||||
}
|
||||
|
||||
void StatusScreen::setStatusMessage(const char * const str) {
|
||||
BioPrintingDialogBox::setStatusMessage(str);
|
||||
}
|
||||
|
||||
void StatusScreen::onIdle() {
|
||||
if (isPrintingFromMedia())
|
||||
BioPrintingDialogBox::show();
|
||||
|
||||
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,87 @@
|
|||
/*********************
|
||||
* bio_tune_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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void TuneMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.font(font_medium);
|
||||
}
|
||||
|
||||
#define GRID_ROWS 8
|
||||
#define GRID_COLS 2
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.font(font_large).text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Print Menu"))
|
||||
.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.enabled(!isPrinting()).tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), isPrinting() ? F("Printing...") : F("Print Again"))
|
||||
.enabled( isPrinting()).tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Print Speed"))
|
||||
.tag(4).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Bed Temperature"))
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
.enabled(true)
|
||||
#else
|
||||
.enabled(false)
|
||||
#endif
|
||||
.tag(5).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Nudge Nozzle"))
|
||||
.enabled(!isPrinting()).tag(6).button( BTN_POS(1,6), BTN_SIZE(2,1), F("Load Syringe"))
|
||||
.enabled(!isPrinting()).tag(7).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Unlock XY Axis"))
|
||||
.colors(action_btn) .tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
|
||||
}
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
bool TuneMenu::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
case 2: {
|
||||
FileList files;
|
||||
printFile(files.shortFilename());
|
||||
GOTO_PREVIOUS();
|
||||
break;
|
||||
}
|
||||
case 3: GOTO_SCREEN(FeedratePercentScreen); break;
|
||||
case 4: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 5: GOTO_SCREEN(NudgeNozzleScreen); break;
|
||||
case 6: GOTO_SCREEN(BioConfirmHomeXYZ); break;
|
||||
case 7: StatusScreen::unlockMotors(); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
113
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp
Normal file
113
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*******************
|
||||
* boot_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../ftdi_eve_lib/extras/poly_ui.h"
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#include "../theme/bootscreen_logo_portrait.h"
|
||||
#else
|
||||
#include "../theme/bootscreen_logo_landscape.h"
|
||||
#endif
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void BootScreen::onRedraw(draw_mode_t) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(0x000000));
|
||||
cmd.cmd(CLEAR(true,true,true));
|
||||
|
||||
CLCD::turn_on_backlight();
|
||||
SoundPlayer::set_volume(255);
|
||||
}
|
||||
|
||||
void BootScreen::onIdle() {
|
||||
if (CLCD::is_touching()) {
|
||||
// If the user is touching the screen at startup, then
|
||||
// assume the user wants to re-calibrate the screen.
|
||||
// This gives the user the ability to recover a
|
||||
// miscalibration that has been stored to EEPROM.
|
||||
|
||||
// Also reset display parameters to defaults, just
|
||||
// in case the display is borked.
|
||||
InterfaceSettingsScreen::failSafeSettings();
|
||||
|
||||
GOTO_SCREEN(TouchCalibrationScreen);
|
||||
current_screen.forget();
|
||||
PUSH_SCREEN(StatusScreen);
|
||||
} else {
|
||||
if (!UIFlashStorage::is_valid()) {
|
||||
SpinnerDialogBox::show(F("Please wait..."));
|
||||
UIFlashStorage::format_flash();
|
||||
SpinnerDialogBox::hide();
|
||||
}
|
||||
|
||||
if (UIData::animations_enabled()) {
|
||||
// If there is a startup video in the flash SPI, play
|
||||
// that, otherwise show a static splash screen.
|
||||
if (!MediaPlayerScreen::playBootMedia())
|
||||
showSplashScreen();
|
||||
}
|
||||
#ifdef LULZBOT_USE_BIOPRINTER_UI
|
||||
GOTO_SCREEN(BioConfirmHomeXYZ);
|
||||
current_screen.forget();
|
||||
PUSH_SCREEN(StatusScreen);
|
||||
PUSH_SCREEN(BioConfirmHomeE);
|
||||
#else
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void BootScreen::showSplashScreen() {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART);
|
||||
cmd.cmd(CLEAR_COLOR_RGB(0xDEEA5C));
|
||||
cmd.cmd(CLEAR(true,true,true));
|
||||
|
||||
#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0]))
|
||||
|
||||
PolyUI ui(cmd);
|
||||
|
||||
cmd.cmd(COLOR_RGB(0xC1D82F));
|
||||
ui.fill(POLY(logo_green));
|
||||
cmd.cmd(COLOR_RGB(0x000000));
|
||||
ui.fill(POLY(logo_black));
|
||||
ui.fill(POLY(logo_type));
|
||||
ui.fill(POLY(logo_mark));
|
||||
cmd.cmd(COLOR_RGB(0xFFFFFF));
|
||||
ui.fill(POLY(logo_white));
|
||||
|
||||
cmd.cmd(DL::DL_DISPLAY);
|
||||
cmd.cmd(CMD_SWAP);
|
||||
cmd.execute();
|
||||
|
||||
ExtUI::delay_ms(2500);
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,323 @@
|
|||
/******************************
|
||||
* change_filament_screen.cpp *
|
||||
******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace ExtUI;
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
#define COOL_TEMP 40
|
||||
#define LOW_TEMP 180
|
||||
#define MED_TEMP 200
|
||||
#define HIGH_TEMP 220
|
||||
|
||||
/****************** COLOR SCALE ***********************/
|
||||
|
||||
uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) {
|
||||
rgb_t R0, R1, mix;
|
||||
|
||||
float t;
|
||||
if (temp < cool) {
|
||||
R0 = cool_rgb;
|
||||
R1 = low_rgb;
|
||||
t = 0;
|
||||
}
|
||||
else if (temp < low) {
|
||||
R0 = cool_rgb;
|
||||
R1 = low_rgb;
|
||||
t = (float(temp)-cool)/(low-cool);
|
||||
}
|
||||
else if (temp < med) {
|
||||
R0 = low_rgb;
|
||||
R1 = med_rgb;
|
||||
t = (float(temp)-low)/(med-low);
|
||||
}
|
||||
else if (temp < high) {
|
||||
R0 = med_rgb;
|
||||
R1 = high_rgb;
|
||||
t = (float(temp)-med)/(high-med);
|
||||
}
|
||||
else if (temp >= high) {
|
||||
R0 = med_rgb;
|
||||
R1 = high_rgb;
|
||||
t = 1;
|
||||
}
|
||||
rgb_t::lerp(t, R0, R1, mix);
|
||||
return mix;
|
||||
}
|
||||
|
||||
void ChangeFilamentScreen::drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(SCISSOR_XY (x, y))
|
||||
.cmd(SCISSOR_SIZE (w, h/2))
|
||||
.gradient (x, y, high_rgb, x, y+h/2, med_rgb)
|
||||
.cmd(SCISSOR_XY (x, y+h/2))
|
||||
.cmd(SCISSOR_SIZE (w, h/2))
|
||||
.gradient (x, y+h/2, med_rgb, x, y+h, low_rgb)
|
||||
.cmd(SCISSOR_XY ())
|
||||
.cmd(SCISSOR_SIZE ());
|
||||
}
|
||||
|
||||
void ChangeFilamentScreen::onEntry() {
|
||||
screen_data.ChangeFilamentScreen.e_tag = ExtUI::getActiveTool() + 10;
|
||||
screen_data.ChangeFilamentScreen.t_tag = 0;
|
||||
screen_data.ChangeFilamentScreen.repeat_tag = 0;
|
||||
screen_data.ChangeFilamentScreen.saved_extruder = getActiveTool();
|
||||
}
|
||||
|
||||
void ChangeFilamentScreen::onExit() {
|
||||
setActiveTool(screen_data.ChangeFilamentScreen.saved_extruder, true);
|
||||
}
|
||||
|
||||
void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 2
|
||||
#define GRID_ROWS 11
|
||||
#else
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 6
|
||||
#endif
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_large)
|
||||
#else
|
||||
.font(font_medium)
|
||||
#endif
|
||||
.text(BTN_POS(1,1), BTN_SIZE(2,1), F("Extruder Selection:"))
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.text(BTN_POS(1,7), BTN_SIZE(1,1), F("Current Temp:"))
|
||||
#else
|
||||
.text(BTN_POS(3,1), BTN_SIZE(2,1), F("Current Temp:"))
|
||||
.font(font_small)
|
||||
#endif
|
||||
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Removal Temp:"));
|
||||
drawTempGradient(BTN_POS(1,4), BTN_SIZE(1,3));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
char e_str[15];
|
||||
|
||||
const char *idle = PSTR("%-3d C / idle");
|
||||
const char *not_idle = PSTR("%-3d / %-3d C");
|
||||
|
||||
sprintf_P(
|
||||
e_str,
|
||||
isHeaterIdle(getExtruder()) ? idle : not_idle,
|
||||
ROUND(getActualTemp_celsius(getExtruder())),
|
||||
ROUND(getTargetTemp_celsius(getExtruder()))
|
||||
);
|
||||
|
||||
const rgb_t tcol = getWarmColor(getActualTemp_celsius(getExtruder()), COOL_TEMP, LOW_TEMP, MED_TEMP, HIGH_TEMP);
|
||||
cmd.cmd(COLOR_RGB(tcol))
|
||||
.tag(15)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.rectangle(BTN_POS(2,7), BTN_SIZE(1,1))
|
||||
#else
|
||||
.rectangle(BTN_POS(3,2), BTN_SIZE(2,1))
|
||||
#endif
|
||||
.cmd(COLOR_RGB(tcol.luminance() > 128 ? 0x000000 : 0xFFFFFF))
|
||||
.font(font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.text(BTN_POS(2,7), BTN_SIZE(1,1), e_str)
|
||||
#else
|
||||
.text(BTN_POS(3,2), BTN_SIZE(2,1), e_str)
|
||||
#endif
|
||||
.colors(normal_btn);
|
||||
|
||||
const bool t_ok = getActualTemp_celsius(getExtruder()) > getSoftenTemp() - 10;
|
||||
|
||||
if (screen_data.ChangeFilamentScreen.t_tag && !t_ok) {
|
||||
cmd.text(BTN_POS(1,6), BTN_SIZE(1,1), F("Heating..."));
|
||||
} else if (getActualTemp_celsius(getExtruder()) > 100) {
|
||||
cmd.cmd(COLOR_RGB(0xFF0000))
|
||||
.text(BTN_POS(1,4), BTN_SIZE(1,1), F("Caution:"))
|
||||
.colors(normal_btn)
|
||||
.text(BTN_POS(1,6), BTN_SIZE(1,1), F("Hot!"));
|
||||
}
|
||||
|
||||
#define TOG_STYLE(A) colors(A ? action_btn : normal_btn)
|
||||
|
||||
const bool tog2 = screen_data.ChangeFilamentScreen.t_tag == 2;
|
||||
const bool tog3 = screen_data.ChangeFilamentScreen.t_tag == 3;
|
||||
const bool tog4 = screen_data.ChangeFilamentScreen.t_tag == 4;
|
||||
const bool tog10 = screen_data.ChangeFilamentScreen.e_tag == 10;
|
||||
#if HOTENDS > 1
|
||||
const bool tog11 = screen_data.ChangeFilamentScreen.e_tag == 11;
|
||||
#endif
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
cmd.font(font_large)
|
||||
#else
|
||||
cmd.font(font_medium)
|
||||
#endif
|
||||
.TOG_STYLE(tog10)
|
||||
.tag(10) .button (BTN_POS(1,2), BTN_SIZE(1,1), F("1"))
|
||||
#if HOTENDS < 2
|
||||
.enabled(false)
|
||||
#else
|
||||
.TOG_STYLE(tog11)
|
||||
#endif
|
||||
.tag(11) .button (BTN_POS(2,2), BTN_SIZE(1,1), F("2"));
|
||||
|
||||
if (!t_ok) reset_menu_timeout();
|
||||
|
||||
const bool tog7 = screen_data.ChangeFilamentScreen.repeat_tag == 7;
|
||||
const bool tog8 = screen_data.ChangeFilamentScreen.repeat_tag == 8;
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
cmd.font(font_large)
|
||||
#else
|
||||
cmd.font(font_small)
|
||||
#endif
|
||||
.tag(2) .TOG_STYLE(tog2) .button (BTN_POS(2,6), BTN_SIZE(1,1), F( STRINGIFY(LOW_TEMP) "C (PLA)"))
|
||||
.tag(3) .TOG_STYLE(tog3) .button (BTN_POS(2,5), BTN_SIZE(1,1), F( STRINGIFY(MED_TEMP) "C (ABS)"))
|
||||
.tag(4) .TOG_STYLE(tog4) .button (BTN_POS(2,4), BTN_SIZE(1,1), F( STRINGIFY(HIGH_TEMP) "C (High)"))
|
||||
.colors(normal_btn)
|
||||
|
||||
// Add tags to color gradient
|
||||
.cmd(COLOR_MASK(0,0,0,0))
|
||||
.tag(2) .rectangle(BTN_POS(1,6), BTN_SIZE(1,1))
|
||||
.tag(3) .rectangle(BTN_POS(1,5), BTN_SIZE(1,1))
|
||||
.tag(4) .rectangle(BTN_POS(1,4), BTN_SIZE(1,1))
|
||||
.cmd(COLOR_MASK(1,1,1,1))
|
||||
|
||||
.cmd(COLOR_RGB(t_ok ? bg_text_enabled : bg_text_disabled))
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_large)
|
||||
.tag(0) .text (BTN_POS(1,8), BTN_SIZE(1,1), F("Unload"))
|
||||
.text (BTN_POS(2,8), BTN_SIZE(1,1), F("Load/Extrude"))
|
||||
.tag(5) .enabled(t_ok).button (BTN_POS(1,9), BTN_SIZE(1,1), F("Momentary"))
|
||||
.tag(6) .enabled(t_ok).button (BTN_POS(2,9), BTN_SIZE(1,1), F("Momentary"))
|
||||
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(1,10), BTN_SIZE(1,1), F("Continuous"))
|
||||
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(2,10), BTN_SIZE(1,1), F("Continuous"))
|
||||
.tag(1).colors(action_btn) .button (BTN_POS(1,11), BTN_SIZE(2,1), F("Back"));
|
||||
#else
|
||||
.font(font_small)
|
||||
.tag(0) .text (BTN_POS(3,3), BTN_SIZE(1,1), F("Unload"))
|
||||
.text (BTN_POS(4,3), BTN_SIZE(1,1), F("Load/Extrude"))
|
||||
.tag(5) .enabled(t_ok).button (BTN_POS(3,4), BTN_SIZE(1,1), F("Momentary"))
|
||||
.tag(6) .enabled(t_ok).button (BTN_POS(4,4), BTN_SIZE(1,1), F("Momentary"))
|
||||
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (BTN_POS(3,5), BTN_SIZE(1,1), F("Continuous"))
|
||||
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (BTN_POS(4,5), BTN_SIZE(1,1), F("Continuous"))
|
||||
.font(font_medium)
|
||||
.tag(1).colors(action_btn) .button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
uint8_t ChangeFilamentScreen::getSoftenTemp() {
|
||||
switch (screen_data.ChangeFilamentScreen.t_tag) {
|
||||
case 2: return LOW_TEMP;
|
||||
case 3: return MED_TEMP;
|
||||
case 4: return HIGH_TEMP;
|
||||
default: return EXTRUDE_MINTEMP;
|
||||
}
|
||||
}
|
||||
|
||||
ExtUI::extruder_t ChangeFilamentScreen::getExtruder() {
|
||||
switch (screen_data.ChangeFilamentScreen.e_tag) {
|
||||
case 13: return ExtUI::E3;
|
||||
case 12: return ExtUI::E2;
|
||||
case 11: return ExtUI::E1;
|
||||
default: return ExtUI::E0;
|
||||
}
|
||||
}
|
||||
|
||||
bool ChangeFilamentScreen::onTouchStart(uint8_t tag) {
|
||||
// Make the Momentary and Continuous buttons slightly more responsive
|
||||
switch (tag) {
|
||||
case 5: case 6: case 7: case 8:
|
||||
return ChangeFilamentScreen::onTouchHeld(tag);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
// Change temperature
|
||||
screen_data.ChangeFilamentScreen.t_tag = tag;
|
||||
setTargetTemp_celsius(getSoftenTemp(), getExtruder());
|
||||
break;
|
||||
case 7:
|
||||
screen_data.ChangeFilamentScreen.repeat_tag = (screen_data.ChangeFilamentScreen.repeat_tag == 7) ? 0 : 7;
|
||||
break;
|
||||
case 8:
|
||||
screen_data.ChangeFilamentScreen.repeat_tag = (screen_data.ChangeFilamentScreen.repeat_tag == 8) ? 0 : 8;
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
// Change extruder
|
||||
screen_data.ChangeFilamentScreen.e_tag = tag;
|
||||
screen_data.ChangeFilamentScreen.t_tag = 0;
|
||||
screen_data.ChangeFilamentScreen.repeat_tag = 0;
|
||||
setActiveTool(getExtruder(), true);
|
||||
break;
|
||||
case 15: GOTO_SCREEN(TemperatureScreen); break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChangeFilamentScreen::onTouchHeld(uint8_t tag) {
|
||||
if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate
|
||||
constexpr float increment = 1;
|
||||
#define UI_INCREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis);
|
||||
#define UI_DECREMENT_AXIS(axis) MoveAxisScreen::setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis);
|
||||
switch (tag) {
|
||||
case 5: case 7: UI_DECREMENT_AXIS(getExtruder()); break;
|
||||
case 6: case 8: UI_INCREMENT_AXIS(getExtruder()); break;
|
||||
default: return false;
|
||||
}
|
||||
#undef UI_DECREMENT_AXIS
|
||||
#undef UI_INCREMENT_AXIS
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChangeFilamentScreen::onIdle() {
|
||||
if (screen_data.ChangeFilamentScreen.repeat_tag) onTouchHeld(screen_data.ChangeFilamentScreen.repeat_tag);
|
||||
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,47 @@
|
|||
/**************************************
|
||||
* confirm_abort_print_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace ExtUI;
|
||||
|
||||
void ConfirmAbortPrintDialogBox::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("Are you sure you want to cancel the print?"));
|
||||
drawYesNoButtons();
|
||||
}
|
||||
|
||||
bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
GOTO_PREVIOUS();
|
||||
stopPrint();
|
||||
return true;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,48 @@
|
|||
/*******************************************
|
||||
* confirm_auto_calibration_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(CALIBRATION_GCODE)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void ConfirmAutoCalibrationDialogBox::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("For best results, unload the filament and clean the hotend prior to starting calibration. Continue?"));
|
||||
drawYesNoButtons();
|
||||
}
|
||||
|
||||
bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
injectCommands_P(PSTR(LULZBOT_CALIBRATION_COMMANDS));
|
||||
return true;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,54 @@
|
|||
/**************************************
|
||||
* confirm_erase_flash_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void ConfirmEraseFlashDialogBox::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("Are you sure? SPI flash will be erased."));
|
||||
drawYesNoButtons();
|
||||
}
|
||||
|
||||
bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
SpinnerDialogBox::show(F("Erasing..."));
|
||||
UIFlashStorage::format_flash();
|
||||
SpinnerDialogBox::hide();
|
||||
AlertDialogBox::show(F("SPI flash erased"));
|
||||
// Remove ConfirmEraseFlashDialogBox from the stack
|
||||
// so the alert box doesn't return to me.
|
||||
current_screen.forget();
|
||||
return true;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,58 @@
|
|||
/**************************************
|
||||
* confirm_user_request_alert_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) {
|
||||
AlertDialogBox::onRedraw(mode); // Required for the GOTO_SCREEN function to work
|
||||
}
|
||||
|
||||
bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
ExtUI::setUserConfirmed();
|
||||
GOTO_PREVIOUS();
|
||||
return true;
|
||||
case 2: GOTO_PREVIOUS(); return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
void ConfirmUserRequestAlertBox::show(const char* msg) {
|
||||
drawMessage(msg);
|
||||
storeBackground();
|
||||
screen_data.AlertDialogBox.isError = false;
|
||||
GOTO_SCREEN(ConfirmUserRequestAlertBox);
|
||||
}
|
||||
|
||||
void ConfirmUserRequestAlertBox::hide() {
|
||||
if (AT_SCREEN(ConfirmUserRequestAlertBox))
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,63 @@
|
|||
/***********************************
|
||||
* default_acceleration_screen.cpp *
|
||||
***********************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void DefaultAccelerationScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0);
|
||||
w.units(PSTR("mm/s^2"));
|
||||
w.heading( PSTR("Default Acceleration"));
|
||||
w.color(other);
|
||||
w.adjuster( 2, PSTR("Printing:"), getPrintingAcceleration_mm_s2() );
|
||||
w.adjuster( 4, PSTR("Travel:"), getTravelAcceleration_mm_s2() );
|
||||
w.adjuster( 6, PSTR("Retraction:"), getRetractAcceleration_mm_s2() );
|
||||
w.increments();
|
||||
w.button( 8, PSTR("Set Axis Maximum"));
|
||||
}
|
||||
|
||||
bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(PrintingAcceleration_mm_s2); break;
|
||||
case 3: UI_INCREMENT(PrintingAcceleration_mm_s2); break;
|
||||
case 4: UI_DECREMENT(TravelAcceleration_mm_s2); break;
|
||||
case 5: UI_INCREMENT(TravelAcceleration_mm_s2); break;
|
||||
case 6: UI_DECREMENT(RetractAcceleration_mm_s2); break;
|
||||
case 7: UI_INCREMENT(RetractAcceleration_mm_s2); break;
|
||||
case 8: GOTO_SCREEN(MaxAccelerationScreen); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,150 @@
|
|||
/**********************
|
||||
* developer_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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void DeveloperMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.font(font_medium)
|
||||
.tag(0);
|
||||
|
||||
#ifdef SPI_FLASH_SS
|
||||
constexpr bool has_flash = true;
|
||||
#else
|
||||
constexpr bool has_flash = false;
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
constexpr bool has_media = true;
|
||||
#else
|
||||
constexpr bool has_media = false;
|
||||
#endif
|
||||
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled));
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 10
|
||||
#define GRID_COLS 1
|
||||
cmd.font(font_large) .text ( BTN_POS(1,1), BTN_SIZE(1,1), F("Developer Menu"))
|
||||
.colors(normal_btn)
|
||||
.tag(2).font(font_medium) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets"))
|
||||
.tag(3) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Stress Test"))
|
||||
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Show Touch Registers"))
|
||||
.tag(5) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Play Song"))
|
||||
.tag(6).enabled(has_media).button( BTN_POS(1,6), BTN_SIZE(1,1), F("Play Video from Media"))
|
||||
.tag(7).enabled(has_flash).button( BTN_POS(1,7), BTN_SIZE(1,1), F("Play Video from SPI Flash"))
|
||||
.tag(8).enabled(has_flash).button( BTN_POS(1,8), BTN_SIZE(1,1), F("Load Video to SPI Flash"))
|
||||
.tag(9).enabled(has_flash).button( BTN_POS(1,9), BTN_SIZE(1,1), F("Erase SPI Flash"))
|
||||
|
||||
.tag(1).colors(action_btn)
|
||||
.button( BTN_POS(1,10), BTN_SIZE(1,1), F("Back"));
|
||||
#else
|
||||
#define GRID_ROWS 6
|
||||
#define GRID_COLS 2
|
||||
cmd.font(font_medium) .text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Developer Menu"))
|
||||
.colors(normal_btn)
|
||||
.tag(2).font(font_small) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Show All Widgets"))
|
||||
.tag(3) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("Show Touch Registers"))
|
||||
.tag(9) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("Show Pin States"))
|
||||
.tag(4) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("Play Song"))
|
||||
.tag(5).enabled(has_media).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Play Video from Media"))
|
||||
.tag(6).enabled(has_flash).button( BTN_POS(2,3), BTN_SIZE(1,1), F("Play Video from SPI Flash"))
|
||||
.tag(7).enabled(has_flash).button( BTN_POS(2,4), BTN_SIZE(1,1), F("Load Video to SPI Flash"))
|
||||
.tag(8).enabled(has_flash).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Erase SPI Flash"))
|
||||
.tag(1).colors(action_btn)
|
||||
.button( BTN_POS(1,6), BTN_SIZE(2,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool DeveloperMenu::onTouchEnd(uint8_t tag) {
|
||||
using namespace Theme;
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
case 2: GOTO_SCREEN(WidgetsScreen); break;
|
||||
case 3:
|
||||
PUSH_SCREEN(StressTestScreen);
|
||||
AlertDialogBox::show(F("Please do not run this test unattended as it may cause your printer to malfunction."));
|
||||
current_screen.forget();
|
||||
break;
|
||||
case 4: GOTO_SCREEN(TouchRegistersScreen); break;
|
||||
case 5: sound.play(js_bach_joy, PLAY_ASYNCHRONOUS); break;
|
||||
#if ENABLED(SDSUPPORT)
|
||||
case 6:
|
||||
if (!MediaPlayerScreen::playCardMedia())
|
||||
AlertDialogBox::showError(F("Cannot open STARTUP.AVI"));
|
||||
break;
|
||||
#endif
|
||||
#ifdef SPI_FLASH_SS
|
||||
case 7:
|
||||
if (!MediaPlayerScreen::playBootMedia())
|
||||
AlertDialogBox::showError(F("No boot media available"));
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
SpinnerDialogBox::show(F("Saving..."));
|
||||
UIFlashStorage::error_t res = UIFlashStorage::write_media_file(F("STARTUP.AVI"));
|
||||
SpinnerDialogBox::hide();
|
||||
reset_menu_timeout();
|
||||
switch (res) {
|
||||
case UIFlashStorage::SUCCESS:
|
||||
AlertDialogBox::show(F("File copied!"));
|
||||
break;
|
||||
|
||||
case UIFlashStorage::READ_ERROR:
|
||||
AlertDialogBox::showError(F("Failed to read file"));
|
||||
break;
|
||||
|
||||
case UIFlashStorage::VERIFY_ERROR:
|
||||
AlertDialogBox::showError(F("Failed to verify file"));
|
||||
break;
|
||||
|
||||
case UIFlashStorage::FILE_NOT_FOUND:
|
||||
AlertDialogBox::showError(F("Cannot open STARTUP.AVI"));
|
||||
break;
|
||||
|
||||
case UIFlashStorage::WOULD_OVERWRITE:
|
||||
AlertDialogBox::showError(F("Cannot overwrite existing media."));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 9: GOTO_SCREEN(ConfirmEraseFlashDialogBox); break;
|
||||
#endif
|
||||
case 10: GOTO_SCREEN(EndstopStatesScreen); break;
|
||||
default: return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,83 @@
|
|||
/*****************************
|
||||
* dialog_box_base_class.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
#define GRID_COLS 2
|
||||
#define GRID_ROWS 8
|
||||
|
||||
template<typename T>
|
||||
void DialogBoxBaseClass::drawMessage(const T message, int16_t font) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.tag(0);
|
||||
draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font ? font : font_large);
|
||||
cmd.colors(normal_btn);
|
||||
}
|
||||
|
||||
template void DialogBoxBaseClass::drawMessage(const char *, int16_t font);
|
||||
template void DialogBoxBaseClass::drawMessage(const progmem_str, int16_t font);
|
||||
|
||||
void DialogBoxBaseClass::drawYesNoButtons(uint8_t default_btn) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_medium)
|
||||
.colors(default_btn == 1 ? action_btn : normal_btn).tag(1).button( BTN_POS(1,8), BTN_SIZE(1,1), F("Yes"))
|
||||
.colors(default_btn == 2 ? action_btn : normal_btn).tag(2).button( BTN_POS(2,8), BTN_SIZE(1,1), F("No"));
|
||||
}
|
||||
|
||||
void DialogBoxBaseClass::drawOkayButton() {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_medium)
|
||||
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Okay"));
|
||||
}
|
||||
|
||||
void DialogBoxBaseClass::drawButton(const progmem_str label) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_medium)
|
||||
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), label);
|
||||
}
|
||||
|
||||
void DialogBoxBaseClass::drawSpinner() {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute();
|
||||
}
|
||||
|
||||
bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
case 2: GOTO_PREVIOUS(); return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,61 @@
|
|||
/*****************************
|
||||
* display_tuning_screen.cpp *
|
||||
*****************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void DisplayTuningScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST);
|
||||
w.units(PSTR(""));
|
||||
w.heading( PSTR("Display Tuning"));
|
||||
w.color(other);
|
||||
w.adjuster( 2, PSTR("H Offset:"), CLCD::mem_read_16(CLCD::REG::HOFFSET) );
|
||||
w.adjuster( 4, PSTR("V Offset:"), CLCD::mem_read_16(CLCD::REG::VOFFSET) );
|
||||
w.increments();
|
||||
w.heading( PSTR("Touch Screen"));
|
||||
w.button(6, PSTR("Calibrate"));
|
||||
}
|
||||
|
||||
bool DisplayTuningScreen::onTouchHeld(uint8_t tag) {
|
||||
#define REG_INCREMENT(a,i) CLCD::mem_write_16(CLCD::REG::a, CLCD::mem_read_16(CLCD::REG::a) + i)
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: REG_INCREMENT(HOFFSET, -increment); break;
|
||||
case 3: REG_INCREMENT(HOFFSET, increment); break;
|
||||
case 4: REG_INCREMENT(VOFFSET, -increment); break;
|
||||
case 5: REG_INCREMENT(VOFFSET, increment); break;
|
||||
case 6: GOTO_SCREEN(TouchCalibrationScreen); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,155 @@
|
|||
/****************************
|
||||
* endstop_state_screen.cpp *
|
||||
****************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void EndstopStatesScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
#ifdef LULZBOT_SET_PROBE_PINS_STATE
|
||||
LULZBOT_SET_PROBE_PINS_STATE(true)
|
||||
#endif
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onExit() {
|
||||
BaseScreen::onExit();
|
||||
#ifdef LULZBOT_SET_PROBE_PINS_STATE
|
||||
LULZBOT_SET_PROBE_PINS_STATE(false)
|
||||
#endif
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onRedraw(draw_mode_t) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0);
|
||||
|
||||
#define GRID_ROWS 7
|
||||
#define GRID_COLS 6
|
||||
|
||||
#define PIN_BTN(X,Y,PIN,LABEL) button(BTN_POS(X,Y), BTN_SIZE(2,1), F(LABEL))
|
||||
#define PIN_ENABLED(LABEL,PIN,INV,X,Y) cmd.enabled(1).colors(READ(PIN##_PIN) != INV ? action_btn : normal_btn).PIN_BTN(X,Y,PIN,LABEL);
|
||||
#define PIN_DISABLED(LABEL,PIN,INV,X,Y) cmd.enabled(0).PIN_BTN(X,Y,PIN,LABEL);
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
cmd.font(font_large)
|
||||
#else
|
||||
cmd.font(font_medium)
|
||||
#endif
|
||||
.text(BTN_POS(1,1), BTN_SIZE(6,1), F("Endstop States:"))
|
||||
.font(font_tiny);
|
||||
#if PIN_EXISTS(X_MAX)
|
||||
PIN_ENABLED ("X Max", X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
|
||||
#else
|
||||
PIN_DISABLED("X Max",X_MAX,X_MAX_ENDSTOP_INVERTING,1,2)
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MAX)
|
||||
PIN_ENABLED ("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
|
||||
#else
|
||||
PIN_DISABLED("Y Max",Y_MAX,Y_MAX_ENDSTOP_INVERTING,3,2)
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MAX)
|
||||
PIN_ENABLED ("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
|
||||
#else
|
||||
PIN_DISABLED("Z Max",Z_MAX,Z_MAX_ENDSTOP_INVERTING,5,2)
|
||||
#endif
|
||||
#if PIN_EXISTS(X_MIN)
|
||||
PIN_ENABLED ("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
|
||||
#else
|
||||
PIN_DISABLED("X Min",X_MIN,X_MIN_ENDSTOP_INVERTING,1,3)
|
||||
#endif
|
||||
#if PIN_EXISTS(Y_MIN)
|
||||
PIN_ENABLED ("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
|
||||
#else
|
||||
PIN_DISABLED("Y Min",Y_MIN,Y_MIN_ENDSTOP_INVERTING,3,3)
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MIN)
|
||||
PIN_ENABLED ("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
|
||||
#else
|
||||
PIN_DISABLED("Z Min",Z_MIN,Z_MIN_ENDSTOP_INVERTING,5,3)
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT)
|
||||
PIN_ENABLED ("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
|
||||
#else
|
||||
PIN_DISABLED("Runout 1",FIL_RUNOUT, FIL_RUNOUT_INVERTING,1,4)
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && PIN_EXISTS(FIL_RUNOUT2)
|
||||
PIN_ENABLED ("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
|
||||
#else
|
||||
PIN_DISABLED("Runout 2",FIL_RUNOUT2,FIL_RUNOUT_INVERTING,3,4)
|
||||
#endif
|
||||
#if PIN_EXISTS(Z_MIN_PROBE)
|
||||
PIN_ENABLED ("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
|
||||
#else
|
||||
PIN_DISABLED("Z Probe",Z_MIN_PROBE,Z_MIN_PROBE_ENDSTOP_INVERTING,5,4)
|
||||
#endif
|
||||
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 30
|
||||
cmd.font(font_small)
|
||||
.text (BTN_POS(1,5), BTN_SIZE(3,1), F("Soft Limits:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.colors(ui_toggle)
|
||||
.tag(2).toggle(BTN_POS(4,5), BTN_SIZE(3,1), F("off\xFFon"), getSoftEndstopState());
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 0
|
||||
#endif
|
||||
|
||||
cmd.font(font_medium)
|
||||
.colors(action_btn)
|
||||
.tag(1).button( BTN_POS(1,7), BTN_SIZE(6,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
bool EndstopStatesScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
case 2: setSoftEndstopState(!getSoftEndstopState());
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onIdle() {
|
||||
constexpr uint32_t DIAGNOSTICS_UPDATE_INTERVAL = 100;
|
||||
|
||||
if (refresh_timer.elapsed(DIAGNOSTICS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
reset_menu_timeout();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,52 @@
|
|||
/*******************************
|
||||
* feedrate_percent_screen.cpp *
|
||||
*******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
|
||||
void FeedratePercentScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0).units(PSTR("%"));
|
||||
|
||||
w.heading(PSTR("Print Speed"));
|
||||
w.adjuster(4, PSTR("Speed"), getFeedrate_percent());
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool FeedratePercentScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 4: UI_DECREMENT(Feedrate_percent); break;
|
||||
case 5: UI_INCREMENT(Feedrate_percent); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,101 @@
|
|||
/*********************
|
||||
* filament_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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void FilamentMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.font(font_large)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 9
|
||||
#define GRID_COLS 2
|
||||
.text ( BTN_POS(1,1), BTN_SIZE(2,1), F("Filament Options:"))
|
||||
.font(font_medium).colors(normal_btn)
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(2).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Runout Sensor"))
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(3).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Linear Advance"))
|
||||
.colors(action_btn)
|
||||
.tag(1) .button( BTN_POS(1,9), BTN_SIZE(2,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
#else
|
||||
#define GRID_ROWS 6
|
||||
#define GRID_COLS 3
|
||||
.text ( BTN_POS(1,1), BTN_SIZE(3,1), F("Filament Options:"))
|
||||
.font(font_medium).colors(normal_btn)
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(2).button( BTN_POS(1,2), BTN_SIZE(3,1), F("Filament Runout"))
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(3).button( BTN_POS(1,3), BTN_SIZE(3,1), F("Linear Advance"))
|
||||
.colors(action_btn)
|
||||
.tag(1) .button( BTN_POS(1,6), BTN_SIZE(3,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool FilamentMenu::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
case 2: GOTO_SCREEN(FilamentRunoutScreen); break;
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
case 3: GOTO_SCREEN(LinearAdvanceScreen); break;
|
||||
#endif
|
||||
default: return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,65 @@
|
|||
/******************************
|
||||
* filament_runout_screen.cpp *
|
||||
******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void FilamentRunoutScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.heading( PSTR("Runout Detection:"));
|
||||
w.toggle( 2, PSTR("Filament Sensor:"), PSTR("off\xFFon"), getFilamentRunoutEnabled());
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
w.heading(PSTR("Detection Threshold:"));
|
||||
w.units(PSTR("mm"));
|
||||
w.precision(0);
|
||||
w.color(e_axis);
|
||||
w.adjuster( 10, PSTR("Distance:"), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled());
|
||||
w.increments();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break;
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
case 10: UI_DECREMENT(FilamentRunoutDistance_mm); break;
|
||||
case 11: UI_INCREMENT(FilamentRunoutDistance_mm); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,264 @@
|
|||
/********************
|
||||
* files_screen.cpp *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void FilesScreen::onEntry() {
|
||||
screen_data.FilesScreen.cur_page = 0;
|
||||
screen_data.FilesScreen.selected_tag = 0xFF;
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
|
||||
CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP);
|
||||
#endif
|
||||
gotoPage(0);
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
const char *FilesScreen::getSelectedShortFilename() {
|
||||
FileList files;
|
||||
files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true);
|
||||
return files.shortFilename();
|
||||
}
|
||||
|
||||
const char *FilesScreen::getSelectedLongFilename() {
|
||||
FileList files;
|
||||
files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true);
|
||||
return files.longFilename();
|
||||
}
|
||||
|
||||
void FilesScreen::drawSelectedFile() {
|
||||
FileList files;
|
||||
files.seek(getFileForTag(screen_data.FilesScreen.selected_tag), true);
|
||||
screen_data.FilesScreen.flags.is_dir = files.isDir();
|
||||
drawFileButton(
|
||||
files.filename(),
|
||||
screen_data.FilesScreen.selected_tag,
|
||||
screen_data.FilesScreen.flags.is_dir,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
uint16_t FilesScreen::getFileForTag(uint8_t tag) {
|
||||
return screen_data.FilesScreen.cur_page * files_per_page + tag - 2;
|
||||
}
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 6
|
||||
#define GRID_ROWS (files_per_page + header_h + footer_h)
|
||||
#else
|
||||
#define GRID_COLS 6
|
||||
#define GRID_ROWS (files_per_page + header_h + footer_h)
|
||||
#endif
|
||||
|
||||
void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted) {
|
||||
const uint8_t line = getLineForTag(tag)+1;
|
||||
CommandProcessor cmd;
|
||||
cmd.tag(tag);
|
||||
cmd.cmd(COLOR_RGB(is_highlighted ? fg_action : bg_color));
|
||||
cmd.font(font_medium)
|
||||
.rectangle( 0, BTN_Y(header_h+line), display_width, BTN_H(1));
|
||||
cmd.cmd(COLOR_RGB(is_highlighted ? normal_btn.rgb : bg_text_enabled));
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
||||
if (is_highlighted) {
|
||||
cmd.cmd(SAVE_CONTEXT());
|
||||
cmd.cmd(MACRO(0));
|
||||
}
|
||||
#endif
|
||||
cmd.text (BTN_POS(1,header_h+line), BTN_SIZE(6,1), filename, OPT_CENTERY);
|
||||
if (is_dir) {
|
||||
cmd.text(BTN_POS(1,header_h+line), BTN_SIZE(6,1), F("> "), OPT_CENTERY | OPT_RIGHTX);
|
||||
}
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES)
|
||||
if (is_highlighted) {
|
||||
cmd.cmd(RESTORE_CONTEXT());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void FilesScreen::drawFileList() {
|
||||
FileList files;
|
||||
screen_data.FilesScreen.num_page = max(1,(ceil)(float(files.count()) / files_per_page));
|
||||
screen_data.FilesScreen.cur_page = min(screen_data.FilesScreen.cur_page, screen_data.FilesScreen.num_page-1);
|
||||
screen_data.FilesScreen.flags.is_root = files.isAtRootDir();
|
||||
|
||||
#undef MARGIN_T
|
||||
#undef MARGIN_B
|
||||
#define MARGIN_T 0
|
||||
#define MARGIN_B 0
|
||||
uint16_t fileIndex = screen_data.FilesScreen.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);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FilesScreen::drawHeader() {
|
||||
const bool prev_enabled = screen_data.FilesScreen.cur_page > 0;
|
||||
const bool next_enabled = screen_data.FilesScreen.cur_page < (screen_data.FilesScreen.num_page - 1);
|
||||
|
||||
#undef MARGIN_T
|
||||
#undef MARGIN_B
|
||||
#define MARGIN_T 0
|
||||
#define MARGIN_B 2
|
||||
|
||||
char str[16];
|
||||
sprintf_P(str, PSTR("Page %d of %d"),
|
||||
screen_data.FilesScreen.cur_page + 1, screen_data.FilesScreen.num_page);
|
||||
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_small)
|
||||
.tag(0).button( BTN_POS(2,1), BTN_SIZE(4,header_h), str, OPT_CENTER | OPT_FLAT)
|
||||
.font(font_medium)
|
||||
.colors(action_btn)
|
||||
.tag(241).enabled(prev_enabled).button( BTN_POS(1,1), BTN_SIZE(1,header_h), F("<"))
|
||||
.tag(242).enabled(next_enabled).button( BTN_POS(6,1), BTN_SIZE(1,header_h), F(">"));
|
||||
}
|
||||
|
||||
void FilesScreen::drawFooter() {
|
||||
#undef MARGIN_T
|
||||
#undef MARGIN_B
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define MARGIN_T 15
|
||||
#define MARGIN_B 5
|
||||
#else
|
||||
#define MARGIN_T 5
|
||||
#define MARGIN_B 5
|
||||
#endif
|
||||
const bool has_selection = screen_data.FilesScreen.selected_tag != 0xFF;
|
||||
const uint8_t back_tag = screen_data.FilesScreen.flags.is_root ? 240 : 245;
|
||||
const uint8_t y = GRID_ROWS - footer_h + 1;
|
||||
const uint8_t h = footer_h;
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.colors(has_selection ? normal_btn : action_btn)
|
||||
.tag(back_tag).button( BTN_POS(4,y), BTN_SIZE(3,h), F("Back"))
|
||||
.enabled(has_selection)
|
||||
.colors(has_selection ? action_btn : normal_btn);
|
||||
if (screen_data.FilesScreen.flags.is_dir) {
|
||||
cmd.tag(244).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Open"));
|
||||
} else {
|
||||
cmd.tag(243).button( BTN_POS(1, y), BTN_SIZE(3,h), F("Print"));
|
||||
}
|
||||
}
|
||||
|
||||
void FilesScreen::onRedraw(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
drawHeader();
|
||||
drawSelectedFile();
|
||||
drawFooter();
|
||||
}
|
||||
}
|
||||
|
||||
void FilesScreen::gotoPage(uint8_t page) {
|
||||
screen_data.FilesScreen.selected_tag = 0xFF;
|
||||
screen_data.FilesScreen.cur_page = page;
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.colors(normal_btn);
|
||||
drawFileList();
|
||||
storeBackground();
|
||||
}
|
||||
|
||||
bool FilesScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 240: GOTO_PREVIOUS(); return true;
|
||||
case 241:
|
||||
if (screen_data.FilesScreen.cur_page > 0) {
|
||||
gotoPage(screen_data.FilesScreen.cur_page-1);
|
||||
}
|
||||
break;
|
||||
case 242:
|
||||
if (screen_data.FilesScreen.cur_page < (screen_data.FilesScreen.num_page-1)) {
|
||||
gotoPage(screen_data.FilesScreen.cur_page+1);
|
||||
}
|
||||
break;
|
||||
case 243:
|
||||
printFile(getSelectedShortFilename());
|
||||
StatusScreen::setStatusMessage(F("Print Starting"));
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
return true;
|
||||
case 244:
|
||||
{
|
||||
FileList files;
|
||||
files.changeDir(getSelectedShortFilename());
|
||||
gotoPage(0);
|
||||
}
|
||||
break;
|
||||
case 245:
|
||||
{
|
||||
FileList files;
|
||||
files.upDir();
|
||||
gotoPage(0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (tag < 240) {
|
||||
screen_data.FilesScreen.selected_tag = tag;
|
||||
#if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
|
||||
if (FTDI::ftdi_chip >= 810) {
|
||||
const char *longFilename = getSelectedLongFilename();
|
||||
if (longFilename[0]) {
|
||||
CLCD::FontMetrics fm(font_medium);
|
||||
uint16_t text_width = fm.get_text_width(longFilename);
|
||||
screen_data.FilesScreen.scroll_pos = 0;
|
||||
if (text_width > display_width)
|
||||
screen_data.FilesScreen.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R;
|
||||
else
|
||||
screen_data.FilesScreen.scroll_max = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
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.FilesScreen.scroll_pos)));
|
||||
if (screen_data.FilesScreen.scroll_pos < screen_data.FilesScreen.scroll_max * 16)
|
||||
screen_data.FilesScreen.scroll_pos++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,285 @@
|
|||
/*********************************
|
||||
* interface_settings_screen.cpp *
|
||||
*********************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
#include "../../../../../module/configuration_store.h"
|
||||
|
||||
#if ENABLED(LULZBOT_PRINTCOUNTER)
|
||||
#include "../../../../../module/printcounter.h"
|
||||
#endif
|
||||
|
||||
bool restoreEEPROM();
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
constexpr bool PERSISTENT_STORE_SUCCESS = false; // persistentStore uses true for error
|
||||
|
||||
void InterfaceSettingsScreen::onStartup() {
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::onEntry() {
|
||||
screen_data.InterfaceSettingsScreen.brightness = CLCD::get_brightness();
|
||||
screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume();
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
|
||||
#define GRID_COLS 4
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 7
|
||||
#else
|
||||
#define GRID_ROWS 6
|
||||
#endif
|
||||
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.tag(0)
|
||||
.font(font_medium)
|
||||
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Settings"))
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 30
|
||||
.font(font_small)
|
||||
.tag(0)
|
||||
.text(BTN_POS(1,2), BTN_SIZE(2,1), F("LCD brightness:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,4), BTN_SIZE(2,1), F("Screen lock:"), OPT_RIGHTX | OPT_CENTERY);
|
||||
cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), F("Boot screen:"), OPT_RIGHTX | OPT_CENTERY);
|
||||
#undef EDGE_R
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr uint8_t w = 2;
|
||||
#else
|
||||
constexpr uint8_t w = 1;
|
||||
#endif
|
||||
|
||||
cmd.font(font_medium)
|
||||
#define EDGE_R 30
|
||||
.colors(ui_slider)
|
||||
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.brightness, 128)
|
||||
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
|
||||
.colors(ui_toggle)
|
||||
.tag(4).toggle(BTN_POS(3,4), BTN_SIZE(w,1), F("off\xFFon"), LockScreen::is_enabled())
|
||||
.tag(5).toggle(BTN_POS(3,5), BTN_SIZE(w,1), F("off\xFFon"), UIData::animations_enabled())
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 0
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.colors(normal_btn)
|
||||
.tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), F("Customize Sounds"))
|
||||
.colors(action_btn)
|
||||
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), F("Back"));
|
||||
#else
|
||||
.tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), F("Customize Sounds"))
|
||||
.colors(action_btn)
|
||||
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
case 4:
|
||||
if (!LockScreen::is_enabled())
|
||||
LockScreen::enable();
|
||||
else
|
||||
LockScreen::disable();
|
||||
break;
|
||||
case 5: UIData::enable_animations(!UIData::animations_enabled());; break;
|
||||
case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InterfaceSettingsScreen::onTouchStart(uint8_t tag) {
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 30
|
||||
CommandProcessor cmd;
|
||||
switch (tag) {
|
||||
case 2: cmd.track_linear(BTN_POS(3,3), BTN_SIZE(2,1), 2).execute(); break;
|
||||
case 3: cmd.track_linear(BTN_POS(3,4), BTN_SIZE(2,1), 3).execute(); break;
|
||||
default: break;
|
||||
}
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 0
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
return true;
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::onIdle() {
|
||||
if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) {
|
||||
refresh_timer.start();
|
||||
|
||||
uint16_t value;
|
||||
CommandProcessor cmd;
|
||||
switch (cmd.track_tag(value)) {
|
||||
case 2:
|
||||
screen_data.InterfaceSettingsScreen.brightness = float(value) * 128 / 0xFFFF;
|
||||
CLCD::set_brightness(screen_data.InterfaceSettingsScreen.brightness);
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
break;
|
||||
case 3:
|
||||
screen_data.InterfaceSettingsScreen.volume = value >> 8;
|
||||
SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume);
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
onRefresh();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::failSafeSettings() {
|
||||
// Reset settings that may make the printer interface
|
||||
// unusable.
|
||||
CLCD::mem_write_32(CLCD::REG::ROTATE, 0);
|
||||
CLCD::default_touch_transform();
|
||||
CLCD::default_display_orientation();
|
||||
CLCD::set_brightness(255);
|
||||
UIData::reset_persistent_data();
|
||||
CLCD::mem_write_16(CLCD::REG::HOFFSET, FTDI::Hoffset);
|
||||
CLCD::mem_write_16(CLCD::REG::VOFFSET, FTDI::Voffset);
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::defaultSettings() {
|
||||
LockScreen::passcode = 0;
|
||||
SoundPlayer::set_volume(255);
|
||||
CLCD::set_brightness(255);
|
||||
UIData::reset_persistent_data();
|
||||
InterfaceSoundsScreen::defaultSettings();
|
||||
CLCD::mem_write_16(CLCD::REG::HOFFSET, FTDI::Hoffset);
|
||||
CLCD::mem_write_16(CLCD::REG::VOFFSET, FTDI::Voffset);
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::saveSettings(char *buff) {
|
||||
static_assert(
|
||||
ExtUI::eeprom_data_size >= sizeof(persistent_data_t),
|
||||
"Insufficient space in EEPROM for UI parameters"
|
||||
);
|
||||
|
||||
SERIAL_ECHOLNPGM("Writing setting to EEPROM");
|
||||
|
||||
persistent_data_t eeprom;
|
||||
|
||||
eeprom.passcode = LockScreen::passcode;
|
||||
eeprom.sound_volume = SoundPlayer::get_volume();
|
||||
eeprom.display_brightness = CLCD::get_brightness();
|
||||
eeprom.bit_flags = UIData::get_persistent_data();
|
||||
eeprom.touch_transform_a = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_A);
|
||||
eeprom.touch_transform_b = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_B);
|
||||
eeprom.touch_transform_c = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_C);
|
||||
eeprom.touch_transform_d = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_D);
|
||||
eeprom.touch_transform_e = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_E);
|
||||
eeprom.touch_transform_f = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
|
||||
eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
|
||||
eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset;
|
||||
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
|
||||
eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
|
||||
|
||||
memcpy(buff, &eeprom, sizeof(eeprom));
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::loadSettings(const char *buff) {
|
||||
static_assert(
|
||||
ExtUI::eeprom_data_size >= sizeof(persistent_data_t),
|
||||
"Insufficient space in EEPROM for UI parameters"
|
||||
);
|
||||
|
||||
persistent_data_t eeprom;
|
||||
memcpy(&eeprom, buff, sizeof(eeprom));
|
||||
|
||||
SERIAL_ECHOLNPGM("Loading setting from EEPROM");
|
||||
|
||||
LockScreen::passcode = eeprom.passcode;
|
||||
SoundPlayer::set_volume(eeprom.sound_volume);
|
||||
UIData::set_persistent_data(eeprom.bit_flags);
|
||||
CLCD::set_brightness(eeprom.display_brightness);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_A, eeprom.touch_transform_a);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_B, eeprom.touch_transform_b);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_C, eeprom.touch_transform_c);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_D, eeprom.touch_transform_d);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_E, eeprom.touch_transform_e);
|
||||
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
|
||||
CLCD::mem_write_16(CLCD::REG::HOFFSET, eeprom.display_h_offset_adj + FTDI::Hoffset);
|
||||
CLCD::mem_write_16(CLCD::REG::VOFFSET, eeprom.display_v_offset_adj + FTDI::Voffset);
|
||||
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
|
||||
InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
|
||||
|
||||
#if ENABLED(DEVELOPER_SCREENS)
|
||||
StressTestScreen::startupCheck();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef LULZBOT_EEPROM_BACKUP_SIZE
|
||||
#include "../../../../../HAL/shared/persistent_store_api.h"
|
||||
|
||||
bool restoreEEPROM() {
|
||||
uint8_t data[LULZBOT_EEPROM_BACKUP_SIZE];
|
||||
|
||||
bool success = UIFlashStorage::read_config_data(data, LULZBOT_EEPROM_BACKUP_SIZE);
|
||||
|
||||
if (success)
|
||||
success = persistentStore.write_data(0, data, LULZBOT_EEPROM_BACKUP_SIZE) == PERSISTENT_STORE_SUCCESS;
|
||||
|
||||
if (success)
|
||||
StatusScreen::setStatusMessage(F("Settings restored from backup"));
|
||||
else
|
||||
StatusScreen::setStatusMessage(F("Settings restored to default"));
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool InterfaceSettingsScreen::backupEEPROM() {
|
||||
uint8_t data[LULZBOT_EEPROM_BACKUP_SIZE];
|
||||
|
||||
if (persistentStore.read_data(0, data, LULZBOT_EEPROM_BACKUP_SIZE) != PERSISTENT_STORE_SUCCESS)
|
||||
return false;
|
||||
|
||||
UIFlashStorage::write_config_data(data, LULZBOT_EEPROM_BACKUP_SIZE);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,160 @@
|
|||
/*******************************
|
||||
* interface_sounds_screen.cpp *
|
||||
*******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
uint8_t InterfaceSoundsScreen::event_sounds[];
|
||||
|
||||
const char* InterfaceSoundsScreen::getSoundSelection(event_t event) {
|
||||
return SoundList::name(event_sounds[event]);
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::toggleSoundSelection(event_t event) {
|
||||
event_sounds[event] = (event_sounds[event]+1) % SoundList::n;
|
||||
playEventSound(event);
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) {
|
||||
for(uint8_t i = 0; i < SoundList::n; i++)
|
||||
if (SoundList::data(i) == sound)
|
||||
event_sounds[event] = i;
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::playEventSound(event_t event, play_mode_t mode) {
|
||||
sound.play(SoundList::data(event_sounds[event]), mode);
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::defaultSettings() {
|
||||
setSoundSelection(PRINTING_STARTED, twinkle);
|
||||
setSoundSelection(PRINTING_FINISHED, fanfare);
|
||||
setSoundSelection(PRINTING_FAILED, sad_trombone);
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.tag(0)
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 9
|
||||
|
||||
.font(font_medium)
|
||||
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Interface Sounds"))
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 30
|
||||
.font(font_small)
|
||||
.tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), F("Sound volume:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text (BTN_POS(1,3), BTN_SIZE(2,1), F("Click sounds:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text (BTN_POS(1,5), BTN_SIZE(2,1), F("Print starting:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text (BTN_POS(1,6), BTN_SIZE(2,1), F("Print finished:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text (BTN_POS(1,7), BTN_SIZE(2,1), F("Print error:"), OPT_RIGHTX | OPT_CENTERY);
|
||||
#undef EDGE_R
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr uint8_t w = 2;
|
||||
#else
|
||||
constexpr uint8_t w = 1;
|
||||
#endif
|
||||
|
||||
cmd.font(font_medium)
|
||||
.colors(ui_slider)
|
||||
#define EDGE_R 30
|
||||
.tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettingsScreen.volume, 0xFF)
|
||||
.colors(ui_toggle)
|
||||
.tag(3).toggle (BTN_POS(3,3), BTN_SIZE(w,1), F("off\xFFon"), UIData::touch_sounds_enabled())
|
||||
#undef EDGE_R
|
||||
.colors(normal_btn)
|
||||
#define EDGE_R 0
|
||||
.tag(4).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED))
|
||||
.tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED))
|
||||
.tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED))
|
||||
.colors(action_btn)
|
||||
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), F("Back"));
|
||||
}
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::onEntry() {
|
||||
screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume();
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
case 3: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break;
|
||||
case 4: toggleSoundSelection(PRINTING_STARTED); break;
|
||||
case 5: toggleSoundSelection(PRINTING_FINISHED); break;
|
||||
case 6: toggleSoundSelection(PRINTING_FAILED); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InterfaceSoundsScreen::onTouchStart(uint8_t tag) {
|
||||
CommandProcessor cmd;
|
||||
#undef EDGE_R
|
||||
#define EDGE_R 30
|
||||
switch (tag) {
|
||||
case 2: cmd.track_linear(BTN_POS(3,2), BTN_SIZE(2,1), 2).execute(); break;
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void InterfaceSoundsScreen::onIdle() {
|
||||
if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) {
|
||||
refresh_timer.start();
|
||||
|
||||
uint16_t value;
|
||||
CommandProcessor cmd;
|
||||
switch (cmd.track_tag(value)) {
|
||||
case 2:
|
||||
screen_data.InterfaceSettingsScreen.volume = value >> 8;
|
||||
SoundPlayer::set_volume(screen_data.InterfaceSettingsScreen.volume);
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
onRefresh();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,65 @@
|
|||
/*******************
|
||||
* jerk_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && DISABLED(JUNCTION_DEVIATION)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void JerkScreen::onRedraw(draw_mode_t what) {
|
||||
|
||||
widgets_t w(what);
|
||||
w.precision(1);
|
||||
w.units(PSTR("mm/s"));
|
||||
w.heading( PSTR("Maximum Jerk"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxJerk_mm_s(X) );
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxJerk_mm_s(Y) );
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxJerk_mm_s(Z) );
|
||||
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxJerk_mm_s(E0) );
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool JerkScreen::onTouchHeld(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisMaxJerk_mm_s, X); break;
|
||||
case 3: UI_INCREMENT(AxisMaxJerk_mm_s, X); break;
|
||||
case 4: UI_DECREMENT(AxisMaxJerk_mm_s, Y); break;
|
||||
case 5: UI_INCREMENT(AxisMaxJerk_mm_s, Y); break;
|
||||
case 6: UI_DECREMENT(AxisMaxJerk_mm_s, Z); break;
|
||||
case 7: UI_INCREMENT(AxisMaxJerk_mm_s, Z); break;
|
||||
case 8: UI_DECREMENT(AxisMaxJerk_mm_s, E0); break;
|
||||
case 9: UI_INCREMENT(AxisMaxJerk_mm_s, E0); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,54 @@
|
|||
/*******************
|
||||
* boot_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(JUNCTION_DEVIATION)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void JunctionDeviationScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2);
|
||||
w.units(PSTR("mm"));
|
||||
w.heading( PSTR("Junction Deviation"));
|
||||
w.color(other) .adjuster( 2, PSTR(""), getJunctionDeviation_mm() );
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(JunctionDeviation_mm); break;
|
||||
case 3: UI_INCREMENT(JunctionDeviation_mm); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,62 @@
|
|||
/*******************
|
||||
* kill_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
// The kill screen is an oddball that happens after Marlin has killed the events
|
||||
// loop. So we only have a show() method rather than onRedraw(). The KillScreen
|
||||
// should not be used as a model for other UI screens as it is an exception.
|
||||
|
||||
void KillScreen::show(progmem_str message) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0);
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 8
|
||||
|
||||
cmd.font(Theme::font_large)
|
||||
.cmd(COLOR_RGB(Theme::bg_text_enabled))
|
||||
.text(BTN_POS(1,2), BTN_SIZE(4,1), message)
|
||||
.text(BTN_POS(1,3), BTN_SIZE(4,1), F("PRINTER HALTED"))
|
||||
.text(BTN_POS(1,6), BTN_SIZE(4,1), F("Please reset"));
|
||||
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
|
||||
cmd.cmd(DL::DL_DISPLAY)
|
||||
.cmd(CMD_SWAP)
|
||||
.execute();
|
||||
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, PLAY_SYNCHRONOUS);
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,77 @@
|
|||
/*****************************
|
||||
* linear_advance_screen.cpp *
|
||||
*****************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(LIN_ADVANCE)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void LinearAdvanceScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2, DEFAULT_LOWEST).color(e_axis);
|
||||
w.heading( PSTR("Linear Advance:"));
|
||||
#if EXTRUDERS == 1
|
||||
w.adjuster( 2, PSTR("K:"), getLinearAdvance_mm_mm_s(E0) );
|
||||
#else
|
||||
w.adjuster( 2, PSTR("K E1:"), getLinearAdvance_mm_mm_s(E0) );
|
||||
w.adjuster( 4, PSTR("K E2:"), getLinearAdvance_mm_mm_s(E1) );
|
||||
#if EXTRUDERS > 2
|
||||
w.adjuster( 6, PSTR("K E3:"), getLinearAdvance_mm_mm_s(E2) );
|
||||
#if EXTRUDERS > 3
|
||||
w.adjuster( 8, PSTR("K E4:"), getLinearAdvance_mm_mm_s(E3) );
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool LinearAdvanceScreen::onTouchHeld(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(LinearAdvance_mm_mm_s, E0); break;
|
||||
case 3: UI_INCREMENT(LinearAdvance_mm_mm_s, E0); break;
|
||||
#if EXTRUDERS > 1
|
||||
case 4: UI_DECREMENT(LinearAdvance_mm_mm_s, E1); break;
|
||||
case 5: UI_INCREMENT(LinearAdvance_mm_mm_s, E1); break;
|
||||
#if EXTRUDERS > 2
|
||||
case 6: UI_DECREMENT(LinearAdvance_mm_mm_s, E2); break;
|
||||
case 7: UI_INCREMENT(LinearAdvance_mm_mm_s, E2); break;
|
||||
#if EXTRUDERS > 3
|
||||
case 8: UI_DECREMENT(LinearAdvance_mm_mm_s, E3); break;
|
||||
case 9: UI_INCREMENT(LinearAdvance_mm_mm_s, E3); break;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
214
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp
Normal file
214
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/lock_screen.cpp
Normal file
|
@ -0,0 +1,214 @@
|
|||
/*******************
|
||||
* lock_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
uint16_t LockScreen::passcode = 0;
|
||||
|
||||
void LockScreen::onEntry() {
|
||||
const uint8_t siz = sizeof(screen_data.LockScreen.passcode);
|
||||
memset(screen_data.LockScreen.passcode, '_', siz-1);
|
||||
screen_data.LockScreen.passcode[siz-1] = '\0';
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
void LockScreen::onRedraw(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0);
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 1
|
||||
#define GRID_ROWS 10
|
||||
#else
|
||||
#define GRID_COLS 1
|
||||
#define GRID_ROWS 7
|
||||
#endif
|
||||
|
||||
#undef MARGIN_T
|
||||
#undef MARGIN_B
|
||||
#define MARGIN_T 3
|
||||
#define MARGIN_B 3
|
||||
|
||||
progmem_str message;
|
||||
switch (message_style()) {
|
||||
case 'w':
|
||||
message = F("Wrong passcode!");
|
||||
break;
|
||||
case 'g':
|
||||
message = F("Passcode accepted!");
|
||||
break;
|
||||
default:
|
||||
if (passcode == 0) {
|
||||
message = F("Select Passcode:");
|
||||
} else {
|
||||
message = F("Enter Passcode:");
|
||||
}
|
||||
}
|
||||
message_style() = '\0'; // Terminate the string.
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr uint8_t l = 6;
|
||||
#else
|
||||
constexpr uint8_t l = 3;
|
||||
#endif
|
||||
|
||||
const uint8_t pressed = EventLoop::get_pressed_tag();
|
||||
|
||||
cmd.font(font_large)
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.text(BTN_POS(1,2), BTN_SIZE(1,1), message)
|
||||
.font(font_xlarge)
|
||||
.text(BTN_POS(1,4), BTN_SIZE(1,1), screen_data.LockScreen.passcode)
|
||||
#else
|
||||
.text(BTN_POS(1,1), BTN_SIZE(1,1), message)
|
||||
.font(font_xlarge)
|
||||
.text(BTN_POS(1,2), BTN_SIZE(1,1), screen_data.LockScreen.passcode)
|
||||
#endif
|
||||
.font(font_large)
|
||||
.colors(normal_btn)
|
||||
#ifdef TOUCH_UI_PASSCODE
|
||||
.keys(BTN_POS(1,l+1), BTN_SIZE(1,1), F("123"), pressed)
|
||||
.keys(BTN_POS(1,l+2), BTN_SIZE(1,1), F("456"), pressed)
|
||||
.keys(BTN_POS(1,l+3), BTN_SIZE(1,1), F("789"), pressed)
|
||||
.keys(BTN_POS(1,l+4), BTN_SIZE(1,1), F("0.<"), pressed);
|
||||
#else
|
||||
.keys(BTN_POS(1,l+1), BTN_SIZE(1,1), F("1234567890"), pressed)
|
||||
.keys(BTN_POS(1,l+2), BTN_SIZE(1,1), F("qwertyuiop"), pressed)
|
||||
.keys(BTN_POS(1,l+3), BTN_SIZE(1,1), F("asdfghjkl "), pressed)
|
||||
.keys(BTN_POS(1,l+4), BTN_SIZE(1,1), F("zxcvbnm!?<"), pressed);
|
||||
#endif
|
||||
|
||||
#undef MARGIN_T
|
||||
#undef MARGIN_B
|
||||
#define MARGIN_T MARGIN_DEFAULT
|
||||
#define MARGIN_B MARGIN_DEFAULT
|
||||
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
}
|
||||
|
||||
char &LockScreen::message_style() {
|
||||
// We use the last byte of the passcode string as a flag to indicate,
|
||||
// which message to show.
|
||||
constexpr uint8_t last_char = sizeof(screen_data.LockScreen.passcode)-1;
|
||||
return screen_data.LockScreen.passcode[last_char];
|
||||
}
|
||||
|
||||
void LockScreen::onPasscodeEntered() {
|
||||
if (passcode == 0) {
|
||||
// We are defining a passcode
|
||||
message_style() = 0;
|
||||
onRefresh();
|
||||
sound.play(twinkle, PLAY_SYNCHRONOUS);
|
||||
passcode = compute_checksum();
|
||||
GOTO_PREVIOUS();
|
||||
} else {
|
||||
// We are verifying a passcode
|
||||
if (passcode == compute_checksum()) {
|
||||
message_style() = 'g';
|
||||
onRefresh();
|
||||
sound.play(twinkle, PLAY_SYNCHRONOUS);
|
||||
GOTO_PREVIOUS();
|
||||
} else {
|
||||
message_style() = 'w';
|
||||
onRefresh();
|
||||
sound.play(sad_trombone, PLAY_SYNCHRONOUS);
|
||||
current_screen.forget(); // Discard the screen the user was trying to go to.
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool LockScreen::onTouchEnd(uint8_t tag) {
|
||||
char *c = strchr(screen_data.LockScreen.passcode,'_');
|
||||
if (c) {
|
||||
if (tag == '<') {
|
||||
if (c != screen_data.LockScreen.passcode) {
|
||||
// Backspace deletes previous entered characters.
|
||||
*--c = '_';
|
||||
}
|
||||
} else {
|
||||
// Append character to passcode
|
||||
*c++ = tag;
|
||||
if (*c == '\0') {
|
||||
// If at last character, then process the code.
|
||||
onPasscodeEntered();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
uint16_t LockScreen::compute_checksum() {
|
||||
uint16_t checksum = 0;
|
||||
const char* c = screen_data.LockScreen.passcode;
|
||||
while (*c) {
|
||||
checksum = (checksum << 2) ^ *c++;
|
||||
}
|
||||
if (checksum == 0) checksum = 0xFFFF; // Prevent a zero checksum
|
||||
return checksum;
|
||||
}
|
||||
|
||||
// This function should be called *after* calling GOTO_SCREEN
|
||||
// to move to new screen. If a passcode is enabled, it will
|
||||
// immediately jump to the keypad screen, pushing the previous
|
||||
// screen onto the stack. If the code is entered correctly,
|
||||
// the stack will be popped, allowing the user to proceed to
|
||||
// the new screen. Otherwise it will be popped twice, taking
|
||||
// the user back to where they were before.
|
||||
void LockScreen::check_passcode() {
|
||||
if (passcode == 0) return;
|
||||
message_style() = 0;
|
||||
GOTO_SCREEN(LockScreen);
|
||||
}
|
||||
|
||||
bool LockScreen::is_enabled() {
|
||||
return passcode != 0;
|
||||
}
|
||||
|
||||
void LockScreen::disable() {
|
||||
passcode = 0;
|
||||
}
|
||||
|
||||
void LockScreen::enable() {
|
||||
message_style() = 0;
|
||||
passcode = 0;
|
||||
GOTO_SCREEN(LockScreen);
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
123
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp
Normal file
123
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/main_menu.cpp
Normal file
|
@ -0,0 +1,123 @@
|
|||
/*****************
|
||||
* 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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void MainMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(Theme::font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 8
|
||||
#define GRID_COLS 2
|
||||
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home"))
|
||||
#ifdef NOZZLE_CLEAN_FEATURE
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle"))
|
||||
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis"))
|
||||
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off"))
|
||||
.tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Temperature"))
|
||||
.tag(7).button( BTN_POS(1,4), BTN_SIZE(2,1), F("Change Filament"))
|
||||
.tag(8).button( BTN_POS(1,5), BTN_SIZE(2,1), F("Advanced Settings"))
|
||||
#ifdef PRINTCOUNTER
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(9).button( BTN_POS(1,7), BTN_SIZE(2,1), F("Printer Statistics"))
|
||||
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), F("About Printer"))
|
||||
.colors(action_btn)
|
||||
.tag(1).button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
#else
|
||||
#define GRID_ROWS 5
|
||||
#define GRID_COLS 2
|
||||
.tag(2).button( BTN_POS(1,1), BTN_SIZE(1,1), F("Auto Home"))
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(3).button( BTN_POS(2,1), BTN_SIZE(1,1), F("Clean Nozzle"))
|
||||
.tag(4).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Move Axis"))
|
||||
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), F("Motors Off"))
|
||||
.tag(6).button( BTN_POS(1,3), BTN_SIZE(1,1), F("Temperature"))
|
||||
.tag(7).button( BTN_POS(2,3), BTN_SIZE(1,1), F("Change Filament"))
|
||||
.tag(8).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Advanced Settings"))
|
||||
#ifdef PRINTCOUNTER
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(9).button( BTN_POS(2,4), BTN_SIZE(1,1), F("Printer Statistics"))
|
||||
.tag(10).button( BTN_POS(1,5), BTN_SIZE(1,1), F("About Printer"))
|
||||
.colors(action_btn)
|
||||
.tag(1).button( BTN_POS(2,5), BTN_SIZE(1,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool MainMenu::onTouchEnd(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
case 2: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break;
|
||||
#if ENABLED(NOZZLE_CLEAN_FEATURE)
|
||||
case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break;
|
||||
#endif
|
||||
case 4: GOTO_SCREEN(MoveAxisScreen); break;
|
||||
case 5: injectCommands_P(PSTR("M84")); break;
|
||||
case 6: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 7: GOTO_SCREEN(ChangeFilamentScreen); break;
|
||||
case 8: GOTO_SCREEN(AdvancedSettingsMenu); break;
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
case 9: GOTO_SCREEN(StatisticsScreen); break;
|
||||
#endif
|
||||
case 10: GOTO_SCREEN(AboutScreen); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,85 @@
|
|||
/*******************************
|
||||
* max_acceleration_screen.cpp *
|
||||
*******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0);
|
||||
w.units(PSTR("mm/s^2"));
|
||||
w.heading( PSTR("Maximum Acceleration"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxAcceleration_mm_s2(X) );
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxAcceleration_mm_s2(Y) );
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxAcceleration_mm_s2(Z) );
|
||||
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
|
||||
w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisMaxAcceleration_mm_s2(E0) );
|
||||
#elif EXTRUDERS > 1
|
||||
w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisMaxAcceleration_mm_s2(E0) );
|
||||
w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisMaxAcceleration_mm_s2(E1) );
|
||||
#if EXTRUDERS > 2
|
||||
w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisMaxAcceleration_mm_s2(E2) );
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisMaxAcceleration_mm_s2(E3) );
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisMaxAcceleration_mm_s2, X ); break;
|
||||
case 3: UI_INCREMENT(AxisMaxAcceleration_mm_s2, X ); break;
|
||||
case 4: UI_DECREMENT(AxisMaxAcceleration_mm_s2, Y ); break;
|
||||
case 5: UI_INCREMENT(AxisMaxAcceleration_mm_s2, Y ); break;
|
||||
case 6: UI_DECREMENT(AxisMaxAcceleration_mm_s2, Z ); break;
|
||||
case 7: UI_INCREMENT(AxisMaxAcceleration_mm_s2, Z ); break;
|
||||
case 8: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E0); break;
|
||||
case 9: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E0); break;
|
||||
#if EXTRUDERS > 1 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break;
|
||||
case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 2 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break;
|
||||
case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 3 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break;
|
||||
case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,87 @@
|
|||
/***************************
|
||||
* max_velocity_screen.cpp *
|
||||
***************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void MaxVelocityScreen::onRedraw(draw_mode_t what) {
|
||||
using namespace ExtUI;
|
||||
widgets_t w(what);
|
||||
w.precision(0);
|
||||
w.units(PSTR("mm/s"));
|
||||
w.heading( PSTR("Maximum Velocity"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisMaxFeedrate_mm_s(X) );
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisMaxFeedrate_mm_s(Y) );
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisMaxFeedrate_mm_s(Z) );
|
||||
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
|
||||
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisMaxFeedrate_mm_s(E0) );
|
||||
#elif EXTRUDERS > 1
|
||||
w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisMaxFeedrate_mm_s(E0) );
|
||||
w.color(e_axis) .adjuster( 10, PSTR("E2:"), getAxisMaxFeedrate_mm_s(E1) );
|
||||
#if EXTRUDERS > 2
|
||||
w.color(e_axis).adjuster( 12, PSTR("E3:"), getAxisMaxFeedrate_mm_s(E2) );
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
w.color(e_axis).adjuster( 14, PSTR("E4:"), getAxisMaxFeedrate_mm_s(E3) );
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool MaxVelocityScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisMaxFeedrate_mm_s, X); break;
|
||||
case 3: UI_INCREMENT(AxisMaxFeedrate_mm_s, X); break;
|
||||
case 4: UI_DECREMENT(AxisMaxFeedrate_mm_s, Y); break;
|
||||
case 5: UI_INCREMENT(AxisMaxFeedrate_mm_s, Y); break;
|
||||
case 6: UI_DECREMENT(AxisMaxFeedrate_mm_s, Z); break;
|
||||
case 7: UI_INCREMENT(AxisMaxFeedrate_mm_s, Z); break;
|
||||
case 8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break;
|
||||
case 9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break;
|
||||
#if EXTRUDERS > 1 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break;
|
||||
case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 2 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break;
|
||||
case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 3 && ENABLED(DISTINCT_E_FACTORS)
|
||||
case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break;
|
||||
case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,169 @@
|
|||
/***************************
|
||||
* media_player_screen.cpp *
|
||||
***************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
/**
|
||||
* The MediaPlayerScreen allows an AVI to be played.
|
||||
*
|
||||
* It requires a special AVI file. The following video
|
||||
* and audio codecs must be used:
|
||||
*
|
||||
* -vcodec mjpeg -pix_fmt yuvj420p
|
||||
* -acodec adpcm_ima_wav
|
||||
*
|
||||
* To generate a 2 second static screen from a png file:
|
||||
*
|
||||
* ffmpeg -i startup.png -vcodec mjpeg -pix_fmt yuvj420p -r 1 video.avi
|
||||
* sox -n -r 44100 -b 8 -c 2 -L silence.wav trim 0.0 2.000
|
||||
* ffmpeg -i silence.wav -acodec adpcm_ima_wav silence.avi
|
||||
* ffmpeg -i video.avi -i silence.wav -c copy -map 0:v:0 -map 1:a:0 startup.avi
|
||||
*/
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
#include "../archim2-flash/media_file_reader.h"
|
||||
|
||||
using namespace FTDI;
|
||||
|
||||
void MediaPlayerScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
CLCD::turn_on_backlight();
|
||||
SoundPlayer::set_volume(255);
|
||||
}
|
||||
|
||||
void MediaPlayerScreen::onRedraw(draw_mode_t) {
|
||||
}
|
||||
|
||||
bool MediaPlayerScreen::playCardMedia() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
char fname[15];
|
||||
strcpy_P(fname, PSTR("STARTUP.AVI"));
|
||||
|
||||
MediaFileReader reader;
|
||||
if (!reader.open(fname))
|
||||
return false;
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Starting to play STARTUP.AVI");
|
||||
playStream(&reader, MediaFileReader::read);
|
||||
reader.close();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
// Attempt to play media from the onboard SPI flash chip
|
||||
bool MediaPlayerScreen::playBootMedia() {
|
||||
UIFlashStorage::BootMediaReader reader;
|
||||
if (!reader.isAvailable()) return false;
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Starting to play boot video");
|
||||
playStream(&reader, UIFlashStorage::BootMediaReader::read);
|
||||
return true;
|
||||
}
|
||||
|
||||
void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream) {
|
||||
#if FTDI_API_LEVEL >= 810
|
||||
if (FTDI::ftdi_chip >= 810) {
|
||||
// Set up the media FIFO on the end of RAMG, as the top of RAMG
|
||||
// will be used as the framebuffer.
|
||||
|
||||
uint8_t buf[512];
|
||||
const uint32_t block_size = 512;
|
||||
const uint32_t fifo_size = block_size * 2;
|
||||
const uint32_t fifo_start = CLCD::MAP::RAM_G + CLCD::MAP::RAM_G_SIZE - fifo_size;
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(0x000000))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(DL::DL_DISPLAY)
|
||||
.cmd(CMD_SWAP)
|
||||
.execute()
|
||||
.cmd(CMD_DLSTART)
|
||||
.mediafifo(fifo_start, fifo_size)
|
||||
.playvideo(OPT_FULLSCREEN | OPT_MEDIAFIFO | OPT_NOTEAR | OPT_SOUND)
|
||||
.cmd(DL::DL_DISPLAY)
|
||||
.cmd(CMD_SWAP)
|
||||
.execute();
|
||||
|
||||
uint32_t writePtr = 0;
|
||||
int16_t nBytes;
|
||||
|
||||
uint32_t t = millis();
|
||||
uint8_t timeouts;
|
||||
|
||||
spiInit(SPI_HALF_SPEED); // Boost SPI speed for video playback
|
||||
|
||||
do {
|
||||
// Write block n
|
||||
nBytes = (*data_stream)(obj, buf, block_size);
|
||||
if (nBytes == -1) break;
|
||||
|
||||
if (millis() - t > 10) {
|
||||
ExtUI::yield();
|
||||
t = millis();
|
||||
}
|
||||
|
||||
CLCD::mem_write_bulk (fifo_start + writePtr, buf, nBytes);
|
||||
|
||||
// Wait for FTDI810 to finish playing block n-1
|
||||
timeouts = 20;
|
||||
do {
|
||||
if (millis() - t > 10) {
|
||||
ExtUI::yield();
|
||||
t = millis();
|
||||
timeouts--;
|
||||
if (timeouts == 0) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Timeout playing video");
|
||||
cmd.reset();
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
} while (CLCD::mem_read_32(CLCD::REG::MEDIAFIFO_READ) != writePtr);
|
||||
|
||||
// Start playing block n
|
||||
writePtr = (writePtr + nBytes) % fifo_size;
|
||||
CLCD::mem_write_32(CLCD::REG::MEDIAFIFO_WRITE, writePtr);
|
||||
} while (nBytes == block_size);
|
||||
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Done playing video");
|
||||
|
||||
exit:
|
||||
spiInit(SPI_SPEED); // Restore default speed
|
||||
|
||||
// Since playing media overwrites RAMG, we need to reinitialize
|
||||
// everything that is stored in RAMG.
|
||||
cmd.cmd(CMD_DLSTART).execute();
|
||||
DLCache::init();
|
||||
StatusScreen::onStartup();
|
||||
}
|
||||
#endif // FTDI_API_LEVEL >= 810
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,132 @@
|
|||
/************************
|
||||
* move_axis_screen.cpp *
|
||||
************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
|
||||
void MoveAxisScreen::onEntry() {
|
||||
// Since Marlin keeps only one absolute position for all the extruders,
|
||||
// we have to keep track of the relative motion of individual extruders
|
||||
// ourselves. The relative distances are reset to zero whenever this
|
||||
// screen is entered.
|
||||
|
||||
for(uint8_t i = 0; i < ExtUI::extruderCount; i++) {
|
||||
screen_data.MoveAxisScreen.e_rel[i] = 0;
|
||||
}
|
||||
BaseNumericAdjustmentScreen::onEntry();
|
||||
}
|
||||
|
||||
void MoveAxisScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(1);
|
||||
w.units(PSTR("mm"));
|
||||
w.heading( PSTR("Move Axis"));
|
||||
w.home_buttons(20);
|
||||
w.color(Theme::x_axis ) .adjuster( 2, PSTR("X:"), getAxisPosition_mm(X), canMove(X));
|
||||
w.color(Theme::y_axis ) .adjuster( 4, PSTR("Y:"), getAxisPosition_mm(Y), canMove(Y));
|
||||
w.color(Theme::z_axis ) .adjuster( 6, PSTR("Z:"), getAxisPosition_mm(Z), canMove(Z));
|
||||
|
||||
#if EXTRUDERS == 1
|
||||
w.color(Theme::e_axis) .adjuster( 8, PSTR("E:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
|
||||
#elif EXTRUDERS > 1
|
||||
w.color(Theme::e_axis) .adjuster( 8, PSTR("E1:"), screen_data.MoveAxisScreen.e_rel[0], canMove(E0));
|
||||
w.color(Theme::e_axis) .adjuster( 10, PSTR("E2:"), screen_data.MoveAxisScreen.e_rel[1], canMove(E1));
|
||||
#if EXTRUDERS > 2
|
||||
w.color(Theme::e_axis) .adjuster( 12, PSTR("E3:"), screen_data.MoveAxisScreen.e_rel[2], canMove(E2));
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
w.color(Theme::e_axis) .adjuster( 14, PSTR("E4:"), screen_data.MoveAxisScreen.e_rel[3], canMove(E3));
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool MoveAxisScreen::onTouchHeld(uint8_t tag) {
|
||||
#define UI_INCREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis);
|
||||
#define UI_DECREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis);
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT_AXIS(X); break;
|
||||
case 3: UI_INCREMENT_AXIS(X); break;
|
||||
case 4: UI_DECREMENT_AXIS(Y); break;
|
||||
case 5: UI_INCREMENT_AXIS(Y); break;
|
||||
case 6: UI_DECREMENT_AXIS(Z); break;
|
||||
case 7: UI_INCREMENT_AXIS(Z); break;
|
||||
// For extruders, also update relative distances.
|
||||
case 8: UI_DECREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] -= increment; break;
|
||||
case 9: UI_INCREMENT_AXIS(E0); screen_data.MoveAxisScreen.e_rel[0] += increment; break;
|
||||
#if EXTRUDERS > 1
|
||||
case 10: UI_DECREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] -= increment; break;
|
||||
case 11: UI_INCREMENT_AXIS(E1); screen_data.MoveAxisScreen.e_rel[1] += increment; break;
|
||||
#endif
|
||||
#if EXTRUDERS > 2
|
||||
case 12: UI_DECREMENT_AXIS(E2); screen_data.MoveAxisScreen.e_rel[2] -= increment; break;
|
||||
case 13: UI_INCREMENT_AXIS(E2); screen_data.MoveAxisScreen.e_rel[2] += increment; break;
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
case 14: UI_DECREMENT_AXIS(E3); screen_data.MoveAxisScreen.e_rel[3] -= increment; break;
|
||||
case 15: UI_INCREMENT_AXIS(E3); screen_data.MoveAxisScreen.e_rel[3] += increment; break;
|
||||
#endif
|
||||
case 20: injectCommands_P(PSTR("G28 X")); break;
|
||||
case 21: injectCommands_P(PSTR("G28 Y")); break;
|
||||
case 22: injectCommands_P(PSTR("G28 Z")); break;
|
||||
case 23: injectCommands_P(PSTR("G28")); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
#undef UI_DECREMENT_AXIS
|
||||
#undef UI_INCREMENT_AXIS
|
||||
return true;
|
||||
}
|
||||
|
||||
float MoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) {
|
||||
// Compute feedrate so that the tool lags the adjuster when it is
|
||||
// being held down, this allows enough margin for the planner to
|
||||
// connect segments and even out the motion.
|
||||
constexpr float max_manual_feedrate[XYZE] = MAX_MANUAL_FEEDRATE;
|
||||
return min(max_manual_feedrate[axis]/60, abs(increment_mm * TOUCH_REPEATS_PER_SECOND * 0.80));
|
||||
}
|
||||
|
||||
void MoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) {
|
||||
ExtUI::setFeedrate_mm_s(getManualFeedrate(X_AXIS + (axis - ExtUI::X), increment_mm));
|
||||
}
|
||||
|
||||
void MoveAxisScreen::setManualFeedrate(ExtUI::extruder_t, float increment_mm) {
|
||||
ExtUI::setFeedrate_mm_s(getManualFeedrate(E_AXIS, increment_mm));
|
||||
}
|
||||
|
||||
void MoveAxisScreen::onIdle() {
|
||||
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,73 @@
|
|||
/*****************************
|
||||
* nozzle_offsets_screen.cpp *
|
||||
*****************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && HOTENDS > 1
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
|
||||
void NozzleOffsetScreen::onEntry() {
|
||||
// Since we don't allow the user to edit the offsets for E0,
|
||||
// make sure they are all zero.
|
||||
normalizeNozzleOffset(X);
|
||||
normalizeNozzleOffset(Y);
|
||||
normalizeNozzleOffset(Z);
|
||||
}
|
||||
|
||||
void NozzleOffsetScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2).units(PSTR("mm"));
|
||||
|
||||
w.heading( PSTR("Nozzle Offset"));
|
||||
w.color(Theme::x_axis).adjuster(2, PSTR("X:"), ExtUI::getNozzleOffset_mm(X, E1));
|
||||
w.color(Theme::y_axis).adjuster(4, PSTR("Y:"), ExtUI::getNozzleOffset_mm(Y, E1));
|
||||
w.color(Theme::z_axis).adjuster(6, PSTR("Z:"), ExtUI::getNozzleOffset_mm(Z, E1));
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
w.button(8, PSTR("Measure automatically"), !isPrinting());
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool NozzleOffsetScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(NozzleOffset_mm, X, E1); break;
|
||||
case 3: UI_INCREMENT(NozzleOffset_mm, X, E1); break;
|
||||
case 4: UI_DECREMENT(NozzleOffset_mm, Y, E1); break;
|
||||
case 5: UI_INCREMENT(NozzleOffset_mm, Y, E1); break;
|
||||
case 6: UI_DECREMENT(NozzleOffset_mm, Z, E1); break;
|
||||
case 7: UI_INCREMENT(NozzleOffset_mm, Z, E1); break;
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
case 8: GOTO_SCREEN(ConfirmAutoCalibrationDialogBox); return true;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,128 @@
|
|||
/********************
|
||||
* nudge_nozzle.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BABYSTEPPING)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void NudgeNozzleScreen::onEntry() {
|
||||
screen_data.NudgeNozzleScreen.show_offsets = false;
|
||||
#if EXTRUDERS > 1
|
||||
screen_data.NudgeNozzleScreen.link_nozzles = true;
|
||||
#endif
|
||||
LOOP_XYZ(i) {
|
||||
screen_data.NudgeNozzleScreen.rel[i] = 0;
|
||||
}
|
||||
BaseNumericAdjustmentScreen::onEntry();
|
||||
}
|
||||
|
||||
void NudgeNozzleScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm"));
|
||||
|
||||
w.heading( PSTR("Nudge Nozzle"));
|
||||
#if ENABLED(BABYSTEP_XY)
|
||||
w.color(x_axis).adjuster(2, PSTR("X:"), screen_data.NudgeNozzleScreen.rel[0] / getAxisSteps_per_mm(X));
|
||||
w.color(y_axis).adjuster(4, PSTR("Y:"), screen_data.NudgeNozzleScreen.rel[1] / getAxisSteps_per_mm(Y));
|
||||
#endif
|
||||
w.color(z_axis).adjuster(6, PSTR("Z:"), screen_data.NudgeNozzleScreen.rel[2] / getAxisSteps_per_mm(Z));
|
||||
w.increments();
|
||||
#if EXTRUDERS > 1
|
||||
w.toggle (8, PSTR("Adjust Both Nozzles:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.link_nozzles, PSTR("Yes\nNo"));
|
||||
#endif
|
||||
|
||||
#if EXTRUDERS > 1 || HAS_BED_PROBE
|
||||
w.toggle (9, PSTR("Show Offsets:"), PSTR("no\xFFyes"), screen_data.NudgeNozzleScreen.show_offsets, PSTR("Yes\nNo"));
|
||||
|
||||
if (screen_data.NudgeNozzleScreen.show_offsets) {
|
||||
char str[19], num1[7];
|
||||
|
||||
w.draw_mode(BOTH);
|
||||
w.color(other);
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
dtostrf(getZOffset_mm(), 4, 2, num1);
|
||||
sprintf_P(str, PSTR("%s mm"), num1);
|
||||
w.text_field (0, PSTR("Z Offset"), str);
|
||||
#endif
|
||||
|
||||
#if EXTRUDERS > 1
|
||||
char num2[7], num3[7];
|
||||
dtostrf(getNozzleOffset_mm(X, E1), 4, 2, num1);
|
||||
dtostrf(getNozzleOffset_mm(Y, E1), 4, 2, num2);
|
||||
dtostrf(getNozzleOffset_mm(Z, E1), 4, 2, num3);
|
||||
sprintf_P(str, PSTR("%s; %s; %s mm"), num1, num2, num3);
|
||||
w.text_field (0, PSTR("Noz. Offset"), str);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool NudgeNozzleScreen::onTouchHeld(uint8_t tag) {
|
||||
const float inc = getIncrement();
|
||||
#if EXTRUDERS > 1
|
||||
const bool link = screen_data.NudgeNozzleScreen.link_nozzles;
|
||||
#else
|
||||
constexpr bool link = true;
|
||||
#endif
|
||||
int16_t steps;
|
||||
switch (tag) {
|
||||
case 2: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps(-steps, X, link); screen_data.NudgeNozzleScreen.rel[0] -= steps; break;
|
||||
case 3: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps( steps, X, link); screen_data.NudgeNozzleScreen.rel[0] += steps; break;
|
||||
case 4: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps(-steps, Y, link); screen_data.NudgeNozzleScreen.rel[1] -= steps; break;
|
||||
case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); screen_data.NudgeNozzleScreen.rel[1] += steps; break;
|
||||
case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); screen_data.NudgeNozzleScreen.rel[2] -= steps; break;
|
||||
case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); screen_data.NudgeNozzleScreen.rel[2] += steps; break;
|
||||
#if EXTRUDERS > 1
|
||||
case 8: screen_data.NudgeNozzleScreen.link_nozzles = !link; break;
|
||||
#endif
|
||||
case 9: screen_data.NudgeNozzleScreen.show_offsets = !screen_data.NudgeNozzleScreen.show_offsets; break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
#if EXTRUDERS > 1 || HAS_BED_PROBE
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NudgeNozzleScreen::onTouchEnd(uint8_t tag) {
|
||||
if (tag == 1) {
|
||||
SaveSettingsDialogBox::promptToSaveSettings();
|
||||
return true;
|
||||
} else {
|
||||
return BaseNumericAdjustmentScreen::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
void NudgeNozzleScreen::onIdle() {
|
||||
reset_menu_timeout();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,51 @@
|
|||
/***********************************
|
||||
* restore_failsafe_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace ExtUI;
|
||||
|
||||
void RestoreFailsafeDialogBox::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("Are you sure? Customizations will be lost."));
|
||||
drawYesNoButtons();
|
||||
}
|
||||
|
||||
bool RestoreFailsafeDialogBox::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1:
|
||||
ExtUI::injectCommands_P(PSTR("M502\nM117 Factory settings restored."));
|
||||
AlertDialogBox::show(F("Factory settings restored."));
|
||||
// Remove RestoreFailsafeDialogBox from the stack
|
||||
// so the alert box doesn't return to it.
|
||||
current_screen.forget();
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,65 @@
|
|||
/********************************
|
||||
* save_settings_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace ExtUI;
|
||||
|
||||
bool SaveSettingsDialogBox::needs_save = false;
|
||||
|
||||
void SaveSettingsDialogBox::onRedraw(draw_mode_t) {
|
||||
drawMessage(F("Do you wish to save these settings as defaults?"));
|
||||
drawYesNoButtons();
|
||||
}
|
||||
|
||||
bool SaveSettingsDialogBox::onTouchEnd(uint8_t tag) {
|
||||
needs_save = false;
|
||||
switch (tag) {
|
||||
case 1:
|
||||
injectCommands_P(PSTR("M500"));
|
||||
AlertDialogBox::show(F("Settings saved!"));
|
||||
// Remove SaveSettingsDialogBox from the stack
|
||||
// so the alert box doesn't return to me.
|
||||
current_screen.forget();
|
||||
return true;
|
||||
default:
|
||||
return DialogBoxBaseClass::onTouchEnd(tag);
|
||||
}
|
||||
}
|
||||
|
||||
void SaveSettingsDialogBox::promptToSaveSettings() {
|
||||
if (needs_save) {
|
||||
// Remove current screen from the stack
|
||||
// so SaveSettingsDialogBox doesn't return here.
|
||||
GOTO_SCREEN(SaveSettingsDialogBox);
|
||||
current_screen.forget();
|
||||
} else {
|
||||
// No save needed.
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,77 @@
|
|||
/*****************
|
||||
* screen_data.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
|
||||
|
||||
// To save RAM, store state information related to a particular screen
|
||||
// in a union. The values should be initialized in the onEntry method.
|
||||
|
||||
struct base_numeric_adjustment_t {uint8_t increment;};
|
||||
|
||||
union screen_data_t {
|
||||
struct base_numeric_adjustment_t BaseNumericAdjustmentScreen;
|
||||
struct {uint8_t volume; uint8_t brightness;} InterfaceSettingsScreen;
|
||||
struct {char passcode[5];} LockScreen;
|
||||
struct {bool isError;} AlertDialogBox;
|
||||
struct {bool auto_hide;} SpinnerDialogBox;
|
||||
struct {
|
||||
uint8_t e_tag, t_tag, repeat_tag;
|
||||
ExtUI::extruder_t saved_extruder;
|
||||
} ChangeFilamentScreen;
|
||||
struct {
|
||||
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
|
||||
} FilesScreen;
|
||||
struct {
|
||||
struct base_numeric_adjustment_t placeholder;
|
||||
float e_rel[ExtUI::extruderCount];
|
||||
} MoveAxisScreen;
|
||||
#if ENABLED(DEVELOPER_SCREENS)
|
||||
struct {
|
||||
uint32_t next_watchdog_trigger;
|
||||
const char* message;
|
||||
} StressTestScreen;
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
struct {
|
||||
struct base_numeric_adjustment_t placeholder;
|
||||
int16_t rel[XYZ];
|
||||
#if EXTRUDERS > 1
|
||||
bool link_nozzles;
|
||||
#endif
|
||||
bool show_offsets;
|
||||
} NudgeNozzleScreen;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern screen_data_t screen_data;
|
113
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp
Normal file
113
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.cpp
Normal file
|
@ -0,0 +1,113 @@
|
|||
/***************
|
||||
* screens.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
tiny_timer_t refresh_timer;
|
||||
screen_data_t screen_data;
|
||||
|
||||
SCREEN_TABLE {
|
||||
DECL_SCREEN(BootScreen),
|
||||
DECL_SCREEN(TouchCalibrationScreen),
|
||||
DECL_SCREEN(StatusScreen),
|
||||
DECL_SCREEN(MainMenu),
|
||||
DECL_SCREEN(TuneMenu),
|
||||
DECL_SCREEN(AdvancedSettingsMenu),
|
||||
DECL_SCREEN(AlertDialogBox),
|
||||
DECL_SCREEN(ConfirmUserRequestAlertBox),
|
||||
DECL_SCREEN(RestoreFailsafeDialogBox),
|
||||
DECL_SCREEN(SaveSettingsDialogBox),
|
||||
DECL_SCREEN(ConfirmAbortPrintDialogBox),
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
DECL_SCREEN(ConfirmAutoCalibrationDialogBox),
|
||||
#endif
|
||||
DECL_SCREEN(SpinnerDialogBox),
|
||||
DECL_SCREEN(AboutScreen),
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
DECL_SCREEN(StatisticsScreen),
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
DECL_SCREEN(NudgeNozzleScreen),
|
||||
#endif
|
||||
DECL_SCREEN(MoveAxisScreen),
|
||||
DECL_SCREEN(StepsScreen),
|
||||
#if HAS_TRINAMIC
|
||||
DECL_SCREEN(StepperCurrentScreen),
|
||||
DECL_SCREEN(StepperBumpSensitivityScreen),
|
||||
#endif
|
||||
#if HAS_BED_PROBE
|
||||
DECL_SCREEN(ZOffsetScreen),
|
||||
#endif
|
||||
#if HOTENDS > 1
|
||||
DECL_SCREEN(NozzleOffsetScreen),
|
||||
#endif
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
DECL_SCREEN(BacklashCompensationScreen),
|
||||
#endif
|
||||
DECL_SCREEN(FeedratePercentScreen),
|
||||
DECL_SCREEN(MaxVelocityScreen),
|
||||
DECL_SCREEN(MaxAccelerationScreen),
|
||||
DECL_SCREEN(DefaultAccelerationScreen),
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
DECL_SCREEN(JunctionDeviationScreen),
|
||||
#else
|
||||
DECL_SCREEN(JerkScreen),
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
DECL_SCREEN(FilamentMenu),
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
DECL_SCREEN(FilamentRunoutScreen),
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
DECL_SCREEN(LinearAdvanceScreen),
|
||||
#endif
|
||||
DECL_SCREEN(TemperatureScreen),
|
||||
DECL_SCREEN(ChangeFilamentScreen),
|
||||
DECL_SCREEN(InterfaceSettingsScreen),
|
||||
DECL_SCREEN(InterfaceSoundsScreen),
|
||||
DECL_SCREEN(LockScreen),
|
||||
DECL_SCREEN(FilesScreen),
|
||||
DECL_SCREEN(EndstopStatesScreen),
|
||||
#ifdef LULZBOT_USE_BIOPRINTER_UI
|
||||
DECL_SCREEN(BioPrintingDialogBox),
|
||||
DECL_SCREEN(BioConfirmHomeXYZ),
|
||||
DECL_SCREEN(BioConfirmHomeE),
|
||||
#endif
|
||||
#if ENABLED(DEVELOPER_SCREENS)
|
||||
DECL_SCREEN(DeveloperMenu),
|
||||
DECL_SCREEN(ConfirmEraseFlashDialogBox),
|
||||
DECL_SCREEN(WidgetsScreen),
|
||||
DECL_SCREEN(TouchRegistersScreen),
|
||||
DECL_SCREEN(StressTestScreen),
|
||||
#endif
|
||||
DECL_SCREEN(MediaPlayerScreen),
|
||||
DECL_SCREEN(DisplayTuningScreen)
|
||||
};
|
||||
|
||||
SCREEN_TABLE_POST
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
712
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h
Normal file
712
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h
Normal file
|
@ -0,0 +1,712 @@
|
|||
/*************
|
||||
* screens.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
|
||||
#include "../theme/theme.h"
|
||||
|
||||
#define ROUND(val) uint16_t((val)+0.5)
|
||||
|
||||
extern tiny_timer_t refresh_timer;
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
// is done using the CLCD::DLCache class, which takes a unique ID for each
|
||||
// cache location. These IDs are defined here:
|
||||
|
||||
enum {
|
||||
STATUS_SCREEN_CACHE,
|
||||
MENU_SCREEN_CACHE,
|
||||
TUNE_SCREEN_CACHE,
|
||||
ADJUST_OFFSETS_SCREEN_CACHE,
|
||||
ALERT_BOX_CACHE,
|
||||
SPINNER_CACHE,
|
||||
ADVANCED_SETTINGS_SCREEN_CACHE,
|
||||
MOVE_AXIS_SCREEN_CACHE,
|
||||
TEMPERATURE_SCREEN_CACHE,
|
||||
STEPS_SCREEN_CACHE,
|
||||
STEPPER_CURRENT_SCREEN_CACHE,
|
||||
STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
|
||||
ZOFFSET_SCREEN_CACHE,
|
||||
NOZZLE_OFFSET_SCREEN_CACHE,
|
||||
BACKLASH_COMPENSATION_SCREEN_CACHE,
|
||||
MAX_FEEDRATE_SCREEN_CACHE,
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
JUNC_DEV_SCREEN_CACHE,
|
||||
#else
|
||||
JERK_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_MENU_CACHE,
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
LINEAR_ADVANCE_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_RUNOUT_SCREEN_CACHE,
|
||||
#endif
|
||||
#ifdef LULZBOT_USE_BIOPRINTER_UI
|
||||
PRINTING_SCREEN_CACHE,
|
||||
#endif
|
||||
CHANGE_FILAMENT_SCREEN_CACHE,
|
||||
INTERFACE_SETTINGS_SCREEN_CACHE,
|
||||
INTERFACE_SOUNDS_SCREEN_CACHE,
|
||||
LOCK_SCREEN_CACHE,
|
||||
FILES_SCREEN_CACHE,
|
||||
DISPLAY_TIMINGS_SCREEN_CACHE
|
||||
};
|
||||
|
||||
// To save MCU RAM, the status message is "baked" in to the status screen
|
||||
// cache, so we reserve a large chunk of memory for the DL cache
|
||||
|
||||
#define STATUS_SCREEN_DL_SIZE 2048
|
||||
#define ALERT_BOX_DL_SIZE 3072
|
||||
#define SPINNER_DL_SIZE 3072
|
||||
#define FILE_SCREEN_DL_SIZE 3072
|
||||
#define PRINTING_SCREEN_DL_SIZE 2048
|
||||
|
||||
/************************* MENU SCREEN DECLARATIONS *************************/
|
||||
|
||||
class BaseScreen : public UIScreen {
|
||||
protected:
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
static uint32_t last_interaction;
|
||||
#endif
|
||||
|
||||
public:
|
||||
static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool);
|
||||
|
||||
static void reset_menu_timeout();
|
||||
|
||||
static void onEntry();
|
||||
static void onIdle();
|
||||
};
|
||||
|
||||
class BootScreen : public BaseScreen, public UncachedScreen {
|
||||
private:
|
||||
static void showSplashScreen();
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static void onIdle();
|
||||
};
|
||||
|
||||
class AboutScreen : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
class StatisticsScreen : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
class KillScreen {
|
||||
// The KillScreen is behaves differently than the
|
||||
// others, so we do not bother extending UIScreen.
|
||||
public:
|
||||
static void show(progmem_str msg);
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
class RestoreFailsafeDialogBox : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class SaveSettingsDialogBox : public DialogBoxBaseClass, public UncachedScreen {
|
||||
private:
|
||||
static bool needs_save;
|
||||
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
|
||||
static void promptToSaveSettings();
|
||||
static void settingsChanged() {needs_save = true;}
|
||||
};
|
||||
|
||||
class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
class ConfirmUserRequestAlertBox : public AlertDialogBox {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t);
|
||||
static void hide();
|
||||
static void show(const char*);
|
||||
};
|
||||
|
||||
class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen<SPINNER_CACHE,SPINNER_DL_SIZE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static void onIdle();
|
||||
|
||||
static void show(const progmem_str);
|
||||
static void hide();
|
||||
static void enqueueAndWait_P(const progmem_str commands);
|
||||
static void enqueueAndWait_P(const progmem_str message, const progmem_str commands);
|
||||
};
|
||||
|
||||
#if !defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> {
|
||||
private:
|
||||
static void draw_axis_position(draw_mode_t);
|
||||
static void draw_temperature(draw_mode_t);
|
||||
static void draw_progress(draw_mode_t);
|
||||
static void draw_interaction_buttons(draw_mode_t);
|
||||
static void draw_status_message(draw_mode_t, const char * const);
|
||||
|
||||
public:
|
||||
static void setStatusMessage(const char *);
|
||||
static void setStatusMessage(progmem_str);
|
||||
static void onRedraw(draw_mode_t);
|
||||
static void onStartup();
|
||||
static void onEntry();
|
||||
static void onIdle();
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
#else
|
||||
class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE> {
|
||||
private:
|
||||
static float increment;
|
||||
static bool jog_xy;
|
||||
static bool fine_motion;
|
||||
|
||||
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 unlockMotors();
|
||||
|
||||
static void setStatusMessage(const char *);
|
||||
static void setStatusMessage(progmem_str);
|
||||
|
||||
static void onStartup();
|
||||
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();
|
||||
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
class MainMenu : public BaseScreen, public CachedScreen<MENU_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class TuneMenu : public BaseScreen, public CachedScreen<TUNE_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class TouchCalibrationScreen : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onRefresh();
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static void onIdle();
|
||||
};
|
||||
|
||||
class TouchRegistersScreen : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class AdvancedSettingsMenu : public BaseScreen, public CachedScreen<ADVANCED_SETTINGS_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
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);
|
||||
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();
|
||||
};
|
||||
|
||||
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;
|
||||
const char *_units;
|
||||
|
||||
protected:
|
||||
void _draw_increment_btn(uint8_t line, const uint8_t tag);
|
||||
|
||||
public:
|
||||
widgets_t(draw_mode_t);
|
||||
|
||||
widgets_t &color(uint32_t color) {_color = color; return *this;}
|
||||
widgets_t &units(const char *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 (const char *label);
|
||||
void adjuster_sram_val (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
|
||||
void adjuster (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
|
||||
void adjuster (uint8_t tag, const char *label, float value=0, bool is_enabled = true);
|
||||
void button (uint8_t tag, const char *label, bool is_enabled = true);
|
||||
void text_field (uint8_t tag, const char *label, const char *value, bool is_enabled = true);
|
||||
void two_buttons (uint8_t tag1, const char *label1,
|
||||
uint8_t tag2, const char *label2, bool is_enabled = true);
|
||||
void toggle (uint8_t tag, const char *label, const char *text, 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);
|
||||
};
|
||||
|
||||
class MoveAxisScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MOVE_AXIS_SCREEN_CACHE> {
|
||||
private:
|
||||
static float getManualFeedrate(uint8_t axis, float increment_mm);
|
||||
public:
|
||||
static void setManualFeedrate(ExtUI::axis_t, float increment_mm);
|
||||
static void setManualFeedrate(ExtUI::extruder_t, float increment_mm);
|
||||
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
static void onIdle();
|
||||
};
|
||||
|
||||
class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEPS_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
#if HAS_TRINAMIC
|
||||
class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEPPER_CURRENT_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
class StepperBumpSensitivityScreen : public BaseNumericAdjustmentScreen, public CachedScreen<STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<ZOFFSET_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if HOTENDS > 1
|
||||
class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<NOZZLE_OFFSET_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
class NudgeNozzleScreen : public BaseNumericAdjustmentScreen, public CachedScreen<ADJUST_OFFSETS_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
static void onIdle();
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<BACKLASH_COMPENSATION_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MAX_FEEDRATE_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
class MaxVelocityScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MAX_VELOCITY_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
class MaxAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<MAX_ACCELERATION_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DEFAULT_ACCELERATION_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
#if ENABLED(JUNCTION_DEVIATION)
|
||||
class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JUNC_DEV_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#else
|
||||
class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen<JERK_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_RUNOUT_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
class LinearAdvanceScreen : public BaseNumericAdjustmentScreen, public CachedScreen<LINEAR_ADVANCE_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
#endif
|
||||
|
||||
class TemperatureScreen : public BaseNumericAdjustmentScreen, public CachedScreen<TEMPERATURE_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
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 LULZBOT_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();
|
||||
};
|
||||
|
||||
class LockScreen : public BaseScreen, public CachedScreen<LOCK_SCREEN_CACHE> {
|
||||
private:
|
||||
friend InterfaceSettingsScreen;
|
||||
|
||||
static uint16_t passcode;
|
||||
|
||||
static char & message_style();
|
||||
static uint16_t compute_checksum();
|
||||
static void onPasscodeEntered();
|
||||
public:
|
||||
static bool is_enabled();
|
||||
static void check_passcode();
|
||||
static void enable();
|
||||
static void disable();
|
||||
|
||||
static void set_hash(uint16_t pass) {passcode = pass;};
|
||||
static uint16_t get_hash() {return passcode;};
|
||||
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, FILE_SCREEN_DL_SIZE> {
|
||||
private:
|
||||
#ifdef 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 const char *getSelectedShortFilename();
|
||||
static const char *getSelectedLongFilename();
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
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();
|
||||
};
|
||||
|
||||
class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen<DISPLAY_TIMINGS_SCREEN_CACHE> {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
#if ENABLED(DEVELOPER_SCREENS)
|
||||
class DeveloperMenu : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen {
|
||||
public:
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
};
|
||||
|
||||
class WidgetsScreen : public BaseScreen, public UncachedScreen {
|
||||
public:
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchStart(uint8_t tag);
|
||||
static void onIdle();
|
||||
};
|
||||
|
||||
class StressTestScreen : public BaseScreen, public UncachedScreen {
|
||||
private:
|
||||
static void drawDots(uint16_t x, uint16_t y, uint16_t h, uint16_t v);
|
||||
static bool watchDogTestNow();
|
||||
static void recursiveLockup();
|
||||
static void iterativeLockup();
|
||||
static void runTestOnBootup(bool enable);
|
||||
|
||||
public:
|
||||
static void startupCheck();
|
||||
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
static void onIdle();
|
||||
};
|
||||
#endif
|
||||
|
||||
class MediaPlayerScreen : public BaseScreen, public UncachedScreen {
|
||||
private:
|
||||
typedef int16_t media_streamer_func_t(void *obj, void *buff, size_t bytes);
|
||||
|
||||
public:
|
||||
static bool playCardMedia();
|
||||
static bool playBootMedia();
|
||||
|
||||
static void onEntry();
|
||||
static void onRedraw(draw_mode_t);
|
||||
|
||||
static void playStream(void *obj, media_streamer_func_t*);
|
||||
};
|
|
@ -0,0 +1,67 @@
|
|||
/**************************
|
||||
* spinner_dialog_box.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
|
||||
void SpinnerDialogBox::onRedraw(draw_mode_t) {
|
||||
}
|
||||
|
||||
void SpinnerDialogBox::show(const progmem_str message) {
|
||||
drawMessage(message);
|
||||
drawSpinner();
|
||||
storeBackground();
|
||||
screen_data.SpinnerDialogBox.auto_hide = false;
|
||||
}
|
||||
|
||||
void SpinnerDialogBox::hide() {
|
||||
CommandProcessor cmd;
|
||||
cmd.stop().execute();
|
||||
}
|
||||
|
||||
void SpinnerDialogBox::enqueueAndWait_P(const progmem_str commands) {
|
||||
enqueueAndWait_P(F("Please wait..."), commands);
|
||||
}
|
||||
|
||||
void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem_str commands) {
|
||||
show(message);
|
||||
GOTO_SCREEN(SpinnerDialogBox);
|
||||
ExtUI::injectCommands_P((const char*)commands);
|
||||
screen_data.SpinnerDialogBox.auto_hide = true;
|
||||
}
|
||||
|
||||
void SpinnerDialogBox::onIdle() {
|
||||
if (screen_data.SpinnerDialogBox.auto_hide && !commandsInQueue()) {
|
||||
screen_data.SpinnerDialogBox.auto_hide = false;
|
||||
hide();
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,77 @@
|
|||
/*************************
|
||||
* statistics_screen.cpp *
|
||||
*************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(PRINTCOUNTER)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 7
|
||||
|
||||
void StatisticsScreen::onRedraw(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
char buffer[21];
|
||||
|
||||
cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0)
|
||||
|
||||
.font(Theme::font_medium)
|
||||
.text(BTN_POS(1,1), BTN_SIZE(4,1), F("Printer Statistics"))
|
||||
.font(Theme::font_small)
|
||||
.tag(0)
|
||||
.text(BTN_POS(1,2), BTN_SIZE(2,1), F("Total Prints:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,3), BTN_SIZE(2,1), F("Finished Prints:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,4), BTN_SIZE(2,1), F("Total Print Time:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,5), BTN_SIZE(2,1), F("Longest Print:"), OPT_RIGHTX | OPT_CENTERY)
|
||||
.text(BTN_POS(1,6), BTN_SIZE(2,1), F("Filament Used:"), OPT_RIGHTX | OPT_CENTERY);
|
||||
// Don't chain the following, it causes strange issues with evaluation ordering!
|
||||
cmd.text(BTN_POS(3,2), BTN_SIZE(2,1), getTotalPrints_str(buffer));
|
||||
cmd.text(BTN_POS(3,3), BTN_SIZE(2,1), getFinishedPrints_str(buffer));
|
||||
cmd.text(BTN_POS(3,4), BTN_SIZE(2,1), getTotalPrintTime_str(buffer));
|
||||
cmd.text(BTN_POS(3,5), BTN_SIZE(2,1), getLongestPrint_str(buffer));
|
||||
cmd.text(BTN_POS(3,6), BTN_SIZE(2,1), getFilamentUsed_str(buffer));
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
cmd.font(Theme::font_medium)
|
||||
.colors(action_btn)
|
||||
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), F("Back"));
|
||||
}
|
||||
}
|
||||
|
||||
bool StatisticsScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI && PRINTCOUNTER
|
|
@ -0,0 +1,446 @@
|
|||
/*********************
|
||||
* status_screen.cpp *
|
||||
*********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
#include "../../../../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 8
|
||||
#else
|
||||
#define GRID_ROWS 8
|
||||
#endif
|
||||
|
||||
void StatusScreen::draw_axis_position(draw_mode_t what) {
|
||||
CommandProcessor cmd;
|
||||
|
||||
#define GRID_COLS 3
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.tag(6)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.fgcolor(Theme::axis_label)
|
||||
.font(Theme::font_large)
|
||||
.button( BTN_POS(1,5), BTN_SIZE(2,1), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(1,6), BTN_SIZE(2,1), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(1,7), BTN_SIZE(2,1), F(""), OPT_FLAT)
|
||||
|
||||
.font(Theme::font_small)
|
||||
.text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X"))
|
||||
.text ( BTN_POS(1,6), BTN_SIZE(1,1), F("Y"))
|
||||
.text ( BTN_POS(1,7), BTN_SIZE(1,1), F("Z"))
|
||||
|
||||
.font(Theme::font_medium)
|
||||
.fgcolor(Theme::x_axis) .button( BTN_POS(2,5), BTN_SIZE(2,1), F(""), OPT_FLAT)
|
||||
.fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(2,1), F(""), OPT_FLAT)
|
||||
.fgcolor(Theme::z_axis) .button( BTN_POS(2,7), BTN_SIZE(2,1), F(""), OPT_FLAT);
|
||||
#else
|
||||
.fgcolor(Theme::axis_label)
|
||||
.font(Theme::font_large)
|
||||
.button( BTN_POS(1,5), BTN_SIZE(1,2), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(2,5), BTN_SIZE(1,2), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(3,5), BTN_SIZE(1,2), F(""), OPT_FLAT)
|
||||
|
||||
.font(Theme::font_small)
|
||||
.text ( BTN_POS(1,5), BTN_SIZE(1,1), F("X"))
|
||||
.text ( BTN_POS(2,5), BTN_SIZE(1,1), F("Y"))
|
||||
.text ( BTN_POS(3,5), BTN_SIZE(1,1), F("Z"))
|
||||
.font(Theme::font_medium)
|
||||
|
||||
.fgcolor(Theme::x_axis) .button( BTN_POS(1,6), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(Theme::y_axis) .button( BTN_POS(2,6), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(Theme::z_axis) .button( BTN_POS(3,6), BTN_SIZE(1,1), F(""), OPT_FLAT);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
using namespace ExtUI;
|
||||
char x_str[15];
|
||||
char y_str[15];
|
||||
char z_str[15];
|
||||
|
||||
if (isAxisPositionKnown(X)) {
|
||||
dtostrf(getAxisPosition_mm(X), 5, 1, x_str);
|
||||
strcat_P(x_str, PSTR(" mm"));
|
||||
} else {
|
||||
strcpy_P(x_str, PSTR("?"));
|
||||
}
|
||||
|
||||
if (isAxisPositionKnown(Y)) {
|
||||
dtostrf(getAxisPosition_mm(Y), 5, 1, y_str);
|
||||
strcat_P(y_str, PSTR(" mm"));
|
||||
} else {
|
||||
strcpy_P(y_str, PSTR("?"));
|
||||
}
|
||||
|
||||
if (isAxisPositionKnown(Z)) {
|
||||
dtostrf(getAxisPosition_mm(Z), 5, 1, z_str);
|
||||
strcat_P(z_str, PSTR(" mm"));
|
||||
} else {
|
||||
strcpy_P(z_str, PSTR("?"));
|
||||
}
|
||||
|
||||
cmd.tag(6).font(Theme::font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.text ( BTN_POS(2,5), BTN_SIZE(2,1), x_str)
|
||||
.text ( BTN_POS(2,6), BTN_SIZE(2,1), y_str)
|
||||
.text ( BTN_POS(2,7), BTN_SIZE(2,1), z_str);
|
||||
#else
|
||||
.text ( BTN_POS(1,6), BTN_SIZE(1,1), x_str)
|
||||
.text ( BTN_POS(2,6), BTN_SIZE(1,1), y_str)
|
||||
.text ( BTN_POS(3,6), BTN_SIZE(1,1), z_str);
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef GRID_COLS
|
||||
}
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 8
|
||||
#else
|
||||
#define GRID_COLS 12
|
||||
#endif
|
||||
|
||||
void StatusScreen::draw_temperature(draw_mode_t what) {
|
||||
using namespace Theme;
|
||||
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.font(Theme::font_small)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(5)
|
||||
.fgcolor(temp) .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT)
|
||||
.fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.tag(0)
|
||||
.fgcolor(progress) .button( BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT);
|
||||
#else
|
||||
.tag(5)
|
||||
.fgcolor(temp) .button( BTN_POS(1,1), BTN_SIZE(4,2), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(1,1), BTN_SIZE(8,1), F(""), OPT_FLAT)
|
||||
.fgcolor(fan_speed) .button( BTN_POS(5,2), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.tag(0)
|
||||
.fgcolor(progress) .button( BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.button( BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT);
|
||||
#endif
|
||||
|
||||
// Draw Extruder Bitmap on Extruder Temperature Button
|
||||
|
||||
cmd.tag(5)
|
||||
.cmd(BITMAP_SOURCE(Extruder_Icon_Info))
|
||||
.cmd(BITMAP_LAYOUT(Extruder_Icon_Info))
|
||||
.cmd(BITMAP_SIZE (Extruder_Icon_Info))
|
||||
.icon (BTN_POS(1,1), BTN_SIZE(1,1), Extruder_Icon_Info, icon_scale)
|
||||
.icon (BTN_POS(5,1), BTN_SIZE(1,1), Extruder_Icon_Info, icon_scale);
|
||||
|
||||
// Draw Bed Heat Bitmap on Bed Heat Button
|
||||
cmd.cmd(BITMAP_SOURCE(Bed_Heat_Icon_Info))
|
||||
.cmd(BITMAP_LAYOUT(Bed_Heat_Icon_Info))
|
||||
.cmd(BITMAP_SIZE (Bed_Heat_Icon_Info))
|
||||
.icon (BTN_POS(1,2), BTN_SIZE(1,1), Bed_Heat_Icon_Info, icon_scale);
|
||||
|
||||
// Draw Fan Percent Bitmap on Bed Heat Button
|
||||
|
||||
cmd.cmd(BITMAP_SOURCE(Fan_Icon_Info))
|
||||
.cmd(BITMAP_LAYOUT(Fan_Icon_Info))
|
||||
.cmd(BITMAP_SIZE (Fan_Icon_Info))
|
||||
.icon (BTN_POS(5,2), BTN_SIZE(1,1), Fan_Icon_Info, icon_scale);
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
using namespace ExtUI;
|
||||
char e0_str[15];
|
||||
char e1_str[15];
|
||||
char bed_str[15];
|
||||
char fan_str[15];
|
||||
|
||||
sprintf_P(
|
||||
fan_str,
|
||||
PSTR("%-3d %%"),
|
||||
int8_t(getActualFan_percent(FAN0))
|
||||
);
|
||||
|
||||
const char *idle = PSTR("%-3d C / idle");
|
||||
const char *not_idle = PSTR("%-3d / %-3d C");
|
||||
|
||||
sprintf_P(
|
||||
bed_str,
|
||||
isHeaterIdle(BED) ? idle : not_idle,
|
||||
ROUND(getActualTemp_celsius(BED)),
|
||||
ROUND(getTargetTemp_celsius(BED))
|
||||
);
|
||||
|
||||
sprintf_P(
|
||||
e0_str,
|
||||
isHeaterIdle(H0) ? idle : not_idle,
|
||||
ROUND(getActualTemp_celsius(H0)),
|
||||
ROUND(getTargetTemp_celsius(H0))
|
||||
);
|
||||
|
||||
#if EXTRUDERS == 2
|
||||
sprintf_P(
|
||||
e1_str,
|
||||
isHeaterIdle(H1) ? idle : not_idle,
|
||||
ROUND(getActualTemp_celsius(H1)),
|
||||
ROUND(getTargetTemp_celsius(H1))
|
||||
);
|
||||
#else
|
||||
strcpy_P(
|
||||
e1_str,
|
||||
PSTR("-")
|
||||
);
|
||||
#endif
|
||||
|
||||
cmd.tag(5)
|
||||
.font(font_medium)
|
||||
.text(BTN_POS(2,1), BTN_SIZE(3,1), e0_str)
|
||||
.text(BTN_POS(6,1), BTN_SIZE(3,1), e1_str)
|
||||
.text(BTN_POS(2,2), BTN_SIZE(3,1), bed_str)
|
||||
.text(BTN_POS(6,2), BTN_SIZE(3,1), fan_str);
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::draw_progress(draw_mode_t what) {
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
CommandProcessor cmd;
|
||||
|
||||
if (what & BACKGROUND) {
|
||||
cmd.tag(0).font(font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.fgcolor(progress) .button(BTN_POS(1,3), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.button(BTN_POS(5,3), BTN_SIZE(4,1), F(""), OPT_FLAT);
|
||||
#else
|
||||
.fgcolor(progress) .button(BTN_POS(9,1), BTN_SIZE(4,1), F(""), OPT_FLAT)
|
||||
.button(BTN_POS(9,2), BTN_SIZE(4,1), F(""), OPT_FLAT);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
const uint32_t elapsed = getProgress_seconds_elapsed();
|
||||
const uint8_t hrs = elapsed/3600;
|
||||
const uint8_t min = (elapsed/60)%60;
|
||||
|
||||
char time_str[10];
|
||||
char progress_str[10];
|
||||
|
||||
sprintf_P(time_str, PSTR(" %02d : %02d"), hrs, min);
|
||||
sprintf_P(progress_str, PSTR("%-3d %%"), getProgress_percent() );
|
||||
|
||||
cmd.font(font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(0).text(BTN_POS(1,3), BTN_SIZE(4,1), time_str)
|
||||
.text(BTN_POS(5,3), BTN_SIZE(4,1), progress_str);
|
||||
#else
|
||||
.tag(0).text(BTN_POS(9,1), BTN_SIZE(4,1), time_str)
|
||||
.text(BTN_POS(9,2), BTN_SIZE(4,1), progress_str);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#undef GRID_COLS
|
||||
|
||||
|
||||
void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
|
||||
#define GRID_COLS 4
|
||||
if (what & FOREGROUND) {
|
||||
using namespace ExtUI;
|
||||
|
||||
const bool has_media = isMediaInserted() && !isPrintingFromMedia();
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(Theme::font_medium)
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
.enabled(!Sd2Card::ready() || has_media)
|
||||
#else
|
||||
.enabled(has_media)
|
||||
#endif
|
||||
.colors(has_media ? action_btn : normal_btn)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(3).button( BTN_POS(1,8), BTN_SIZE(2,1),
|
||||
#else
|
||||
.tag(3).button( BTN_POS(1,7), BTN_SIZE(2,2),
|
||||
#endif
|
||||
isPrintingFromMedia() ? F("Printing") :
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
||||
#ifdef LULZBOT_MANUAL_USB_STARTUP
|
||||
(Sd2Card::ready() ? F("USB Drive") : F("Enable USB"))
|
||||
#else
|
||||
F("USB Drive")
|
||||
#endif
|
||||
)
|
||||
#else
|
||||
F("SD Card"))
|
||||
#endif
|
||||
.colors(!has_media ? action_btn : normal_btn)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(4).button( BTN_POS(3,8), BTN_SIZE(2,1), F("MENU"));
|
||||
#else
|
||||
.tag(4).button( BTN_POS(3,7), BTN_SIZE(2,2), F("MENU"));
|
||||
#endif
|
||||
}
|
||||
#undef GRID_COLS
|
||||
}
|
||||
|
||||
void StatusScreen::draw_status_message(draw_mode_t what, const char* message) {
|
||||
#define GRID_COLS 1
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.fgcolor(Theme::status_msg)
|
||||
.tag(0)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.button( BTN_POS(1,4), BTN_SIZE(1,1), F(""), OPT_FLAT);
|
||||
#else
|
||||
.button( BTN_POS(1,3), BTN_SIZE(1,2), F(""), OPT_FLAT);
|
||||
#endif
|
||||
|
||||
draw_text_box(cmd,
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
BTN_POS(1,4), BTN_SIZE(1,1),
|
||||
#else
|
||||
BTN_POS(1,3), BTN_SIZE(1,2),
|
||||
#endif
|
||||
message, OPT_CENTER, font_large);
|
||||
}
|
||||
#undef GRID_COLS
|
||||
}
|
||||
|
||||
void StatusScreen::setStatusMessage(progmem_str message) {
|
||||
char buff[strlen_P((const char * const)message)+1];
|
||||
strcpy_P(buff, (const char * const) message);
|
||||
setStatusMessage((const char *) buff);
|
||||
}
|
||||
|
||||
void StatusScreen::setStatusMessage(const char* message) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(Theme::bg_color))
|
||||
.cmd(CLEAR(true,true,true));
|
||||
|
||||
draw_temperature(BACKGROUND);
|
||||
draw_progress(BACKGROUND);
|
||||
draw_axis_position(BACKGROUND);
|
||||
draw_status_message(BACKGROUND, message);
|
||||
draw_interaction_buttons(BACKGROUND);
|
||||
storeBackground();
|
||||
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPAIR("New status message: ", message);
|
||||
#endif
|
||||
|
||||
if (AT_SCREEN(StatusScreen)) {
|
||||
current_screen.onRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::onStartup() {
|
||||
// Load the bitmaps for the status screen
|
||||
|
||||
using namespace Theme;
|
||||
constexpr uint32_t base = ftdi_memory_map::RAM_G;
|
||||
CLCD::mem_write_pgm(base + TD_Icon_Info.RAMG_offset, TD_Icon, sizeof(TD_Icon));
|
||||
CLCD::mem_write_pgm(base + Extruder_Icon_Info.RAMG_offset, Extruder_Icon, sizeof(Extruder_Icon));
|
||||
CLCD::mem_write_pgm(base + Bed_Heat_Icon_Info.RAMG_offset, Bed_Heat_Icon, sizeof(Bed_Heat_Icon));
|
||||
CLCD::mem_write_pgm(base + Fan_Icon_Info.RAMG_offset, Fan_Icon, sizeof(Fan_Icon));
|
||||
|
||||
setStatusMessage(F(WELCOME_MSG));
|
||||
|
||||
UIFlashStorage::initialize();
|
||||
}
|
||||
|
||||
void StatusScreen::onRedraw(draw_mode_t what) {
|
||||
if (what & FOREGROUND) {
|
||||
draw_temperature(FOREGROUND);
|
||||
draw_progress(FOREGROUND);
|
||||
draw_axis_position(FOREGROUND);
|
||||
draw_interaction_buttons(FOREGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
void StatusScreen::onEntry() {
|
||||
onRefresh();
|
||||
}
|
||||
|
||||
void StatusScreen::onIdle() {
|
||||
if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) {
|
||||
onRefresh();
|
||||
refresh_timer.start();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
bool StatusScreen::onTouchEnd(uint8_t tag) {
|
||||
using namespace ExtUI;
|
||||
|
||||
switch (tag) {
|
||||
case 3:
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
if (!Sd2Card::ready()) {
|
||||
StatusScreen::setStatusMessage(F("Insert USB drive..."));
|
||||
Sd2Card::usbStartup();
|
||||
} else {
|
||||
GOTO_SCREEN(FilesScreen);
|
||||
}
|
||||
#else
|
||||
GOTO_SCREEN(FilesScreen);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
if (isPrinting()) {
|
||||
GOTO_SCREEN(TuneMenu);
|
||||
} else {
|
||||
GOTO_SCREEN(MainMenu);
|
||||
}
|
||||
break;
|
||||
case 5: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 6:
|
||||
if (!isPrinting()) {
|
||||
GOTO_SCREEN(MoveAxisScreen);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
// If a passcode is enabled, the LockScreen will prevent the
|
||||
// user from proceeding.
|
||||
LockScreen::check_passcode();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,77 @@
|
|||
/**************************************
|
||||
* stepper_bump_sensiivity_screen.cpp *
|
||||
**************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && HAS_TRINAMIC
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void StepperBumpSensitivityScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0, BaseNumericAdjustmentScreen::DEFAULT_LOWEST);
|
||||
w.heading( PSTR("TMC Bump Sensitivity"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getTMCBumpSensitivity(X),
|
||||
#if X_SENSORLESS && AXIS_HAS_STALLGUARD(X)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
);
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getTMCBumpSensitivity(Y),
|
||||
#if Y_SENSORLESS && AXIS_HAS_STALLGUARD(Y)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
);
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getTMCBumpSensitivity(Z),
|
||||
#if Z_SENSORLESS && AXIS_HAS_STALLGUARD(Z)
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
);
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool StepperBumpSensitivityScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(TMCBumpSensitivity, X ); break;
|
||||
case 3: UI_INCREMENT(TMCBumpSensitivity, X ); break;
|
||||
case 4: UI_DECREMENT(TMCBumpSensitivity, Y ); break;
|
||||
case 5: UI_INCREMENT(TMCBumpSensitivity, Y ); break;
|
||||
case 6: UI_DECREMENT(TMCBumpSensitivity, Z ); break;
|
||||
case 7: UI_INCREMENT(TMCBumpSensitivity, Z ); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI && HAS_TRINAMIC
|
|
@ -0,0 +1,86 @@
|
|||
/******************************
|
||||
* stepper_current_screen.cpp *
|
||||
******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && HAS_TRINAMIC
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void StepperCurrentScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0);
|
||||
w.units(PSTR("mA"));
|
||||
w.heading( PSTR("Stepper Current"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisCurrent_mA(X) );
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisCurrent_mA(Y) );
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisCurrent_mA(Z) );
|
||||
#if EXTRUDERS == 1
|
||||
w.color(e_axis).adjuster( 8, PSTR("E:"), getAxisCurrent_mA(E0) );
|
||||
#elif EXTRUDERS > 1
|
||||
w.color(e_axis).adjuster( 8, PSTR("E1:"), getAxisCurrent_mA(E0) );
|
||||
w.color(e_axis).adjuster(10, PSTR("E2:"), getAxisCurrent_mA(E1) );
|
||||
#if EXTRUDERS > 2
|
||||
w.color(e_axis).adjuster(12, PSTR("E3:"), getAxisCurrent_mA(E2) );
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
w.color(e_axis).adjuster(14, PSTR("E4:"), getAxisCurrent_mA(E3) );
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool StepperCurrentScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisCurrent_mA, X ); break;
|
||||
case 3: UI_INCREMENT(AxisCurrent_mA, X ); break;
|
||||
case 4: UI_DECREMENT(AxisCurrent_mA, Y ); break;
|
||||
case 5: UI_INCREMENT(AxisCurrent_mA, Y ); break;
|
||||
case 6: UI_DECREMENT(AxisCurrent_mA, Z ); break;
|
||||
case 7: UI_INCREMENT(AxisCurrent_mA, Z ); break;
|
||||
case 8: UI_DECREMENT(AxisCurrent_mA, E0); break;
|
||||
case 9: UI_INCREMENT(AxisCurrent_mA, E0); break;
|
||||
#if EXTRUDERS > 1
|
||||
case 10: UI_DECREMENT(AxisCurrent_mA, E1); break;
|
||||
case 11: UI_INCREMENT(AxisCurrent_mA, E1); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 2
|
||||
case 12: UI_DECREMENT(AxisCurrent_mA, E2); break;
|
||||
case 13: UI_INCREMENT(AxisCurrent_mA, E2); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
case 14: UI_DECREMENT(AxisCurrent_mA, E3); break;
|
||||
case 15: UI_INCREMENT(AxisCurrent_mA, E3); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,86 @@
|
|||
/********************
|
||||
* steps_screen.cpp *
|
||||
********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void StepsScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0);
|
||||
w.units(PSTR("st/mm"));
|
||||
w.heading( PSTR("Steps/mm"));
|
||||
w.color(x_axis) .adjuster( 2, PSTR("X:"), getAxisSteps_per_mm(X) );
|
||||
w.color(y_axis) .adjuster( 4, PSTR("Y:"), getAxisSteps_per_mm(Y) );
|
||||
w.color(z_axis) .adjuster( 6, PSTR("Z:"), getAxisSteps_per_mm(Z) );
|
||||
#if EXTRUDERS == 1 || DISABLED(DISTINCT_E_FACTORS)
|
||||
w.color(e_axis) .adjuster( 8, PSTR("E:"), getAxisSteps_per_mm(E0) );
|
||||
#elif EXTRUDERS > 1
|
||||
w.color(e_axis) .adjuster( 8, PSTR("E1:"), getAxisSteps_per_mm(E0) );
|
||||
w.color(e_axis) .adjuster(10, PSTR("E2:"), getAxisSteps_per_mm(E1) );
|
||||
#if EXTRUDERS > 2
|
||||
w.color(e_axis) .adjuster(12, PSTR("E3:"), getAxisSteps_per_mm(E2) );
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
w.color(e_axis) .adjuster(14, PSTR("E4:"), getAxisSteps_per_mm(E3) );
|
||||
#endif
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool StepsScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: UI_DECREMENT(AxisSteps_per_mm, X); break;
|
||||
case 3: UI_INCREMENT(AxisSteps_per_mm, X); break;
|
||||
case 4: UI_DECREMENT(AxisSteps_per_mm, Y); break;
|
||||
case 5: UI_INCREMENT(AxisSteps_per_mm, Y); break;
|
||||
case 6: UI_DECREMENT(AxisSteps_per_mm, Z); break;
|
||||
case 7: UI_INCREMENT(AxisSteps_per_mm, Z); break;
|
||||
case 8: UI_DECREMENT(AxisSteps_per_mm, E0); break;
|
||||
case 9: UI_INCREMENT(AxisSteps_per_mm, E0); break;
|
||||
#if EXTRUDERS > 1
|
||||
case 10: UI_DECREMENT(AxisSteps_per_mm, E1); break;
|
||||
case 11: UI_INCREMENT(AxisSteps_per_mm, E1); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 2
|
||||
case 12: UI_DECREMENT(AxisSteps_per_mm, E2); break;
|
||||
case 13: UI_INCREMENT(AxisSteps_per_mm, E2); break;
|
||||
#endif
|
||||
#if EXTRUDERS > 3
|
||||
case 14: UI_DECREMENT(AxisSteps_per_mm, E3); break;
|
||||
case 15: UI_INCREMENT(AxisSteps_per_mm, E3); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,151 @@
|
|||
/**************************
|
||||
* stress_test_screen.cpp *
|
||||
**************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
|
||||
|
||||
#include "screens.h"
|
||||
#include "screen_data.h"
|
||||
|
||||
#define STRESS_TEST_CHANGE_INTERVAL 6000
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 9
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
|
||||
CommandProcessor cmd;
|
||||
for(uint8_t i = 0; i < 100; i++) {
|
||||
cmd.cmd(BEGIN(POINTS))
|
||||
.cmd(POINT_SIZE(20*16))
|
||||
.cmd(COLOR_RGB(random(0xFFFFFF)))
|
||||
.cmd(VERTEX2F((x + random(w)) * 16,(y + random(h)) * 16));
|
||||
}
|
||||
}
|
||||
|
||||
bool StressTestScreen::watchDogTestNow() {
|
||||
return screen_data.StressTestScreen.next_watchdog_trigger &&
|
||||
ELAPSED(millis(), screen_data.StressTestScreen.next_watchdog_trigger);
|
||||
}
|
||||
|
||||
void StressTestScreen::onRedraw(draw_mode_t) {
|
||||
using namespace ExtUI;
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.font(font_medium)
|
||||
.text(BTN_POS(1,1), BTN_SIZE(4,1), progmem_str(screen_data.StressTestScreen.message));
|
||||
|
||||
drawDots(BTN_POS(1,3), BTN_SIZE(4,4));
|
||||
|
||||
cmd.font(font_medium).enabled(!watchDogTestNow()).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), F("Exit"));
|
||||
}
|
||||
|
||||
bool StressTestScreen::onTouchEnd(uint8_t tag) {
|
||||
CommandProcessor cmd;
|
||||
switch (tag) {
|
||||
case 1:
|
||||
runTestOnBootup(false);
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void StressTestScreen::runTestOnBootup(bool enable) {
|
||||
// Use a magic value in passcode to indicate
|
||||
// whether or not we need to re-run the test
|
||||
// at startup.
|
||||
LockScreen::set_hash(enable ? 0xDEAD : 0);
|
||||
injectCommands_P(PSTR("M500"));
|
||||
}
|
||||
|
||||
void StressTestScreen::startupCheck() {
|
||||
if (LockScreen::get_hash() == 0xDEAD) {
|
||||
GOTO_SCREEN(StressTestScreen);
|
||||
}
|
||||
}
|
||||
|
||||
void StressTestScreen::onEntry() {
|
||||
screen_data.StressTestScreen.next_watchdog_trigger = millis() + 10000 + random(40000);
|
||||
screen_data.StressTestScreen.message = PSTR("Test 1: Stress testing...");
|
||||
|
||||
// Turn off heaters.
|
||||
setTargetTemp_celsius(0, E0);
|
||||
setTargetTemp_celsius(0, E1);
|
||||
setTargetTemp_celsius(0, BED);
|
||||
|
||||
runTestOnBootup(true);
|
||||
}
|
||||
|
||||
void StressTestScreen::recursiveLockup() {
|
||||
screen_data.StressTestScreen.message = PSTR("Test 2: Printer will restart.");
|
||||
current_screen.onRefresh();
|
||||
recursiveLockup();
|
||||
}
|
||||
|
||||
void StressTestScreen::iterativeLockup() {
|
||||
screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart.");
|
||||
for(;;) current_screen.onRefresh();
|
||||
}
|
||||
|
||||
void StressTestScreen::onIdle() {
|
||||
current_screen.onRefresh();
|
||||
reset_menu_timeout();
|
||||
|
||||
if (!commandsInQueue()) {
|
||||
if (!isPositionKnown()) {
|
||||
injectCommands_P(PSTR("G28"));
|
||||
} else {
|
||||
injectCommands_P(PSTR(
|
||||
"G0 X100 Y100 Z100 F6000\n"
|
||||
"T0\nG4 S1"
|
||||
#if EXTRUDERS > 1
|
||||
"\nT1\nG4 S1"
|
||||
#endif
|
||||
"\nG0 X150 Y150 Z150"
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) {
|
||||
setTargetFan_percent(random(100),FAN0);
|
||||
}
|
||||
|
||||
if (watchDogTestNow()) {
|
||||
if (random(2) % 2)
|
||||
iterativeLockup();
|
||||
else
|
||||
recursiveLockup();
|
||||
}
|
||||
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,111 @@
|
|||
/*******************
|
||||
* boot_screen.cpp *
|
||||
*******************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
|
||||
void TemperatureScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(0).color(temp).units(PSTR("C"));
|
||||
w.heading( PSTR("Temperature:"));
|
||||
w.button(30, PSTR("Cooldown (All Off)"));
|
||||
#ifndef LULZBOT_DISABLE_TOOLHEAD_HEATER
|
||||
#if HOTENDS == 1
|
||||
w.adjuster( 2, PSTR("Hot End:"), getTargetTemp_celsius(E0));
|
||||
#else
|
||||
w.adjuster( 2, PSTR("Hot End 1:"), getTargetTemp_celsius(E0));
|
||||
w.adjuster( 4, PSTR("Hot End 2:"), getTargetTemp_celsius(E1));
|
||||
#if HOTENDS > 2
|
||||
w.adjuster( 6, PSTR("Hot End 3:"), getTargetTemp_celsius(E2));
|
||||
#endif
|
||||
#if HOTENDS > 3
|
||||
w.adjuster( 8, PSTR("Hot End 4:"), getTargetTemp_celsius(E3));
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
w.adjuster( 20, PSTR("Bed:"), getTargetTemp_celsius(BED));
|
||||
#endif
|
||||
#if FAN_COUNT > 0
|
||||
w.color(fan_speed).units(PSTR("%"));
|
||||
w.adjuster( 10, PSTR("Fan Speed:"), getTargetFan_percent(FAN0));
|
||||
#endif
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool TemperatureScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 20: UI_DECREMENT(TargetTemp_celsius, BED); break;
|
||||
case 21: UI_INCREMENT(TargetTemp_celsius, BED); break;
|
||||
#ifndef LULZBOT_DISABLE_TOOLHEAD_HEATER
|
||||
case 2: UI_DECREMENT(TargetTemp_celsius, E0); break;
|
||||
case 3: UI_INCREMENT(TargetTemp_celsius, E0); break;
|
||||
#endif
|
||||
#if HOTENDS > 1
|
||||
case 4: UI_DECREMENT(TargetTemp_celsius, E1); break;
|
||||
case 5: UI_INCREMENT(TargetTemp_celsius, E1); break;
|
||||
#endif
|
||||
#if HOTENDS > 2
|
||||
case 6: UI_DECREMENT(TargetTemp_celsius, E2); break;
|
||||
case 7: UI_INCREMENT(TargetTemp_celsius, E2); break;
|
||||
#endif
|
||||
#if HOTENDS > 3
|
||||
case 8: UI_DECREMENT(TargetTemp_celsius, E3); break;
|
||||
case 9: UI_INCREMENT(TargetTemp_celsius, E3); break;
|
||||
#endif
|
||||
#if FAN_COUNT > 0
|
||||
case 10: UI_DECREMENT(TargetFan_percent, FAN0); break;
|
||||
case 11: UI_INCREMENT(TargetFan_percent, FAN0); break;
|
||||
#endif
|
||||
case 30:
|
||||
setTargetTemp_celsius(0,E0);
|
||||
#if HOTENDS > 1
|
||||
setTargetTemp_celsius(0,E1);
|
||||
#if HOTENDS > 2
|
||||
setTargetTemp_celsius(0,E2);
|
||||
#if HOTENDS > 3
|
||||
setTargetTemp_celsius(0,E4);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
setTargetTemp_celsius(0,BED);
|
||||
#endif
|
||||
#if FAN_COUNT > 0
|
||||
setTargetFan_percent(0,FAN0);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,116 @@
|
|||
/********************************
|
||||
* touch_calibration_screen.cpp *
|
||||
********************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 16
|
||||
|
||||
void TouchCalibrationScreen::onEntry() {
|
||||
CommandProcessor cmd;
|
||||
|
||||
BaseScreen::onEntry();
|
||||
|
||||
if (CLCD::is_touching()) {
|
||||
// Ask the user to release the touch before starting,
|
||||
// as otherwise the first calibration point could
|
||||
// be misinterpreted.
|
||||
cmd.cmd(CMD_DLSTART)
|
||||
.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_large)
|
||||
.text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Release to begin"))
|
||||
.text ( BTN_POS(1,9), BTN_SIZE(4,1), F("screen calibration"))
|
||||
#else
|
||||
.font(
|
||||
#ifdef TOUCH_UI_800x480
|
||||
font_large
|
||||
#else
|
||||
font_medium
|
||||
#endif
|
||||
)
|
||||
.text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Release to calibrate"))
|
||||
#endif
|
||||
.cmd(DL::DL_DISPLAY)
|
||||
.cmd(CMD_SWAP)
|
||||
.execute();
|
||||
|
||||
while (CLCD::is_touching()) {
|
||||
#ifdef UI_FRAMEWORK_DEBUG
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOLNPGM("Waiting for touch release");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// Force a refresh
|
||||
cmd.cmd(CMD_DLSTART);
|
||||
onRedraw(FOREGROUND);
|
||||
cmd.cmd(DL::DL_DISPLAY);
|
||||
cmd.execute();
|
||||
}
|
||||
|
||||
void TouchCalibrationScreen::onRefresh() {
|
||||
// Don't do the regular refresh, as this would
|
||||
// cause the calibration be restarted on every
|
||||
// touch.
|
||||
}
|
||||
|
||||
void TouchCalibrationScreen::onRedraw(draw_mode_t) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.font(font_large)
|
||||
.text ( BTN_POS(1,8), BTN_SIZE(4,1), F("Touch the dots"))
|
||||
.text ( BTN_POS(1,9), BTN_SIZE(4,1), F("to calibrate"))
|
||||
#else
|
||||
.font(
|
||||
#ifdef TOUCH_UI_800x480
|
||||
font_large
|
||||
#else
|
||||
font_medium
|
||||
#endif
|
||||
)
|
||||
.text ( BTN_POS(1,1), BTN_SIZE(4,16), F("Touch the dots to calibrate"))
|
||||
#endif
|
||||
.cmd(CMD_CALIBRATE);
|
||||
}
|
||||
|
||||
void TouchCalibrationScreen::onIdle() {
|
||||
if (!CLCD::is_touching() && !CommandProcessor::is_processing()) {
|
||||
GOTO_PREVIOUS();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,86 @@
|
|||
/******************************
|
||||
* touch_registers_screen.cpp *
|
||||
******************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void TouchRegistersScreen::onRedraw(draw_mode_t) {
|
||||
const uint32_t T_Transform_A = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_A);
|
||||
const uint32_t T_Transform_B = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_B);
|
||||
const uint32_t T_Transform_C = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_C);
|
||||
const uint32_t T_Transform_D = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_D);
|
||||
const uint32_t T_Transform_E = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_E);
|
||||
const uint32_t T_Transform_F = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
|
||||
char b[20];
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.tag(0);
|
||||
|
||||
#define GRID_ROWS 7
|
||||
#define GRID_COLS 2
|
||||
cmd.tag(0)
|
||||
.font(font_xsmall)
|
||||
.fgcolor(transformA) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("TOUCH_XFORM_A"))
|
||||
.fgcolor(transformB) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("TOUCH_XFORM_B"))
|
||||
.fgcolor(transformC) .button( BTN_POS(1,3), BTN_SIZE(1,1), F("TOUCH_XFORM_C"))
|
||||
.fgcolor(transformD) .button( BTN_POS(1,4), BTN_SIZE(1,1), F("TOUCH_XFORM_D"))
|
||||
.fgcolor(transformE) .button( BTN_POS(1,5), BTN_SIZE(1,1), F("TOUCH_XFORM_E"))
|
||||
.fgcolor(transformF) .button( BTN_POS(1,6), BTN_SIZE(1,1), F("TOUCH_XFORM_F"))
|
||||
|
||||
.fgcolor(transformVal).button( BTN_POS(2,1), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(transformVal).button( BTN_POS(2,2), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(transformVal).button( BTN_POS(2,3), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(transformVal).button( BTN_POS(2,4), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(transformVal).button( BTN_POS(2,5), BTN_SIZE(1,1), F(""), OPT_FLAT)
|
||||
.fgcolor(transformVal).button( BTN_POS(2,6), BTN_SIZE(1,1), F(""), OPT_FLAT);
|
||||
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_A); cmd.text( BTN_POS(2,1), BTN_SIZE(1,1), b);
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_B); cmd.text( BTN_POS(2,2), BTN_SIZE(1,1), b);
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_C); cmd.text( BTN_POS(2,3), BTN_SIZE(1,1), b);
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_D); cmd.text( BTN_POS(2,4), BTN_SIZE(1,1), b);
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_E); cmd.text( BTN_POS(2,5), BTN_SIZE(1,1), b);
|
||||
sprintf_P(b, PSTR("0x%08lX"), T_Transform_F); cmd.text( BTN_POS(2,6), BTN_SIZE(1,1), b);
|
||||
|
||||
cmd.colors(action_btn).font(font_medium)
|
||||
.tag(1).button( BTN_POS(2,7), BTN_SIZE(1,1), F("Back"));
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
bool TouchRegistersScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
167
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp
Normal file
167
Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp
Normal file
|
@ -0,0 +1,167 @@
|
|||
/*******************
|
||||
* tune_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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && !defined(LULZBOT_USE_BIOPRINTER_UI)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace Theme;
|
||||
|
||||
void TuneMenu::onRedraw(draw_mode_t what) {
|
||||
if (what & BACKGROUND) {
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.font(font_medium);
|
||||
}
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_ROWS 8
|
||||
#define GRID_COLS 2
|
||||
#else
|
||||
#define GRID_ROWS 4
|
||||
#define GRID_COLS 2
|
||||
#endif
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
using namespace ExtUI;
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature"))
|
||||
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Change Filament"))
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(9).button( BTN_POS(1,3), BTN_SIZE(2,1), F("Filament Options"))
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
.tag(4).enabled(1) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Nudge Nozzle"))
|
||||
#else
|
||||
#if HAS_BED_PROBE
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset"))
|
||||
#endif
|
||||
.tag(5).enabled(1) .button( BTN_POS(1,5), BTN_SIZE(2,1), F("Print Speed"))
|
||||
.tag(isPrintingFromMediaPaused() ? 7 : 6)
|
||||
#if ENABLED(SDSUPPORT)
|
||||
.enabled(isPrintingFromMedia())
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.button( BTN_POS(1,6), BTN_SIZE(2,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print"))
|
||||
#if ENABLED(SDSUPPORT)
|
||||
.enabled(isPrintingFromMedia())
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(8) .button( BTN_POS(1,7), BTN_SIZE(2,1), F("Cancel Print"))
|
||||
.tag(1).colors(action_btn)
|
||||
.button( BTN_POS(1,8), BTN_SIZE(2,1), F("Back"));
|
||||
#else // TOUCH_UI_PORTRAIT
|
||||
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(1,1), F("Temperature"))
|
||||
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(1,1), F("Change Filament"))
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
.tag(4) .button( BTN_POS(2,1), BTN_SIZE(1,1), F("Nudge Nozzle"))
|
||||
#else
|
||||
#if HAS_BED_PROBE
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(4) .button( BTN_POS(1,4), BTN_SIZE(2,1), F("Adjust Z-Offset"))
|
||||
#endif
|
||||
.tag(5).enabled(1) .button( BTN_POS(2,2), BTN_SIZE(1,1), F("Print Speed"))
|
||||
.tag(isPrintingFromMediaPaused() ? 7 : 6)
|
||||
#if ENABLED(SDSUPPORT)
|
||||
.enabled(isPrintingFromMedia())
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.button( BTN_POS(1,3), BTN_SIZE(1,1), isPrintingFromMediaPaused() ? F("Resume Print") : F("Pause Print"))
|
||||
#if ENABLED(SDSUPPORT)
|
||||
.enabled(isPrintingFromMedia())
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print"))
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
.enabled(1)
|
||||
#else
|
||||
.enabled(0)
|
||||
#endif
|
||||
.tag(9).button( BTN_POS(1,4), BTN_SIZE(1,1), F("Filament Options"))
|
||||
.tag(1).colors(action_btn) .button( BTN_POS(2,4), BTN_SIZE(1,1), F("Back"));
|
||||
#endif
|
||||
}
|
||||
#undef GRID_COLS
|
||||
#undef GRID_ROWS
|
||||
}
|
||||
|
||||
bool TuneMenu::onTouchEnd(uint8_t tag) {
|
||||
using namespace Theme;
|
||||
using namespace ExtUI;
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
case 2: GOTO_SCREEN(TemperatureScreen); break;
|
||||
case 3: GOTO_SCREEN(ChangeFilamentScreen); break;
|
||||
case 4:
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
GOTO_SCREEN(NudgeNozzleScreen);
|
||||
#else
|
||||
#if HAS_BED_PROBE
|
||||
GOTO_SCREEN(ZOffsetScreen);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case 5: GOTO_SCREEN(FeedratePercentScreen); break;
|
||||
case 6: sound.play(twinkle, PLAY_ASYNCHRONOUS); ExtUI::pausePrint(); GOTO_SCREEN(StatusScreen); break;
|
||||
case 7: sound.play(twinkle, PLAY_ASYNCHRONOUS); ExtUI::resumePrint(); GOTO_SCREEN(StatusScreen); break;
|
||||
case 8:
|
||||
GOTO_SCREEN(ConfirmAbortPrintDialogBox);
|
||||
current_screen.forget();
|
||||
PUSH_SCREEN(StatusScreen);
|
||||
break;
|
||||
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
case 9: GOTO_SCREEN(FilamentMenu); break;
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
|
@ -0,0 +1,158 @@
|
|||
/**************************
|
||||
* widget_demo_screen.cpp *
|
||||
**************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
uint16_t slider_val;
|
||||
bool show_grid;
|
||||
|
||||
void WidgetsScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
CLCD::turn_on_backlight();
|
||||
SoundPlayer::set_volume(255);
|
||||
}
|
||||
|
||||
void WidgetsScreen::onRedraw(draw_mode_t) {
|
||||
using namespace ExtUI;
|
||||
CommandProcessor cmd;
|
||||
cmd.cmd(CLEAR_COLOR_RGB(bg_color))
|
||||
.cmd(CLEAR(true,true,true))
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.tag(0);
|
||||
|
||||
const uint16_t hrs = (slider_val*12/0xFFFFU);
|
||||
const uint16_t m = (slider_val*12*60/0xFFFFU)%60;
|
||||
const uint16_t s = (slider_val*12*60*60/0xFFFFU)%60;
|
||||
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
#define GRID_COLS 3
|
||||
#define GRID_ROWS 8
|
||||
cmd.font(font_large)
|
||||
.cmd(COLOR_RGB(bg_text_enabled))
|
||||
.text (BTN_POS(1,1), BTN_SIZE(3,1), F("Sample Widgets"))
|
||||
.tag(0).text (BTN_POS(2,6), BTN_SIZE(1,1), F("Show grid:"))
|
||||
.colors(ui_toggle)
|
||||
.tag(2).dial (BTN_POS(1,2), BTN_SIZE(1,2), slider_val)
|
||||
.tag(0).clock (BTN_POS(1,4), BTN_SIZE(1,2), hrs, m, s, 0)
|
||||
.gauge (BTN_POS(1,6), BTN_SIZE(1,2), 5, 4, slider_val, 0xFFFFU)
|
||||
.font(font_medium)
|
||||
.colors(ui_slider)
|
||||
.tag(4).slider (BTN_POS(2,3), BTN_SIZE(2,1), slider_val, 0xFFFFU)
|
||||
.tag(5).progress (BTN_POS(2,4), BTN_SIZE(2,1), slider_val, 0xFFFFU)
|
||||
.tag(6).scrollbar (BTN_POS(2,5), BTN_SIZE(2,1), slider_val, 1000, 0xFFFFU)
|
||||
.font(font_small)
|
||||
.colors(ui_toggle)
|
||||
.tag(7).toggle (BTN_POS(3,6), BTN_SIZE(1,1), F("no\xFFyes"), show_grid)
|
||||
.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.tag(1)
|
||||
.button (BTN_POS(2, 8), BTN_SIZE(1,1), F("1"))
|
||||
.button (BTN_POS(3, 8), BTN_SIZE(1,1), F("2"))
|
||||
.colors(action_btn)
|
||||
.button (BTN_POS(1, 8), BTN_SIZE(1,1), F("Back"));
|
||||
#else
|
||||
#define GRID_COLS 4
|
||||
#define GRID_ROWS 8
|
||||
|
||||
cmd.font(font_large)
|
||||
.text (BTN_POS(1,1), BTN_SIZE(4,1), F("Sample Widgets"))
|
||||
.tag(0).text (BTN_POS(3,6), BTN_SIZE(1,1), F("Show grid:"))
|
||||
.colors(ui_toggle)
|
||||
.tag(2).dial (BTN_POS(1,2), BTN_SIZE(1,3), slider_val)
|
||||
.tag(3).dial (BTN_POS(1,5), BTN_SIZE(1,3), slider_val)
|
||||
.tag(0).clock (BTN_POS(2,2), BTN_SIZE(1,3), hrs, m, s, 0)
|
||||
.gauge (BTN_POS(2,5), BTN_SIZE(1,3), 5, 4, slider_val, 0xFFFFU)
|
||||
.font(font_medium)
|
||||
.colors(ui_slider)
|
||||
.tag(4).slider (BTN_POS(3,3), BTN_SIZE(2,1), slider_val, 0xFFFFU)
|
||||
.tag(5).progress (BTN_POS(3,4), BTN_SIZE(2,1), slider_val, 0xFFFFU)
|
||||
.tag(6).scrollbar (BTN_POS(3,5), BTN_SIZE(2,1), slider_val, 1000, 0xFFFFU)
|
||||
.font(font_small)
|
||||
.colors(ui_toggle)
|
||||
.tag(7).toggle (BTN_POS(4,6), BTN_SIZE(1,1), F("no\xFFyes"), show_grid)
|
||||
.colors(normal_btn)
|
||||
.font(font_medium)
|
||||
.tag(1).button (BTN_POS(3, 8), BTN_SIZE(1,1), F("1"))
|
||||
.button (BTN_POS(4, 8), BTN_SIZE(1,1), F("2"))
|
||||
.colors(action_btn)
|
||||
.button (BTN_POS(1, 8), BTN_SIZE(2,1), F("Back"));
|
||||
#endif
|
||||
|
||||
cmd.cmd(COLOR_RGB(bg_text_enabled));
|
||||
if (show_grid) DRAW_LAYOUT_GRID
|
||||
}
|
||||
|
||||
bool WidgetsScreen::onTouchStart(uint8_t tag) {
|
||||
CommandProcessor cmd;
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
case 2: cmd.track_circular (BTN_POS(1,2), BTN_SIZE(1,2), 2).execute(); break;
|
||||
case 4: cmd.track_linear (BTN_POS(2,3), BTN_SIZE(2,1), 4).execute(); break;
|
||||
case 5: cmd.track_linear (BTN_POS(2,4), BTN_SIZE(2,1), 5).execute(); break;
|
||||
case 6: cmd.track_linear (BTN_POS(2,5), BTN_SIZE(2,1), 6).execute(); break;
|
||||
#else
|
||||
case 2: cmd.track_circular (BTN_POS(1,2), BTN_SIZE(1,3), 2).execute(); break;
|
||||
case 3: cmd.track_circular (BTN_POS(1,5), BTN_SIZE(1,3), 3).execute(); break;
|
||||
case 4: cmd.track_linear (BTN_POS(3,3), BTN_SIZE(2,1), 4).execute(); break;
|
||||
case 5: cmd.track_linear (BTN_POS(3,4), BTN_SIZE(2,1), 5).execute(); break;
|
||||
case 6: cmd.track_linear (BTN_POS(3,5), BTN_SIZE(2,1), 6).execute(); break;
|
||||
#endif
|
||||
case 7: show_grid = !show_grid; break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WidgetsScreen::onIdle() {
|
||||
if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) {
|
||||
refresh_timer.start();
|
||||
|
||||
uint16_t value;
|
||||
CommandProcessor cmd;
|
||||
switch (cmd.track_tag(value)) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
slider_val = value; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
onRefresh();
|
||||
}
|
||||
BaseScreen::onIdle();
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI && DEVELOPER_SCREENS
|
|
@ -0,0 +1,54 @@
|
|||
/***********************
|
||||
* z_offset_screen.cpp *
|
||||
***********************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI) && HAS_BED_PROBE
|
||||
|
||||
#include "screens.h"
|
||||
|
||||
using namespace FTDI;
|
||||
using namespace ExtUI;
|
||||
using namespace Theme;
|
||||
|
||||
void ZOffsetScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(PSTR("mm"));
|
||||
|
||||
w.heading( PSTR("Z Offset"));
|
||||
w.color(z_axis).adjuster(4, PSTR("Z Offset:"), getZOffset_mm());
|
||||
w.increments();
|
||||
}
|
||||
|
||||
bool ZOffsetScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 4: UI_DECREMENT(ZOffset_mm); break;
|
||||
case 5: UI_INCREMENT(ZOffset_mm); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
SaveSettingsDialogBox::settingsChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI && HAS_BED_PROBE
|
181
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h
Normal file
181
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/bitmaps.h
Normal file
|
@ -0,0 +1,181 @@
|
|||
/*************
|
||||
* bitmaps.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Theme {
|
||||
using namespace FTDI;
|
||||
|
||||
constexpr PROGMEM bitmap_info_t Extruder_Icon_Info = {
|
||||
.format = L1,
|
||||
.linestride = 3,
|
||||
.filter = BILINEAR,
|
||||
.wrapx = BORDER,
|
||||
.wrapy = BORDER,
|
||||
.RAMG_offset = 8000,
|
||||
.width = 24,
|
||||
.height = 23,
|
||||
};
|
||||
|
||||
constexpr PROGMEM unsigned char Extruder_Icon[] = {
|
||||
0x3F, 0xFF, 0xFC,
|
||||
0x7F, 0xFF, 0xFE,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0x7F, 0xFF, 0xFE,
|
||||
0x3F, 0xFF, 0xFC,
|
||||
0x3F, 0xFF, 0xFC,
|
||||
0x7F, 0xFF, 0xFE,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0xC0, 0x00, 0x03,
|
||||
0x7F, 0xFF, 0xFE,
|
||||
0x7F, 0xFF, 0xFE,
|
||||
0x07, 0xFF, 0xE0,
|
||||
0x03, 0xFF, 0xC0,
|
||||
0x01, 0x81, 0x80,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0x66, 0x00,
|
||||
0x00, 0x3C, 0x00,
|
||||
0x00, 0x3C, 0x00
|
||||
};
|
||||
|
||||
constexpr PROGMEM bitmap_info_t Bed_Heat_Icon_Info = {
|
||||
.format = L1,
|
||||
.linestride = 4,
|
||||
.filter = BILINEAR,
|
||||
.wrapx = BORDER,
|
||||
.wrapy = BORDER,
|
||||
.RAMG_offset = 8100,
|
||||
.width = 32,
|
||||
.height = 23,
|
||||
};
|
||||
|
||||
constexpr PROGMEM unsigned char Bed_Heat_Icon[] = {
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x00, 0xC0, 0xC0, 0xC0,
|
||||
0x00, 0xC0, 0xC0, 0xC0,
|
||||
0x00, 0x60, 0x60, 0x60,
|
||||
0x00, 0x60, 0x60, 0x60,
|
||||
0x00, 0xC0, 0xC0, 0xC0,
|
||||
0x00, 0xC0, 0xC0, 0xC0,
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x03, 0x03, 0x03, 0x00,
|
||||
0x03, 0x03, 0x03, 0x00,
|
||||
0x06, 0x06, 0x06, 0x00,
|
||||
0x06, 0x06, 0x06, 0x00,
|
||||
0x03, 0x03, 0x03, 0x00,
|
||||
0x03, 0x03, 0x03, 0x00,
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x01, 0x81, 0x81, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xC0, 0x00, 0x00, 0x03,
|
||||
0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
constexpr PROGMEM bitmap_info_t Fan_Icon_Info = {
|
||||
.format = L1,
|
||||
.linestride = 4,
|
||||
.filter = BILINEAR,
|
||||
.wrapx = BORDER,
|
||||
.wrapy = BORDER,
|
||||
.RAMG_offset = 8300,
|
||||
.width = 32,
|
||||
.height = 32,
|
||||
};
|
||||
|
||||
constexpr PROGMEM unsigned char Fan_Icon[] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xF8, 0x00, 0x00, 0x1F,
|
||||
0xF0, 0x03, 0xF8, 0x0F,
|
||||
0xE0, 0x07, 0xF0, 0x07,
|
||||
0xC0, 0x0F, 0xE0, 0x03,
|
||||
0xC0, 0x1F, 0xE0, 0x03,
|
||||
0xC0, 0x1F, 0xE0, 0x03,
|
||||
0xC0, 0x0F, 0xE0, 0x03,
|
||||
0xC0, 0x07, 0xE0, 0x03,
|
||||
0xC0, 0x03, 0xC0, 0x03,
|
||||
0xD0, 0x00, 0x00, 0xC3,
|
||||
0xD8, 0x03, 0xC1, 0xE3,
|
||||
0xDF, 0xC7, 0xE3, 0xF3,
|
||||
0xDF, 0xEF, 0xF7, 0xFB,
|
||||
0xDF, 0xEF, 0xF7, 0xFB,
|
||||
0xDF, 0xEF, 0xF7, 0xFB,
|
||||
0xDF, 0xEF, 0xF7, 0xFB,
|
||||
0xCF, 0xC7, 0xE3, 0xFB,
|
||||
0xC7, 0x83, 0xC0, 0x1B,
|
||||
0xC3, 0x00, 0x00, 0x0B,
|
||||
0xC0, 0x03, 0xC0, 0x03,
|
||||
0xC0, 0x07, 0xE0, 0x03,
|
||||
0xC0, 0x07, 0xF0, 0x03,
|
||||
0xC0, 0x07, 0xF8, 0x03,
|
||||
0xC0, 0x07, 0xF8, 0x03,
|
||||
0xC0, 0x07, 0xF0, 0x03,
|
||||
0xE0, 0x0F, 0xE0, 0x07,
|
||||
0xF0, 0x1F, 0xC0, 0x0F,
|
||||
0xF8, 0x00, 0x00, 0x1F,
|
||||
0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF
|
||||
};
|
||||
|
||||
constexpr PROGMEM bitmap_info_t TD_Icon_Info = {
|
||||
.format = L1,
|
||||
.linestride = 7,
|
||||
.filter = BILINEAR,
|
||||
.wrapx = BORDER,
|
||||
.wrapy = BORDER,
|
||||
.RAMG_offset = 9000,
|
||||
.width = 50,
|
||||
.height = 20,
|
||||
};
|
||||
|
||||
constexpr PROGMEM unsigned char TD_Icon[] = {
|
||||
0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // Thumb Drive Widget
|
||||
0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80,
|
||||
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xC0, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xC0,
|
||||
0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80,
|
||||
0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||
0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00
|
||||
};
|
||||
}; // namespace Theme
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
/****************************************************************************
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* This file was auto-generated using "svg2cpp.pl"
|
||||
*
|
||||
* The encoding consists of x,y pairs with the min and max scaled to
|
||||
* 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the
|
||||
* start of a new closed path.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
constexpr float x_min = 0.000000;
|
||||
|
||||
constexpr float x_max = 480.000000;
|
||||
|
||||
constexpr float y_min = 0.000000;
|
||||
|
||||
constexpr float y_max = 272.000000;
|
||||
|
||||
const PROGMEM uint16_t logo_green[] = {0x7E30, 0x2358, 0x4C02, 0xBCAA, 0xB05C, 0xBCAA};
|
||||
|
||||
const PROGMEM uint16_t logo_mark[] = {0xB1F2, 0xD5EE, 0xB146, 0xD62A, 0xB0B5, 0xD6D9, 0xB052, 0xD7DC, 0xB030, 0xD90B, 0xB052, 0xDA38, 0xB0B5, 0xDB3A, 0xB146, 0xDBE9, 0xB1F2, 0xDC22, 0xB29E, 0xDBE9, 0xB330, 0xDB3A, 0xB392, 0xDA3A, 0xB3B4, 0xD90B, 0xB392, 0xD7D9, 0xB330, 0xD6D9, 0xB29E, 0xD62A, 0xFFFF, 0xB1F2, 0xD56F, 0xB2B9, 0xD5B3, 0xB362, 0xD67F, 0xB3D4, 0xD7A9, 0xB3FB, 0xD90B, 0xB3D4, 0xDA68, 0xB362, 0xDB91, 0xB2B9, 0xDC5E, 0xB1F2, 0xDCA2, 0xB12B, 0xDC5E, 0xB082, 0xDB91, 0xB00E, 0xDA68, 0xAFE9, 0xD90B, 0xB00E, 0xD7A9, 0xB082, 0xD67F, 0xB12B, 0xD5B3, 0xFFFF, 0xB1DF, 0xD770, 0xB188, 0xD770, 0xB188, 0xD8C7, 0xB1DF, 0xD8C7, 0xB24A, 0xD8A2, 0xB269, 0xD81D, 0xB24A, 0xD798, 0xFFFF, 0xB1E3, 0xD6F0, 0xB29C, 0xD73A, 0xB2D9, 0xD81A, 0xB2B4, 0xD8CD, 0xB24C, 0xD925, 0xB274, 0xD960, 0xB2AD, 0xD9EB, 0xB30D, 0xDAFE, 0xB294, 0xDAFE, 0xB23A, 0xD9FC, 0xB1F7, 0xD966, 0xB1B6, 0xD944, 0xB188, 0xD944, 0xB188, 0xDAFE, 0xB11C, 0xDAFE, 0xB11C, 0xD6F0};
|
||||
|
||||
const PROGMEM uint16_t logo_type[] = {0xB05D, 0xC9B7, 0xB042, 0xCA2D, 0xAFFF, 0xCA5F, 0xAD38, 0xCA5F, 0xACF5, 0xCA8B, 0xACD9, 0xCAFE, 0xACD9, 0xDBFC, 0xACC0, 0xDC74, 0xAC7F, 0xDCA5, 0xA9C8, 0xDCA5, 0xA984, 0xDC74, 0xA969, 0xDBFC, 0xA969, 0xCAFE, 0xA950, 0xCA8B, 0xA90F, 0xCA60, 0xA649, 0xCA60, 0xA605, 0xCA2E, 0xA5EA, 0xC9B8, 0xA5EA, 0xC52A, 0xA649, 0xC482, 0xAFFF, 0xC482, 0xB042, 0xC4B3, 0xB05D, 0xC52A, 0xFFFF, 0x99EB, 0xD6D1, 0x9E82, 0xD6D1, 0x9E82, 0xCA60, 0x99EB, 0xCA60, 0xFFFF, 0xA1D0, 0xC7F5, 0xA1EB, 0xC88B, 0xA1F8, 0xC92A, 0xA1F8, 0xD7FD, 0xA1EB, 0xD89C, 0xA1D0, 0xD933, 0xA004, 0xDC5E, 0x9FAC, 0xDC93, 0x9F50, 0xDCA5, 0x991E, 0xDCA5, 0x98C4, 0xDC93, 0x986F, 0xDC5E, 0x96A3, 0xD933, 0x9685, 0xD89C, 0x967B, 0xD7FD, 0x967B, 0xC92A, 0x9685, 0xC88B, 0x96A3, 0xC7F5, 0x986F, 0xC4C9, 0x98C4, 0xC498, 0x991E, 0xC482, 0x9F50, 0xC482, 0x9FAC, 0xC498, 0xA004, 0xC4C9, 0xFFFF, 0x8928, 0xD75F, 0x8E6A, 0xD75F, 0x8E6A, 0xD2AE, 0x8928, 0xD2AE, 0x8928, 0xD75F, 0xFFFF, 0x8928, 0xCE0F, 0x8E6A, 0xCE0F, 0x8E6A, 0xC9C0, 0x8928, 0xC9C0, 0xFFFF, 0x9162, 0xC7F5, 0x917D, 0xC88F, 0x918A, 0xC932, 0x918A, 0xCD06, 0x9178, 0xCDA1, 0x914D, 0xCE2A, 0x9077, 0xD00F, 0x9060, 0xD094, 0x907C, 0xD10F, 0x9149, 0xD2C9, 0x9176, 0xD352, 0x918A, 0xD3EC, 0x918A, 0xD7FD, 0x917D, 0xD89C, 0x9162, 0xD933, 0x8F96, 0xDC5E, 0x8F3E, 0xDC93, 0x8EE2, 0xDCA5, 0x866C, 0xDCA5, 0x860D, 0xDBFC, 0x860D, 0xC52A, 0x8628, 0xC4B3, 0x866C, 0xC482, 0x8EE2, 0xC482, 0x8F3E, 0xC498, 0x8F96, 0xC4C9, 0xFFFF, 0x80FE, 0xC983, 0x80E9, 0xCA19, 0x80BD, 0xCA9D, 0x7A63, 0xD73B, 0x809F, 0xD73B, 0x80E2, 0xD76C, 0x80FE, 0xD7E3, 0x80FE, 0xDBFC, 0x80E2, 0xDC74, 0x809F, 0xDCA5, 0x76E9, 0xDCA5, 0x768A, 0xDBFC, 0x768A, 0xD7AD, 0x769B, 0xD713, 0x76C6, 0xD68B, 0x7D42, 0xC9EC, 0x7707, 0xC9EC, 0x76C4, 0xC9BB, 0x76A8, 0xC945, 0x76A8, 0xC52A, 0x76C4, 0xC4B3, 0x7707, 0xC482, 0x809F, 0xC482, 0x80E2, 0xC4B3, 0x80FE, 0xC52A, 0xFFFF, 0x725C, 0xD6C8, 0x729D, 0xD6F9, 0x72B6, 0xD770, 0x72B6, 0xDBFC, 0x729D, 0xDC74, 0x725C, 0xDCA5, 0x69EB, 0xDCA5, 0x698C, 0xDBFC, 0x698C, 0xC52A, 0x69EB, 0xC482, 0x6C9D, 0xC482, 0x6CFD, 0xC52A, 0x6CFD, 0xD62A, 0x6D18, 0xD69C, 0x6D5B, 0xD6C8, 0xFFFF, 0x6466, 0xC4B3, 0x6482, 0xC52A, 0x6482, 0xD818, 0x647D, 0xD818, 0x6473, 0xD8AE, 0x645A, 0xD933, 0x628E, 0xDC5E, 0x6236, 0xDC93, 0x61D9, 0xDCA5, 0x5BA8, 0xDCA5, 0x5B4E, 0xDC93, 0x5AF9, 0xDC5E, 0x592D, 0xD933, 0x590F, 0xD89C, 0x5905, 0xD7FD, 0x5905, 0xC52A, 0x5921, 0xC4B3, 0x5964, 0xC482, 0x5C16, 0xC482, 0x5C5A, 0xC4B3, 0x5C76, 0xC52A, 0x5C76, 0xD62A, 0x5C91, 0xD6A0, 0x5CD4, 0xD6D1, 0x60B3, 0xD6D1, 0x60F4, 0xD6A0, 0x610D, 0xD62A, 0x610D, 0xC52A, 0x6128, 0xC4B3, 0x616C, 0xC482, 0x6423, 0xC482, 0xFFFF, 0x54D2, 0xD6C8, 0x5513, 0xD6F9, 0x552C, 0xD770, 0x552C, 0xDBFD, 0x5513, 0xDC74, 0x54D2, 0xDCA5, 0x4C62, 0xDCA5, 0x4C02, 0xDBFD, 0x4C02, 0xC52A, 0x4C62, 0xC482, 0x4F14, 0xC482, 0x4F73, 0xC52A, 0x4F73, 0xD62A, 0x4F8E, 0xD69C, 0x4FD2, 0xD6C8};
|
||||
|
||||
const PROGMEM uint16_t logo_black[] = {0x7E30, 0x37DF, 0x842F, 0x4A34, 0x7830, 0x4A34, 0xFFFF, 0x7E30, 0x336E, 0x7602, 0x4C6C, 0x865E, 0x4C6C, 0x7E30, 0x336E, 0xFFFF, 0x5C26, 0xA020, 0x6225, 0xB275, 0x5626, 0xB275, 0xFFFF, 0x5C26, 0x9BAF, 0x53F8, 0xB4AE, 0x6453, 0xB4AE, 0xFFFF, 0xA02A, 0xA020, 0xA629, 0xB275, 0x9A2A, 0xB275, 0xFFFF, 0xA02A, 0x9BAF, 0x97FC, 0xB4AE, 0xA857, 0xB4AE, 0xFFFF, 0x7E2E, 0x5CEA, 0x7DB3, 0x5D3D, 0x7D3E, 0x5EF3, 0x7C7D, 0x613A, 0x7B56, 0x6244, 0x7A14, 0x61C8, 0x7903, 0x5FEC, 0x7850, 0x5E78, 0x77CE, 0x5E60, 0x7764, 0x5EE8, 0x7734, 0x60C6, 0x76D0, 0x6353, 0x75DA, 0x64DA, 0x7490, 0x64F7, 0x733F, 0x639E, 0x7258, 0x6281, 0x71D6, 0x62A5, 0x7184, 0x6359, 0x71A0, 0x6545, 0x71A3, 0x67F2, 0x70EF, 0x69DB, 0x6FB4, 0x6A8D, 0x6E36, 0x69CC, 0x6D27, 0x6913, 0x6CAF, 0x6970, 0x6C7A, 0x6A43, 0x6CE3, 0x6C21, 0x6D50, 0x6EC4, 0x6CEB, 0x70EF, 0x6BD5, 0x722C, 0x6A51, 0x7225, 0x693A, 0x71F5, 0x68D4, 0x7286, 0x68C0, 0x736A, 0x6961, 0x7502, 0x6A24, 0x7756, 0x6A13, 0x799D, 0x6936, 0x7B4C, 0x67C3, 0x7BFC, 0x66B4, 0x7C51, 0x6667, 0x7D0B, 0x6674, 0x7DF1, 0x6747, 0x7F2D, 0x6855, 0x810F, 0x689A, 0x8349, 0x6803, 0x8550, 0x66B9, 0x86A5, 0x65C0, 0x8773, 0x6592, 0x884B, 0x65C0, 0x8922, 0x66B9, 0x89F3, 0x6803, 0x8B47, 0x689A, 0x8D4F, 0x6854, 0x8F89, 0x6745, 0x916A, 0x6673, 0x92A5, 0x6665, 0x938B, 0x66B2, 0x9446, 0x67C1, 0x949C, 0x6933, 0x954B, 0x6A11, 0x96FC, 0x6A21, 0x9943, 0x695E, 0x9B96, 0x68BC, 0x9D2E, 0x68D0, 0x9E13, 0x6936, 0x9EA3, 0x6A4E, 0x9E74, 0x6BD1, 0x9E6D, 0x6CE7, 0x9FAA, 0x6D4C, 0xA1D6, 0x6CDE, 0xA479, 0x6C75, 0xA657, 0x6CAA, 0xA72A, 0x6D21, 0xA788, 0x6E31, 0xA6CF, 0x6FAF, 0xA60E, 0x70EA, 0xA6C1, 0x719D, 0xA8AC, 0x7199, 0xAB57, 0x717D, 0xAD44, 0x71D0, 0xADF8, 0x7251, 0xAE1C, 0x7339, 0xACFF, 0x748A, 0xABA7, 0x75D4, 0xABC5, 0x76C9, 0xAD4D, 0x772D, 0xAFDA, 0x775D, 0xB1B9, 0x77C7, 0xB240, 0x7848, 0xB228, 0x78FC, 0xB0B5, 0x7A0D, 0xAED8, 0x7B50, 0xAE5F, 0x7C76, 0xAF69, 0x7D37, 0xB1B0, 0x7DAC, 0xB366, 0x7E26, 0xB3BA, 0x7EA0, 0xB367, 0x7F16, 0xB1B0, 0x7FD7, 0xAF69, 0x80FE, 0xAE60, 0x8240, 0xAEDB, 0x8351, 0xB0B8, 0x8404, 0xB22B, 0x8486, 0xB244, 0x84F0, 0xB1BD, 0x8521, 0xAFDE, 0x8584, 0xAD51, 0x867A, 0xABC9, 0x87C4, 0xABAD, 0x8915, 0xAD05, 0x89FD, 0xAE22, 0x8A7D, 0xADFF, 0x8AD0, 0xAD4C, 0x8AB5, 0xAB5E, 0x8AB1, 0xA8B2, 0x8B65, 0xA6C8, 0x8CA0, 0xA616, 0x8E1E, 0xA6D9, 0x8F2D, 0xA792, 0x8FA5, 0xA733, 0x8FDA, 0xA661, 0x8F71, 0xA481, 0x8F04, 0xA1DF, 0x8F69, 0x9FB4, 0x907F, 0x9E78, 0x9203, 0x9E7E, 0x931A, 0x9EB0, 0x9380, 0x9E1E, 0x9394, 0x9D3A, 0x92F3, 0x9BA1, 0x9230, 0x994E, 0x9241, 0x9707, 0x931F, 0x9557, 0x9491, 0x94A7, 0x95A0, 0x9452, 0x95ED, 0x9398, 0x95DF, 0x92B3, 0x950D, 0x9176, 0x93FF, 0x8F94, 0x93BA, 0x8D5A, 0x9451, 0x8B53, 0x959B, 0x89FF, 0x9693, 0x8930, 0x96C3, 0x8859, 0x9693, 0x8781, 0x959B, 0x86B2, 0x9451, 0x855C, 0x93BA, 0x8355, 0x9400, 0x811B, 0x950F, 0x7F3A, 0x95E1, 0x7DFF, 0x95EF, 0x7D19, 0x95A2, 0x7C5E, 0x9493, 0x7C09, 0x9321, 0x7B58, 0x9243, 0x79A7, 0x9233, 0x7760, 0x92F6, 0x750D, 0x9397, 0x7375, 0x9383, 0x7291, 0x931E, 0x7200, 0x9207, 0x7230, 0x9083, 0x7236, 0x8F6D, 0x70F9, 0x8F08, 0x6ECE, 0x8F76, 0x6C2C, 0x8FDF, 0x6A4D, 0x8FAA, 0x697A, 0x8F33, 0x691C, 0x8E23, 0x69D5, 0x8CA5, 0x6A96, 0x8B6A, 0x69E3, 0x8AB7, 0x67F9, 0x8ABB, 0x654C, 0x8AD6, 0x635F, 0x8A84, 0x62AB, 0x8A03, 0x6287, 0x891C, 0x63A5, 0x87CA, 0x64FC, 0x8680, 0x64DF, 0x858B, 0x6358, 0x8527, 0x60CA, 0x84F7, 0x5EEB, 0x848E, 0x5E62, 0x840B, 0x5E7B, 0x8358, 0x5FEE, 0x8247, 0x61CB, 0x8104, 0x6246, 0x7FDE, 0x613B, 0x7F1E, 0x5EF4, 0x7EA8, 0x5D3E, 0x7E2E, 0x5CEA, 0x7E2E, 0x5CEA, 0xFFFF, 0x7E2F, 0x627C, 0x7F09, 0x631B, 0x7F64, 0x649C, 0x7F09, 0x661D, 0x7E2F, 0x66BC, 0x7D55, 0x661D, 0x7CFB, 0x649C, 0x7D55, 0x631B, 0x7E2F, 0x627C, 0x7E2F, 0x627C, 0xFFFF, 0x7E2A, 0x689C, 0x81B4, 0x6938, 0x850D, 0x6B02, 0x8823, 0x6DEA, 0x8AE0, 0x71E3, 0x8D2D, 0x76DC, 0x8ED1, 0x7C60, 0x8FCE, 0x8242, 0x9022, 0x8852, 0x8FCD, 0x8E62, 0x8ED1, 0x9443, 0x8D2C, 0x99C7, 0x8ADF, 0x9EC0, 0x8822, 0xA2BA, 0x850D, 0xA5A2, 0x81B3, 0xA76C, 0x7E2A, 0xA807, 0x7AA0, 0xA76C, 0x7747, 0xA5A2, 0x7431, 0xA2BA, 0x7174, 0x9EC0, 0x6F34, 0x99EB, 0x6D8E, 0x947A, 0x6C8B, 0x8E91, 0x6C32, 0x8852, 0x6C8A, 0x8214, 0x6D8D, 0x7C2B, 0x6F33, 0x76BA, 0x7174, 0x71E4, 0x7431, 0x6DEA, 0x7747, 0x6B02, 0x7AA0, 0x6938, 0x7E2A, 0x689C, 0x7E2A, 0x689C, 0xFFFF, 0x7E2A, 0x69AA, 0x7AD3, 0x6A3B, 0x779F, 0x6BE9, 0x748F, 0x6EC1, 0x71E0, 0x72A3, 0x6FA7, 0x7771, 0x6E11, 0x7CC6, 0x6D1D, 0x8276, 0x6CCB, 0x8852, 0x6D1D, 0x8E2F, 0x6E11, 0x93DE, 0x6FA7, 0x9933, 0x71E0, 0x9E02, 0x748F, 0xA1E3, 0x779F, 0xA4BC, 0x7AD3, 0xA669, 0x7E2A, 0xA6F9, 0x7E2A, 0xA6F9, 0x8180, 0xA669, 0x84B5, 0xA4BC, 0x87C4, 0xA1E3, 0x8A73, 0x9E01, 0x8CA7, 0x9944, 0x8E44, 0x93DE, 0x8F37, 0x8E36, 0x8F89, 0x8852, 0x8F37, 0x826E, 0x8E44, 0x7CC6, 0x8CA7, 0x7760, 0x8A74, 0x72A3, 0x87C4, 0x6EC1, 0x84B5, 0x6BE9, 0x8180, 0x6A3B, 0x7E2A, 0x69AA, 0x7E2A, 0x69AA, 0xFFFF, 0x7E71, 0x6BAF, 0x7E6A, 0x6F39, 0x7DE7, 0x6F3A, 0x7DDE, 0x6BB1, 0x7E71, 0x6BAF, 0x7E71, 0x6BAF, 0xFFFF, 0x802D, 0x6BE7, 0x80C0, 0x6C0B, 0x806E, 0x6F89, 0x7FEE, 0x6F69, 0xFFFF, 0x7C22, 0x6BE9, 0x7C62, 0x6F6C, 0x7BE2, 0x6F8C, 0x7B90, 0x6C0E, 0x7C22, 0x6BE9, 0x7C22, 0x6BE9, 0xFFFF, 0x8272, 0x6CB0, 0x8300, 0x6CFA, 0x8268, 0x705B, 0x81EC, 0x701B, 0xFFFF, 0x79DD, 0x6CB4, 0x7A65, 0x701E, 0x79E8, 0x705E, 0x794F, 0x6CFE, 0x79DD, 0x6CB4, 0x79DD, 0x6CB4, 0xFFFF, 0x6FDC, 0x6CEB, 0x70B6, 0x6D8C, 0x7110, 0x6F0D, 0x70B6, 0x708E, 0x6FDC, 0x712D, 0x6F02, 0x708E, 0x6EA8, 0x6F0C, 0x6F02, 0x6D8A, 0x6FDC, 0x6CEB, 0x6FDC, 0x6CEB, 0xFFFF, 0x8C82, 0x6CEF, 0x8D5C, 0x6D8E, 0x8DB6, 0x6F0F, 0x8D5C, 0x7091, 0x8C82, 0x7131, 0x8BA8, 0x7091, 0x8B4E, 0x6F10, 0x8BA8, 0x6D90, 0x8C82, 0x6CEF, 0x8C82, 0x6CEF, 0xFFFF, 0x84A1, 0x6E0A, 0x8528, 0x6E76, 0x844B, 0x71A8, 0x83D5, 0x7149, 0x84A1, 0x6E0A, 0xFFFF, 0x77AF, 0x6E0F, 0x787A, 0x714F, 0x7804, 0x71AD, 0x7727, 0x6E7B, 0x77AF, 0x6E0F, 0x77AF, 0x6E0F, 0xFFFF, 0x86AF, 0x6FEE, 0x872B, 0x707A, 0x860F, 0x736D, 0x85A1, 0x72F1, 0x86AF, 0x6FEE, 0xFFFF, 0x75A0, 0x6FF3, 0x76AE, 0x72F6, 0x7640, 0x7372, 0x7523, 0x7081, 0x75A0, 0x6FF3, 0x75A0, 0x6FF3, 0xFFFF, 0x7E2A, 0x7132, 0x8330, 0x72F1, 0x876F, 0x77F6, 0x8A47, 0x7F75, 0x8B45, 0x8852, 0x8A47, 0x912F, 0x876F, 0x98AF, 0x8330, 0x9DB3, 0x7E2A, 0x9F72, 0x7924, 0x9DB3, 0x74E5, 0x98AF, 0x720D, 0x912F, 0x710F, 0x8852, 0x720C, 0x7F75, 0x74E5, 0x77F7, 0x7924, 0x72F1, 0x7E2A, 0x7132, 0x7E2A, 0x7132, 0xFFFF, 0x7E2A, 0x7240, 0x795F, 0x73EB, 0x7551, 0x78B5, 0x729A, 0x7FDD, 0x71A8, 0x8852, 0x729A, 0x90C8, 0x7551, 0x97EF, 0x795F, 0x9CB9, 0x7E2A, 0x9E64, 0x82F5, 0x9CBA, 0x8703, 0x97EF, 0x89BA, 0x90C8, 0x8AAC, 0x8852, 0x89BA, 0x7FDD, 0x8703, 0x78B5, 0x82F5, 0x73EB, 0x7E2A, 0x7240, 0x7E2A, 0x7240, 0xFFFF, 0x8892, 0x7253, 0x88FF, 0x72FC, 0x87A9, 0x759E, 0x874B, 0x750F, 0x87EB, 0x73AD, 0xFFFF, 0x73BF, 0x7258, 0x7509, 0x750F, 0x74A6, 0x75A5, 0x734F, 0x7305, 0x73BF, 0x7258, 0x73BF, 0x7258, 0xFFFF, 0x8A3B, 0x7525, 0x8A9C, 0x75EC, 0x8912, 0x7831, 0x88BE, 0x7784, 0xFFFF, 0x7215, 0x752F, 0x7393, 0x778C, 0x7340, 0x7836, 0x7337, 0x7847, 0x72A7, 0x775B, 0x71B4, 0x75F5, 0x71B6, 0x75F0, 0x7215, 0x752F, 0x7215, 0x752F, 0xFFFF, 0x8BA7, 0x785E, 0x8BF8, 0x793B, 0x8A43, 0x7B17, 0x89FC, 0x7A56, 0xFFFF, 0x70AA, 0x7867, 0x7254, 0x7A5F, 0x720E, 0x7B20, 0x7059, 0x7943, 0x70AA, 0x7867, 0x70AA, 0x7867, 0xFFFF, 0x8CCD, 0x7BEB, 0x8D0A, 0x7CDA, 0x8B34, 0x7E44, 0x8AFE, 0x7D72, 0x8CCD, 0x7BEB, 0xFFFF, 0x6F84, 0x7BF4, 0x7154, 0x7D7B, 0x711D, 0x7E4C, 0x6F47, 0x7CE3, 0x6F84, 0x7BF4, 0x6F84, 0x7BF4, 0xFFFF, 0x8DA6, 0x7FB9, 0x8DD0, 0x80B5, 0x8BE0, 0x81A3, 0x8BBC, 0x80C8, 0xFFFF, 0x6EAB, 0x7FC2, 0x7096, 0x80D0, 0x7071, 0x81AB, 0x6E82, 0x80BD, 0x6EAB, 0x7FC2, 0x6EAB, 0x7FC2, 0xFFFF, 0x8E2E, 0x83B2, 0x8E44, 0x84B6, 0x8C46, 0x8528, 0x8C33, 0x8445, 0xFFFF, 0x6E24, 0x83BC, 0x701F, 0x844B, 0x700D, 0x852D, 0x6E0F, 0x84BF, 0x6E24, 0x83BC, 0x6E24, 0x83BC, 0xFFFF, 0x69ED, 0x862F, 0x6AC7, 0x86CE, 0x6B22, 0x884F, 0x6AC7, 0x89D0, 0x69ED, 0x8A6F, 0x69EC, 0x8A6F, 0x6913, 0x89CF, 0x68B9, 0x884E, 0x6913, 0x86CE, 0x69ED, 0x862F, 0x69ED, 0x862F, 0xFFFF, 0x926F, 0x8634, 0x9349, 0x86D2, 0x93A3, 0x8852, 0x93A3, 0x8855, 0x9349, 0x89D5, 0x926F, 0x8A75, 0x9195, 0x89D6, 0x913A, 0x8855, 0x9194, 0x86D4, 0x926F, 0x8634, 0x926F, 0x8634, 0xFFFF, 0x8E64, 0x87C3, 0x8E64, 0x88CA, 0x8C63, 0x88BB, 0x8C63, 0x87D7, 0xFFFF, 0x6DF1, 0x87CB, 0x6FF2, 0x87DC, 0x6FF2, 0x88C2, 0x6DF1, 0x88D2, 0x6DF1, 0x87CB, 0x6DF1, 0x87CB, 0xFFFF, 0x8C48, 0x8B69, 0x8E45, 0x8BD8, 0x8E31, 0x8CD9, 0x8C36, 0x8C4D, 0x8C48, 0x8B69, 0x8C48, 0x8B69, 0xFFFF, 0x700D, 0x8B6F, 0x7020, 0x8C52, 0x6E25, 0x8CE3, 0x6E10, 0x8BDF, 0xFFFF, 0x8BE4, 0x8EEC, 0x8DD4, 0x8FDA, 0x8DAA, 0x90D4, 0x8BC1, 0x8FC9, 0x8BE4, 0x8EEC, 0x8BE4, 0x8EEC, 0xFFFF, 0x7072, 0x8EF4, 0x7096, 0x8FCF, 0x6EAC, 0x90DD, 0x6E82, 0x8FE1, 0xFFFF, 0x8B39, 0x924D, 0x8D10, 0x93B4, 0x8CD3, 0x94A3, 0x8B04, 0x931C, 0x8B39, 0x924D, 0x8B39, 0x924D, 0xFFFF, 0x711E, 0x9255, 0x7154, 0x9326, 0x6F84, 0x94AB, 0x6F47, 0x93BC, 0xFFFF, 0x8A49, 0x9578, 0x8BFE, 0x9754, 0x8BAE, 0x9830, 0x8A03, 0x9639, 0x8A49, 0x9578, 0x8A49, 0x9578, 0xFFFF, 0x720E, 0x9582, 0x7254, 0x9643, 0x70A9, 0x983A, 0x7059, 0x975C, 0x720E, 0x9582, 0xFFFF, 0x733E, 0x986A, 0x7393, 0x9916, 0x7215, 0x9B75, 0x71B4, 0x9AAF, 0xFFFF, 0x8914, 0x986E, 0x8AA6, 0x9AA3, 0x8AA2, 0x9AAB, 0x8A44, 0x9B6B, 0x88C5, 0x990F, 0x8914, 0x986E, 0x8914, 0x986E, 0xFFFF, 0x87B2, 0x9AF6, 0x890A, 0x9D97, 0x889B, 0x9E43, 0x8750, 0x9B8E, 0x87B2, 0x9AF6, 0x87B2, 0x9AF6, 0xFFFF, 0x74A6, 0x9AFD, 0x7509, 0x9B94, 0x7514, 0x9BA4, 0x73C9, 0x9E57, 0x73C2, 0x9E4F, 0x7350, 0x9D9F, 0xFFFF, 0x8619, 0x9D2B, 0x8737, 0xA01B, 0x86B9, 0xA0A9, 0x85AB, 0x9DA7, 0x8619, 0x9D2B, 0x8619, 0x9D2B, 0xFFFF, 0x764A, 0x9D3C, 0x76B8, 0x9DB7, 0x75AB, 0xA0BC, 0x752F, 0xA02F, 0xFFFF, 0x8456, 0x9EF1, 0x8533, 0xA222, 0x84AC, 0xA28F, 0x83DF, 0x9F50, 0x8456, 0x9EF1, 0x8456, 0x9EF1, 0xFFFF, 0x780E, 0x9F00, 0x7885, 0x9F5E, 0x77B9, 0xA29E, 0x7732, 0xA233, 0xFFFF, 0x6FD5, 0x9F77, 0x70AF, 0xA018, 0x70B4, 0xA021, 0x70B9, 0xA02A, 0x7114, 0xA1AA, 0x70BA, 0xA32C, 0x6FDF, 0xA3CB, 0x6F05, 0xA32D, 0x6F02, 0xA326, 0x6EFA, 0xA319, 0x6EFB, 0xA319, 0x6EA0, 0xA197, 0x6EFB, 0xA016, 0x6FD5, 0x9F77, 0x6FD5, 0x9F77, 0xFFFF, 0x8C85, 0x9F7B, 0x8D5F, 0xA01B, 0x8DBA, 0xA19C, 0x8D60, 0xA31D, 0x8C85, 0xA3BC, 0x8BAC, 0xA31D, 0x8B51, 0xA19C, 0x8BAB, 0xA01B, 0x8C85, 0x9F7B, 0x8C85, 0x9F7B, 0xFFFF, 0x8272, 0xA041, 0x830C, 0xA3A2, 0x827E, 0xA3EB, 0x81F5, 0xA082, 0x8272, 0xA041, 0x8272, 0xA041, 0xFFFF, 0x79F2, 0xA04C, 0x7A6F, 0xA08B, 0x79E9, 0xA3F6, 0x795A, 0xA3AE, 0xFFFF, 0x8079, 0xA115, 0x80CB, 0xA493, 0x8039, 0xA4B8, 0x7FF7, 0xA136, 0x8079, 0xA115, 0x8079, 0xA115, 0xFFFF, 0x7BEC, 0xA11B, 0x7C6C, 0xA13A, 0x7C2E, 0xA4BE, 0x7B9C, 0xA499, 0x7BEC, 0xA11B, 0xFFFF, 0x7E73, 0xA169, 0x7E7E, 0xA4F2, 0x7DEA, 0xA4F3, 0x7DF1, 0xA169, 0x7E73, 0xA169, 0x7E73, 0xA169, 0xFFFF, 0x7E34, 0xA9F6, 0x7F0E, 0xAA93, 0x7F69, 0xAC14, 0x7F0F, 0xAD96, 0x7E35, 0xAE37, 0x7D5A, 0xAD98, 0x7CFF, 0xAC16, 0x7D59, 0xAA95, 0x7E34, 0xA9F6, 0x7E34, 0xA9F6, 0xFFFF, 0x7E30, 0x2358, 0x4C02, 0xBCAA, 0xB05C, 0xBCAA, 0xFFFF, 0x7E30, 0x2C0E, 0x8A08, 0x503F, 0x7258, 0x503F, 0xFFFF, 0x70E4, 0x54AE, 0x8B7C, 0x54AE, 0x9EBD, 0x8F88, 0x916B, 0xB83A, 0x6ACF, 0xB83A, 0x5D90, 0x8FBE, 0x70E4, 0x54AE, 0xFFFF, 0xA02A, 0x93E3, 0xAC0F, 0xB83A, 0x9446, 0xB83A, 0xFFFF, 0x5C23, 0x941A, 0x67F5, 0xB83A, 0x5050, 0xB83A, 0x5C23, 0x941A};
|
||||
|
||||
const PROGMEM uint16_t logo_white[] = {0x7E72, 0x6BAF, 0x7E6A, 0x6F39, 0x7DE7, 0x6F3A, 0x7DDE, 0x6BB1, 0x7E72, 0x6BAF, 0xFFFF, 0x802D, 0x6BE7, 0x80C0, 0x6C0B, 0x806E, 0x6F8A, 0x7FEE, 0x6F69, 0xFFFF, 0x7C22, 0x6BE9, 0x7C62, 0x6F6C, 0x7BE2, 0x6F8C, 0x7B90, 0x6C0E, 0x7C22, 0x6BE9, 0x7C22, 0x6BE9, 0xFFFF, 0x8272, 0x6CB0, 0x8300, 0x6CFA, 0x8268, 0x705B, 0x81EC, 0x701B, 0xFFFF, 0x79DD, 0x6CB4, 0x7A65, 0x701E, 0x79E8, 0x705E, 0x794F, 0x6CFE, 0x79DD, 0x6CB4, 0x79DD, 0x6CB4, 0xFFFF, 0x84A1, 0x6E0A, 0x8528, 0x6E76, 0x844B, 0x71A8, 0x83D6, 0x7149, 0xFFFF, 0x77AF, 0x6E0F, 0x787A, 0x714F, 0x7804, 0x71AD, 0x7727, 0x6E7B, 0x77AF, 0x6E0F, 0x77AF, 0x6E0F, 0xFFFF, 0x86AF, 0x6FEE, 0x872C, 0x707A, 0x860F, 0x736D, 0x85A1, 0x72F1, 0xFFFF, 0x75A0, 0x6FF3, 0x76AE, 0x72F6, 0x7641, 0x7372, 0x7523, 0x7081, 0x75A0, 0x6FF3, 0x75A0, 0x6FF3, 0xFFFF, 0x8892, 0x7253, 0x88FF, 0x72FC, 0x87A9, 0x759E, 0x874B, 0x750F, 0xFFFF, 0x73BF, 0x7258, 0x7509, 0x750F, 0x74A6, 0x75A5, 0x734F, 0x7305, 0x73BF, 0x7258, 0x73BF, 0x7258, 0xFFFF, 0x8A3B, 0x7525, 0x8A9C, 0x75EC, 0x8912, 0x7831, 0x88BE, 0x7784, 0xFFFF, 0x7215, 0x752F, 0x7393, 0x778C, 0x7340, 0x7836, 0x71B4, 0x75F5, 0x7215, 0x752F, 0xFFFF, 0x8BA7, 0x785E, 0x8BF8, 0x793B, 0x8A43, 0x7B17, 0x89FC, 0x7A56, 0xFFFF, 0x70AA, 0x7867, 0x7254, 0x7A5F, 0x720E, 0x7B20, 0x7059, 0x7943, 0x70AA, 0x7867, 0x70AA, 0x7867, 0xFFFF, 0x8CCD, 0x7BEB, 0x8D0A, 0x7CDA, 0x8B34, 0x7E44, 0x8AFE, 0x7D72, 0xFFFF, 0x6F84, 0x7BF4, 0x7154, 0x7D7B, 0x711D, 0x7E4C, 0x6F47, 0x7CE3, 0x6F84, 0x7BF4, 0x6F84, 0x7BF4, 0xFFFF, 0x8DA6, 0x7FB9, 0x8DD0, 0x80B5, 0x8BE0, 0x81A3, 0x8BBC, 0x80C8, 0xFFFF, 0x6EAB, 0x7FC3, 0x7096, 0x80D0, 0x7071, 0x81AB, 0x6E82, 0x80BD, 0x6EAB, 0x7FC3, 0x6EAB, 0x7FC3, 0xFFFF, 0x8E2E, 0x83B2, 0x8E44, 0x84B6, 0x8C46, 0x8528, 0x8C33, 0x8445, 0xFFFF, 0x6E24, 0x83BC, 0x701F, 0x844B, 0x700D, 0x852D, 0x6E0F, 0x84BF, 0x6E24, 0x83BC, 0x6E24, 0x83BC, 0xFFFF, 0x8E64, 0x87C3, 0x8E64, 0x88CA, 0x8C63, 0x88BB, 0x8C63, 0x87D7, 0xFFFF, 0x6DF1, 0x87CB, 0x6FF2, 0x87DC, 0x6FF2, 0x88C2, 0x6DF1, 0x88D3, 0x6DF1, 0x87CB, 0xFFFF, 0x8C48, 0x8B69, 0x8E45, 0x8BD8, 0x8E31, 0x8CD9, 0x8C36, 0x8C4D, 0x8C48, 0x8B69, 0x8C48, 0x8B69, 0xFFFF, 0x700D, 0x8B70, 0x7020, 0x8C52, 0x6E25, 0x8CE3, 0x6E10, 0x8BE0, 0xFFFF, 0x8BE4, 0x8EEC, 0x8DD4, 0x8FDA, 0x8DAA, 0x90D4, 0x8BC0, 0x8FC9, 0x8BE4, 0x8EEC, 0xFFFF, 0x7072, 0x8EF4, 0x7096, 0x8FD0, 0x6EAC, 0x90DD, 0x6E82, 0x8FE1, 0xFFFF, 0x8B39, 0x924D, 0x8D10, 0x93B4, 0x8CD3, 0x94A3, 0x8B04, 0x931D, 0x8B39, 0x924D, 0x8B39, 0x924D, 0xFFFF, 0x711E, 0x9255, 0x7154, 0x9326, 0x6F84, 0x94AB, 0x6F47, 0x93BC, 0xFFFF, 0x8A49, 0x9579, 0x8BFE, 0x9754, 0x8BAE, 0x9830, 0x8A03, 0x9639, 0x8A49, 0x9579, 0x8A49, 0x9579, 0xFFFF, 0x720E, 0x9582, 0x7254, 0x9644, 0x70A9, 0x983A, 0x7059, 0x975C, 0xFFFF, 0x733D, 0x986A, 0x7393, 0x9916, 0x7215, 0x9B75, 0x71B4, 0x9AAF, 0xFFFF, 0x8914, 0x986E, 0x8AA6, 0x9AA3, 0x8A44, 0x9B6B, 0x88C5, 0x990F, 0x8914, 0x986E, 0xFFFF, 0x87B2, 0x9AF6, 0x890A, 0x9D97, 0x889B, 0x9E43, 0x8750, 0x9B8E, 0x87B2, 0x9AF6, 0x87B2, 0x9AF6, 0xFFFF, 0x74A6, 0x9AFD, 0x7509, 0x9B94, 0x73C9, 0x9E57, 0x7350, 0x9DA0, 0xFFFF, 0x8619, 0x9D2B, 0x8737, 0xA01B, 0x86B9, 0xA0A9, 0x85AB, 0x9DA7, 0x8619, 0x9D2B, 0x8619, 0x9D2B, 0xFFFF, 0x764A, 0x9D3C, 0x76B8, 0x9DB7, 0x75AB, 0xA0BC, 0x752E, 0xA02F, 0xFFFF, 0x8455, 0x9EF1, 0x8533, 0xA222, 0x84AC, 0xA28F, 0x83DF, 0x9F50, 0x8455, 0x9EF1, 0x8455, 0x9EF1, 0xFFFF, 0x780E, 0x9F00, 0x7885, 0x9F5E, 0x77B9, 0xA29E, 0x7732, 0xA233, 0xFFFF, 0x8272, 0xA041, 0x830C, 0xA3A2, 0x827D, 0xA3EC, 0x81F5, 0xA082, 0x8272, 0xA041, 0x8272, 0xA041, 0xFFFF, 0x79F2, 0xA04D, 0x7A6E, 0xA08C, 0x79E9, 0xA3F6, 0x795A, 0xA3AE, 0xFFFF, 0x8079, 0xA115, 0x80CB, 0xA493, 0x8039, 0xA4B9, 0x7FF7, 0xA136, 0x8079, 0xA115, 0x8079, 0xA115, 0xFFFF, 0x7BEC, 0xA11B, 0x7C6C, 0xA13A, 0x7C2E, 0xA4BE, 0x7B9C, 0xA499, 0xFFFF, 0x7E73, 0xA169, 0x7E7E, 0xA4F2, 0x7DE9, 0xA4F3, 0x7DF1, 0xA169, 0x7E73, 0xA169, 0xFFFF, 0x7F6C, 0x7644, 0x801D, 0x768B, 0x8069, 0x76D5, 0x80AE, 0x7739, 0x8102, 0x785D, 0x80E7, 0x799A, 0x807D, 0x7A8F, 0x7FD8, 0x7B0A, 0x7FC8, 0x7AFB, 0x7FA3, 0x7ABE, 0x7FCB, 0x7A6B, 0x7FE9, 0x7A54, 0x803C, 0x7A0A, 0x8084, 0x7950, 0x8090, 0x787F, 0x8057, 0x77D1, 0x8021, 0x778E, 0x7FE8, 0x775E, 0x7F71, 0x773A, 0x7F02, 0x777C, 0x7ECF, 0x77C4, 0x7EAC, 0x780F, 0x7E89, 0x7880, 0x7E77, 0x78DA, 0x7E6F, 0x79A6, 0x7E7D, 0x79F6, 0x7E9C, 0x7A3A, 0x7F0C, 0x7AD3, 0x8002, 0x7C03, 0x8084, 0x7CC0, 0x80B8, 0x7D14, 0x80F6, 0x7D99, 0x8135, 0x7EE9, 0x812D, 0x8036, 0x8103, 0x8165, 0x80C6, 0x8280, 0x8087, 0x8371, 0x806C, 0x8452, 0x810C, 0x8410, 0x8154, 0x839E, 0x8206, 0x823F, 0x827D, 0x80B4, 0x8297, 0x8003, 0x82CD, 0x7E19, 0x82F5, 0x7CEB, 0x8303, 0x7CA0, 0x8342, 0x7BB3, 0x8375, 0x7B3F, 0x83B2, 0x7ADA, 0x843E, 0x7A4C, 0x84A1, 0x7A11, 0x84DA, 0x79F7, 0x8528, 0x7A0D, 0x8575, 0x7A3B, 0x8597, 0x7A59, 0x861A, 0x7B08, 0x8672, 0x7C1B, 0x8684, 0x7CB2, 0x8686, 0x7D50, 0x8636, 0x7E77, 0x8597, 0x7F10, 0x84E7, 0x7F24, 0x8442, 0x7EA8, 0x843C, 0x7E82, 0x8439, 0x7E27, 0x847D, 0x7E2E, 0x8498, 0x7E44, 0x84F4, 0x7E8C, 0x8582, 0x7E7E, 0x85FA, 0x7E0C, 0x8630, 0x7D40, 0x862E, 0x7CC4, 0x861C, 0x7C48, 0x85D5, 0x7B74, 0x8562, 0x7AE7, 0x851B, 0x7ABD, 0x84E1, 0x7AAF, 0x848E, 0x7AE2, 0x8456, 0x7B13, 0x83F8, 0x7B7B, 0x83CC, 0x7BCD, 0x83A8, 0x7C2E, 0x837D, 0x7CFD, 0x8365, 0x7EF1, 0x8367, 0x8074, 0x8361, 0x810D, 0x8303, 0x8341, 0x8266, 0x8533, 0x81A6, 0x8702, 0x81A4, 0x8710, 0x824F, 0x8671, 0x82F2, 0x8603, 0x83B0, 0x85C4, 0x8493, 0x860B, 0x84F8, 0x8689, 0x853B, 0x8727, 0x8575, 0x87EB, 0x85F2, 0x8982, 0x8655, 0x8ABA, 0x86A4, 0x8B6E, 0x86D5, 0x8BAE, 0x8702, 0x8BCD, 0x8779, 0x8BD7, 0x87BB, 0x8BBA, 0x8806, 0x8B7C, 0x8834, 0x8B3C, 0x8853, 0x8B04, 0x8887, 0x8A44, 0x8881, 0x8962, 0x8869, 0x88EC, 0x884A, 0x888D, 0x87EB, 0x8810, 0x876F, 0x880F, 0x86FC, 0x887C, 0x86BC, 0x892D, 0x86AF, 0x8955, 0x866E, 0x8955, 0x8665, 0x88F9, 0x86C0, 0x8806, 0x8756, 0x8771, 0x8806, 0x876F, 0x8899, 0x8824, 0x88C9, 0x88AB, 0x88E7, 0x8932, 0x88F5, 0x8A64, 0x88B1, 0x8B88, 0x8873, 0x8C00, 0x882B, 0x8C5B, 0x87DD, 0x8C9D, 0x8790, 0x8CC5, 0x86E1, 0x8CCB, 0x86A0, 0x8CA8, 0x8679, 0x8C86, 0x863A, 0x8C3E, 0x85C5, 0x8B6D, 0x853C, 0x8A3D, 0x847D, 0x8882, 0x8456, 0x8835, 0x8420, 0x8808, 0x83DF, 0x8820, 0x831F, 0x88EC, 0x825B, 0x8A2B, 0x8258, 0x8A47, 0x8323, 0x8BA0, 0x8399, 0x8CA6, 0x83F8, 0x8DF6, 0x8405, 0x8F9A, 0x83DE, 0x905F, 0x83A4, 0x9120, 0x833B, 0x929B, 0x82F3, 0x945E, 0x82FC, 0x9529, 0x8319, 0x9587, 0x8336, 0x95C0, 0x841E, 0x968C, 0x844B, 0x9688, 0x8482, 0x966F, 0x84E3, 0x9607, 0x852B, 0x955E, 0x8543, 0x94FA, 0x854B, 0x9497, 0x852F, 0x93EA, 0x84D7, 0x9378, 0x8463, 0x9357, 0x83F5, 0x9378, 0x83AE, 0x9352, 0x83BB, 0x92D5, 0x83EB, 0x92BA, 0x8461, 0x928C, 0x8501, 0x92C4, 0x8587, 0x937A, 0x85B9, 0x949F, 0x85AC, 0x9536, 0x8586, 0x95D3, 0x8538, 0x96A1, 0x84B0, 0x9749, 0x845E, 0x9778, 0x8401, 0x9786, 0x83A7, 0x975E, 0x835F, 0x9730, 0x82CB, 0x96A2, 0x8285, 0x962B, 0x825B, 0x95B6, 0x824F, 0x9579, 0x822A, 0x945A, 0x8233, 0x932B, 0x828E, 0x8FF7, 0x8201, 0x8E1D, 0x81D6, 0x8E1B, 0x80A8, 0x8E1A, 0x7D88, 0x9136, 0x7D81, 0x9352, 0x7E13, 0x9482, 0x7EE8, 0x960C, 0x7F4A, 0x970B, 0x7F69, 0x97B4, 0x7F6C, 0x983B, 0x7F63, 0x9881, 0x7F26, 0x9992, 0x7EEE, 0x9A13, 0x7EA6, 0x9A86, 0x7E66, 0x9ACC, 0x7E14, 0x9B05, 0x7D61, 0x9B0D, 0x7CC3, 0x9A88, 0x7C84, 0x9A22, 0x7C50, 0x99AA, 0x7C25, 0x987B, 0x7C63, 0x9759, 0x7CE5, 0x9694, 0x7D8C, 0x9653, 0x7DB0, 0x966C, 0x7DB1, 0x96DF, 0x7D0E, 0x971E, 0x7CAB, 0x97B5, 0x7C81, 0x9884, 0x7CA2, 0x9950, 0x7CCE, 0x99AC, 0x7D03, 0x99F6, 0x7D77, 0x9A4B, 0x7DF2, 0x9A35, 0x7E2F, 0x9A00, 0x7E59, 0x99C6, 0x7E64, 0x99B4, 0x7E97, 0x9944, 0x7EAE, 0x98F9, 0x7ECA, 0x9840, 0x7EC4, 0x97E8, 0x7EAF, 0x9796, 0x7E5B, 0x96EA, 0x7D73, 0x9597, 0x7C95, 0x9462, 0x7C76, 0x9426, 0x7C3D, 0x9397, 0x7C18, 0x92D4, 0x7C1D, 0x9165, 0x7C9A, 0x8F14, 0x7CE9, 0x8E19, 0x7CDA, 0x8E1F, 0x7A83, 0x8FB1, 0x7A47, 0x8FC2, 0x7960, 0x8FD1, 0x78E6, 0x8FA5, 0x787F, 0x8F77, 0x77CC, 0x8F40, 0x7777, 0x8F3D, 0x772A, 0x8F54, 0x768D, 0x8FBB, 0x7670, 0x8FDD, 0x7609, 0x9086, 0x75EE, 0x90E1, 0x75DF, 0x916F, 0x75DF, 0x91A2, 0x75FF, 0x9292, 0x767C, 0x933F, 0x7721, 0x9375, 0x77A0, 0x92F1, 0x779C, 0x90BF, 0x779F, 0x907F, 0x77A1, 0x9055, 0x77DC, 0x904C, 0x77ED, 0x9087, 0x783B, 0x91C9, 0x7809, 0x9369, 0x77B0, 0x9410, 0x7737, 0x9468, 0x7645, 0x9438, 0x7579, 0x933A, 0x753D, 0x9268, 0x752C, 0x9188, 0x7538, 0x90AB, 0x7557, 0x9012, 0x756A, 0x8FD4, 0x7617, 0x8E93, 0x7664, 0x8E4F, 0x76E5, 0x8DE6, 0x7760, 0x8DAC, 0x77DC, 0x8D9E, 0x78BE, 0x8DC4, 0x795C, 0x8DF1, 0x7988, 0x8DF0, 0x7A69, 0x8DA0, 0x7AB9, 0x8D58, 0x7B46, 0x8C9F, 0x7BB3, 0x8BD0, 0x7BB7, 0x8B31, 0x7AD6, 0x8B59, 0x7983, 0x8B9A, 0x791B, 0x8BAC, 0x7895, 0x8B9D, 0x780B, 0x8B35, 0x77A4, 0x8A6A, 0x7784, 0x89EC, 0x773F, 0x8886, 0x7724, 0x880F, 0x76DB, 0x86FD, 0x7673, 0x8607, 0x75E1, 0x859E, 0x7538, 0x85D5, 0x7502, 0x8614, 0x74DB, 0x8661, 0x74C1, 0x869C, 0x74A2, 0x87BB, 0x74B8, 0x885D, 0x74C3, 0x888C, 0x74DF, 0x88D2, 0x7574, 0x8936, 0x761A, 0x88D3, 0x7672, 0x87D7, 0x767D, 0x87BC, 0x76AE, 0x8795, 0x76CA, 0x87F9, 0x76A5, 0x88B8, 0x7656, 0x895A, 0x7578, 0x89EF, 0x74FD, 0x89D4, 0x748E, 0x895C, 0x7462, 0x88FE, 0x7441, 0x8876, 0x7427, 0x87D9, 0x744C, 0x862A, 0x7494, 0x8576, 0x74D8, 0x8513, 0x74FC, 0x84EE, 0x75E8, 0x848A, 0x76DA, 0x851A, 0x777B, 0x865A, 0x77EA, 0x87BE, 0x7847, 0x8903, 0x7873, 0x8975, 0x78A2, 0x89B1, 0x78D7, 0x89D9, 0x791D, 0x89F0, 0x79C7, 0x89AB, 0x7A2B, 0x8938, 0x7AA0, 0x8868, 0x7A67, 0x83FA, 0x79D6, 0x82A1, 0x795A, 0x80F5, 0x7937, 0x7FF7, 0x793A, 0x7EE4, 0x7950, 0x7E54, 0x7970, 0x7DD1, 0x798F, 0x7D44, 0x79B3, 0x7BEA, 0x79AD, 0x7B69, 0x7992, 0x7B0C, 0x7983, 0x7AE4, 0x7886, 0x79EC, 0x77A1, 0x7ACF, 0x7787, 0x7B52, 0x777B, 0x7BDB, 0x77B1, 0x7C9E, 0x7846, 0x7CE9, 0x78E3, 0x7CA0, 0x7917, 0x7CB1, 0x791B, 0x7D17, 0x78B7, 0x7D82, 0x784C, 0x7DB0, 0x776A, 0x7D66, 0x770C, 0x7CC6, 0x76E4, 0x7BEA, 0x76EB, 0x7B15, 0x7702, 0x7A7F, 0x7710, 0x7A4B, 0x77A2, 0x790A, 0x7891, 0x789F, 0x7973, 0x790B, 0x7A2C, 0x7A0F, 0x7A54, 0x7A76, 0x7A78, 0x7AEE, 0x7A8E, 0x7BF9, 0x7A65, 0x7DC1, 0x7A4A, 0x7EDC, 0x7A4B, 0x7F1B, 0x7A7F, 0x800B, 0x7AFA, 0x80FD, 0x7B72, 0x81A2, 0x7D4E, 0x80DA, 0x7F2C, 0x824D, 0x7FB6, 0x8175, 0x800C, 0x809F, 0x8045, 0x7FD2, 0x8056, 0x7F0C, 0x8037, 0x7E65, 0x8008, 0x7E02, 0x7F7E, 0x7D1D, 0x7E90, 0x7BCF, 0x7E13, 0x7B0A, 0x7DDC, 0x7A70, 0x7DC6, 0x79DB, 0x7DC9, 0x797D, 0x7DDB, 0x787C, 0x7E01, 0x77E5, 0x7E25, 0x7782, 0x7E5D, 0x7711, 0x7E85, 0x76D8, 0x7EBA, 0x7698, 0x7F6C, 0x7643};
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
/****************************************************************************
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* This file was auto-generated using "svg2cpp.pl"
|
||||
*
|
||||
* The encoding consists of x,y pairs with the min and max scaled to
|
||||
* 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the
|
||||
* start of a new closed path.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
constexpr float x_min = 0.000000;
|
||||
|
||||
constexpr float x_max = 272.000000;
|
||||
|
||||
constexpr float y_min = 0.000000;
|
||||
|
||||
constexpr float y_max = 480.000000;
|
||||
|
||||
const PROGMEM uint16_t logo_green[] = {0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA};
|
||||
|
||||
const PROGMEM uint16_t logo_mark[] = {0xDB9F, 0xAC0C, 0xDA6F, 0xAC2D, 0xD970, 0xAC91, 0xD8C0, 0xAD23, 0xD885, 0xADCF, 0xD8C0, 0xAE7A, 0xD970, 0xAF0C, 0xDA6F, 0xAF6F, 0xDB9F, 0xAF8F, 0xDCCE, 0xAF6F, 0xDDD0, 0xAF0C, 0xDE7D, 0xAE7B, 0xDEB9, 0xADCF, 0xDE7D, 0xAD22, 0xDDD0, 0xAC91, 0xDCCE, 0xAC2D, 0xFFFF, 0xDB9F, 0xABC3, 0xDCFE, 0xABEA, 0xDE28, 0xAC5E, 0xDEF1, 0xAD06, 0xDF36, 0xADCF, 0xDEF1, 0xAE95, 0xDE28, 0xAF3E, 0xDCFE, 0xAFB1, 0xDB9F, 0xAFD8, 0xDA3F, 0xAFB1, 0xD916, 0xAF3E, 0xD849, 0xAE95, 0xD808, 0xADCF, 0xD849, 0xAD06, 0xD916, 0xAC5E, 0xDA3F, 0xABEA, 0xFFFF, 0xDB7D, 0xACE6, 0xDAE4, 0xACE6, 0xDAE4, 0xADA9, 0xDB7D, 0xADA9, 0xDC3B, 0xAD94, 0xDC71, 0xAD48, 0xDC3B, 0xACFD, 0xFFFF, 0xDB85, 0xAC9E, 0xDCCB, 0xACC8, 0xDD37, 0xAD47, 0xDCF6, 0xADAC, 0xDC3E, 0xADDE, 0xDC85, 0xADFF, 0xDCE8, 0xAE4E, 0xDD92, 0xAEEA, 0xDCBD, 0xAEEA, 0xDC1E, 0xAE58, 0xDBA7, 0xAE03, 0xDB36, 0xADEF, 0xDAE4, 0xADEF, 0xDAE4, 0xAEEA, 0xDA26, 0xAEEA, 0xDA26, 0xAC9E};
|
||||
|
||||
const PROGMEM uint16_t logo_type[] = {0xD8D5, 0xA520, 0xD8A5, 0xA563, 0xD82E, 0xA57F, 0xD348, 0xA57F, 0xD2D1, 0xA598, 0xD2A0, 0xA5D9, 0xD2A0, 0xAF7A, 0xD274, 0xAFBE, 0xD202, 0xAFDA, 0xCD37, 0xAFDA, 0xCCBF, 0xAFBE, 0xCC8F, 0xAF7A, 0xCC8F, 0xA5D9, 0xCC63, 0xA598, 0xCBF1, 0xA57F, 0xC70B, 0xA57F, 0xC694, 0xA563, 0xC664, 0xA520, 0xC664, 0xA28C, 0xC70B, 0xA22C, 0xD82E, 0xA22C, 0xD8A5, 0xA248, 0xD8D5, 0xA28C, 0xFFFF, 0xB138, 0xAC8C, 0xB952, 0xAC8C, 0xB952, 0xA57F, 0xB138, 0xA57F, 0xFFFF, 0xBF27, 0xA421, 0xBF57, 0xA476, 0xBF6D, 0xA4D0, 0xBF6D, 0xAD36, 0xBF57, 0xAD90, 0xBF27, 0xADE6, 0xBBFA, 0xAFB2, 0xBB60, 0xAFCF, 0xBABD, 0xAFDA, 0xAFCE, 0xAFDA, 0xAF30, 0xAFCF, 0xAE9A, 0xAFB2, 0xAB6E, 0xADE6, 0xAB39, 0xAD90, 0xAB28, 0xAD36, 0xAB28, 0xA4D0, 0xAB39, 0xA476, 0xAB6E, 0xA421, 0xAE9A, 0xA255, 0xAF30, 0xA239, 0xAFCE, 0xA22C, 0xBABD, 0xA22C, 0xBB60, 0xA239, 0xBBFA, 0xA255, 0xFFFF, 0x93A4, 0xACDC, 0x9CEA, 0xACDC, 0x9CEA, 0xAA34, 0x93A4, 0xAA34, 0x93A4, 0xACDC, 0xFFFF, 0x93A4, 0xA796, 0x9CEA, 0xA796, 0x9CEA, 0xA525, 0x93A4, 0xA525, 0xFFFF, 0xA227, 0xA421, 0xA258, 0xA478, 0xA26E, 0xA4D5, 0xA26E, 0xA700, 0xA24F, 0xA757, 0xA204, 0xA7A5, 0xA089, 0xA8B8, 0xA061, 0xA903, 0xA092, 0xA949, 0xA1FC, 0xAA43, 0xA24B, 0xAA91, 0xA26E, 0xAAE8, 0xA26E, 0xAD36, 0xA258, 0xAD90, 0xA227, 0xADE6, 0x9EFC, 0xAFB2, 0x9E61, 0xAFCF, 0x9DBE, 0xAFDA, 0x8ED0, 0xAFDA, 0x8E28, 0xAF7A, 0x8E28, 0xA28C, 0x8E59, 0xA248, 0x8ED0, 0xA22C, 0x9DBE, 0xA22C, 0x9E61, 0xA239, 0x9EFC, 0xA255, 0xFFFF, 0x853C, 0xA502, 0x8517, 0xA557, 0x84C9, 0xA5A2, 0x7994, 0xACC8, 0x8494, 0xACC8, 0x850A, 0xACE4, 0x853C, 0xAD27, 0x853C, 0xAF7A, 0x850A, 0xAFBE, 0x8494, 0xAFDA, 0x7371, 0xAFDA, 0x72C9, 0xAF7A, 0x72C9, 0xAD09, 0x72E8, 0xACB2, 0x7333, 0xAC64, 0x7EA5, 0xA53E, 0x73A6, 0xA53E, 0x732F, 0xA522, 0x72FE, 0xA4DF, 0x72FE, 0xA28C, 0x732F, 0xA248, 0x73A6, 0xA22C, 0x8494, 0xA22C, 0x850A, 0xA248, 0x853C, 0xA28C, 0xFFFF, 0x6B68, 0xAC87, 0x6BDB, 0xACA3, 0x6C07, 0xACE6, 0x6C07, 0xAF7A, 0x6BDB, 0xAFBE, 0x6B68, 0xAFDA, 0x5C84, 0xAFDA, 0x5BDC, 0xAF7A, 0x5BDC, 0xA28C, 0x5C84, 0xA22C, 0x6146, 0xA22C, 0x61EE, 0xA28C, 0x61EE, 0xAC2D, 0x621E, 0xAC6E, 0x6295, 0xAC87, 0xFFFF, 0x52C6, 0xA248, 0x52F7, 0xA28C, 0x52F7, 0xAD45, 0x52EE, 0xAD45, 0x52DC, 0xAD9B, 0x52B1, 0xADE6, 0x4F85, 0xAFB2, 0x4EEA, 0xAFCF, 0x4E47, 0xAFDA, 0x4359, 0xAFDA, 0x42BA, 0xAFCF, 0x4224, 0xAFB2, 0x3EF8, 0xADE6, 0x3EC3, 0xAD90, 0x3EB2, 0xAD36, 0x3EB2, 0xA28C, 0x3EE2, 0xA248, 0x3F5A, 0xA22C, 0x441B, 0xA22C, 0x4493, 0xA248, 0x44C3, 0xA28C, 0x44C3, 0xAC2D, 0x44F4, 0xAC71, 0x456B, 0xAC8C, 0x4C3E, 0xAC8C, 0x4CB1, 0xAC71, 0x4CDD, 0xAC2D, 0x4CDD, 0xA28C, 0x4D0D, 0xA248, 0x4D85, 0xA22C, 0x524F, 0xA22C, 0xFFFF, 0x3748, 0xAC87, 0x37BB, 0xACA3, 0x37E7, 0xACE6, 0x37E7, 0xAF7A, 0x37BB, 0xAFBE, 0x3748, 0xAFDA, 0x2864, 0xAFDA, 0x27BC, 0xAF7A, 0x27BC, 0xA28C, 0x2864, 0xA22C, 0x2D26, 0xA22C, 0x2DCD, 0xA28C, 0x2DCD, 0xAC2D, 0x2DFE, 0xAC6E, 0x2E75, 0xAC87};
|
||||
|
||||
const PROGMEM uint16_t logo_black[] = {0x8048, 0x527A, 0x8ADE, 0x5CDE, 0x75B2, 0x5CDE, 0xFFFF, 0x8048, 0x4FF6, 0x71D9, 0x5E20, 0x8EB8, 0x5E20, 0x8048, 0x4FF6, 0xFFFF, 0x4436, 0x8D8E, 0x4ECC, 0x97F2, 0x39A0, 0x97F2, 0xFFFF, 0x4436, 0x8B0A, 0x35C8, 0x9934, 0x52A5, 0x9934, 0xFFFF, 0xBC3D, 0x8D8E, 0xC6D4, 0x97F2, 0xB1A7, 0x97F2, 0xFFFF, 0xBC3D, 0x8B0A, 0xADCE, 0x9934, 0xCAAC, 0x9934, 0xFFFF, 0x8045, 0x6778, 0x7F6D, 0x67A7, 0x7E9D, 0x689F, 0x7D49, 0x69EA, 0x7B41, 0x6A81, 0x7908, 0x6A3A, 0x7726, 0x692C, 0x75EA, 0x685A, 0x7505, 0x684C, 0x744A, 0x6899, 0x73F5, 0x69A8, 0x7345, 0x6B1A, 0x7193, 0x6BF8, 0x6F4D, 0x6C08, 0x6CFA, 0x6B45, 0x6B61, 0x6AA3, 0x6A7D, 0x6AB7, 0x69EB, 0x6B1D, 0x6A1D, 0x6C34, 0x6A22, 0x6DB8, 0x68E5, 0x6ECD, 0x66B9, 0x6F33, 0x6417, 0x6EC5, 0x6239, 0x6E5C, 0x6165, 0x6E91, 0x6108, 0x6F09, 0x61C1, 0x7018, 0x6282, 0x7196, 0x61CF, 0x72D1, 0x5FE5, 0x7384, 0x5D38, 0x7380, 0x5B4B, 0x7365, 0x5A97, 0x73B7, 0x5A74, 0x7438, 0x5B90, 0x7520, 0x5CE8, 0x7671, 0x5CCB, 0x77BB, 0x5B43, 0x78B0, 0x58B6, 0x7914, 0x56D7, 0x7944, 0x564F, 0x79AD, 0x5667, 0x7A2F, 0x57DA, 0x7AE3, 0x59B7, 0x7BF3, 0x5A31, 0x7D37, 0x5927, 0x7E5D, 0x56E0, 0x7F1E, 0x5529, 0x7F93, 0x54D7, 0x800D, 0x5529, 0x8087, 0x56E0, 0x80FD, 0x5926, 0x81BE, 0x5A30, 0x82E5, 0x59B5, 0x8428, 0x57D8, 0x8538, 0x5664, 0x85EB, 0x564C, 0x866D, 0x56D4, 0x86D7, 0x58B2, 0x8708, 0x5B3F, 0x876B, 0x5CC6, 0x8860, 0x5CE3, 0x89AA, 0x5B8B, 0x8AFC, 0x5A6D, 0x8BE3, 0x5A91, 0x8C65, 0x5B44, 0x8CB7, 0x5D32, 0x8C9C, 0x5FDE, 0x8C98, 0x61C7, 0x8D4B, 0x627A, 0x8E87, 0x61B9, 0x9005, 0x60FF, 0x9114, 0x615C, 0x918B, 0x622F, 0x91C0, 0x640E, 0x9158, 0x66B0, 0x90EA, 0x68DC, 0x9150, 0x6A18, 0x9266, 0x6A12, 0x93E9, 0x69E0, 0x9501, 0x6A72, 0x9567, 0x6B56, 0x957B, 0x6CEE, 0x94D9, 0x6F43, 0x9417, 0x7188, 0x9428, 0x7339, 0x9506, 0x73E9, 0x9678, 0x743E, 0x9787, 0x74F8, 0x97D4, 0x75DD, 0x97C6, 0x771A, 0x96F4, 0x78FB, 0x95E6, 0x7B35, 0x95A1, 0x7D3D, 0x9637, 0x7E91, 0x9782, 0x7F60, 0x987A, 0x8038, 0x98AA, 0x810F, 0x987B, 0x81DF, 0x9782, 0x8333, 0x9638, 0x853B, 0x95A1, 0x8775, 0x95E7, 0x8956, 0x96F5, 0x8A92, 0x97C8, 0x8B78, 0x97D6, 0x8C32, 0x9789, 0x8C88, 0x967A, 0x8D37, 0x9508, 0x8EE9, 0x942A, 0x912F, 0x941A, 0x9383, 0x94DD, 0x951B, 0x957F, 0x95FF, 0x956B, 0x9690, 0x9505, 0x9660, 0x93ED, 0x9659, 0x926A, 0x9797, 0x9154, 0x99C3, 0x90EF, 0x9C65, 0x915D, 0x9E43, 0x91C6, 0x9F17, 0x9191, 0x9F74, 0x9119, 0x9EBB, 0x900A, 0x9DFA, 0x8E8C, 0x9EAE, 0x8D51, 0xA098, 0x8C9E, 0xA345, 0x8CA2, 0xA531, 0x8CBE, 0xA5E5, 0x8C6B, 0xA609, 0x8BEA, 0xA4EC, 0x8B02, 0xA394, 0x89B1, 0xA3B2, 0x8867, 0xA53A, 0x8772, 0xA7C6, 0x870E, 0xA9A5, 0x86DE, 0xAA2D, 0x8675, 0xAA14, 0x85F2, 0xA8A2, 0x853F, 0xA6C5, 0x842E, 0xA64B, 0x82EB, 0xA755, 0x81C5, 0xA99C, 0x8104, 0xAB52, 0x808F, 0xABA6, 0x8015, 0xAB52, 0x7F9B, 0xA99C, 0x7F25, 0xA755, 0x7E64, 0xA64C, 0x7D3E, 0xA6C7, 0x7BFA, 0xA8A5, 0x7AEA, 0xAA18, 0x7A37, 0xAA31, 0x79B5, 0xA9A9, 0x794B, 0xA7CA, 0x791B, 0xA53C, 0x78B7, 0xA3B6, 0x77C1, 0xA39A, 0x7677, 0xA4F1, 0x7526, 0xA60E, 0x743F, 0xA5EB, 0x73BD, 0xA538, 0x736B, 0xA34B, 0x7387, 0xA09E, 0x738A, 0x9EB4, 0x72D6, 0x9E02, 0x719B, 0x9EC4, 0x701D, 0x9F7E, 0x6F0E, 0x9F20, 0x6E96, 0x9E4E, 0x6E61, 0x9C6E, 0x6ECA, 0x99CB, 0x6F37, 0x97A0, 0x6ED2, 0x9664, 0x6DBC, 0x966B, 0x6C38, 0x969B, 0x6B21, 0x960B, 0x6ABB, 0x9526, 0x6AA6, 0x938E, 0x6B48, 0x913B, 0x6C0B, 0x8EF4, 0x6BFA, 0x8D43, 0x6B1D, 0x8C94, 0x69AA, 0x8C3F, 0x689B, 0x8B85, 0x684D, 0x8A9E, 0x685C, 0x8962, 0x692E, 0x8781, 0x6A3C, 0x8546, 0x6A82, 0x833F, 0x69EA, 0x81EC, 0x68A0, 0x811C, 0x67A8, 0x8045, 0x6778, 0x8045, 0x6778, 0xFFFF, 0x8047, 0x6AA0, 0x81C8, 0x6AFA, 0x8268, 0x6BD5, 0x81C8, 0x6CAF, 0x8047, 0x6D09, 0x7EC6, 0x6CAF, 0x7E27, 0x6BD5, 0x7EC6, 0x6AFA, 0x8047, 0x6AA0, 0x8047, 0x6AA0, 0xFFFF, 0x803E, 0x6E19, 0x867C, 0x6E71, 0x8C65, 0x6F75, 0x91D7, 0x711B, 0x96AD, 0x735B, 0x9ABC, 0x762C, 0x9DA2, 0x794C, 0x9F5F, 0x7CA2, 0x9FF3, 0x8011, 0x9F5E, 0x8380, 0x9DA1, 0x86D5, 0x9ABA, 0x89F6, 0x96AB, 0x8CC7, 0x91D6, 0x8F08, 0x8C65, 0x90AD, 0x867C, 0x91B1, 0x803D, 0x9209, 0x7A00, 0x91B1, 0x7416, 0x90AD, 0x6EA6, 0x8F08, 0x69D0, 0x8CC7, 0x65D6, 0x8A0A, 0x62EE, 0x86F4, 0x6125, 0x839B, 0x6089, 0x8011, 0x6124, 0x7C88, 0x62ED, 0x792E, 0x65D6, 0x7619, 0x69CF, 0x735B, 0x6EA5, 0x711B, 0x7416, 0x6F75, 0x7A00, 0x6E71, 0x803E, 0x6E19, 0x803E, 0x6E19, 0xFFFF, 0x803E, 0x6EB2, 0x7A5A, 0x6F04, 0x74B2, 0x6FF8, 0x6F4B, 0x7194, 0x6A8F, 0x73C7, 0x66A2, 0x7681, 0x63D5, 0x7986, 0x6226, 0x7CBF, 0x6197, 0x8011, 0x6226, 0x8363, 0x63D5, 0x869C, 0x66A2, 0x89A2, 0x6A8F, 0x8C5B, 0x6F4B, 0x8E8E, 0x74B2, 0x902B, 0x7A5A, 0x911E, 0x803D, 0x9170, 0x803E, 0x9170, 0x8621, 0x911E, 0x8BCA, 0x902B, 0x9130, 0x8E8E, 0x95ED, 0x8C5B, 0x99CF, 0x89AB, 0x9CA7, 0x869C, 0x9E55, 0x8367, 0x9EE5, 0x8011, 0x9E55, 0x7CBB, 0x9CA7, 0x7986, 0x99CF, 0x7677, 0x95ED, 0x73C7, 0x9130, 0x7194, 0x8BCA, 0x6FF8, 0x8621, 0x6F04, 0x803E, 0x6EB2, 0x803E, 0x6EB2, 0xFFFF, 0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x6700, 0x708A, 0x6880, 0x70E5, 0x6920, 0x71BF, 0x6880, 0x7299, 0x66FF, 0x72F4, 0x657F, 0x7299, 0x64E0, 0x71BF, 0x657F, 0x70E4, 0x6700, 0x708A, 0x6700, 0x708A, 0xFFFF, 0x998D, 0x708C, 0x9B0E, 0x70E6, 0x9BAE, 0x71C0, 0x9B0E, 0x729B, 0x998D, 0x72F6, 0x980D, 0x729B, 0x976E, 0x71C1, 0x980D, 0x70E7, 0x998D, 0x708C, 0x998D, 0x708C, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0x8BA7, 0x712C, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0x8F47, 0x723F, 0xFFFF, 0x712D, 0x7242, 0x7308, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x803E, 0x72F6, 0x891B, 0x73F4, 0x909A, 0x76CC, 0x959F, 0x7B0B, 0x975E, 0x8011, 0x959F, 0x8517, 0x909A, 0x8957, 0x891B, 0x8C2E, 0x803E, 0x8D2B, 0x7761, 0x8C2E, 0x6FE2, 0x8957, 0x6ADD, 0x8517, 0x691E, 0x8011, 0x6ADD, 0x7B0B, 0x6FE2, 0x76CC, 0x7761, 0x73F4, 0x803E, 0x72F6, 0x803E, 0x72F6, 0xFFFF, 0x803E, 0x738F, 0x77C8, 0x7481, 0x70A0, 0x7738, 0x6BD7, 0x7B46, 0x6A2C, 0x8011, 0x6BD7, 0x84DC, 0x70A1, 0x88EA, 0x77C9, 0x8BA1, 0x803E, 0x8C93, 0x88B4, 0x8BA1, 0x8FDB, 0x88EA, 0x94A5, 0x84DD, 0x9650, 0x8011, 0x94A5, 0x7B46, 0x8FDB, 0x7738, 0x88B4, 0x7481, 0x803E, 0x738F, 0x803E, 0x738F, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0x9175, 0x745E, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6CEC, 0x76FA, 0x6BED, 0x7674, 0x6A40, 0x75A9, 0x6A45, 0x75A7, 0x6AEB, 0x7539, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0x9A12, 0x790A, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCB, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x5C87, 0x7EDB, 0x5E08, 0x7F35, 0x5EA8, 0x800F, 0x5E08, 0x80E9, 0x5C87, 0x8144, 0x5C85, 0x8144, 0x5B06, 0x80E9, 0x5A67, 0x800F, 0x5B06, 0x7F35, 0x5C87, 0x7EDB, 0x5C87, 0x7EDB, 0xFFFF, 0xA402, 0x7EDE, 0xA583, 0x7F38, 0xA623, 0x8011, 0xA623, 0x8013, 0xA583, 0x80EC, 0xA402, 0x8147, 0xA281, 0x80ED, 0xA1E2, 0x8013, 0xA281, 0x7F38, 0xA402, 0x7EDE, 0xA402, 0x7EDE, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8255, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8914, 0x67DC, 0x8897, 0x6ADF, 0x878A, 0xFFFF, 0x6CF7, 0x892F, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x963E, 0x8A77, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x7035, 0x8B04, 0x6DED, 0x8C8B, 0x6DE1, 0x8C87, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x66F3, 0x8D2F, 0x6874, 0x8D8A, 0x687D, 0x8D8F, 0x6886, 0x8D94, 0x6926, 0x8E6E, 0x6887, 0x8F48, 0x6705, 0x8FA2, 0x6584, 0x8F49, 0x657F, 0x8F45, 0x6570, 0x8F3E, 0x6573, 0x8F3E, 0x64D3, 0x8E63, 0x6573, 0x8D89, 0x66F3, 0x8D2F, 0x66F3, 0x8D2F, 0xFFFF, 0x9993, 0x8D31, 0x9B13, 0x8D8C, 0x9BB4, 0x8E66, 0x9B16, 0x8F40, 0x9993, 0x8F9A, 0x9814, 0x8F40, 0x9774, 0x8E66, 0x9812, 0x8D8C, 0x9993, 0x8D31, 0x9993, 0x8D31, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CD, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C1, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0x7C48, 0x8E1C, 0xFFFF, 0x80BF, 0x8E49, 0x80D2, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BF, 0x8E49, 0x80BF, 0x8E49, 0xFFFF, 0x804F, 0x9321, 0x81D0, 0x937A, 0x8271, 0x9455, 0x81D1, 0x952F, 0x8051, 0x958A, 0x7ECF, 0x9530, 0x7E2F, 0x9456, 0x7ECE, 0x937B, 0x804F, 0x9321, 0x804F, 0x9321, 0xFFFF, 0x8048, 0x46D9, 0x27BC, 0x9DBA, 0xD8D3, 0x9DBA, 0xFFFF, 0x8048, 0x4BC9, 0x952E, 0x604A, 0x6B62, 0x604A, 0xFFFF, 0x68D2, 0x62CE, 0x97BF, 0x62CE, 0xB9BA, 0x8427, 0xA239, 0x9B36, 0x5E16, 0x9B36, 0x46B6, 0x8446, 0x68D2, 0x62CE, 0xFFFF, 0xBC3E, 0x869F, 0xD13B, 0x9B36, 0xA742, 0x9B36, 0xFFFF, 0x4431, 0x86BE, 0x590E, 0x9B36, 0x2F54, 0x9B36, 0x4431, 0x86BE};
|
||||
|
||||
const PROGMEM uint16_t logo_white[] = {0x80BC, 0x6FD7, 0x80AF, 0x71D8, 0x7FC8, 0x71D9, 0x7FB7, 0x6FD8, 0x80BC, 0x6FD7, 0xFFFF, 0x83CB, 0x6FF6, 0x84CD, 0x700B, 0x843E, 0x7206, 0x835B, 0x71F4, 0xFFFF, 0x7CA9, 0x6FF8, 0x7D1A, 0x71F5, 0x7C37, 0x7207, 0x7BA7, 0x700D, 0x7CA9, 0x6FF8, 0x7CA9, 0x6FF8, 0xFFFF, 0x87CD, 0x7068, 0x88C7, 0x7092, 0x87BA, 0x727C, 0x86DF, 0x7258, 0xFFFF, 0x78A8, 0x706B, 0x7997, 0x725A, 0x78BA, 0x727E, 0x77AD, 0x7095, 0x78A8, 0x706B, 0x78A8, 0x706B, 0xFFFF, 0x8BA7, 0x712C, 0x8C95, 0x716A, 0x8B10, 0x7339, 0x8A3F, 0x7303, 0xFFFF, 0x74CE, 0x712F, 0x7635, 0x7307, 0x7564, 0x733C, 0x73DE, 0x716D, 0x74CE, 0x712F, 0x74CE, 0x712F, 0xFFFF, 0x8F47, 0x723F, 0x9023, 0x728E, 0x8E2D, 0x743A, 0x8D6B, 0x73F4, 0xFFFF, 0x712D, 0x7242, 0x7309, 0x73F7, 0x7248, 0x743D, 0x7050, 0x7292, 0x712D, 0x7242, 0x712D, 0x7242, 0xFFFF, 0x929B, 0x739A, 0x935C, 0x73FA, 0x9100, 0x7578, 0x905A, 0x7527, 0xFFFF, 0x6DDC, 0x739D, 0x7022, 0x7527, 0x6F74, 0x757C, 0x6D16, 0x73FF, 0x6DDC, 0x739D, 0x6DDC, 0x739D, 0xFFFF, 0x9589, 0x7533, 0x9634, 0x75A4, 0x937E, 0x76ED, 0x92E8, 0x768B, 0xFFFF, 0x6AEB, 0x7539, 0x6D8D, 0x7690, 0x6CFB, 0x76F0, 0x6A40, 0x75A9, 0x6AEB, 0x7539, 0xFFFF, 0x980B, 0x7707, 0x989A, 0x7784, 0x9597, 0x7892, 0x951A, 0x7825, 0xFFFF, 0x686A, 0x770C, 0x6B5B, 0x782A, 0x6ADF, 0x7897, 0x67DD, 0x7788, 0x686A, 0x770C, 0x686A, 0x770C, 0xFFFF, 0x9A12, 0x790A, 0x9A7E, 0x7991, 0x9740, 0x7A5E, 0x96E1, 0x79E8, 0xFFFF, 0x6664, 0x790F, 0x6996, 0x79ED, 0x6937, 0x7A63, 0x65F9, 0x7996, 0x6664, 0x790F, 0x6664, 0x790F, 0xFFFF, 0x9B91, 0x7B32, 0x9BDB, 0x7BC1, 0x9870, 0x7C48, 0x9831, 0x7BCC, 0xFFFF, 0x64E6, 0x7B37, 0x6847, 0x7BD0, 0x6807, 0x7C4C, 0x649D, 0x7BC5, 0x64E6, 0x7B37, 0x64E6, 0x7B37, 0xFFFF, 0x9C82, 0x7D72, 0x9CA7, 0x7E06, 0x9925, 0x7E46, 0x9903, 0x7DC5, 0xFFFF, 0x63F7, 0x7D78, 0x6776, 0x7DC9, 0x6756, 0x7E49, 0x63D3, 0x7E0A, 0x63F7, 0x7D78, 0x63F7, 0x7D78, 0xFFFF, 0x9CE0, 0x7FC0, 0x9CE0, 0x8055, 0x9957, 0x804D, 0x9957, 0x7FCB, 0xFFFF, 0x639D, 0x7FC5, 0x6726, 0x7FCE, 0x6726, 0x8051, 0x639D, 0x805A, 0x639D, 0x7FC5, 0xFFFF, 0x9927, 0x81D1, 0x9CAA, 0x8210, 0x9C87, 0x82A2, 0x9907, 0x8252, 0x9927, 0x81D1, 0x9927, 0x81D1, 0xFFFF, 0x6757, 0x81D5, 0x6777, 0x8256, 0x63F9, 0x82A7, 0x63D4, 0x8214, 0xFFFF, 0x9877, 0x83CF, 0x9BE2, 0x8455, 0x9B99, 0x84E3, 0x9838, 0x844C, 0x9877, 0x83CF, 0xFFFF, 0x6808, 0x83D3, 0x6848, 0x8450, 0x64E7, 0x84E8, 0x649E, 0x845A, 0xFFFF, 0x9749, 0x85B9, 0x9A88, 0x8684, 0x9A1D, 0x870C, 0x96EB, 0x862E, 0x9749, 0x85B9, 0x9749, 0x85B9, 0xFFFF, 0x6938, 0x85BD, 0x6997, 0x8634, 0x6665, 0x8710, 0x65F9, 0x8689, 0xFFFF, 0x95A2, 0x8785, 0x98A5, 0x8892, 0x9818, 0x890F, 0x9527, 0x87F2, 0x95A2, 0x8785, 0x95A2, 0x8785, 0xFFFF, 0x6ADF, 0x878A, 0x6B5B, 0x87F8, 0x686A, 0x8915, 0x67DC, 0x8897, 0xFFFF, 0x6CF7, 0x8930, 0x6D8D, 0x8991, 0x6AEB, 0x8AE9, 0x6A40, 0x8A79, 0xFFFF, 0x9380, 0x8932, 0x9645, 0x8A72, 0x9599, 0x8AE3, 0x92F5, 0x898D, 0x9380, 0x8932, 0xFFFF, 0x9110, 0x8AA1, 0x936F, 0x8C1F, 0x92AA, 0x8C80, 0x9064, 0x8AF7, 0x9110, 0x8AA1, 0x9110, 0x8AA1, 0xFFFF, 0x6F73, 0x8AA5, 0x7021, 0x8AFB, 0x6DED, 0x8C8C, 0x6D17, 0x8C23, 0xFFFF, 0x8E3E, 0x8BE1, 0x9037, 0x8D8B, 0x8F59, 0x8DDC, 0x8D7C, 0x8C27, 0x8E3E, 0x8BE1, 0x8E3E, 0x8BE1, 0xFFFF, 0x7259, 0x8BEB, 0x731B, 0x8C31, 0x7140, 0x8DE7, 0x7064, 0x8D97, 0xFFFF, 0x8B21, 0x8CE3, 0x8CA9, 0x8EB2, 0x8BBA, 0x8EEF, 0x8A51, 0x8D18, 0x8B21, 0x8CE3, 0x8B21, 0x8CE3, 0xFFFF, 0x7576, 0x8CEB, 0x7648, 0x8D20, 0x74E0, 0x8EF8, 0x73F2, 0x8EBB, 0xFFFF, 0x87CD, 0x8DA1, 0x88DC, 0x8F8B, 0x87E0, 0x8FB5, 0x86F0, 0x8DC6, 0x87CD, 0x8DA1, 0x87CD, 0x8DA1, 0xFFFF, 0x78CC, 0x8DA8, 0x79A8, 0x8DCB, 0x78BC, 0x8FBB, 0x77C0, 0x8F92, 0xFFFF, 0x8450, 0x8E19, 0x84E2, 0x9014, 0x83E0, 0x9029, 0x836C, 0x8E2C, 0x8450, 0x8E19, 0x8450, 0x8E19, 0xFFFF, 0x7C48, 0x8E1C, 0x7D2B, 0x8E2E, 0x7CBD, 0x902C, 0x7BBB, 0x9017, 0xFFFF, 0x80BE, 0x8E49, 0x80D1, 0x904A, 0x7FCC, 0x904A, 0x7FD9, 0x8E49, 0x80BE, 0x8E49, 0xFFFF, 0x8276, 0x75D6, 0x83AF, 0x75FE, 0x8436, 0x7628, 0x84AE, 0x7661, 0x8542, 0x7706, 0x8512, 0x77BA, 0x8457, 0x7845, 0x8335, 0x788B, 0x8318, 0x7882, 0x82D8, 0x7860, 0x831E, 0x7830, 0x8353, 0x7823, 0x83E6, 0x77F9, 0x8464, 0x7790, 0x847A, 0x771A, 0x8415, 0x76B7, 0x83B6, 0x7691, 0x8351, 0x7676, 0x827F, 0x7662, 0x81BB, 0x7687, 0x8161, 0x76AF, 0x8123, 0x76DA, 0x80E5, 0x771A, 0x80C5, 0x774D, 0x80B8, 0x77C1, 0x80D1, 0x77EE, 0x8107, 0x7814, 0x81CC, 0x786B, 0x837F, 0x7918, 0x8464, 0x7983, 0x84C0, 0x79B2, 0x852D, 0x79FD, 0x859D, 0x7ABC, 0x858E, 0x7B79, 0x8545, 0x7C25, 0x84D9, 0x7CC5, 0x8469, 0x7D4D, 0x843B, 0x7DCD, 0x8555, 0x7DA8, 0x85D3, 0x7D67, 0x870D, 0x7CA0, 0x87E0, 0x7BC0, 0x880D, 0x7B5B, 0x886D, 0x7A46, 0x88B3, 0x799B, 0x88CC, 0x7970, 0x893A, 0x78EA, 0x8995, 0x78A8, 0x8A01, 0x786F, 0x8AF8, 0x781F, 0x8BA6, 0x77FD, 0x8C0C, 0x77EF, 0x8C96, 0x77FB, 0x8D1D, 0x7815, 0x8D59, 0x7826, 0x8E40, 0x7889, 0x8EDB, 0x7925, 0x8EFC, 0x797B, 0x8EFF, 0x79D4, 0x8E71, 0x7A7B, 0x8D58, 0x7AD2, 0x8C23, 0x7ADE, 0x8AFF, 0x7A97, 0x8AF5, 0x7A81, 0x8AEF, 0x7A4E, 0x8B68, 0x7A52, 0x8B96, 0x7A5F, 0x8C39, 0x7A87, 0x8D33, 0x7A7F, 0x8E07, 0x7A3F, 0x8E66, 0x79CB, 0x8E63, 0x7985, 0x8E43, 0x793F, 0x8DC6, 0x78C6, 0x8CFA, 0x7876, 0x8C7E, 0x785F, 0x8C18, 0x7857, 0x8B84, 0x7874, 0x8B22, 0x788F, 0x8A7D, 0x78CA, 0x8A2E, 0x78F9, 0x89F0, 0x7930, 0x89A3, 0x79A5, 0x8979, 0x7AC0, 0x897C, 0x7B9C, 0x8972, 0x7BF2, 0x88CC, 0x7D32, 0x87B7, 0x7E4C, 0x8665, 0x7F52, 0x8660, 0x7F5A, 0x878F, 0x7F01, 0x88AE, 0x7EC2, 0x89FD, 0x7E9E, 0x8B8D, 0x7EC6, 0x8C40, 0x7F0E, 0x8CB6, 0x7F68, 0x8D1D, 0x7FD7, 0x8DFA, 0x80BD, 0x8EA8, 0x816E, 0x8F34, 0x81D4, 0x8F8A, 0x81F9, 0x8FDA, 0x820A, 0x90AB, 0x820F, 0x9120, 0x81FF, 0x91A5, 0x81DC, 0x91F4, 0x81B8, 0x922C, 0x8198, 0x9288, 0x812B, 0x927D, 0x80AB, 0x9252, 0x8068, 0x921C, 0x8033, 0x9174, 0x7FEB, 0x9099, 0x7FEB, 0x8FCF, 0x8029, 0x8F5D, 0x808D, 0x8F47, 0x80A4, 0x8ED4, 0x80A4, 0x8EC5, 0x8070, 0x8F65, 0x7FE6, 0x906D, 0x7F92, 0x91A4, 0x7F90, 0x92A8, 0x7FF7, 0x92FC, 0x8043, 0x9331, 0x8090, 0x9349, 0x813D, 0x92D1, 0x81E3, 0x9264, 0x8227, 0x91E5, 0x825B, 0x915D, 0x8280, 0x90D3, 0x8296, 0x8FA0, 0x829A, 0x8F2C, 0x8286, 0x8EE7, 0x8273, 0x8E78, 0x824A, 0x8DA9, 0x81D4, 0x8CB9, 0x8127, 0x8B68, 0x802C, 0x8B22, 0x8001, 0x8AC3, 0x7FE7, 0x8A50, 0x7FF4, 0x88FD, 0x8068, 0x87A4, 0x811D, 0x879E, 0x812D, 0x8904, 0x81F1, 0x89D4, 0x8285, 0x8A7C, 0x8343, 0x8A94, 0x8431, 0x8A4E, 0x84A1, 0x89E8, 0x850E, 0x892F, 0x85E5, 0x88B0, 0x86E5, 0x88C0, 0x8757, 0x88F2, 0x878D, 0x8927, 0x87AD, 0x8ABF, 0x8821, 0x8B0E, 0x881E, 0x8B70, 0x8811, 0x8C1B, 0x87D6, 0x8C9B, 0x8776, 0x8CC4, 0x873D, 0x8CD3, 0x8705, 0x8CA2, 0x86A3, 0x8C06, 0x8662, 0x8B39, 0x864F, 0x8A77, 0x8662, 0x89F9, 0x864D, 0x8A10, 0x8606, 0x8A66, 0x85F7, 0x8B35, 0x85DC, 0x8C50, 0x85FD, 0x8D3C, 0x8663, 0x8D94, 0x870A, 0x8D7D, 0x875F, 0x8D3A, 0x87B8, 0x8CB1, 0x882D, 0x8BC1, 0x888C, 0x8B30, 0x88A7, 0x8A8D, 0x88AE, 0x89EE, 0x8898, 0x896E, 0x887E, 0x8869, 0x882D, 0x87EE, 0x87EA, 0x87A4, 0x87A8, 0x878E, 0x8785, 0x874D, 0x86E3, 0x875D, 0x8637, 0x87FD, 0x8466, 0x8705, 0x835A, 0x86B8, 0x8359, 0x84A4, 0x8358, 0x7F20, 0x851B, 0x7F13, 0x864D, 0x8016, 0x86F9, 0x818E, 0x87D8, 0x823B, 0x8869, 0x8272, 0x88C9, 0x8276, 0x8915, 0x8266, 0x893D, 0x81FB, 0x89D8, 0x8197, 0x8A21, 0x8119, 0x8A62, 0x80A7, 0x8A8A, 0x8016, 0x8AAA, 0x7EDC, 0x8AAE, 0x7DC5, 0x8A63, 0x7D55, 0x8A29, 0x7CFA, 0x89E5, 0x7CAD, 0x8939, 0x7D1B, 0x8895, 0x7E00, 0x8825, 0x7F27, 0x8800, 0x7F66, 0x880F, 0x7F69, 0x8850, 0x7E49, 0x8873, 0x7D9A, 0x88C9, 0x7D4F, 0x893E, 0x7D8B, 0x89B2, 0x7DD8, 0x89E6, 0x7E36, 0x8A10, 0x7F02, 0x8A40, 0x7FDB, 0x8A34, 0x8046, 0x8A16, 0x8091, 0x89F5, 0x80A5, 0x89EB, 0x80FE, 0x89AB, 0x8126, 0x8981, 0x8159, 0x8918, 0x814F, 0x88E6, 0x8128, 0x88B8, 0x8094, 0x8856, 0x7EFC, 0x8796, 0x7D74, 0x86E7, 0x7D3D, 0x86C5, 0x7CD8, 0x8674, 0x7C98, 0x8605, 0x7CA0, 0x8536, 0x7D7C, 0x83E6, 0x7E07, 0x8357, 0x7DED, 0x835B, 0x79CC, 0x843E, 0x7962, 0x8448, 0x77CB, 0x8450, 0x76F3, 0x8438, 0x763E, 0x841E, 0x7502, 0x83FE, 0x746C, 0x83FD, 0x73E4, 0x840A, 0x72CE, 0x8444, 0x729B, 0x8457, 0x71E6, 0x84B7, 0x71B5, 0x84EB, 0x719B, 0x853B, 0x719B, 0x8558, 0x71D4, 0x85E0, 0x72B0, 0x8642, 0x73D4, 0x8661, 0x74B3, 0x8616, 0x74AD, 0x84D7, 0x74B2, 0x84B3, 0x74B5, 0x849B, 0x751E, 0x8496, 0x753B, 0x84B8, 0x75C5, 0x856E, 0x756D, 0x865A, 0x74D0, 0x86B8, 0x73FA, 0x86EA, 0x7250, 0x86CF, 0x70E7, 0x863F, 0x707E, 0x85C8, 0x705F, 0x8549, 0x7075, 0x84CC, 0x70AC, 0x8475, 0x70CD, 0x8452, 0x71FF, 0x839C, 0x7287, 0x8376, 0x736A, 0x833A, 0x7443, 0x8319, 0x751E, 0x8311, 0x76AC, 0x8327, 0x77C4, 0x8341, 0x7810, 0x8340, 0x799F, 0x8313, 0x7A2A, 0x82EA, 0x7B24, 0x8281, 0x7BE4, 0x820C, 0x7BEC, 0x81B1, 0x7A5E, 0x81C8, 0x7809, 0x81ED, 0x7751, 0x81F8, 0x7664, 0x81EF, 0x7571, 0x81B4, 0x74BB, 0x8141, 0x7483, 0x80F9, 0x7408, 0x802F, 0x73D9, 0x7FEB, 0x7359, 0x7F50, 0x72A0, 0x7EC4, 0x719E, 0x7E89, 0x7074, 0x7EA8, 0x7015, 0x7ECC, 0x6FD0, 0x7EF8, 0x6FA3, 0x7F19, 0x6F6B, 0x7FBB, 0x6F93, 0x8017, 0x6FA7, 0x8032, 0x6FD7, 0x805A, 0x70DF, 0x8092, 0x7205, 0x805A, 0x729E, 0x7FCB, 0x72B3, 0x7FBC, 0x7309, 0x7FA6, 0x733B, 0x7FDE, 0x72F9, 0x804B, 0x726D, 0x80A7, 0x70E6, 0x80FB, 0x700D, 0x80EC, 0x6F48, 0x80A8, 0x6EFC, 0x8073, 0x6EC1, 0x8026, 0x6E93, 0x7FCC, 0x6ED4, 0x7ED8, 0x6F54, 0x7E72, 0x6FCB, 0x7E3A, 0x700B, 0x7E25, 0x71AB, 0x7DED, 0x7356, 0x7E3E, 0x7472, 0x7EF4, 0x7536, 0x7FBD, 0x75DA, 0x8075, 0x7628, 0x80B6, 0x767B, 0x80D8, 0x76D9, 0x80EF, 0x7755, 0x80FC, 0x7881, 0x80D5, 0x7931, 0x8093, 0x7A00, 0x801E, 0x799B, 0x7D9B, 0x789A, 0x7CD8, 0x77C0, 0x7BE5, 0x7783, 0x7B55, 0x7787, 0x7AB9, 0x77AE, 0x7A67, 0x77E6, 0x7A1D, 0x781E, 0x79CD, 0x785E, 0x7909, 0x7853, 0x78C0, 0x7823, 0x788B, 0x7808, 0x7875, 0x7649, 0x77E8, 0x74B6, 0x7869, 0x7488, 0x78B3, 0x7472, 0x7901, 0x74D2, 0x796F, 0x75D8, 0x799A, 0x76EE, 0x7971, 0x774A, 0x797A, 0x7751, 0x79B4, 0x76A0, 0x79F0, 0x75E4, 0x7A0A, 0x7454, 0x79E1, 0x73AF, 0x7986, 0x7369, 0x7909, 0x7374, 0x7891, 0x739D, 0x783C, 0x73B6, 0x781E, 0x74B7, 0x7768, 0x765D, 0x772C, 0x77ED, 0x7769, 0x7932, 0x77FC, 0x7979, 0x7836, 0x79B8, 0x787B, 0x79DF, 0x7912, 0x7998, 0x7A14, 0x7967, 0x7AB4, 0x796A, 0x7AD8, 0x79C5, 0x7B60, 0x7A9D, 0x7BE9, 0x7B72, 0x7C47, 0x7EBA, 0x7BD6, 0x8206, 0x7CA8, 0x82FA, 0x7C2E, 0x8391, 0x7BB4, 0x83F6, 0x7B40, 0x8413, 0x7AD0, 0x83DD, 0x7A71, 0x838A, 0x7A39, 0x8296, 0x79B7, 0x80F3, 0x78FA, 0x8016, 0x788A, 0x7FB4, 0x7833, 0x7F8D, 0x77DF, 0x7F92, 0x77A9, 0x7FB3, 0x7718, 0x7FF6, 0x76C2, 0x8036, 0x768A, 0x8097, 0x764A, 0x80DF, 0x762A, 0x813C, 0x7605, 0x8275, 0x75D5};
|
117
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h
Normal file
117
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/colors.h
Normal file
|
@ -0,0 +1,117 @@
|
|||
/************
|
||||
* colors.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Theme {
|
||||
|
||||
#define COLOR_CORRECTION(rgb) ( \
|
||||
(uint32_t((((rgb) & 0xFF0000) >> 16) * 1.00) << 16) | \
|
||||
(uint32_t((((rgb) & 0x00FF00) >> 8) * 1.00) << 8) | \
|
||||
(uint32_t((((rgb) & 0x0000FF) >> 0) * .75) << 0))
|
||||
|
||||
#define COLOR_BLEND(a,b,f) COLOR_CORRECTION( \
|
||||
(uint32_t((((a) & 0xFF0000) >> 16) * f + (((b) & 0xFF0000) >> 16) * (1-f)) << 16) | \
|
||||
(uint32_t((((a) & 0x00FF00) >> 8) * f + (((b) & 0x00FF00) >> 8) * (1-f)) << 8) | \
|
||||
(uint32_t((((a) & 0x0000FF) >> 0) * f + (((b) & 0x0000FF) >> 0) * (1-f)) << 0))
|
||||
|
||||
constexpr uint32_t lulzbot_bg = 0xDEEA5C;
|
||||
constexpr uint32_t lulzbot_fg = 0xC1D82F;
|
||||
|
||||
constexpr uint32_t lulzbot_green = COLOR_BLEND(0xC1DB2F,0x788814,0.33);
|
||||
|
||||
#ifndef LULZBOT_USE_BIOPRINTER_UI
|
||||
constexpr uint32_t theme_darkest = COLOR_CORRECTION(0x444444);
|
||||
constexpr uint32_t theme_dark = COLOR_CORRECTION(0x777777);
|
||||
|
||||
constexpr uint32_t bg_color = theme_darkest;
|
||||
constexpr uint32_t bg_text_disabled = theme_dark;
|
||||
constexpr uint32_t bg_text_enabled = 0xFFFFFF;
|
||||
constexpr uint32_t bg_normal = theme_darkest;
|
||||
|
||||
constexpr uint32_t fg_normal = theme_dark;
|
||||
constexpr uint32_t fg_action = lulzbot_green;
|
||||
constexpr uint32_t fg_disabled = bg_color;
|
||||
#else
|
||||
constexpr uint32_t theme_darkest = 0x545923;
|
||||
constexpr uint32_t theme_dark = lulzbot_bg;
|
||||
|
||||
constexpr uint32_t bg_color = 0xFFFFFF;
|
||||
constexpr uint32_t bg_text_disabled = 0x333333;
|
||||
constexpr uint32_t bg_text_enabled = theme_darkest;
|
||||
constexpr uint32_t bg_normal = theme_dark;
|
||||
|
||||
constexpr uint32_t fg_normal = theme_darkest;
|
||||
constexpr uint32_t fg_action = theme_dark;
|
||||
constexpr uint32_t fg_disabled = 0xEFEFEF;
|
||||
|
||||
constexpr uint32_t shadow_rgb = 0xE0E0E0;
|
||||
constexpr uint32_t fill_rgb = lulzbot_fg;
|
||||
constexpr uint32_t stroke_rgb = theme_darkest;
|
||||
constexpr uint32_t syringe_rgb = 0xF1F6C0;
|
||||
#endif
|
||||
|
||||
constexpr uint32_t x_axis = COLOR_CORRECTION(0xFF0000);
|
||||
constexpr uint32_t y_axis = COLOR_CORRECTION(0x00BB00);
|
||||
constexpr uint32_t z_axis = COLOR_CORRECTION(0x0000FF);
|
||||
#ifndef LULZBOT_USE_BIOPRINTER_UI
|
||||
constexpr uint32_t e_axis = COLOR_CORRECTION(0x777777);
|
||||
constexpr uint32_t feedrate = COLOR_CORRECTION(0x777777);
|
||||
constexpr uint32_t other = COLOR_CORRECTION(0x777777);
|
||||
#else
|
||||
constexpr uint32_t e_axis = 0x000000;
|
||||
constexpr uint32_t feedrate = 0x000000;
|
||||
constexpr uint32_t other = 0x000000;
|
||||
#endif
|
||||
|
||||
// Status screen
|
||||
constexpr uint32_t progress = theme_dark;
|
||||
constexpr uint32_t status_msg = theme_dark;
|
||||
constexpr uint32_t fan_speed = COLOR_CORRECTION(0x3771CB);
|
||||
constexpr uint32_t temp = COLOR_CORRECTION(0x892ca0);
|
||||
constexpr uint32_t axis_label = theme_dark;
|
||||
|
||||
constexpr uint32_t disabled_icon = 0x101010;
|
||||
|
||||
// Calibration Registers Screen
|
||||
constexpr uint32_t transformA = 0x3010D0;
|
||||
constexpr uint32_t transformB = 0x4010D0;
|
||||
constexpr uint32_t transformC = 0x5010D0;
|
||||
constexpr uint32_t transformD = 0x6010D0;
|
||||
constexpr uint32_t transformE = 0x7010D0;
|
||||
constexpr uint32_t transformF = 0x8010D0;
|
||||
constexpr uint32_t transformVal = 0x104010;
|
||||
|
||||
constexpr btn_colors disabled_btn = {.bg = bg_color, .grad = fg_disabled, .fg = fg_disabled, .rgb = fg_disabled };
|
||||
constexpr btn_colors normal_btn = {.bg = fg_action, .grad = 0xFFFFFF, .fg = fg_normal, .rgb = 0xFFFFFF };
|
||||
constexpr btn_colors action_btn = {.bg = bg_color, .grad = 0xFFFFFF, .fg = fg_action, .rgb = 0xFFFFFF };
|
||||
constexpr btn_colors red_btn = {.bg = 0xFF5555, .grad = 0xFFFFFF, .fg = 0xFF0000, .rgb = 0xFFFFFF };
|
||||
constexpr btn_colors ui_slider = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = lulzbot_green };
|
||||
constexpr btn_colors ui_toggle = {.bg = theme_darkest, .grad = 0xFFFFFF, .fg = theme_dark, .rgb = 0xFFFFFF };
|
||||
|
||||
// Temperature color scale
|
||||
|
||||
const rgb_t cool_rgb ( 0, 0, 0);
|
||||
const rgb_t low_rgb (128, 0, 0);
|
||||
const rgb_t med_rgb (255, 128, 0);
|
||||
const rgb_t high_rgb (255, 255, 128);
|
||||
};
|
80
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h
Normal file
80
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/fonts.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
/***********
|
||||
* fonts.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Theme {
|
||||
#ifdef TOUCH_UI_800x480
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr int16_t font_tiny = 26;
|
||||
constexpr int16_t font_xsmall = 28;
|
||||
constexpr int16_t font_small = 29;
|
||||
constexpr int16_t font_medium = 30;
|
||||
constexpr int16_t font_large = 30;
|
||||
constexpr int16_t font_xlarge = 31;
|
||||
#else
|
||||
constexpr int16_t font_tiny = 27;
|
||||
constexpr int16_t font_xsmall = 29;
|
||||
constexpr int16_t font_small = 30;
|
||||
constexpr int16_t font_medium = 30;
|
||||
constexpr int16_t font_large = 31;
|
||||
constexpr int16_t font_xlarge = 31;
|
||||
#endif
|
||||
constexpr float icon_scale = 1.0;
|
||||
#elif defined(TOUCH_UI_480x272)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr int16_t font_tiny = 26;
|
||||
constexpr int16_t font_xsmall = 26;
|
||||
constexpr int16_t font_small = 26;
|
||||
constexpr int16_t font_medium = 27;
|
||||
constexpr int16_t font_large = 28;
|
||||
constexpr int16_t font_xlarge = 29;
|
||||
constexpr float icon_scale = 0.7;
|
||||
#else
|
||||
constexpr int16_t font_tiny = 26;
|
||||
constexpr int16_t font_xsmall = 26;
|
||||
constexpr int16_t font_small = 27;
|
||||
constexpr int16_t font_medium = 28;
|
||||
constexpr int16_t font_large = 30;
|
||||
constexpr int16_t font_xlarge = 31;
|
||||
constexpr float icon_scale = 0.6;
|
||||
#endif
|
||||
#elif defined(TOUCH_UI_320x240)
|
||||
#ifdef TOUCH_UI_PORTRAIT
|
||||
constexpr int16_t font_tiny = 26;
|
||||
constexpr int16_t font_xsmall = 26;
|
||||
constexpr int16_t font_small = 26;
|
||||
constexpr int16_t font_medium = 27;
|
||||
constexpr int16_t font_large = 27;
|
||||
constexpr int16_t font_xlarge = 28;
|
||||
constexpr float icon_scale = 0.6;
|
||||
#else
|
||||
constexpr int16_t font_tiny = 26;
|
||||
constexpr int16_t font_xsmall = 26;
|
||||
constexpr int16_t font_small = 26;
|
||||
constexpr int16_t font_medium = 27;
|
||||
constexpr int16_t font_large = 29;
|
||||
constexpr int16_t font_xlarge = 30;
|
||||
constexpr float icon_scale = 0.5;
|
||||
#endif
|
||||
#endif
|
||||
}
|
410
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp
Normal file
410
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.cpp
Normal file
|
@ -0,0 +1,410 @@
|
|||
/**************
|
||||
* sounds.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#include "../compat.h"
|
||||
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
|
||||
#include "../ftdi_eve_lib/ftdi_eve_lib.h"
|
||||
|
||||
#include "sounds.h"
|
||||
|
||||
namespace Theme {
|
||||
using namespace FTDI;
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t chimes[] = {
|
||||
{CHIMES, NOTE_G3, 5},
|
||||
{CHIMES, NOTE_E4, 5},
|
||||
{CHIMES, NOTE_C4, 5},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t sad_trombone[] = {
|
||||
{TRUMPET, NOTE_A3S, 10},
|
||||
{TRUMPET, NOTE_A3 , 10},
|
||||
{TRUMPET, NOTE_G3S, 10},
|
||||
{TRUMPET, NOTE_G3, 20},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t twinkle[] = {
|
||||
{GLOCKENSPIEL, NOTE_C4, 1},
|
||||
{GLOCKENSPIEL, NOTE_E4, 1},
|
||||
{GLOCKENSPIEL, NOTE_G4, 16},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t fanfare[] = {
|
||||
{TRUMPET, NOTE_A3, 4},
|
||||
{SILENCE, REST, 1},
|
||||
{TRUMPET, NOTE_A3, 2},
|
||||
{SILENCE, REST, 1},
|
||||
{TRUMPET, NOTE_A3, 2},
|
||||
{SILENCE, REST, 1},
|
||||
{TRUMPET, NOTE_E4, 10},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t media_inserted[] = {
|
||||
{MUSIC_BOX, NOTE_C4, 2},
|
||||
{MUSIC_BOX, NOTE_E4, 2},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t media_removed[] = {
|
||||
{MUSIC_BOX, NOTE_E4, 2},
|
||||
{MUSIC_BOX, NOTE_C4, 2},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t js_bach_toccata[] = {
|
||||
{ORGAN, NOTE_A4, 2},
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
{ORGAN, NOTE_A4, 35},
|
||||
{SILENCE, REST, 12},
|
||||
{ORGAN, NOTE_G4, 4},
|
||||
{ORGAN, NOTE_F4, 4},
|
||||
{ORGAN, NOTE_E4, 4},
|
||||
{ORGAN, NOTE_D4, 4},
|
||||
{ORGAN, NOTE_C4S, 16},
|
||||
{ORGAN, NOTE_D4, 32},
|
||||
{SILENCE, REST, 42},
|
||||
|
||||
{ORGAN, NOTE_A3, 2},
|
||||
{ORGAN, NOTE_G3, 2},
|
||||
{ORGAN, NOTE_A3, 35},
|
||||
{SILENCE, REST, 9},
|
||||
{ORGAN, NOTE_E3, 8},
|
||||
{ORGAN, NOTE_F3, 8},
|
||||
{ORGAN, NOTE_C3S, 16},
|
||||
{ORGAN, NOTE_D3, 27},
|
||||
{SILENCE, REST, 42},
|
||||
|
||||
{ORGAN, NOTE_A2, 2},
|
||||
{ORGAN, NOTE_G2, 2},
|
||||
{ORGAN, NOTE_A2, 35},
|
||||
{SILENCE, REST, 12},
|
||||
{ORGAN, NOTE_G2, 4},
|
||||
{ORGAN, NOTE_F2, 4},
|
||||
{ORGAN, NOTE_E2, 4},
|
||||
{ORGAN, NOTE_D2, 4},
|
||||
{ORGAN, NOTE_C2S, 16},
|
||||
{ORGAN, NOTE_D2, 32},
|
||||
{SILENCE, REST, 52},
|
||||
|
||||
//{ORGAN, NOTE_D1, 28},
|
||||
{ORGAN, NOTE_C3S, 9},
|
||||
{ORGAN, NOTE_E3, 9},
|
||||
{ORGAN, NOTE_G3, 9},
|
||||
{ORGAN, NOTE_A3S, 9},
|
||||
{ORGAN, NOTE_C4S, 9},
|
||||
{ORGAN, NOTE_E4, 9},
|
||||
{ORGAN, NOTE_D4, 20},
|
||||
{SILENCE, REST, 30},
|
||||
|
||||
{ORGAN, NOTE_C4S, 4},
|
||||
{ORGAN, NOTE_D4, 2},
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
|
||||
{ORGAN, NOTE_C4S, 2},
|
||||
{ORGAN, NOTE_D4, 2},
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
|
||||
{ORGAN, NOTE_C4S, 2},
|
||||
{ORGAN, NOTE_D4, 2},
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
|
||||
{ORGAN, NOTE_C4S, 2},
|
||||
{ORGAN, NOTE_D4, 4},
|
||||
{ORGAN, NOTE_E4, 4},
|
||||
{ORGAN, NOTE_F4, 2},
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
{ORGAN, NOTE_F4, 2},
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
{ORGAN, NOTE_F4, 2},
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
|
||||
{ORGAN, NOTE_E4, 2},
|
||||
{ORGAN, NOTE_F4, 4},
|
||||
{ORGAN, NOTE_G4, 4},
|
||||
{ORGAN, NOTE_A4, 2},
|
||||
{ORGAN, NOTE_A4S, 2},
|
||||
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
{ORGAN, NOTE_A4, 2},
|
||||
{ORGAN, NOTE_A4S, 2},
|
||||
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
{ORGAN, NOTE_A4, 2},
|
||||
{ORGAN, NOTE_A4S, 2},
|
||||
|
||||
{ORGAN, NOTE_G4, 2},
|
||||
{ORGAN, NOTE_A4, 4},
|
||||
{SILENCE, REST, 36},
|
||||
|
||||
|
||||
{ORGAN, NOTE_C5S, 4},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
|
||||
{ORGAN, NOTE_C5S, 2},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
|
||||
{ORGAN, NOTE_C5S, 2},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
|
||||
{ORGAN, NOTE_C5S, 2},
|
||||
{ORGAN, NOTE_D5, 4},
|
||||
{ORGAN, NOTE_E5, 4},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_F5, 4},
|
||||
{ORGAN, NOTE_G5, 4},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
{ORGAN, NOTE_A5S, 2},
|
||||
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
{ORGAN, NOTE_A5S, 2},
|
||||
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
{ORGAN, NOTE_A5S, 2},
|
||||
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
{ORGAN, NOTE_A5, 4},
|
||||
{SILENCE, REST, 32},
|
||||
|
||||
{ORGAN, NOTE_A5, 4},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
{ORGAN, NOTE_A5S, 2},
|
||||
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
{ORGAN, NOTE_A5S, 2},
|
||||
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
{ORGAN, NOTE_G5, 2},
|
||||
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
|
||||
{ORGAN, NOTE_C5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{ORGAN, NOTE_A5, 2},
|
||||
|
||||
{ORGAN, NOTE_C5, 2},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_F5, 2},
|
||||
|
||||
{ORGAN, NOTE_A4S, 2},
|
||||
{ORGAN, NOTE_D5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
|
||||
{ORGAN, NOTE_A4S, 2},
|
||||
{ORGAN, NOTE_C5, 2},
|
||||
{ORGAN, NOTE_E5, 2},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t js_bach_joy[] = {
|
||||
{PIANO, NOTE_G3, 4},
|
||||
{PIANO, NOTE_A3, 4},
|
||||
{PIANO, NOTE_B3, 4},
|
||||
{PIANO, NOTE_D4, 3},
|
||||
{SILENCE, REST, 1},
|
||||
|
||||
{PIANO, NOTE_C4, 3},
|
||||
{SILENCE, REST, 1},
|
||||
{PIANO, NOTE_C4, 4},
|
||||
{PIANO, NOTE_E4, 3},
|
||||
{SILENCE, REST, 1},
|
||||
{PIANO, NOTE_D4, 2},
|
||||
{SILENCE, REST, 2},
|
||||
|
||||
{PIANO, NOTE_D4, 4},
|
||||
{PIANO, NOTE_G4 , 3},
|
||||
{SILENCE, REST, 1},
|
||||
{PIANO, NOTE_F4S, 4},
|
||||
{PIANO, NOTE_G4, 4},
|
||||
|
||||
{PIANO, NOTE_D4, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_B3, 3},
|
||||
{SILENCE, REST, 1},
|
||||
{PIANO, NOTE_G3, 4},
|
||||
{PIANO, NOTE_A3, 2},
|
||||
{SILENCE, REST, 2},
|
||||
|
||||
{PIANO, NOTE_B3, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_C4, 4},
|
||||
{PIANO, NOTE_D4, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_E4, 2},
|
||||
{SILENCE, REST, 2},
|
||||
|
||||
{PIANO, NOTE_D4, 4},
|
||||
{PIANO, NOTE_C4, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_B3, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_A3, 4},
|
||||
|
||||
{PIANO, NOTE_B3, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_G3, 2},
|
||||
{SILENCE, REST, 2},
|
||||
{PIANO, NOTE_G3, 8},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t big_band[] = {
|
||||
{XYLOPHONE, NOTE_F4, 3},
|
||||
{XYLOPHONE, NOTE_G4, 3},
|
||||
{XYLOPHONE, NOTE_F4, 3},
|
||||
{XYLOPHONE, NOTE_D4, 3},
|
||||
{XYLOPHONE, NOTE_A3S, 3},
|
||||
{SILENCE, REST, 3},
|
||||
|
||||
{TRUMPET, NOTE_F4, 3},
|
||||
{TRUMPET, NOTE_G4, 3},
|
||||
{TRUMPET, NOTE_F4, 3},
|
||||
{TRUMPET, NOTE_D4, 3},
|
||||
{TRUMPET, NOTE_A3S, 3},
|
||||
{SILENCE, REST, 3},
|
||||
|
||||
{TUBA, NOTE_A2S, 6},
|
||||
{TUBA, NOTE_A2S, 6},
|
||||
{TUBA, NOTE_A2S, 4},
|
||||
{TUBA, NOTE_A2S, 6},
|
||||
{TUBA, NOTE_A2S, 6},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t beats[] = {
|
||||
{SILENCE, REST, 8},
|
||||
{NOTCH, NOTE_C4, 8},
|
||||
{KICKDRUM, NOTE_C4, 8},
|
||||
{HIHAT, NOTE_C4, 8},
|
||||
{COWBELL, NOTE_C4, 8},
|
||||
{SILENCE, REST, 8},
|
||||
{NOTCH, NOTE_C4, 8},
|
||||
{KICKDRUM, NOTE_C4, 8},
|
||||
{HIHAT, NOTE_C4, 8},
|
||||
{COWBELL, NOTE_C4, 8},
|
||||
{SILENCE, REST, 8},
|
||||
{NOTCH, NOTE_C4, 8},
|
||||
{KICKDRUM, NOTE_C4, 8},
|
||||
{HIHAT, NOTE_C4, 8},
|
||||
{COWBELL, NOTE_C4, 8},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t beeping[] = {
|
||||
{BEEPING, NOTE_C4, 64},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t alarm[] = {
|
||||
{ALARM, NOTE_C4, 64},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t warble[] = {
|
||||
{WARBLE, NOTE_C4, 64},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t carousel[] = {
|
||||
{CAROUSEL, NOTE_C4, 64},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
|
||||
const PROGMEM SoundPlayer::sound_t all_instruments[] = {
|
||||
{HARP},
|
||||
{XYLOPHONE},
|
||||
{TUBA},
|
||||
{GLOCKENSPIEL},
|
||||
{ORGAN},
|
||||
{TRUMPET},
|
||||
{PIANO},
|
||||
{CHIMES},
|
||||
{MUSIC_BOX},
|
||||
{BELL},
|
||||
{CLICK},
|
||||
{SWITCH},
|
||||
{COWBELL},
|
||||
{NOTCH},
|
||||
{HIHAT},
|
||||
{KICKDRUM},
|
||||
{SWITCH},
|
||||
{POP},
|
||||
{CLACK},
|
||||
{CHACK},
|
||||
{SILENCE, END_SONG, 0}
|
||||
};
|
||||
}; // namespace Theme
|
||||
|
||||
#define N_ELEMENTS(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
const SoundList::list_t SoundList::list[] = {
|
||||
{"Silence", FTDI::silence},
|
||||
{"Twinkle", Theme::twinkle},
|
||||
{"Chimes", Theme::chimes},
|
||||
{"Fanfare", Theme::fanfare},
|
||||
{"Sad Trombone", Theme::sad_trombone},
|
||||
{"Big Band", Theme::big_band},
|
||||
{"Beeping", Theme::beeping},
|
||||
{"Alarm", Theme::alarm},
|
||||
{"Warble", Theme::warble},
|
||||
{"Carousel", Theme::carousel},
|
||||
{"Beats", Theme::beats},
|
||||
{"Bach Joy", Theme::js_bach_joy},
|
||||
{"Bach Toccata", Theme::js_bach_toccata}
|
||||
};
|
||||
|
||||
const uint8_t SoundList::n = N_ELEMENTS(SoundList::list);
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
43
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h
Normal file
43
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/sounds.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
/************
|
||||
* sounds.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Theme {
|
||||
using namespace FTDI;
|
||||
|
||||
extern const PROGMEM SoundPlayer::sound_t chimes[];
|
||||
extern const PROGMEM SoundPlayer::sound_t sad_trombone[];
|
||||
extern const PROGMEM SoundPlayer::sound_t twinkle[];
|
||||
extern const PROGMEM SoundPlayer::sound_t fanfare[];
|
||||
extern const PROGMEM SoundPlayer::sound_t media_inserted[];
|
||||
extern const PROGMEM SoundPlayer::sound_t media_removed[];
|
||||
extern const PROGMEM SoundPlayer::sound_t js_bach_toccata[];
|
||||
extern const PROGMEM SoundPlayer::sound_t js_bach_joy[];
|
||||
extern const PROGMEM SoundPlayer::sound_t big_band[];
|
||||
extern const PROGMEM SoundPlayer::sound_t beats[];
|
||||
extern const PROGMEM SoundPlayer::sound_t beeping[];
|
||||
extern const PROGMEM SoundPlayer::sound_t alarm[];
|
||||
extern const PROGMEM SoundPlayer::sound_t warble[];
|
||||
extern const PROGMEM SoundPlayer::sound_t carousel[];
|
||||
extern const PROGMEM SoundPlayer::sound_t all_instruments[];
|
||||
}; // namespace Theme
|
28
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h
Normal file
28
Marlin/src/lcd/extensible_ui/lib/lulzbot/theme/theme.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/***********
|
||||
* theme.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: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bitmaps.h"
|
||||
#include "colors.h"
|
||||
#include "fonts.h"
|
||||
#include "sounds.h"
|
|
@ -46,4 +46,3 @@ void menu_game() {
|
|||
}
|
||||
|
||||
#endif // HAS_GAME_MENU
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define X_STEP_INIT SET_OUTPUT(X_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(X)
|
||||
#define X_STEP_WRITE(STATE) do { if(STATE) TOGGLE(X_STEP_PIN); } while(0)
|
||||
#define X_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define X_STEP_WRITE(STATE) WRITE(X_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -157,7 +157,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define Y_STEP_INIT SET_OUTPUT(Y_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(Y)
|
||||
#define Y_STEP_WRITE(STATE) do { if (STATE) TOGGLE(Y_STEP_PIN); } while(0)
|
||||
#define Y_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -196,7 +196,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define Z_STEP_INIT SET_OUTPUT(Z_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(Z)
|
||||
#define Z_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z_STEP_PIN); } while(0)
|
||||
#define Z_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -236,7 +236,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define X2_STEP_INIT SET_OUTPUT(X2_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(X2)
|
||||
#define X2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(X2_STEP_PIN); } while(0)
|
||||
#define X2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X2_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define X2_STEP_WRITE(STATE) WRITE(X2_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -278,7 +278,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define Y2_STEP_INIT SET_OUTPUT(Y2_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(Y2)
|
||||
#define Y2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Y2_STEP_PIN); } while(0)
|
||||
#define Y2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Y2_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define Y2_STEP_WRITE(STATE) WRITE(Y2_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -322,7 +322,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define Z2_STEP_INIT SET_OUTPUT(Z2_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(Z2)
|
||||
#define Z2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z2_STEP_PIN); } while(0)
|
||||
#define Z2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z2_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define Z2_STEP_WRITE(STATE) WRITE(Z2_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -366,7 +366,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define Z3_STEP_INIT SET_OUTPUT(Z3_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(Z3)
|
||||
#define Z3_STEP_WRITE(STATE) do { if(STATE) TOGGLE(Z3_STEP_PIN); } while(0)
|
||||
#define Z3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z3_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define Z3_STEP_WRITE(STATE) WRITE(Z3_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -409,7 +409,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E0_STEP_INIT SET_OUTPUT(E0_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E0)
|
||||
#define E0_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E0_STEP_PIN); } while(0)
|
||||
#define E0_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E0_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E0_STEP_WRITE(STATE) WRITE(E0_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -448,7 +448,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E1_STEP_INIT SET_OUTPUT(E1_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E1)
|
||||
#define E1_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E1_STEP_PIN); } while(0)
|
||||
#define E1_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E1_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E1_STEP_WRITE(STATE) WRITE(E1_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -487,7 +487,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E2_STEP_INIT SET_OUTPUT(E2_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E2)
|
||||
#define E2_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E2_STEP_PIN); } while(0)
|
||||
#define E2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E2_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E2_STEP_WRITE(STATE) WRITE(E2_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -526,7 +526,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E3_STEP_INIT SET_OUTPUT(E3_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E3)
|
||||
#define E3_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E3_STEP_PIN); } while(0)
|
||||
#define E3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E3_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E3_STEP_WRITE(STATE) WRITE(E3_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -565,7 +565,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E4_STEP_INIT SET_OUTPUT(E4_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E4)
|
||||
#define E4_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E4_STEP_PIN); } while(0)
|
||||
#define E4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E4_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E4_STEP_WRITE(STATE) WRITE(E4_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -604,7 +604,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#endif
|
||||
#define E5_STEP_INIT SET_OUTPUT(E5_STEP_PIN)
|
||||
#if AXIS_HAS_SQUARE_WAVE(E5)
|
||||
#define E5_STEP_WRITE(STATE) do { if(STATE) TOGGLE(E5_STEP_PIN); } while(0)
|
||||
#define E5_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E5_STEP_PIN); }while(0)
|
||||
#else
|
||||
#define E5_STEP_WRITE(STATE) WRITE(E5_STEP_PIN,STATE)
|
||||
#endif
|
||||
|
@ -701,7 +701,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset
|
|||
#define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); RDIR(2); } else _REV_E_DIR(E); }while(0)
|
||||
#endif
|
||||
#else
|
||||
#define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); } while(0)
|
||||
#define DUPE(T,V) do{ _DUPE(0,T,V); _DUPE(1,T,V); }while(0)
|
||||
#define NORM_E_DIR(E) do{ if (extruder_duplication_enabled) { NDIR(0); NDIR(1); } else _NORM_E_DIR(E); }while(0)
|
||||
#define REV_E_DIR(E) do{ if (extruder_duplication_enabled) { RDIR(0); RDIR(1); } else _REV_E_DIR(E); }while(0)
|
||||
#endif
|
||||
|
|
|
@ -938,7 +938,7 @@
|
|||
#define LCD_PINS_D4 -1
|
||||
#endif
|
||||
|
||||
#if HAS_CHARACTER_LCD
|
||||
#if HAS_CHARACTER_LCD || TOUCH_UI_ULTIPANEL
|
||||
#ifndef LCD_PINS_D5
|
||||
#define LCD_PINS_D5 -1
|
||||
#endif
|
||||
|
|
|
@ -149,11 +149,11 @@
|
|||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#define KILL_PIN 32
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define LCD_PINS_RS 85
|
||||
|
@ -176,5 +176,5 @@
|
|||
#define BEEPER_PIN 84 // AUX-4
|
||||
#define SD_DETECT_PIN 15
|
||||
|
||||
#endif // NEWPANEL
|
||||
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||
#endif // HAS_SPI_LCD
|
||||
|
|
|
@ -163,11 +163,11 @@
|
|||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#define KILL_PIN 32
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#if ENABLED(CR10_STOCKDISPLAY)
|
||||
#define LCD_PINS_RS 85
|
||||
|
@ -188,7 +188,8 @@
|
|||
|
||||
#define BTN_ENC 9 // AUX-2
|
||||
#define BEEPER_PIN 84 // AUX-4
|
||||
|
||||
#define SD_DETECT_PIN 15
|
||||
|
||||
#endif // NEWPANEL
|
||||
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||
#endif // HAS_SPI_LCD
|
||||
|
|
|
@ -141,13 +141,13 @@
|
|||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#if !MB(MINIRAMBO_10A)
|
||||
#define KILL_PIN 32
|
||||
#endif
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#if MB(MINIRAMBO_10A)
|
||||
|
||||
|
@ -187,6 +187,6 @@
|
|||
|
||||
#endif // !MINIRAMBO_10A
|
||||
|
||||
#endif // NEWPANEL
|
||||
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
|
|
|
@ -169,11 +169,11 @@
|
|||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#define KILL_PIN 80
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
|
||||
|
||||
#define LCD_PINS_RS 70
|
||||
#define LCD_PINS_ENABLE 71
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
//
|
||||
// LCD / Controller
|
||||
//
|
||||
#if HAS_SPI_LCD
|
||||
#if HAS_SPI_LCD || TOUCH_UI_ULTIPANEL
|
||||
#define BEEPER_PIN 23 // D24 PA15_CTS1
|
||||
#define LCD_PINS_RS 17 // D17 PA12_RXD1
|
||||
#define LCD_PINS_ENABLE 24 // D23 PA14_RTS1
|
||||
|
@ -242,10 +242,10 @@
|
|||
|
||||
#define SD_DETECT_PIN 2 // D2 PB25_TIOA0
|
||||
|
||||
#if ENABLED(NEWPANEL)
|
||||
#if ENABLED(ULTIPANEL) || TOUCH_UI_ULTIPANEL
|
||||
// Buttons on AUX-2
|
||||
#define BTN_EN1 60 // D60 PA3_TIOB1
|
||||
#define BTN_EN2 13 // D13 PB27_TIOB0
|
||||
#define BTN_ENC 16 // D16 PA13_TXD1 // the click
|
||||
#endif // NEWPANEL
|
||||
#endif // ULTIPANEL || TOUCH_UI_ULTIPANEL
|
||||
#endif // HAS_SPI_LCD
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#define LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2064,6 +2064,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2053,6 +2053,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2123,6 +2123,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1146,6 +1146,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2044,6 +2044,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2186,6 +2186,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2048,6 +2048,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2044,6 +2044,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2045,6 +2045,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2043,6 +2043,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2034,6 +2034,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1147,6 +1147,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2021,6 +2021,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1151,6 +1151,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2021,6 +2021,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2032,6 +2032,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2043,6 +2043,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2034,6 +2034,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2036,6 +2036,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2052,6 +2052,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2036,6 +2036,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2036,6 +2036,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2043,6 +2043,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2043,6 +2043,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2036,6 +2036,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2043,6 +2043,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2039,6 +2039,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2021,6 +2021,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2015,6 +2015,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2015,6 +2015,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2024,6 +2024,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2039,6 +2039,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2138,6 +2138,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2067,6 +2067,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1147,6 +1147,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2061,6 +2061,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1147,6 +1147,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2018,6 +2018,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2018,6 +2018,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2020,6 +2020,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2048,6 +2048,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2040,6 +2040,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2054,6 +2054,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2053,6 +2053,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2041,6 +2041,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1148,6 +1148,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2045,6 +2045,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2041,6 +2041,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1148,6 +1148,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2053,6 +2053,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2061,6 +2061,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2032,6 +2032,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1144,6 +1144,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2041,6 +2041,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2082,6 +2082,12 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2042,6 +2042,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2035,6 +2035,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2064,6 +2064,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2031,6 +2031,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1139,6 +1139,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1142,6 +1142,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2089,6 +2089,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2037,6 +2037,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2054,6 +2054,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2044,6 +2044,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2042,6 +2042,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2031,6 +2031,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1156,6 +1156,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2052,6 +2052,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2046,6 +2046,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2033,6 +2033,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2221,6 +2221,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2157,6 +2157,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2168,6 +2168,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2161,6 +2161,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2160,6 +2160,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2160,6 +2160,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2149,6 +2149,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2163,6 +2163,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2148,6 +2148,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2152,6 +2152,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2148,6 +2148,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2150,6 +2150,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2151,6 +2151,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -2151,6 +2151,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1145,6 +1145,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2047,6 +2047,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2036,6 +2036,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2028,6 +2028,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1143,6 +1143,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
|
@ -2038,6 +2038,12 @@
|
|||
//
|
||||
//#define MALYAN_LCD
|
||||
|
||||
//
|
||||
// LulzBot Color Touch UI for FTDI EVE (FT800/FT810) displays
|
||||
// See Configuration_adv.h for all configuration options.
|
||||
//
|
||||
//#defined LULZBOT_TOUCH_UI
|
||||
|
||||
//
|
||||
// Third-party or vendor-customized controller interfaces.
|
||||
// Sources should be installed in 'src/lcd/extensible_ui'.
|
||||
|
|
|
@ -1144,6 +1144,53 @@
|
|||
|
||||
#endif // HAS_GRAPHICAL_LCD
|
||||
|
||||
//
|
||||
// Lulzbot Touch UI
|
||||
//
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
// Display board used
|
||||
//#define LCD_FTDI_VM800B35A // FTDI 3.5" with FT800 (320x240)
|
||||
//#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272)
|
||||
//#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272)
|
||||
//#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480)
|
||||
//#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI
|
||||
|
||||
// Correct the resolution if not using the stock TFT panel.
|
||||
//#define TOUCH_UI_320x240
|
||||
//#define TOUCH_UI_480x272
|
||||
//#define TOUCH_UI_800x480
|
||||
|
||||
// Mappings for boards with a standard RepRapDiscount Display connector
|
||||
//#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping
|
||||
//#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping
|
||||
//#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping
|
||||
//#define OTHER_PIN_LAYOUT // Define pins manually below
|
||||
#if ENABLED(OTHER_PIN_LAYOUT)
|
||||
// The pins for CS and MOD_RESET (PD) must be chosen.
|
||||
#define CLCD_MOD_RESET 9
|
||||
#define CLCD_SPI_CS 10
|
||||
|
||||
// If using software SPI, specify pins for SCLK, MOSI, MISO
|
||||
//#define CLCD_USE_SOFT_SPI
|
||||
#if ENABLED(CLCD_USE_SOFT_SPI)
|
||||
#define CLCD_SOFT_SPI_MOSI 11
|
||||
#define CLCD_SOFT_SPI_MISO 12
|
||||
#define CLCD_SOFT_SPI_SCLK 13
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Display Orientation. An inverted (i.e. upside-down) display
|
||||
// is supported on the FT800. The FT810 and beyond also support
|
||||
// portrait and mirrored orientations.
|
||||
//#define TOUCH_UI_INVERTED
|
||||
//#define TOUCH_UI_PORTRAIT
|
||||
//#define TOUCH_UI_MIRRORED
|
||||
|
||||
// Use a numeric passcode for "Screen lock" keypad.
|
||||
// (recommended for smaller displays)
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
#endif
|
||||
|
||||
// @section safety
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue