Add Marlin firmware. Has initial configuration for CoreXY and 1 servo.

Update CAD file with improved clearances for Pilot G2 cartridge clearances after first print.
This commit is contained in:
bisse
2021-10-03 20:35:11 -05:00
parent 814a0bbba3
commit 9babd991e2
2349 changed files with 1512972 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Hitachi HD44780 display defines and headers
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(LCD_I2C_TYPE_PCF8575)
// NOTE: These are register-mapped pins on the PCF8575 controller, not Arduino pins.
#define LCD_I2C_PIN_BL 3
#define LCD_I2C_PIN_EN 2
#define LCD_I2C_PIN_RW 1
#define LCD_I2C_PIN_RS 0
#define LCD_I2C_PIN_D4 4
#define LCD_I2C_PIN_D5 5
#define LCD_I2C_PIN_D6 6
#define LCD_I2C_PIN_D7 7
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#define LCD_CLASS LiquidCrystal_I2C
#elif ENABLED(LCD_I2C_TYPE_MCP23017)
// For the LED indicators (which may be mapped to different events in update_indicators())
#define LCD_HAS_STATUS_INDICATORS
#define LED_A 0x04 //100
#define LED_B 0x02 //010
#define LED_C 0x01 //001
#include <Wire.h>
#include <LiquidTWI2.h>
#define LCD_CLASS LiquidTWI2
#elif ENABLED(LCD_I2C_TYPE_MCP23008)
#include <Wire.h>
#include <LiquidTWI2.h>
#define LCD_CLASS LiquidTWI2
#elif ENABLED(LCD_I2C_TYPE_PCA8574)
#include <LiquidCrystal_I2C.h>
#define LCD_CLASS LiquidCrystal_I2C
#elif ENABLED(SR_LCD_2W_NL)
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#include <LCD.h>
#include <LiquidCrystal_SR.h>
#define LCD_CLASS LiquidCrystal_SR
#elif ENABLED(SR_LCD_3W_NL)
// NewLiquidCrystal didn't work, so this uses
// https://github.com/mikeshub/SailfishLCD
#include <SailfishLCD.h>
#define LCD_CLASS LiquidCrystalSerial
#elif ENABLED(LCM1602)
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#define LCD_CLASS LiquidCrystal_I2C
#elif ENABLED(YHCB2004)
#include <LiquidCrystal_AIP31068_SPI.h>
#define LCD_CLASS LiquidCrystal_AIP31068_SPI
#else
// Standard directly connected LCD implementations
#include <LiquidCrystal.h>
#define LCD_CLASS LiquidCrystal
#endif
#include "../fontutils.h"
#include "../lcdprint.h"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,963 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../inc/MarlinConfigPre.h"
#if IS_TFTGLCD_PANEL
/**
* marlinui_TFTGLCD.cpp
*
* Implementation of the LCD display routines for a TFT GLCD displays with external controller.
* This display looks like a REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER but has good text font
* and supports color output.
*/
#if NONE(__AVR__, TARGET_LPC1768, STM32F1, STM32F4xx)
#warning "Selected platform not yet tested. Please contribute your good pin mappings."
#endif
#if ENABLED(TFTGLCD_PANEL_SPI)
#include <SPI.h>
#else
#include <Wire.h>
#endif
#include "marlinui_TFTGLCD.h"
#include "../marlinui.h"
#include "../../libs/numtostr.h"
#include "../../sd/cardreader.h"
#include "../../module/temperature.h"
#include "../../module/printcounter.h"
#include "../../module/planner.h"
#include "../../module/motion.h"
#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#include "../../feature/filwidth.h"
#include "../../gcode/parser.h"
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "../../feature/bedlevel/bedlevel.h"
#endif
TFTGLCD lcd;
#define ICON_LOGO B00000001
#define ICON_TEMP1 B00000010 //hotend 1
#define ICON_TEMP2 B00000100 //hotend 2
#define ICON_TEMP3 B00001000 //hotend 3
#define ICON_BED B00010000
#define ICON_FAN B00100000
#define ICON_HOT B01000000 //when any T > 50deg
#define PIC_MASK 0x7F
// LEDs not used, for compatibility with Smoothieware
#define LED_HOTEND_ON B00000001
#define LED_BED_ON B00000010
#define LED_FAN_ON B00000100
#define LED_HOT B00001000
#define LED_MASK 0x0F
#define FBSIZE (LCD_WIDTH * LCD_HEIGHT + 2)
#define MIDDLE_Y ((LCD_HEIGHT - 1) / 2)
// Markers for change line colors
#define COLOR_EDIT '#'
#define COLOR_ERROR '!'
#ifdef CONVERT_TO_EXT_ASCII //use standart pseudographic symbols in ASCII table
#define LR 179 //vertical line
#define TRC 191 //top right corner
#define BLC 192 //bottom left corner
#define GL 196 //horizontal line
#define BRC 217 //bottom right corner, should be replaced to 12 for some languages
#define TLC 218 //top left corner, should be replaced to 13 for some languages
#else //next symbols must be present in panel font
#define LR 8 //equal to 179
#define TRC 9 //equal to 191
#define BLC 10 //equal to 192
#define GL 11 //equal to 196
#define BRC 12 //equal to 217
#define TLC 13 //equal to 218
#endif
#define Marlin 0x01
enum Commands { // based on Smoothieware commands
GET_SPI_DATA = 0,
READ_BUTTONS, // read buttons
READ_ENCODER, // read encoder
LCD_WRITE, // write all screen to LCD
BUZZER, // beep buzzer
CONTRAST, // set contrast (brightnes)
// Other commands... 0xE0 thru 0xFF
GET_LCD_ROW = 0xE0, // for detect panel
GET_LCD_COL, // reserved for compatibility with Smoothieware, not used
LCD_PUT, // write one line to LCD
CLR_SCREEN,
INIT_SCREEN = 0xFE // clear panel buffer
};
static unsigned char framebuffer[FBSIZE];
static unsigned char *fb;
static uint8_t cour_line;
static uint8_t picBits, ledBits, hotBits;
static uint8_t PanelDetected = 0;
// Different platforms use different SPI methods
#if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_ONE(V) SPI.transfer(V);
#define SPI_SEND_TWO(V) SPI.transfer16(V);
#elif EITHER(STM32F4xx, STM32F1xx)
#define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE);
#define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE);
#elif defined(ARDUINO_ARCH_ESP32)
#define SPI_SEND_ONE(V) SPI.write(V);
#define SPI_SEND_TWO(V) SPI.write16(V);
#endif
#if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L);
#elif EITHER(STM32F4xx, STM32F1xx)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L, SPI_CONTINUE);
#elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32)
#define SPI_SEND_SOME(V,L,Z) do{ for (uint16_t i = 0; i < L; i++) SPI_SEND_ONE(V[(Z)+i]); }while(0)
#endif
// Constructor
TFTGLCD::TFTGLCD() {}
// Clear local buffer
void TFTGLCD::clear_buffer() {
memset(&framebuffer[0], ' ', FBSIZE - 2);
framebuffer[FBSIZE - 1] = framebuffer[FBSIZE - 2] = 0;
picBits = ledBits = 0;
}
// Clear panel's screen
void TFTGLCD::clr_screen() {
if (!PanelDetected) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(CLR_SCREEN);
WRITE(TFTGLCD_CS, HIGH);
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS); //set I2C device address
Wire.write(CLR_SCREEN);
Wire.endTransmission(); //transmit data
#endif
}
// Set new text cursor position
void TFTGLCD::setCursor(uint8_t col, uint8_t row) {
fb = &framebuffer[0] + col + row * LCD_WIDTH;
cour_line = row;
}
// Send char to buffer
void TFTGLCD::write(char c) {
*fb++ = c;
}
// Send text line to buffer
void TFTGLCD::print(const char *line) {
while (*line) *fb++ = *line++;
}
// For menu
void TFTGLCD::print_line() {
if (!PanelDetected) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(LCD_PUT);
SPI_SEND_ONE(cour_line);
SPI_SEND_SOME(framebuffer, LCD_WIDTH, cour_line * LCD_WIDTH);
WRITE(TFTGLCD_CS, HIGH);
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS); //set I2C device address
Wire.write(LCD_PUT);
Wire.write(cour_line);
Wire.write(&framebuffer[cour_line * LCD_WIDTH], LCD_WIDTH); //transfer 1 line to txBuffer
Wire.endTransmission(); //transmit data
safe_delay(1);
#endif
}
void TFTGLCD::print_screen() {
if (!PanelDetected) return;
framebuffer[FBSIZE - 2] = picBits & PIC_MASK;
framebuffer[FBSIZE - 1] = ledBits;
#if ENABLED(TFTGLCD_PANEL_SPI)
// Send all framebuffer to panel
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(LCD_WRITE);
SPI_SEND_SOME(framebuffer, FBSIZE, 0);
WRITE(TFTGLCD_CS, HIGH);
#else
uint8_t r;
// Send framebuffer to panel by line
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
// First line
Wire.write(LCD_WRITE);
Wire.write(&framebuffer[0], LCD_WIDTH);
Wire.endTransmission();
for (r = 1; r < (LCD_HEIGHT - 1); r++) {
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write(&framebuffer[r * LCD_WIDTH], LCD_WIDTH);
Wire.endTransmission();
}
// Last line
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write(&framebuffer[r * LCD_WIDTH], LCD_WIDTH);
Wire.write(&framebuffer[FBSIZE - 2], 2);
Wire.endTransmission();
#endif
}
void TFTGLCD::setContrast(uint16_t contrast) {
if (!PanelDetected) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(CONTRAST);
SPI_SEND_ONE((uint8_t)contrast);
WRITE(TFTGLCD_CS, HIGH);
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write(CONTRAST);
Wire.write((uint8_t)contrast);
Wire.endTransmission();
#endif
}
extern volatile int8_t encoderDiff;
// Read buttons and encoder states
uint8_t MarlinUI::read_slow_buttons(void) {
if (!PanelDetected) return 0;
#if ENABLED(TFTGLCD_PANEL_SPI)
uint8_t b = 0;
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(READ_ENCODER);
#ifndef STM32F4xx
WRITE(TFTGLCD_CS, LOW); // for delay
#endif
encoderDiff += SPI_SEND_ONE(READ_BUTTONS);
#ifndef STM32F4xx
WRITE(TFTGLCD_CS, LOW); // for delay
WRITE(TFTGLCD_CS, LOW);
#endif
b = SPI_SEND_ONE(GET_SPI_DATA);
WRITE(TFTGLCD_CS, HIGH);
return b;
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write(READ_ENCODER);
Wire.endTransmission();
#ifdef __AVR__
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1);
#elif defined(STM32F1)
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2);
#elif EITHER(STM32F4xx, TARGET_LPC1768)
Wire.requestFrom(LCD_I2C_ADDRESS, 2);
#endif
encoderDiff += Wire.read();
return Wire.read(); //buttons
#endif
}
// Duration in ms, freq in Hz
void MarlinUI::buzz(const long duration, const uint16_t freq) {
if (!PanelDetected) return;
if (!buzzer_enabled) return;
#if ENABLED(TFTGLCD_PANEL_SPI)
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(BUZZER);
SPI_SEND_TWO((uint16_t)duration);
SPI_SEND_TWO(freq);
WRITE(TFTGLCD_CS, HIGH);
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write(BUZZER);
Wire.write((uint8_t)(duration >> 8));
Wire.write((uint8_t)duration);
Wire.write((uint8_t)(freq >> 8));
Wire.write((uint8_t)freq);
Wire.endTransmission();
#endif
}
void MarlinUI::init_lcd() {
uint8_t t;
lcd.clear_buffer();
t = 0;
#if ENABLED(TFTGLCD_PANEL_SPI)
// SPI speed must be less 10MHz
SET_OUTPUT(TFTGLCD_CS);
WRITE(TFTGLCD_CS, HIGH);
spiInit(TERN(__STM32F1__, SPI_QUARTER_SPEED, SPI_FULL_SPEED));
WRITE(TFTGLCD_CS, LOW);
SPI_SEND_ONE(GET_LCD_ROW);
t = SPI_SEND_ONE(GET_SPI_DATA);
#else
#ifdef TARGET_LPC1768
Wire.begin(); //init twi/I2C
#else
Wire.begin((uint8_t)LCD_I2C_ADDRESS); //init twi/I2C
#endif
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write((uint8_t)GET_LCD_ROW); // put command to buffer
Wire.endTransmission(); // send buffer
#ifdef __AVR__
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 1, 0, 0, 1);
#elif ANY(STM32F1, STM32F4xx, TARGET_LPC1768)
Wire.requestFrom(LCD_I2C_ADDRESS, 1);
#endif
t = (uint8_t)Wire.read();
#endif
if (t == LCD_HEIGHT) {
PanelDetected = 1;
#if ENABLED(TFTGLCD_PANEL_SPI)
SPI_SEND_ONE(INIT_SCREEN);
SPI_SEND_ONE(Marlin);
WRITE(TFTGLCD_CS, HIGH);
#else
Wire.beginTransmission((uint8_t)LCD_I2C_ADDRESS);
Wire.write((uint8_t)INIT_SCREEN);
Wire.write(Marlin);
Wire.endTransmission();
#endif
}
else
PanelDetected = 0;
safe_delay(100);
}
bool MarlinUI::detected() {
return PanelDetected;
}
void MarlinUI::clear_lcd() {
if (!PanelDetected) return;
lcd.clr_screen();
lcd.clear_buffer();
}
int16_t MarlinUI::contrast; // Initialized by settings.load()
void MarlinUI::set_contrast(const int16_t value) {
contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
lcd.setContrast(contrast);
}
static void center_text_P(PGM_P pstart, uint8_t y) {
uint8_t len = utf8_strlen_P(pstart);
if (len < LCD_WIDTH)
lcd.setCursor((LCD_WIDTH - len) / 2, y);
else
lcd.setCursor(0, y);
lcd_put_u8str_P(pstart);
}
#if ENABLED(SHOW_BOOTSCREEN)
void MarlinUI::show_bootscreen() {
if (!PanelDetected) return;
//
// Show the Marlin logo, splash line1, and splash line 2
//
uint8_t indent = (LCD_WIDTH - 8) / 2;
// symbols 217 (bottom right corner) and 218 (top left corner) are using for letters in some languages
// and they should be moved to begining ASCII table as spetial symbols
lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str_P(PSTR("------")); lcd.write(TRC);
lcd.setCursor(indent, 1); lcd.write(LR); lcd_put_u8str_P(PSTR("Marlin")); lcd.write(LR);
lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str_P(PSTR("------")); lcd.write(BRC);
center_text_P(PSTR(SHORT_BUILD_VERSION), 3);
center_text_P(PSTR(MARLIN_WEBSITE_URL), 4);
picBits = ICON_LOGO;
lcd.print_screen();
}
void MarlinUI::bootscreen_completion(const millis_t sofar) {
if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar);
}
#endif // SHOW_BOOTSCREEN
void MarlinUI::draw_kill_screen() {
if (!PanelDetected) return;
lcd.clear_buffer();
lcd.setCursor(0, 3); lcd.write(COLOR_ERROR);
lcd.setCursor((LCD_WIDTH - utf8_strlen(status_message)) / 2 + 1, 3);
lcd_put_u8str(status_message);
center_text_P(GET_TEXT(MSG_HALTED), 5);
center_text_P(GET_TEXT(MSG_PLEASE_RESET), 6);
lcd.print_screen();
}
//
// Before homing, blink '123' <-> '???'.
// Homed but unknown... '123' <-> ' '.
// Homed and known, display constantly.
//
FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink) {
lcd.write('X' + uint8_t(axis));
if (blink)
lcd.print(value);
else if (axis_should_home(axis))
while (const char c = *value++) lcd.write(c <= '.' ? c : '?');
else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
lcd_put_u8str_P(axis == Z_AXIS ? PSTR(" ") : PSTR(" "));
else
lcd_put_u8str(value);
}
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) {
uint8_t pic_hot_bits;
#if HAS_HEATED_BED
const bool isBed = heater_id < 0;
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
#else
const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
#endif
#if HOTENDS < 2
if (heater_id == H_E0) {
lcd.setCursor(2, 5); lcd.print(prefix); //HE
lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1));
lcd.setCursor(1, 7);
}
else {
lcd.setCursor(6, 5); lcd.print(prefix); //BED
lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1));
lcd.setCursor(6, 7);
}
#else
if (heater_id > H_BED) {
lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); // HE1 or HE2 or HE3
lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1));
lcd.setCursor(heater_id * 4, 7);
}
else {
lcd.setCursor(13, 5); lcd.print(prefix); //BED
lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1));
lcd.setCursor(13, 7);
}
#endif // HOTENDS <= 1
#if !HEATER_IDLE_HANDLER
UNUSED(blink);
#else
if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) {
lcd.write(' ');
if (t2 >= 10) lcd.write(' ');
if (t2 >= 100) lcd.write(' ');
}
else
#endif // !HEATER_IDLE_HANDLER
lcd.print(i16tostr3rj(t2));
switch (heater_id) {
case H_BED: pic_hot_bits = ICON_BED; break;
case H_E0: pic_hot_bits = ICON_TEMP1; break;
case H_E1: pic_hot_bits = ICON_TEMP2; break;
case H_E2: pic_hot_bits = ICON_TEMP3;
default: break;
}
if (t2) picBits |= pic_hot_bits;
else picBits &= ~pic_hot_bits;
if (t1 > 50) hotBits |= pic_hot_bits;
else hotBits &= ~pic_hot_bits;
if (hotBits) picBits |= ICON_HOT;
else picBits &= ~ICON_HOT;
}
#if HAS_PRINT_PROGRESS
FORCE_INLINE void _draw_print_progress() {
if (!PanelDetected) return;
const uint8_t progress = ui._get_progress();
#if ENABLED(SDSUPPORT)
lcd_put_u8str_P(PSTR("SD"));
#elif ENABLED(LCD_SET_PROGRESS_MANUALLY)
lcd_put_u8str_P(PSTR("P:"));
#endif
if (progress)
lcd.print(ui8tostr3rj(progress));
else
lcd_put_u8str_P(PSTR("---"));
lcd.write('%');
}
#endif // HAS_PRINT_PROGRESS
#if ENABLED(LCD_PROGRESS_BAR)
void MarlinUI::draw_progress_bar(const uint8_t percent) {
if (!PanelDetected) return;
if (fb == &framebuffer[0] + LCD_WIDTH * 2) { // For status screen
lcd.write('%'); lcd.write(percent);
}
else { // For progress bar test
lcd.setCursor(LCD_WIDTH / 2 - 2, MIDDLE_Y);
lcd.print(i16tostr3rj(percent)); lcd.write('%');
lcd.print_line();
lcd.setCursor(0, MIDDLE_Y + 1);
lcd.write('%'); lcd.write(percent);
lcd.print_line();
}
}
#endif
void MarlinUI::draw_status_message(const bool blink) {
if (!PanelDetected) return;
lcd.setCursor(0, 3);
#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
// Alternate Status message and Filament display
if (ELAPSED(millis(), next_filament_display)) {
lcd_put_u8str_P(PSTR("Dia "));
lcd.print(ftostr12ns(filament_width_meas));
lcd_put_u8str_P(PSTR(" V"));
lcd.print(i16tostr3rj(100.0 * (
parser.volumetric_enabled
? planner.volumetric_area_nominal / planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
: planner.volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]
)
));
lcd.write('%');
return;
}
#endif // FILAMENT_LCD_DISPLAY && SDSUPPORT
// Get the UTF8 character count of the string
uint8_t slen = utf8_strlen(status_message);
#if ENABLED(STATUS_MESSAGE_SCROLLING)
static bool last_blink = false;
// If the string fits into the LCD, just print it and do not scroll it
if (slen <= LCD_WIDTH) {
// The string isn't scrolling and may not fill the screen
lcd_put_u8str(status_message);
// Fill the rest with spaces
while (slen < LCD_WIDTH) { lcd.write(' '); ++slen; }
}
else {
// String is larger than the available space in screen.
// Get a pointer to the next valid UTF8 character
// and the string remaining length
uint8_t rlen;
const char *stat = status_and_len(rlen);
lcd_put_u8str_max(stat, LCD_WIDTH); // The string leaves space
// If the remaining string doesn't completely fill the screen
if (rlen < LCD_WIDTH) {
uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters
lcd.write(' '); // Always at 1+ spaces left, draw a space
if (--chars) { // Draw a second space if there's room
lcd.write(' ');
if (--chars) { // Draw a third space if there's room
lcd.write(' ');
if (--chars)
lcd_put_u8str_max(status_message, chars); // Print a second copy of the message
}
}
}
if (last_blink != blink) {
last_blink = blink;
advance_status_scroll();
}
}
#else
UNUSED(blink);
// Just print the string to the LCD
lcd_put_u8str_max(status_message, LCD_WIDTH);
// Fill the rest with spaces if there are missing spaces
while (slen < LCD_WIDTH) {
lcd.write(' ');
++slen;
}
#endif
}
/**
Possible status screens:
Equal to 20x10 text LCD
|X 000 Y 000 Z 000.00|
|FR100% SD100% C--:--|
| Progress bar line |
|Status message |
| |
| HE BED FAN |
| ttc ttc % | ttc - current temperature
| tts tts %%% | tts - setted temperature, %%% - percent for FAN
| ICO ICO ICO ICO | ICO - icon 48x48, placed in 2 text lines
| ICO ICO ICO ICO | ICO
or
|X 000 Y 000 Z 000.00|
|FR100% SD100% C--:--|
| Progress bar line |
|Status message |
| |
|HE1 HE2 HE3 BED ICO|
|ttc ttc ttc ttc ICO|
|tts tts tts tts %%%|
|ICO ICO ICO ICO ICO|
|ICO ICO ICO ICO ICO|
or
Equal to 24x10 text LCD
|X 000 Y 000 Z 000.00 |
|FR100% SD100% C--:--|
| Progress bar line |
|Status message |
| |
|HE1 HE2 HE3 BED FAN |
|ttc ttc ttc ttc % |
|tts tts tts tts %%% |
|ICO ICO ICO ICO ICO ICO|
|ICO ICO ICO ICO ICO ICO|
*/
void MarlinUI::draw_status_screen() {
if (!PanelDetected) return;
const bool blink = get_blink();
lcd.clear_buffer();
//
// Line 1 - XYZ coordinates
//
lcd.setCursor(0, 0);
_draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position.x)), blink); lcd.write(' ');
_draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position.y)), blink); lcd.write(' ');
_draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink);
#if HAS_LEVELING && !HAS_HEATED_BED
lcd.write(planner.leveling_active || blink ? '_' : ' ');
#endif
//
// Line 2 - feedrate, , time
//
lcd.setCursor(0, 1);
lcd_put_u8str_P(PSTR("FR")); lcd.print(i16tostr3rj(feedrate_percentage)); lcd.write('%');
#if BOTH(SDSUPPORT, HAS_PRINT_PROGRESS)
lcd.setCursor(LCD_WIDTH / 2 - 3, 1);
_draw_print_progress();
#endif
char buffer[10];
duration_t elapsed = print_job_timer.duration();
uint8_t len = elapsed.toDigital(buffer);
lcd.setCursor((LCD_WIDTH - 1) - len, 1);
lcd.write(LCD_STR_CLOCK[0]); lcd.print(buffer);
//
// Line 3 - progressbar
//
lcd.setCursor(0, 2);
#if ENABLED(LCD_PROGRESS_BAR)
draw_progress_bar(_get_progress());
#else
lcd.write('%'); lcd.write(0);
#endif
//
// Line 4 - Status Message (which may be a Filament display)
//
draw_status_message(blink);
//
// Line 5
//
#if HOTENDS <= 1 || (HOTENDS <= 2 && !HAS_HEATED_BED)
#if DUAL_MIXING_EXTRUDER
lcd.setCursor(0, 4);
// Two-component mix / gradient instead of XY
char mixer_messages[12];
const char *mix_label;
#if ENABLED(GRADIENT_MIX)
if (mixer.gradient.enabled) {
mixer.update_mix_from_gradient();
mix_label = "Gr";
}
else
#endif
{
mixer.update_mix_from_vtool();
mix_label = "Mx";
}
sprintf_P(mixer_messages, PSTR("%s %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1]));
lcd_put_u8str(mixer_messages);
#endif
#endif
//
// Line 6..8 Temperatures, FAN
//
#if HOTENDS < 2
_draw_heater_status(H_E0, "HE", blink); // Hotend Temperature
#else
_draw_heater_status(H_E0, "HE1", blink); // Hotend 1 Temperature
_draw_heater_status(H_E1, "HE2", blink); // Hotend 2 Temperature
#if HOTENDS > 2
_draw_heater_status(H_E2, "HE3", blink); // Hotend 3 Temperature
#endif
#endif
#if HAS_HEATED_BED
#if HAS_LEVELING
_draw_heater_status(H_BED, (planner.leveling_active && blink ? "___" : "BED"), blink);
#else
_draw_heater_status(H_BED, "BED", blink);
#endif
#endif
#if HAS_FAN
uint16_t spd = thermalManager.fan_speed[0];
#if ENABLED(ADAPTIVE_FAN_SLOWING)
if (!blink) spd = thermalManager.scaledFanSpeed(0, spd);
#endif
uint16_t per = thermalManager.pwmToPercent(spd);
#if HOTENDS < 2
#define FANX 11
#else
#define FANX 17
#endif
lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN"));
lcd.setCursor(FANX + 1, 6); lcd.write('%');
lcd.setCursor(FANX, 7);
lcd.print(i16tostr3rj(per));
if (TERN0(HAS_FAN0, thermalManager.fan_speed[0]) || TERN0(HAS_FAN1, thermalManager.fan_speed[1]) || TERN0(HAS_FAN2, thermalManager.fan_speed[2]))
picBits |= ICON_FAN;
else
picBits &= ~ICON_FAN;
#endif // HAS_FAN
//
// Line 9, 10 - icons
//
lcd.print_screen();
}
#if HAS_LCD_MENU
#include "../menu/menu.h"
#if ENABLED(ADVANCED_PAUSE_FEATURE)
void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) {
if (!PanelDetected) return;
lcd.setCursor((LCD_WIDTH - 14) / 2, row + 1);
lcd.write(LCD_STR_THERMOMETER[0]); lcd_put_u8str_P(PSTR(" E")); lcd.write('1' + extruder); lcd.write(' ');
lcd.print(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/');
lcd.print(i16tostr3rj(thermalManager.degTargetHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]);
lcd.print_line();
}
#endif
// Draw a static item with no left-right margin required. Centered by default.
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
if (!PanelDetected) return;
uint8_t n = LCD_WIDTH;
lcd.setCursor(0, row);
if ((style & SS_CENTER) && !valstr) {
int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
while (--pad >= 0) { lcd.write(' '); n--; }
}
n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n);
if (valstr) n -= lcd_put_u8str_max(valstr, n);
for (; n; --n) lcd.write(' ');
lcd.print_line();
}
// Draw a generic menu item with pre_char (if selected) and post_char
void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char pre_char, const char post_char) {
if (!PanelDetected) return;
lcd.setCursor(0, row);
lcd.write(sel ? pre_char : ' ');
uint8_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2);
for (; n; --n) lcd.write(' ');
lcd.write(post_char);
lcd.print_line();
}
// Draw a menu item with a (potentially) editable value
void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const data, const bool pgm) {
if (!PanelDetected) return;
const uint8_t vlen = data ? (pgm ? utf8_strlen_P(data) : utf8_strlen(data)) : 0;
lcd.setCursor(0, row);
lcd.write(sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
uint8_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vlen);
if (vlen) {
lcd.write(':');
for (; n; --n) lcd.write(' ');
if (pgm) lcd_put_u8str_P(data); else lcd_put_u8str(data);
}
lcd.print_line();
}
// Low-level draw_edit_screen can be used to draw an edit screen from anyplace
// This line moves to the last line of the screen for UBL plot screen on the panel side
void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
if (!PanelDetected) return;
ui.encoder_direction_normal();
const uint8_t y = TERN0(AUTO_BED_LEVELING_UBL, ui.external_control) ? LCD_HEIGHT - 1 : MIDDLE_Y;
lcd.setCursor(0, y);
lcd.write(COLOR_EDIT);
lcd_put_u8str_P(pstr);
if (value) {
lcd.write(':');
lcd.setCursor((LCD_WIDTH - 1) - (utf8_strlen(value) + 1), y); // Right-justified, padded by spaces
lcd.write(' '); // Overwrite char if value gets shorter
lcd.print(value);
lcd.write(' ');
lcd.print_line();
}
}
// The Select Screen presents a prompt and two "buttons"
void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string, PGM_P const suff) {
if (!PanelDetected) return;
ui.draw_select_screen_prompt(pref, string, suff);
lcd.setCursor(0, MIDDLE_Y);
lcd.write(COLOR_EDIT);
lcd.write(yesno ? ' ' : '['); lcd_put_u8str_P(no); lcd.write(yesno ? ' ' : ']');
lcd.setCursor(LCD_WIDTH - utf8_strlen_P(yes) - 3, MIDDLE_Y);
lcd.write(yesno ? '[' : ' '); lcd_put_u8str_P(yes); lcd.write(yesno ? ']' : ' ');
lcd.print_line();
}
#if ENABLED(SDSUPPORT)
void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) {
if (!PanelDetected) return;
lcd.setCursor(0, row);
lcd.write(sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
constexpr uint8_t maxlen = LCD_WIDTH - 2;
uint8_t n = maxlen - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), maxlen);
for (; n; --n) lcd.write(' ');
lcd.write(isDir ? LCD_STR_FOLDER[0] : ' ');
lcd.print_line();
}
#endif // SDSUPPORT
#if ENABLED(LCD_HAS_STATUS_INDICATORS)
void MarlinUI::update_indicators() {}
#endif // LCD_HAS_STATUS_INDICATORS
#if ENABLED(AUTO_BED_LEVELING_UBL)
/**
* Map screen:
* |/---------\ (00,00) |
* || . . . . | X:000.00|
* || . . . . | Y:000.00|
* || . . . . | Z:00.000|
* || . . . . | |
* || . . . . | |
* || . . . . | |
* |+---------/ |
* | |
* |____________________|
*/
void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) {
if (!PanelDetected) return;
#define _LCD_W_POS 12
lcd.clear_buffer();
//print only top left corner. All frame with grid points will be printed by panel
lcd.setCursor(0, 0);
*fb++ = TLC; //top left corner - marker for plot parameters
*fb = (GRID_MAX_POINTS_X << 4) + GRID_MAX_POINTS_Y; //set mesh size
// Print plot position
lcd.setCursor(_LCD_W_POS, 0);
*fb++ = '('; lcd.print(i16tostr3left(x_plot));
*fb++ = ','; lcd.print(i16tostr3left(y_plot)); *fb = ')';
// Show all values
lcd.setCursor(_LCD_W_POS, 1); lcd_put_u8str_P(PSTR("X:"));
lcd.print(ftostr52(LOGICAL_X_POSITION(pgm_read_float(&ubl._mesh_index_to_xpos[x_plot]))));
lcd.setCursor(_LCD_W_POS, 2); lcd_put_u8str_P(PSTR("Y:"));
lcd.print(ftostr52(LOGICAL_Y_POSITION(pgm_read_float(&ubl._mesh_index_to_ypos[y_plot]))));
// Show the location value
lcd.setCursor(_LCD_W_POS, 3); lcd_put_u8str_P(PSTR("Z:"));
if (!isnan(ubl.z_values[x_plot][y_plot]))
lcd.print(ftostr43sign(ubl.z_values[x_plot][y_plot]));
else
lcd_put_u8str_P(PSTR(" -----"));
center_text_P(GET_TEXT(MSG_UBL_FINE_TUNE_MESH), 8);
lcd.print_screen();
}
#endif // AUTO_BED_LEVELING_UBL
#endif // HAS_LCD_MENU
#endif // IS_TFTGLCD_PANEL

View File

@@ -0,0 +1,72 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Implementation of the LCD display routines for a TFT GLCD displays with external controller.
*/
#include "../../inc/MarlinConfig.h"
#if IS_TFTGLCD_PANEL
#include "../../libs/duration_t.h"
////////////////////////////////////
// Set up button and encode mappings for each panel (into 'buttons' variable)
//
// This is just to map common functions (across different panels) onto the same
// macro name. The mapping is independent of whether the button is directly connected or
// via a shift/i2c register.
////////////////////////////////////
// Create LCD class instance and chipset-specific information
class TFTGLCD {
private:
public:
TFTGLCD();
void clear_buffer();
void clr_screen();
void setCursor(uint8_t col, uint8_t row);
void write(char c);
void print(const char *line);
void print_line();
void print_screen();
void redraw_screen();
void setContrast(uint16_t contrast);
};
extern TFTGLCD lcd;
#include "../fontutils.h"
#include "../lcdprint.h"
// Use panel encoder - free old encoder pins
#undef BTN_EN1
#undef BTN_EN2
#undef BTN_ENC
#ifndef EN_C
#define EN_C 4 // for click
#endif
#endif // IS_TFTGLCD_PANEL

View File

@@ -0,0 +1,224 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../inc/MarlinConfig.h"
#if ((!HAS_ADC_BUTTONS && IS_NEWPANEL) || BUTTONS_EXIST(EN1, EN2)) && !IS_TFTGLCD_PANEL
#define HAS_ENCODER_WHEEL 1
#endif
#if HAS_ENCODER_WHEEL || ANY_BUTTON(ENC, BACK, UP, DWN, LFT, RT)
#define HAS_DIGITAL_BUTTONS 1
#endif
#if !HAS_ADC_BUTTONS && (IS_RRW_KEYPAD || (HAS_WIRED_LCD && !IS_NEWPANEL))
#define HAS_SHIFT_ENCODER 1
#endif
// I2C buttons must be read in the main thread
#if ANY(LCD_I2C_VIKI, LCD_I2C_PANELOLU2, IS_TFTGLCD_PANEL)
#define HAS_SLOW_BUTTONS 1
#endif
#if HAS_ENCODER_WHEEL
#define ENCODER_PHASE_0 0
#define ENCODER_PHASE_1 2
#define ENCODER_PHASE_2 3
#define ENCODER_PHASE_3 1
#endif
#if IS_RRW_KEYPAD
#define BTN_OFFSET 0 // Bit offset into buttons for shift register values
#define BLEN_KEYPAD_F3 0
#define BLEN_KEYPAD_F2 1
#define BLEN_KEYPAD_F1 2
#define BLEN_KEYPAD_DOWN 3
#define BLEN_KEYPAD_RIGHT 4
#define BLEN_KEYPAD_MIDDLE 5
#define BLEN_KEYPAD_UP 6
#define BLEN_KEYPAD_LEFT 7
#define EN_KEYPAD_F1 _BV(BTN_OFFSET + BLEN_KEYPAD_F1)
#define EN_KEYPAD_F2 _BV(BTN_OFFSET + BLEN_KEYPAD_F2)
#define EN_KEYPAD_F3 _BV(BTN_OFFSET + BLEN_KEYPAD_F3)
#define EN_KEYPAD_DOWN _BV(BTN_OFFSET + BLEN_KEYPAD_DOWN)
#define EN_KEYPAD_RIGHT _BV(BTN_OFFSET + BLEN_KEYPAD_RIGHT)
#define EN_KEYPAD_MIDDLE _BV(BTN_OFFSET + BLEN_KEYPAD_MIDDLE)
#define EN_KEYPAD_UP _BV(BTN_OFFSET + BLEN_KEYPAD_UP)
#define EN_KEYPAD_LEFT _BV(BTN_OFFSET + BLEN_KEYPAD_LEFT)
#define RRK(B) (keypad_buttons & (B))
#ifdef EN_C
#define BUTTON_CLICK() ((buttons & EN_C) || RRK(EN_KEYPAD_MIDDLE))
#else
#define BUTTON_CLICK() RRK(EN_KEYPAD_MIDDLE)
#endif
#endif
#if EITHER(HAS_DIGITAL_BUTTONS, DWIN_CREALITY_LCD)
// Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes)
#define BLEN_A 0
#define BLEN_B 1
#define EN_A _BV(BLEN_A)
#define EN_B _BV(BLEN_B)
#define _BUTTON_PRESSED(BN) !READ(BTN_##BN)
#if BUTTON_EXISTS(ENC) || HAS_TOUCH_BUTTONS
#define BLEN_C 2
#define EN_C _BV(BLEN_C)
#endif
#if ENABLED(LCD_I2C_VIKI)
#include <LiquidTWI2.h>
#define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
// button and encoder bit positions within 'buttons'
#define B_LE (BUTTON_LEFT << B_I2C_BTN_OFFSET) // The remaining normalized buttons are all read via I2C
#define B_UP (BUTTON_UP << B_I2C_BTN_OFFSET)
#define B_MI (BUTTON_SELECT << B_I2C_BTN_OFFSET)
#define B_DW (BUTTON_DOWN << B_I2C_BTN_OFFSET)
#define B_RI (BUTTON_RIGHT << B_I2C_BTN_OFFSET)
#if BUTTON_EXISTS(ENC) // The pause/stop/restart button is connected to BTN_ENC when used
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
#define BUTTON_CLICK() (buttons & (B_MI|B_RI|B_ST)) // Pause/stop also acts as click until a proper pause/stop is implemented.
#else
#define BUTTON_CLICK() (buttons & (B_MI|B_RI))
#endif
// I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update
#elif ENABLED(LCD_I2C_PANELOLU2)
#if !BUTTON_EXISTS(ENC) // Use I2C if not directly connected to a pin
#define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C)
#define B_MI (PANELOLU2_ENCODER_C << B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later
#define BUTTON_CLICK() (buttons & B_MI)
#endif
#endif
#else
#undef BUTTON_EXISTS
#define BUTTON_EXISTS(...) false
// Dummy button, never pressed
#define _BUTTON_PRESSED(BN) false
// Shift register bits correspond to buttons:
#define BL_LE 7 // Left
#define BL_UP 6 // Up
#define BL_MI 5 // Middle
#define BL_DW 4 // Down
#define BL_RI 3 // Right
#define BL_ST 2 // Red Button
#define B_LE _BV(BL_LE)
#define B_UP _BV(BL_UP)
#define B_MI _BV(BL_MI)
#define B_DW _BV(BL_DW)
#define B_RI _BV(BL_RI)
#define B_ST _BV(BL_ST)
#ifndef BUTTON_CLICK
#define BUTTON_CLICK() (buttons & (B_MI|B_ST))
#endif
#endif
#ifndef EN_A
#define EN_A 0
#endif
#ifndef EN_B
#define EN_B 0
#endif
#ifndef EN_C
#define EN_C 0
#endif
#if BUTTON_EXISTS(BACK) || EITHER(HAS_TOUCH_BUTTONS, IS_TFTGLCD_PANEL)
#define BLEN_D 3
#define EN_D _BV(BLEN_D)
#else
#define EN_D 0
#endif
#define BUTTON_PRESSED(BN) (_BUTTON_PRESSED_##BN)
#if BUTTON_EXISTS(EN1)
#define _BUTTON_PRESSED_EN1 _BUTTON_PRESSED(EN1)
#else
#define _BUTTON_PRESSED_EN1 false
#endif
#if BUTTON_EXISTS(EN2)
#define _BUTTON_PRESSED_EN2 _BUTTON_PRESSED(EN2)
#else
#define _BUTTON_PRESSED_EN2 false
#endif
#if BUTTON_EXISTS(ENC_EN)
#define _BUTTON_PRESSED_ENC_EN _BUTTON_PRESSED(ENC_EN)
#else
#define _BUTTON_PRESSED_ENC_EN false
#endif
#if BUTTON_EXISTS(ENC)
#define _BUTTON_PRESSED_ENC _BUTTON_PRESSED(ENC)
#else
#define _BUTTON_PRESSED_ENC false
#endif
#if BUTTON_EXISTS(UP)
#define _BUTTON_PRESSED_UP _BUTTON_PRESSED(UP)
#else
#define _BUTTON_PRESSED_UP false
#endif
#if BUTTON_EXISTS(DWN)
#define _BUTTON_PRESSED_DWN _BUTTON_PRESSED(DWN)
#else
#define _BUTTON_PRESSED_DWN false
#endif
#if BUTTON_EXISTS(LFT)
#define _BUTTON_PRESSED_LFT _BUTTON_PRESSED(LFT)
#else
#define _BUTTON_PRESSED_LFT false
#endif
#if BUTTON_EXISTS(RT)
#define _BUTTON_PRESSED_RT _BUTTON_PRESSED(RT)
#else
#define _BUTTON_PRESSED_RT false
#endif
#if BUTTON_EXISTS(BACK)
#define _BUTTON_PRESSED_BACK _BUTTON_PRESSED(BACK)
#else
#define _BUTTON_PRESSED_BACK false
#endif
#ifndef BUTTON_CLICK
#if EN_C > 0
#define BUTTON_CLICK() (buttons & EN_C)
#else
#define BUTTON_CLICK() false
#endif
#endif
#if EN_D > 0
#define LCD_BACK_CLICKED() (buttons & EN_D)
#else
#define LCD_BACK_CLICKED() false
#endif

View File

@@ -0,0 +1,136 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../../inc/MarlinConfig.h"
// use this file to create the public interface for device drivers that are NOT in the U8G library
extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi;
extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi;
class U8GLIB_64128N_2X_HAL : public U8GLIB {
public:
U8GLIB_64128N_2X_HAL() : U8GLIB() { }
U8GLIB_64128N_2X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); }
U8GLIB_64128N_2X_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(cs, a0, reset); }
void init(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);
}
void init(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);
}
};
extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_sw_spi;
extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi;
class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB {
public:
U8GLIB_ST7920_128X64_4X_HAL() : U8GLIB() { }
U8GLIB_ST7920_128X64_4X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, reset); }
U8GLIB_ST7920_128X64_4X_HAL(pin_t cs, pin_t reset = U8G_PIN_NONE) { init(cs, reset); }
void init(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE
}
void init(pin_t cs, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE
}
};
//
// AVR version uses ultralcd_st7920_u8glib_rrd_AVR.cpp
// HAL version uses u8g_dev_st7920_128x64_HAL.cpp
//
extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
public:
U8GLIB_ST7920_128X64_RRD() : U8GLIB() { }
U8GLIB_ST7920_128X64_RRD(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, reset); }
void init(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_st7920_128x64_rrd_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE
}
};
extern u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire;
class U8GLIB_SH1106_128X64_2X_I2C_2_WIRE : public U8GLIB {
public:
U8GLIB_SH1106_128X64_2X_I2C_2_WIRE() : U8GLIB() { }
U8GLIB_SH1106_128X64_2X_I2C_2_WIRE(uint8_t options) { init(options); }
void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_sh1106_128x64_2x_i2c_2_wire, options); }
};
extern u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire;
class U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE : public U8GLIB {
public:
U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE() : U8GLIB() { }
U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE(uint8_t options) { init(options); }
void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_ssd1306_128x64_2x_i2c_2_wire, options); }
};
//
// Very basic support for 320x240 TFT screen
// Tested on MKS Robin TFT_V2.0 with ST7789V controller
//
extern u8g_dev_t u8g_dev_tft_320x240_upscale_from_128x64;
class U8GLIB_TFT_320X240_UPSCALE_FROM_128X64 : public U8GLIB {
public:
U8GLIB_TFT_320X240_UPSCALE_FROM_128X64() : U8GLIB() { }
U8GLIB_TFT_320X240_UPSCALE_FROM_128X64(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) { init(cs, rs, reset); }
void init(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset); }
};
extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini12864_HAL_2x_hw_spi;
class U8GLIB_MINI12864_2X_HAL : public U8GLIB {
public:
U8GLIB_MINI12864_2X_HAL() : U8GLIB() { }
U8GLIB_MINI12864_2X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); }
U8GLIB_MINI12864_2X_HAL(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { init(cs, a0, reset); }
void init(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, sck, mosi, cs, a0, reset);
}
void init(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_hw_spi, cs, a0, reset);
}
};
extern u8g_dev_t u8g_dev_ssd1309_sw_spi;
extern u8g_dev_t u8g_dev_ssd1309_hw_spi;
class U8GLIB_SSD1309_128X64_HAL : public U8GLIB {
public:
U8GLIB_SSD1309_128X64_HAL() : U8GLIB() { }
U8GLIB_SSD1309_128X64_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); }
U8GLIB_SSD1309_128X64_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(cs, a0, reset); }
void init(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_ssd1309_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);
}
void init(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) {
U8GLIB::init(&u8g_dev_ssd1309_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset);
}
};

View File

@@ -0,0 +1,122 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// Use this file to select the com driver for device drivers that are NOT in the U8G library
#include <U8glib.h>
#ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini
#ifdef __SAM3X8E__
uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn
#define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn
#elif defined(__SAMD51__)
#define U8G_COM_HAL_HW_SPI_FN u8g_com_samd51_hw_spi_fn
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd51_st7920_hw_spi_fn
#elif defined(__STM32F1__)
uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn
#elif defined(ARDUINO_ARCH_STM32)
uint8_t u8g_com_std_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_std_sw_spi_fn
#define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
#elif defined(__AVR__)
uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn
#endif
#ifndef U8G_COM_HAL_SW_SPI_FN
#define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn
#endif
#ifndef U8G_COM_HAL_HW_SPI_FN
#define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
#endif
#ifndef U8G_COM_ST7920_HAL_SW_SPI
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
#endif
#ifndef U8G_COM_ST7920_HAL_HW_SPI
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
#endif
// This can't be invoked from the current platformio.ini
#ifdef TARGET_LPC1768
uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#endif
#define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn
#elif defined(TARGET_LPC1768)
uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn
#define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_LPC1768_hw_spi_fn
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn
#define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn
#endif
#ifndef U8G_COM_HAL_SW_SPI_FN
#define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn
#endif
#ifndef U8G_COM_HAL_HW_SPI_FN
#define U8G_COM_HAL_HW_SPI_FN u8g_com_null_fn
#endif
#ifndef U8G_COM_ST7920_HAL_SW_SPI
#define U8G_COM_ST7920_HAL_SW_SPI u8g_com_null_fn
#endif
#ifndef U8G_COM_ST7920_HAL_HW_SPI
#define U8G_COM_ST7920_HAL_HW_SPI u8g_com_null_fn
#endif
#ifndef U8G_COM_SSD_I2C_HAL
#define U8G_COM_SSD_I2C_HAL u8g_com_null_fn
#endif
#if HAS_FSMC_GRAPHICAL_TFT || HAS_SPI_GRAPHICAL_TFT
uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
#define U8G_COM_HAL_TFT_FN u8g_com_hal_tft_fn
#else
#define U8G_COM_HAL_TFT_FN u8g_com_null_fn
#endif

View File

@@ -0,0 +1,540 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Standard Marlin Boot Screen bitmaps
*
* Use the Marlin Bitmap Converter to make your own:
* https://marlinfw.org/tools/u8glib/converter.html
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
typedef struct {
const unsigned char *bitmap;
const unsigned short duration;
} boot_frame_t;
#include "../../../_Bootscreen.h"
#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED) && DISABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME) && !defined(CUSTOM_BOOTSCREEN_FRAME_TIME)
#define CUSTOM_BOOTSCREEN_FRAME_TIME 500 // (ms)
#endif
#ifndef CUSTOM_BOOTSCREEN_BMPWIDTH
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
#endif
#ifndef CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH
#define CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH CEILING(CUSTOM_BOOTSCREEN_BMPWIDTH, 8)
#endif
#ifndef CUSTOM_BOOTSCREEN_BMPHEIGHT
#define CUSTOM_BOOTSCREEN_BMPHEIGHT (sizeof(custom_start_bmp) / (CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH))
#endif
#ifndef CUSTOM_BOOTSCREEN_Y
#if ENABLED(CUSTOM_BOOTSCREEN_BOTTOM_JUSTIFY)
#define CUSTOM_BOOTSCREEN_Y (LCD_PIXEL_HEIGHT - (CUSTOM_BOOTSCREEN_BMPHEIGHT))
#else
#define CUSTOM_BOOTSCREEN_Y ((LCD_PIXEL_HEIGHT - (CUSTOM_BOOTSCREEN_BMPHEIGHT)) / 2)
#endif
#endif
#endif
#if ENABLED(BOOT_MARLIN_LOGO_SMALL)
#define START_BMPWIDTH 56
const unsigned char start_bmp[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B11100111,
B10001100,B00110000,B11001111,B11000111,B11001100,B00110001,B11110011,
B10001100,B00110000,B11011100,B11101100,B11101100,B00110011,B10111001,
B10001100,B00110000,B11011000,B01101100,B01101100,B00110011,B00011001,
B10001100,B00110000,B11010000,B01101100,B00001100,B00110011,B00011001,
B10001100,B00110000,B11011000,B01101100,B00001100,B00110011,B00011001,
B10001100,B00110000,B11011100,B01101100,B00001110,B00111011,B00011001,
B10001100,B00110000,B11001111,B01111100,B00000111,B10011111,B00011001,
B10001100,B00110000,B11000111,B01111100,B00000011,B10001111,B00011001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
#if ENABLED(BOOT_MARLIN_LOGO_ANIMATED)
const unsigned char start_bmp1[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
const unsigned char start_bmp2[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000111,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000011,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000000,B00000000,B00000000,B00000000,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
const unsigned char start_bmp3[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
B10001100,B00110000,B11000111,B10000000,B00000000,B00000000,B00000111,
B10001100,B00110000,B11001111,B11000000,B00000000,B00000000,B00000011,
B10001100,B00110000,B11011100,B11100000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11010000,B01100000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11011000,B01100000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11011100,B01100000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11001111,B01110000,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000111,B01110000,B00000000,B00000000,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
const unsigned char start_bmp4[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00000000,B00000000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00000000,B00000000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00000000,B00000000,B00001111,
B10001100,B00110000,B11000111,B10000011,B10000000,B00000000,B00000111,
B10001100,B00110000,B11001111,B11000111,B11000000,B00000000,B00000011,
B10001100,B00110000,B11011100,B11101100,B11100000,B00000000,B00000001,
B10001100,B00110000,B11011000,B01101100,B01100000,B00000000,B00000001,
B10001100,B00110000,B11010000,B01101100,B00000000,B00000000,B00000001,
B10001100,B00110000,B11011000,B01101100,B00000000,B00000000,B00000001,
B10001100,B00110000,B11011100,B01101100,B00000000,B00000000,B00000001,
B10001100,B00110000,B11001111,B01111100,B00000000,B00000000,B00000001,
B10001100,B00110000,B11000111,B01111100,B00000000,B00000000,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
const unsigned char start_bmp5[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00001100,B00000000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00001100,B00000000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
B10001100,B00110000,B11000111,B10000011,B10001100,B00000000,B00000111,
B10001100,B00110000,B11001111,B11000111,B11001100,B00000000,B00000011,
B10001100,B00110000,B11011100,B11101100,B11101100,B00000000,B00000001,
B10001100,B00110000,B11011000,B01101100,B01101100,B00000000,B00000001,
B10001100,B00110000,B11010000,B01101100,B00001100,B00000000,B00000001,
B10001100,B00110000,B11011000,B01101100,B00001100,B00000000,B00000001,
B10001100,B00110000,B11011100,B01101100,B00001110,B00000000,B00000001,
B10001100,B00110000,B11001111,B01111100,B00000111,B10000000,B00000001,
B10001100,B00110000,B11000111,B01111100,B00000011,B10000000,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
const unsigned char start_bmp6[] PROGMEM = {
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B10000011,B11001111,B00000000,B00000000,B00001100,B00110000,B00111111,
B10000111,B11111111,B10000000,B00000000,B00001100,B00110000,B00011111,
B10000110,B01111001,B10000000,B00000000,B00001100,B00000000,B00001111,
B10001100,B00110000,B11000111,B10000011,B10001100,B00110000,B00000111,
B10001100,B00110000,B11001111,B11000111,B11001100,B00110000,B00000011,
B10001100,B00110000,B11011100,B11101100,B11101100,B00110000,B00000001,
B10001100,B00110000,B11011000,B01101100,B01101100,B00110000,B00000001,
B10001100,B00110000,B11010000,B01101100,B00001100,B00110000,B00000001,
B10001100,B00110000,B11011000,B01101100,B00001100,B00110000,B00000001,
B10001100,B00110000,B11011100,B01101100,B00001110,B00111000,B00000001,
B10001100,B00110000,B11001111,B01111100,B00000111,B10011100,B00000001,
B10001100,B00110000,B11000111,B01111100,B00000011,B10001100,B00000001,
B01000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B00011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000
};
#endif
#else
#define START_BMPWIDTH 112
const unsigned char start_bmp[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000011,B11110000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000111,B11111100,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00001111,B11111110,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00011111,B11111110,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00111111,B00111111,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00111110,B00011111,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B11111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B11111100,B00001111,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B11111100,B00001111,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
#if ENABLED(BOOT_MARLIN_LOGO_ANIMATED)
const unsigned char start_bmp1[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
const unsigned char start_bmp2[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
const unsigned char start_bmp3[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
const unsigned char start_bmp4[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B00000000,B00000000,B00000000,B00000000,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B00000000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
const unsigned char start_bmp5[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00000000,B00000000,B00000000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00000000,B00000000,B00000000,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00000000,B00000000,B00000000,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00000000,B00000000,B00000000,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00000000,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B00000000,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B00000000,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
const unsigned char start_bmp6[] PROGMEM = {
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B11111111,B11111111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111111,B11111111,
B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00111111,B11111111,
B11000000,B00001111,B11000000,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00011000,B00000000,B00011111,B11111111,
B11000000,B00111111,B11100001,B11111111,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00001111,B11111111,
B11000000,B01111111,B11110011,B11111111,B10000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000111,B11111111,
B11000000,B11111111,B11111111,B11111111,B11000000,B00000000,B00000000,B00000000,B00000000,B01111000,B00111100,B00000000,B00000011,B11111111,
B11000001,B11111000,B01111111,B10000111,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000001,B11111111,
B11000001,B11110000,B00111111,B00000011,B11100000,B00000000,B00000000,B00000000,B00000000,B01111000,B00000000,B00000000,B00000000,B11111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B00011111,B00000000,B00000011,B11100000,B01111000,B00111100,B00000000,B00000000,B01111111,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B11000000,B00001111,B11111000,B01111000,B00111100,B00000000,B00000000,B00111111,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B11100000,B00011111,B11111100,B01111000,B00111100,B00000000,B00000000,B00011111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B11110000,B00111111,B11111110,B01111000,B00111100,B00000000,B00000000,B00001111,
B11000001,B11100000,B00011110,B00000001,B11100011,B11110011,B11111000,B00111111,B00111110,B01111000,B00111100,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11100000,B11111100,B01111100,B00011111,B01111000,B00111100,B00000000,B00000000,B00000111,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B01111100,B01111100,B00001111,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B01111100,B01111000,B00001111,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B10000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100111,B11000000,B00111100,B01111000,B00000000,B01111000,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11100000,B00111100,B01111000,B00000000,B01111100,B00111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100011,B11111111,B00111111,B11111000,B00000000,B01111111,B10111100,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100001,B11111111,B00111111,B11111000,B00000000,B00111111,B10111111,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B11111111,B00111111,B11111000,B00000000,B00011111,B10111111,B00000000,B00000000,B00000011,
B11000001,B11100000,B00011110,B00000001,B11100000,B01111111,B00111111,B11111000,B00000000,B00001111,B10111111,B00000000,B00000000,B00000011,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,
B01100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,
B01110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001110,
B00111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011100,
B00011110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111000,
B00001111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11110000,
B00000001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B10000000
};
#endif
#endif
#if ENABLED(BOOT_MARLIN_LOGO_ANIMATED)
#ifndef MARLIN_BOOTSCREEN_FRAME_TIME
#define MARLIN_BOOTSCREEN_FRAME_TIME 100 // (ms)
#endif
const unsigned char * const marlin_bootscreen_animation[] PROGMEM = {
start_bmp1, start_bmp2, start_bmp3, start_bmp4, start_bmp5, start_bmp6, start_bmp
};
#endif
#ifndef START_BMP_BYTEWIDTH
#define START_BMP_BYTEWIDTH CEILING(START_BMPWIDTH, 8)
#endif
#ifndef START_BMPHEIGHT
#define START_BMPHEIGHT (sizeof(start_bmp) / (START_BMP_BYTEWIDTH))
#endif
static_assert(sizeof(start_bmp) == (START_BMP_BYTEWIDTH) * (START_BMPHEIGHT), "Bootscreen (start_bmp) dimensions don't match data.");

View File

@@ -0,0 +1,764 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Standard Marlin Status Screen bitmaps
*
* Use the Marlin Bitmap Converter to make your own:
* https://marlinfw.org/tools/u8glib/converter.html
*/
#include "../../inc/MarlinConfig.h"
#include "marlinui_DOGM.h"
#define BW(N) ((N + 7) / 8)
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE) && DISABLED(STATUS_COMBINE_HEATERS)
#undef STATUS_HEATERS_X
#undef STATUS_BED_X
/**
* Custom _Statusscreen.h files can define:
* - A custom logo image
* - A custom heater bitmap
* - A custom fan bitmap / animation
*
* See the included examples for guidance
*/
#include "../../../_Statusscreen.h"
#ifdef STATUS_SCREENWIDTH
#error "Your custom _Statusscreen.h needs to be converted for Marlin 2.0."
#endif
#endif
//
// Default Status Screen Heater or Hotends bitmaps
//
#if !STATUS_HEATERS_WIDTH && !STATUS_HOTEND1_WIDTH
#if ENABLED(STATUS_COMBINE_HEATERS)
#include "status/combined.h"
#else
#if HAS_HOTEND
#include "status/hotend.h"
#else
#define STATUS_HEATERS_HEIGHT 20
#endif
#endif
#endif
//
// Laser / Spindle
//
#if !STATUS_CUTTER_WIDTH && HAS_CUTTER
#include "status/cutter.h"
#endif
#ifndef STATUS_CUTTER_WIDTH
#define STATUS_CUTTER_WIDTH 0
#endif
#ifndef STATUS_CUTTER_BYTEWIDTH
#define STATUS_CUTTER_BYTEWIDTH BW(STATUS_CUTTER_WIDTH)
#endif
//
// Laser cooler
//
#if !STATUS_COOLER_WIDTH && HAS_COOLER
#include "status/cooler.h"
#endif
#ifndef STATUS_COOLER_WIDTH
#define STATUS_COOLER_WIDTH 0
#endif
#ifndef STATUS_COOLER_BYTEWIDTH
#define STATUS_COOLER_BYTEWIDTH BW(STATUS_COOLER_WIDTH)
#endif
//
// Laser Flowmeter
//
#if !STATUS_FLOWMETER_WIDTH && ENABLED(LASER_COOLANT_FLOW_METER)
#include "status/cooler.h"
#endif
#ifndef STATUS_FLOWMETER_WIDTH
#define STATUS_FLOWMETER_WIDTH 0
#endif
#ifndef STATUS_FLOWMETER_BYTEWIDTH
#define STATUS_FLOWMETER_BYTEWIDTH BW(STATUS_FLOWMETER_WIDTH)
#endif
//
// Laser Ammeter
//
#if ENABLED(I2C_AMMETER)
#if !STATUS_AMMETER_WIDTH
#include "status/ammeter.h"
#endif
#ifndef STATUS_AMMETER_WIDTH
#define STATUS_AMMETER_WIDTH 0
#endif
#endif
//
// Bed
//
#if !STATUS_BED_WIDTH && HAS_HEATED_BED && DISABLED(STATUS_COMBINE_HEATERS)
#include "status/bed.h"
#endif
#ifndef STATUS_BED_WIDTH
#define STATUS_BED_WIDTH 0
#endif
//
// Chamber
//
#if !STATUS_CHAMBER_WIDTH && HAS_TEMP_CHAMBER && ((HOTENDS <= 4 && !HAS_HEATED_BED) || (HOTENDS <= 3 && HAS_HEATED_BED))
#include "status/chamber.h"
#endif
#ifndef STATUS_CHAMBER_WIDTH
#define STATUS_CHAMBER_WIDTH 0
#endif
// Can also be overridden in Configuration_adv.h
// If you can afford it, try the 3-frame fan animation!
// Don't compile in the fan animation with no fan
#if !HAS_FAN0 || (HOTENDS == 5 || (HOTENDS == 4 && BED_OR_CHAMBER) || BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_CHAMBER))
#undef STATUS_FAN_FRAMES
#elif !STATUS_FAN_FRAMES
#define STATUS_FAN_FRAMES 2
#elif STATUS_FAN_FRAMES > 4
#error "A maximum of 4 fan animation frames is currently supported."
#endif
#if HOTENDS > 4
#undef STATUS_LOGO_WIDTH
#undef STATUS_HEATERS_XSPACE
#define STATUS_HEATERS_XSPACE 24
#endif
//
// Provide default Fan Bitmaps
//
#if !STATUS_FAN_WIDTH && STATUS_FAN_FRAMES > 0
#include "status/fan.h"
#else
#undef STATUS_FAN_FRAMES
#define STATUS_FAN_WIDTH 0
#endif
#define _EXTRA_WIDTH (STATUS_FAN_WIDTH + STATUS_CHAMBER_WIDTH + STATUS_BED_WIDTH)
//
// Heater Bitmap X Space Requirements
//
#if !defined(STATUS_HEATERS_XSPACE) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
#if (HOTENDS == 3 || HOTENDS == 4) && ENABLED(STATUS_COMBINE_HEATERS)
// If more heaters or they're combined, 3 bytes
#define STATUS_HEATERS_XSPACE 24
#elif STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH) - 26 * (HOTENDS)) // 128 - (20 + 24 + 26) == 58
// If the logo won't fit at 26 width
#define STATUS_HEATERS_XSPACE 24
#else
#define STATUS_HEATERS_XSPACE 26
#endif
#endif
#if ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
//
// Disable the logo bitmap if insufficient space
//
#if STATUS_HEATERS_XSPACE
#define _HEATERS_WIDTH (HOTENDS * (STATUS_HEATERS_XSPACE)) // as many hotends as possible
#elif STATUS_HEATERS_WIDTH
#define _HEATERS_WIDTH STATUS_HEATERS_WIDTH
#elif HOTENDS
#error "Status screen heaters region was not specified."
#endif
#if STATUS_LOGO_WIDTH > (LCD_PIXEL_WIDTH - (_EXTRA_WIDTH + _HEATERS_WIDTH))
#warning "Unable to fit custom Status Screen logo. Disabling."
#undef STATUS_LOGO_WIDTH
#endif
#if !defined(STATUS_HEATERS_X) && ((HAS_HOTEND && STATUS_LOGO_WIDTH && BED_OR_CHAMBER_OR_FAN) || (HOTENDS >= 3 && !BED_OR_CHAMBER_OR_FAN))
#define _STATUS_HEATERS_X(H,S,N) ((LCD_PIXEL_WIDTH - (H * (S + N)) - (_EXTRA_WIDTH) + (STATUS_LOGO_WIDTH)) / 2)
#if STATUS_HOTEND1_WIDTH
#if HOTENDS > 2
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 6)
#else
#define STATUS_HEATERS_X _STATUS_HEATERS_X(HOTENDS, STATUS_HOTEND1_WIDTH, 4)
#endif
#else
#define STATUS_HEATERS_X _STATUS_HEATERS_X(1, STATUS_HEATERS_WIDTH, 4)
#endif
#endif
#endif
//
// Custom Logo Bitmap Properties
//
#ifndef STATUS_LOGO_WIDTH
#define STATUS_LOGO_WIDTH 0
#endif
#ifndef STATUS_LOGO_BYTEWIDTH
#define STATUS_LOGO_BYTEWIDTH BW(STATUS_LOGO_WIDTH)
#endif
#if STATUS_LOGO_WIDTH
#ifndef STATUS_LOGO_X
#ifdef STATUS_HEATERS_X
#define STATUS_LOGO_X ((STATUS_HEATERS_X - (STATUS_LOGO_WIDTH) - 1) / 2)
#else
#define STATUS_LOGO_X 0
#endif
#endif
#ifndef STATUS_LOGO_HEIGHT
#define STATUS_LOGO_HEIGHT (sizeof(status_logo_bmp) / (STATUS_LOGO_BYTEWIDTH))
#endif
#ifndef STATUS_LOGO_Y
#define STATUS_LOGO_Y _MAX(0U, (28U - _MIN(28U, STATUS_LOGO_HEIGHT)) / 2U)
#endif
static_assert(
sizeof(status_logo_bmp) == (STATUS_LOGO_BYTEWIDTH) * (STATUS_LOGO_HEIGHT),
"Status logo bitmap (status_logo_bmp) dimensions don't match data."
);
#endif
//
// Hotend Heater Bitmap starting X position
//
#if !defined(STATUS_HEATERS_X) && (STATUS_HOTEND1_WIDTH || STATUS_HEATERS_WIDTH)
#if STATUS_LOGO_BYTEWIDTH
#define STATUS_HEATERS_X (STATUS_LOGO_BYTEWIDTH * 8)
#elif ((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH) && (STATUS_BED_WIDTH && STATUS_HOTEND_BITMAPS == 3)) || \
((STATUS_CHAMBER_WIDTH || STATUS_FAN_WIDTH || STATUS_BED_WIDTH) && STATUS_HOTEND_BITMAPS == 4)
#define STATUS_HEATERS_X 5
#else
#if BOTH(STATUS_COMBINE_HEATERS, HAS_HEATED_BED) && HOTENDS <= 4
#define STATUS_HEATERS_X 5
#else
#define STATUS_HEATERS_X 8 // Like the included bitmaps
#endif
#endif
#endif
#if STATUS_HOTEND1_WIDTH
//
// Hotend images. A base hotend image and optional "ON" state image.
//
#ifndef STATUS_HOTEND_BITMAPS
#define STATUS_HOTEND_BITMAPS 1
#endif
#ifndef STATUS_HOTEND2_WIDTH
#define STATUS_HOTEND2_WIDTH STATUS_HOTEND1_WIDTH
#endif
#ifndef STATUS_HOTEND3_WIDTH
#define STATUS_HOTEND3_WIDTH STATUS_HOTEND2_WIDTH
#endif
#ifndef STATUS_HOTEND4_WIDTH
#define STATUS_HOTEND4_WIDTH STATUS_HOTEND3_WIDTH
#endif
#ifndef STATUS_HOTEND5_WIDTH
#define STATUS_HOTEND5_WIDTH STATUS_HOTEND4_WIDTH
#endif
#ifndef STATUS_HOTEND6_WIDTH
#define STATUS_HOTEND6_WIDTH STATUS_HOTEND5_WIDTH
#endif
#ifndef STATUS_HOTEND7_WIDTH
#define STATUS_HOTEND7_WIDTH STATUS_HOTEND6_WIDTH
#endif
#ifndef STATUS_HOTEND8_WIDTH
#define STATUS_HOTEND8_WIDTH STATUS_HOTEND7_WIDTH
#endif
#define _SHNAME(N,T) STATUS_HOTEND##N##_##T,
constexpr uint8_t status_hotend_width[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, WIDTH) };
#define STATUS_HOTEND_WIDTH(N) status_hotend_width[N]
#ifndef STATUS_HOTEND1_BYTEWIDTH
#define STATUS_HOTEND1_BYTEWIDTH BW(STATUS_HOTEND1_WIDTH)
#endif
#ifndef STATUS_HOTEND2_BYTEWIDTH
#define STATUS_HOTEND2_BYTEWIDTH BW(STATUS_HOTEND2_WIDTH)
#endif
#ifndef STATUS_HOTEND3_BYTEWIDTH
#define STATUS_HOTEND3_BYTEWIDTH BW(STATUS_HOTEND3_WIDTH)
#endif
#ifndef STATUS_HOTEND4_BYTEWIDTH
#define STATUS_HOTEND4_BYTEWIDTH BW(STATUS_HOTEND4_WIDTH)
#endif
#ifndef STATUS_HOTEND5_BYTEWIDTH
#define STATUS_HOTEND5_BYTEWIDTH BW(STATUS_HOTEND5_WIDTH)
#endif
#ifndef STATUS_HOTEND6_BYTEWIDTH
#define STATUS_HOTEND6_BYTEWIDTH BW(STATUS_HOTEND6_WIDTH)
#endif
#ifndef STATUS_HOTEND7_BYTEWIDTH
#define STATUS_HOTEND7_BYTEWIDTH BW(STATUS_HOTEND7_WIDTH)
#endif
#ifndef STATUS_HOTEND8_BYTEWIDTH
#define STATUS_HOTEND8_BYTEWIDTH BW(STATUS_HOTEND8_WIDTH)
#endif
constexpr uint8_t status_hotend_bytewidth[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, BYTEWIDTH) };
#define STATUS_HOTEND_BYTEWIDTH(N) status_hotend_bytewidth[N]
#ifndef STATUS_HOTEND1_X
#define STATUS_HOTEND1_X STATUS_HEATERS_X
#endif
#ifndef STATUS_HOTEND2_X
#define STATUS_HOTEND2_X STATUS_HOTEND1_X + STATUS_HEATERS_XSPACE
#endif
#if HOTENDS > 2
#ifndef STATUS_HOTEND3_X
#define STATUS_HOTEND3_X STATUS_HOTEND2_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND4_X
#define STATUS_HOTEND4_X STATUS_HOTEND3_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND5_X
#define STATUS_HOTEND5_X STATUS_HOTEND4_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND6_X
#define STATUS_HOTEND6_X STATUS_HOTEND5_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND7_X
#define STATUS_HOTEND7_X STATUS_HOTEND6_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND8_X
#define STATUS_HOTEND8_X STATUS_HOTEND7_X + STATUS_HEATERS_XSPACE
#endif
constexpr uint8_t status_hotend_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, X) };
#define STATUS_HOTEND_X(N) status_hotend_x[N]
#elif HAS_MULTI_HOTEND
#define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X)
#else
#define STATUS_HOTEND_X(N) STATUS_HOTEND1_X
#endif
#ifndef STATUS_HOTEND_TEXT_X
#ifdef STATUS_HOTEND1_TEXT_X
#ifndef STATUS_HOTEND2_TEXT_X
#define STATUS_HOTEND2_TEXT_X STATUS_HOTEND1_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND3_TEXT_X
#define STATUS_HOTEND3_TEXT_X STATUS_HOTEND2_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND4_TEXT_X
#define STATUS_HOTEND4_TEXT_X STATUS_HOTEND3_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND5_TEXT_X
#define STATUS_HOTEND5_TEXT_X STATUS_HOTEND4_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND6_TEXT_X
#define STATUS_HOTEND6_TEXT_X STATUS_HOTEND5_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND7_TEXT_X
#define STATUS_HOTEND7_TEXT_X STATUS_HOTEND6_TEXT_X + STATUS_HEATERS_XSPACE
#endif
#ifndef STATUS_HOTEND8_TEXT_X
#define STATUS_HOTEND8_TEXT_X STATUS_HOTEND7_TEXT_X + STATUS_HEATERS_XSPACE
#endif
constexpr uint8_t status_hotend_text_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, TEXT_X) };
#define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N]
#else
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HOTEND1_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#endif
#undef _SHNAME
#if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS)
#define TEST_BITMAP_OFF status_hotend1_a_bmp
#define TEST_BITMAP_ON status_hotend1_b_bmp
#else
#define TEST_BITMAP_OFF status_hotend_a_bmp
#define TEST_BITMAP_ON status_hotend_b_bmp
#endif
#ifndef STATUS_HEATERS_HEIGHT
#define STATUS_HEATERS_HEIGHT (sizeof(TEST_BITMAP_OFF) / (STATUS_HOTEND1_BYTEWIDTH))
#endif
#ifndef STATUS_HEATERS_Y
#define STATUS_HEATERS_Y (20 - (STATUS_HEATERS_HEIGHT))
#endif
#define HOTEND0_BITMAP_SIZE (STATUS_HOTEND1_BYTEWIDTH) * (STATUS_HEATERS_HEIGHT)
static_assert(
sizeof(TEST_BITMAP_OFF) == HOTEND0_BITMAP_SIZE,
"Status hotend bitmap (" STRINGIFY(TEST_BITMAP_OFF) ") dimensions don't match data."
);
#ifdef STATUS_HOTEND_ANIM
static_assert(
sizeof(TEST_BITMAP_ON) == HOTEND0_BITMAP_SIZE,
"Status hotend bitmaps (" STRINGIFY(TEST_BITMAP_OFF) " and " STRINGIFY(TEST_BITMAP_ON) ") dimensions don't match."
);
#endif
#elif STATUS_HEATERS_WIDTH
#ifndef STATUS_HEATERS_XSPACE
#define STATUS_HEATERS_XSPACE 24
#endif
#ifndef STATUS_HOTEND_WIDTH
#define STATUS_HOTEND_WIDTH(N) 10
#endif
#ifndef STATUS_HOTEND_X
#define STATUS_HOTEND_X(N) (STATUS_HEATERS_X + 2 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#ifndef STATUS_HOTEND_TEXT_X
#if HOTENDS == 4 && STATUS_LOGO_WIDTH
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#else
#define STATUS_HOTEND_TEXT_X(N) (STATUS_HEATERS_X + 6 + (N) * (STATUS_HEATERS_XSPACE))
#endif
#endif
#ifndef STATUS_HEATERS_BYTEWIDTH
#define STATUS_HEATERS_BYTEWIDTH BW(STATUS_HEATERS_WIDTH)
#endif
#ifndef STATUS_HEATERS_HEIGHT
#define STATUS_HEATERS_HEIGHT (sizeof(status_heaters_bmp) / (STATUS_HEATERS_BYTEWIDTH))
#endif
#ifndef STATUS_HEATERS_Y
#define STATUS_HEATERS_Y (20 - (STATUS_HEATERS_HEIGHT))
#endif
static_assert(
sizeof(status_heaters_bmp) == (STATUS_HEATERS_BYTEWIDTH) * (STATUS_HEATERS_HEIGHT),
"Status heaters bitmap (status_heaters_bmp) dimensions don't match data."
);
#else // HOTENDS == 0
#define STATUS_HOTEND_TEXT_X(N) 0
#define STATUS_HEATERS_Y 0
#endif
//
// Cutter Bitmap Properties
//
#if HAS_CUTTER
#if STATUS_CUTTER_WIDTH
#ifndef STATUS_CUTTER_X
#define STATUS_CUTTER_X (LCD_PIXEL_WIDTH - (STATUS_CUTTER_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_CUTTER_HEIGHT
#ifdef STATUS_CUTTER_ANIM
#define STATUS_CUTTER_HEIGHT(S) ((S) ? sizeof(status_cutter_on_bmp) / (STATUS_CUTTER_BYTEWIDTH) : sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH))
#else
#define STATUS_CUTTER_HEIGHT(S) (sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH))
#endif
#endif
#ifndef STATUS_CUTTER_Y
#define STATUS_CUTTER_Y(S) 4
#endif
#ifndef STATUS_CUTTER_TEXT_X
#define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X -1)
#endif
#ifndef STATUS_CUTTER_TEXT_Y
#define STATUS_CUTTER_TEXT_Y 28
#endif
static_assert(
sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(0)),
"Status cutter bitmap (status_cutter_bmp) dimensions don't match data."
);
#ifdef STATUS_CUTTER_ANIM
static_assert(
sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(1)),
"Status cutter bitmap (status_cutter_on_bmp) dimensions don't match data."
);
#endif
#endif
#endif
//
// Chamber Bitmap Properties
//
#ifndef STATUS_CHAMBER_BYTEWIDTH
#define STATUS_CHAMBER_BYTEWIDTH BW(STATUS_CHAMBER_WIDTH)
#endif
#if STATUS_CHAMBER_WIDTH
#ifndef STATUS_CHAMBER_X
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_CHAMBER_HEIGHT
#ifdef STATUS_CHAMBER_ANIM
#define STATUS_CHAMBER_HEIGHT(S) ((S) ? sizeof(status_chamber_on_bmp) / (STATUS_CHAMBER_BYTEWIDTH) : sizeof(status_chamber_bmp) / (STATUS_CHAMBER_BYTEWIDTH))
#else
#define STATUS_CHAMBER_HEIGHT(S) (sizeof(status_chamber_bmp) / (STATUS_CHAMBER_BYTEWIDTH))
#endif
#endif
#ifndef STATUS_CHAMBER_Y
#define STATUS_CHAMBER_Y(S) (20 - STATUS_CHAMBER_HEIGHT(S))
#endif
#ifndef STATUS_CHAMBER_TEXT_X
#define STATUS_CHAMBER_TEXT_X (STATUS_CHAMBER_X + 11)
#endif
static_assert(
sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(0)),
"Status chamber bitmap (status_chamber_bmp) dimensions don't match data."
);
#ifdef STATUS_CHAMBER_ANIM
static_assert(
sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(1)),
"Status chamber bitmap (status_chamber_on_bmp) dimensions don't match data."
);
#endif
#endif
//
// Cooler Bitmap Properties
//
#if HAS_COOLER
#if STATUS_COOLER_WIDTH
#ifndef STATUS_COOLER_X
#define STATUS_COOLER_X (LCD_PIXEL_WIDTH - (STATUS_COOLER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_COOLER_HEIGHT
#define STATUS_COOLER_HEIGHT(S) (sizeof(status_cooler_bmp1) / (STATUS_COOLER_BYTEWIDTH))
#endif
#ifndef STATUS_COOLER_Y
#define STATUS_COOLER_Y(S) (18 - STATUS_COOLER_HEIGHT(S))
#endif
#ifndef STATUS_COOLER_TEXT_X
#define STATUS_COOLER_TEXT_X (STATUS_COOLER_X + 12)
#endif
static_assert(
sizeof(status_cooler_bmp1) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(0)),
"Status cooler bitmap (status_cooler_bmp1) dimensions don't match data."
);
#ifdef STATUS_COOLER_ANIM
static_assert(
sizeof(status_cooler_bmp2) == (STATUS_COOLER_BYTEWIDTH) * (STATUS_COOLER_HEIGHT(1)),
"Status cooler bitmap (status_cooler_bmp2) dimensions don't match data."
);
#endif
#endif
#endif
//
// Flowmeter Bitmap Properties
//
#if ENABLED(LASER_COOLANT_FLOW_METER)
#if STATUS_FLOWMETER_WIDTH
#ifndef STATUS_FLOWMETER_X
#define STATUS_FLOWMETER_X (LCD_PIXEL_WIDTH - (STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_FLOWMETER_HEIGHT
#define STATUS_FLOWMETER_HEIGHT(S) (sizeof(status_flowmeter_bmp1) / (STATUS_FLOWMETER_BYTEWIDTH))
#endif
#ifndef STATUS_FLOWMETER_Y
#define STATUS_FLOWMETER_Y(S) (20 - STATUS_FLOWMETER_HEIGHT(S))
#endif
#ifndef STATUS_FLOWMETER_TEXT_X
#define STATUS_FLOWMETER_TEXT_X (STATUS_FLOWMETER_X + 12)
#endif
static_assert(
sizeof(status_flowmeter_bmp1) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(0),
"Status flowmeter bitmap (status_flowmeter_bmp1) dimensions don't match data."
);
#ifdef STATUS_COOLER_ANIM
static_assert(
sizeof(status_flowmeter_bmp2) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(1),
"Status flowmeter bitmap (status_flowmeter_bmp2) dimensions don't match data."
);
#endif
#endif
#endif
//
// I2C Laser Ammeter
//
#if ENABLED(I2C_AMMETER) && STATUS_AMMETER_WIDTH
#ifndef STATUS_AMMETER_BYTEWIDTH
#define STATUS_AMMETER_BYTEWIDTH BW(STATUS_AMMETER_WIDTH)
#endif
#ifndef STATUS_AMMETER_X
#define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_AMMETER_HEIGHT
#define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp1) / (STATUS_AMMETER_BYTEWIDTH))
#endif
#ifndef STATUS_AMMETER_Y
#define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S))
#endif
#ifndef STATUS_AMMETER_TEXT_X
#define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7)
#endif
static_assert(
sizeof(status_ammeter_bmp1) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0),
"Status ammeter bitmap (status_ammeter_bmp1) dimensions don't match data."
);
#endif
//
// Bed Bitmap Properties
//
#ifndef STATUS_BED_BYTEWIDTH
#define STATUS_BED_BYTEWIDTH BW(STATUS_BED_WIDTH)
#endif
#if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH
#ifndef STATUS_BED_X
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_BED_HEIGHT
#ifdef STATUS_BED_ANIM
#define STATUS_BED_HEIGHT(S) ((S) ? sizeof(status_bed_on_bmp) / (STATUS_BED_BYTEWIDTH) : sizeof(status_bed_bmp) / (STATUS_BED_BYTEWIDTH))
#else
#define STATUS_BED_HEIGHT(S) (sizeof(status_bed_bmp) / (STATUS_BED_BYTEWIDTH))
#endif
#endif
#ifndef STATUS_BED_Y
#define STATUS_BED_Y(S) (20 - STATUS_BED_HEIGHT(S))
#endif
#ifndef STATUS_BED_TEXT_X
#define STATUS_BED_TEXT_X (STATUS_BED_X + 9)
#endif
static_assert(
sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(0)),
"Status bed bitmap (status_bed_bmp) dimensions don't match data."
);
#ifdef STATUS_BED_ANIM
static_assert(
sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(1)),
"Status bed bitmap (status_bed_on_bmp) dimensions don't match data."
);
#endif
#endif
//
// Fan Bitmap Properties
//
#ifndef STATUS_FAN_BYTEWIDTH
#define STATUS_FAN_BYTEWIDTH BW(STATUS_FAN_WIDTH)
#endif
#if STATUS_FAN_FRAMES
#ifndef STATUS_FAN_X
#define STATUS_FAN_X (LCD_PIXEL_WIDTH - (STATUS_FAN_BYTEWIDTH) * 8)
#endif
#ifndef STATUS_FAN_Y
#define STATUS_FAN_Y 1
#endif
#ifndef STATUS_FAN_TEXT_X
#define STATUS_FAN_TEXT_X (STATUS_FAN_X - 1)
#endif
#ifndef STATUS_FAN_TEXT_Y
#define STATUS_FAN_TEXT_Y 28
#endif
#ifndef STATUS_FAN_HEIGHT
#define STATUS_FAN_HEIGHT (sizeof(status_fan0_bmp) / (STATUS_FAN_BYTEWIDTH))
#endif
#define FAN_BMP_SIZE (STATUS_FAN_BYTEWIDTH) * (STATUS_FAN_HEIGHT)
static_assert(sizeof(status_fan0_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan0_bmp) dimensions don't match data.");
#if STATUS_FAN_FRAMES > 1
static_assert(sizeof(status_fan1_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan1_bmp) dimensions don't match data.");
#if STATUS_FAN_FRAMES > 2
static_assert(sizeof(status_fan2_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan2_bmp) dimensions don't match data.");
#if STATUS_FAN_FRAMES > 3
static_assert(sizeof(status_fan3_bmp) == FAN_BMP_SIZE, "Status fan bitmap (status_fan3_bmp) dimensions don't match data.");
#endif
#endif
#endif
#endif
#if STATUS_LOGO_WIDTH && ENABLED(CUSTOM_STATUS_SCREEN_IMAGE)
#define DO_DRAW_LOGO 1
#endif
#if HOTENDS > 0
#define DO_DRAW_HOTENDS 1
#endif
#if HAS_HEATED_BED && HOTENDS <= 4
#define DO_DRAW_BED 1
#endif
#if HAS_CUTTER && !DO_DRAW_BED
#define DO_DRAW_CUTTER 1
#endif
#if HAS_COOLER
#define DO_DRAW_COOLER 1
#endif
#if ENABLED(LASER_COOLANT_FLOW_METER)
#define DO_DRAW_FLOWMETER 1
#endif
#if ENABLED(I2C_AMMETER)
#define DO_DRAW_AMMETER 1
#endif
#if HAS_TEMP_CHAMBER && STATUS_CHAMBER_WIDTH && HOTENDS <= 4
#define DO_DRAW_CHAMBER 1
#endif
#if HAS_FAN0 && STATUS_FAN_WIDTH && HOTENDS <= 4 && defined(STATUS_FAN_FRAMES)
#define DO_DRAW_FAN 1
#endif
#if BOTH(HAS_HOTEND, STATUS_HOTEND_ANIM)
#define ANIM_HOTEND 1
#endif
#if BOTH(DO_DRAW_BED, STATUS_BED_ANIM)
#define ANIM_BED 1
#endif
#if BOTH(DO_DRAW_CHAMBER, STATUS_CHAMBER_ANIM)
#define ANIM_CHAMBER 1
#endif
#if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM)
#define ANIM_CUTTER 1
#endif
#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM)
#define ANIM_COOLER 1
#endif
#if BOTH(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM)
#define ANIM_FLOWMETER 1
#endif
#if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER
#define ANIM_HBCC 1
#endif

View File

@@ -0,0 +1,189 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
Fontname: -Misc-Fixed-Medium-R-Normal--9-90-75-75-C-60-ISO10646-1
Copyright: Public domain font. Share and enjoy.
Capital A Height: 6, '1' Height: 6
Calculated Max Values w= 6 h= 9 x= 5 y= 5 dx= 6 dy= 0 ascent= 7 len= 9
Font Bounding box w= 6 h= 9 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 6 descent=-2
X Font ascent = 6 descent=-2
Max Font ascent = 7 descent=-2
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t u8g_font_6x9[2434] U8G_FONT_SECTION(".progmem.u8g_font_6x9") = {
0x00,0x06,0x09,0x00,0xFE,0x06,0x02,0x0F,0x03,0x84,0x01,0xFF,0xFE,0x07,0xFE,0x06,
0xFE,0x05,0x07,0x07,0x00,0x00,0x00,0x40,0xF0,0xC8,0x88,0x98,0x78,0x10,0x05,0x07,
0x07,0x00,0x00,0x00,0xC0,0xF8,0x88,0x88,0x88,0x88,0xF8,0x05,0x05,0x05,0x00,0x00,
0x01,0x20,0x30,0xF8,0x30,0x20,0x05,0x07,0x07,0x00,0x00,0x00,0x20,0x70,0xF8,0x20,
0x20,0x20,0xE0,0x05,0x07,0x07,0x00,0x00,0x00,0x20,0x70,0xA8,0xB8,0x88,0x70,0x20,
0x06,0x05,0x05,0x00,0x00,0x00,0xB0,0xD8,0x6C,0xD8,0xB0,0x05,0x08,0x08,0x00,0x00,
0xFF,0xF8,0xA8,0x88,0x88,0x88,0x88,0xA8,0xF8,0x05,0x09,0x09,0x00,0x00,0xFE,0x20,
0x50,0x50,0x50,0x50,0x88,0xA8,0x88,0x70,0x03,0x03,0x03,0x00,0x00,0x03,0x40,0xA0,
0x40,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x06,0x05,0xFF,0x01,0x06,0x06,
0x06,0x02,0x00,0x80,0x80,0x80,0x80,0x00,0x80,0x03,0x03,0x03,0x06,0x01,0x03,0xA0,
0xA0,0xA0,0x05,0x07,0x07,0x06,0x00,0xFF,0x50,0x50,0xF8,0x50,0xF8,0x50,0x50,0x05,
0x09,0x09,0x06,0x00,0xFE,0x20,0x70,0xA8,0xA0,0x70,0x28,0xA8,0x70,0x20,0x06,0x08,
0x08,0x06,0x00,0xFF,0x40,0xA8,0x48,0x10,0x20,0x48,0x54,0x08,0x05,0x07,0x07,0x06,
0x00,0xFF,0x60,0x90,0x90,0x60,0x98,0x90,0x68,0x01,0x03,0x03,0x06,0x02,0x03,0x80,
0x80,0x80,0x02,0x07,0x07,0x06,0x02,0xFF,0x40,0x80,0x80,0x80,0x80,0x80,0x40,0x02,
0x07,0x07,0x06,0x02,0xFF,0x80,0x40,0x40,0x40,0x40,0x40,0x80,0x05,0x05,0x05,0x06,
0x00,0x00,0x88,0x50,0xF8,0x50,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x20,0x20,0xF8,
0x20,0x20,0x02,0x04,0x04,0x06,0x02,0xFE,0xC0,0x40,0x40,0x80,0x05,0x01,0x01,0x06,
0x00,0x02,0xF8,0x02,0x02,0x02,0x06,0x02,0x00,0xC0,0xC0,0x04,0x06,0x06,0x06,0x01,
0x00,0x10,0x10,0x20,0x40,0x80,0x80,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x90,
0x90,0x90,0x60,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0xC0,0x40,0x40,0x40,0xE0,0x04,
0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x10,0x20,0x40,0xF0,0x04,0x06,0x06,0x06,0x01,
0x00,0xF0,0x20,0x60,0x10,0x10,0xE0,0x05,0x06,0x06,0x06,0x00,0x00,0x10,0x30,0x50,
0x90,0xF8,0x10,0x04,0x06,0x06,0x06,0x01,0x00,0xF0,0x80,0xE0,0x10,0x10,0xE0,0x04,
0x06,0x06,0x06,0x01,0x00,0x60,0x80,0xE0,0x90,0x90,0x60,0x04,0x06,0x06,0x06,0x01,
0x00,0xF0,0x10,0x10,0x20,0x40,0x40,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x60,
0x90,0x90,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x90,0x70,0x10,0x60,0x02,
0x05,0x05,0x06,0x02,0x00,0xC0,0xC0,0x00,0xC0,0xC0,0x02,0x07,0x07,0x06,0x02,0xFE,
0xC0,0xC0,0x00,0xC0,0x40,0x40,0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x18,0x60,0x80,
0x60,0x18,0x05,0x03,0x03,0x06,0x00,0x01,0xF8,0x00,0xF8,0x05,0x05,0x05,0x06,0x00,
0x00,0xC0,0x30,0x08,0x30,0xC0,0x04,0x07,0x07,0x06,0x01,0x00,0x60,0x90,0x10,0x60,
0x40,0x00,0x40,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x90,0xA8,0xB0,0x80,0x70,0x05,
0x06,0x06,0x06,0x00,0x00,0x20,0x50,0x88,0xF8,0x88,0x88,0x05,0x06,0x06,0x06,0x00,
0x00,0xF0,0x88,0xF0,0x88,0x88,0xF0,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x80,
0x80,0x90,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0xE0,0x90,0x90,0x90,0x90,0xE0,0x04,
0x06,0x06,0x06,0x01,0x00,0xF0,0x80,0xE0,0x80,0x80,0xF0,0x04,0x06,0x06,0x06,0x01,
0x00,0xF0,0x80,0xE0,0x80,0x80,0x80,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0x80,
0xB0,0x90,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0x90,0x90,0xF0,0x90,0x90,0x90,0x03,
0x06,0x06,0x06,0x01,0x00,0xE0,0x40,0x40,0x40,0x40,0xE0,0x05,0x06,0x06,0x06,0x00,
0x00,0x38,0x10,0x10,0x10,0x90,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0x90,0xA0,0xC0,
0xA0,0x90,0x90,0x04,0x06,0x06,0x06,0x01,0x00,0x80,0x80,0x80,0x80,0x80,0xF0,0x05,
0x06,0x06,0x06,0x00,0x00,0x88,0xD8,0xA8,0xA8,0x88,0x88,0x04,0x06,0x06,0x06,0x01,
0x00,0x90,0xD0,0xB0,0x90,0x90,0x90,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x88,0x88,
0x88,0x88,0x70,0x04,0x06,0x06,0x06,0x01,0x00,0xE0,0x90,0x90,0xE0,0x80,0x80,0x04,
0x07,0x07,0x06,0x01,0xFF,0x60,0x90,0x90,0xD0,0xB0,0x60,0x10,0x04,0x06,0x06,0x06,
0x01,0x00,0xE0,0x90,0x90,0xE0,0x90,0x90,0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,
0x40,0x20,0x90,0x60,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,
0x04,0x06,0x06,0x06,0x01,0x00,0x90,0x90,0x90,0x90,0x90,0x60,0x04,0x06,0x06,0x06,
0x01,0x00,0x90,0x90,0x90,0xF0,0x60,0x60,0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x88,
0xA8,0xA8,0xD8,0x88,0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x50,0x20,0x20,0x50,0x88,
0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x04,0x06,0x06,0x06,
0x01,0x00,0xF0,0x10,0x20,0x40,0x80,0xF0,0x03,0x06,0x06,0x06,0x01,0x00,0xE0,0x80,
0x80,0x80,0x80,0xE0,0x04,0x06,0x06,0x06,0x01,0x00,0x80,0x80,0x40,0x20,0x10,0x10,
0x03,0x06,0x06,0x06,0x01,0x00,0xE0,0x20,0x20,0x20,0x20,0xE0,0x05,0x03,0x03,0x06,
0x00,0x03,0x20,0x50,0x88,0x05,0x01,0x01,0x06,0x00,0xFE,0xF8,0x02,0x02,0x02,0x06,
0x02,0x04,0x80,0x40,0x04,0x04,0x04,0x06,0x01,0x00,0x70,0x90,0x90,0x70,0x04,0x06,
0x06,0x06,0x01,0x00,0x80,0x80,0xE0,0x90,0x90,0xE0,0x04,0x04,0x04,0x06,0x01,0x00,
0x70,0x80,0x80,0x70,0x04,0x06,0x06,0x06,0x01,0x00,0x10,0x10,0x70,0x90,0x90,0x70,
0x04,0x04,0x04,0x06,0x01,0x00,0x60,0xB0,0xC0,0x70,0x04,0x06,0x06,0x06,0x01,0x00,
0x20,0x50,0x40,0xE0,0x40,0x40,0x04,0x06,0x06,0x06,0x01,0xFE,0x60,0x90,0x90,0x70,
0x10,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0x80,0x80,0xE0,0x90,0x90,0x90,0x03,0x06,
0x06,0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x08,0x08,0x06,0x01,0xFE,
0x20,0x00,0x60,0x20,0x20,0x20,0xA0,0x40,0x04,0x06,0x06,0x06,0x01,0x00,0x80,0x80,
0xA0,0xC0,0xA0,0x90,0x03,0x06,0x06,0x06,0x01,0x00,0xC0,0x40,0x40,0x40,0x40,0xE0,
0x05,0x04,0x04,0x06,0x00,0x00,0xD0,0xA8,0xA8,0x88,0x04,0x04,0x04,0x06,0x01,0x00,
0xE0,0x90,0x90,0x90,0x04,0x04,0x04,0x06,0x01,0x00,0x60,0x90,0x90,0x60,0x04,0x06,
0x06,0x06,0x01,0xFE,0xE0,0x90,0x90,0xE0,0x80,0x80,0x04,0x06,0x06,0x06,0x01,0xFE,
0x70,0x90,0x90,0x70,0x10,0x10,0x04,0x04,0x04,0x06,0x01,0x00,0xA0,0xD0,0x80,0x80,
0x04,0x04,0x04,0x06,0x01,0x00,0x70,0xC0,0x30,0xE0,0x04,0x06,0x06,0x06,0x01,0x00,
0x40,0x40,0xE0,0x40,0x50,0x20,0x04,0x04,0x04,0x06,0x01,0x00,0x90,0x90,0x90,0x70,
0x04,0x04,0x04,0x06,0x01,0x00,0x90,0x90,0x60,0x60,0x05,0x04,0x04,0x06,0x00,0x00,
0x88,0xA8,0xA8,0x50,0x04,0x04,0x04,0x06,0x01,0x00,0x90,0x60,0x60,0x90,0x04,0x06,
0x06,0x06,0x01,0xFE,0x90,0x90,0x90,0x70,0x90,0x60,0x04,0x04,0x04,0x06,0x01,0x00,
0xF0,0x20,0x40,0xF0,0x03,0x07,0x07,0x06,0x01,0x00,0x20,0x40,0x40,0x80,0x40,0x40,
0x20,0x01,0x07,0x07,0x06,0x02,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x03,0x07,
0x07,0x06,0x01,0x00,0x80,0x40,0x40,0x20,0x40,0x40,0x80,0x04,0x02,0x02,0x06,0x01,
0x03,0x50,0xA0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x06,0x05,0xFF,0x01,0x06,0x06,0x06,0x02,0x00,
0x80,0x00,0x80,0x80,0x80,0x80,0x04,0x06,0x06,0x06,0x01,0xFF,0x20,0x70,0xA0,0xA0,
0x70,0x20,0x05,0x07,0x07,0x06,0x00,0xFF,0x30,0x48,0x40,0xF0,0x40,0x40,0xF8,0x05,
0x05,0x05,0x06,0x00,0x00,0xA8,0x50,0x88,0x50,0xA8,0x05,0x06,0x06,0x06,0x00,0x00,
0x88,0x50,0xF8,0x20,0xF8,0x20,0x01,0x07,0x07,0x06,0x02,0xFF,0x80,0x80,0x80,0x00,
0x80,0x80,0x80,0x04,0x07,0x07,0x06,0x01,0xFF,0x70,0x80,0x60,0x90,0x60,0x10,0xE0,
0x03,0x01,0x01,0x06,0x01,0x05,0xA0,0x06,0x07,0x07,0x06,0x00,0x00,0x78,0x84,0x94,
0xA4,0x94,0x84,0x78,0x03,0x05,0x05,0x06,0x01,0x01,0x60,0xA0,0x60,0x00,0xE0,0x05,
0x05,0x05,0x06,0x00,0x00,0x28,0x50,0xA0,0x50,0x28,0x04,0x03,0x03,0x06,0x01,0x00,
0xF0,0x10,0x10,0x04,0x01,0x01,0x06,0x01,0x02,0xF0,0x06,0x07,0x07,0x06,0x00,0x00,
0x78,0x84,0xB4,0xA4,0xA4,0x84,0x78,0x04,0x01,0x01,0x06,0x01,0x05,0xF0,0x04,0x03,
0x03,0x06,0x01,0x02,0x60,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0xFF,0x20,0x20,0xF8,
0x20,0x20,0x00,0xF8,0x03,0x05,0x05,0x06,0x01,0x01,0x40,0xA0,0x20,0x40,0xE0,0x03,
0x05,0x05,0x06,0x01,0x01,0xC0,0x20,0x40,0x20,0xC0,0x02,0x02,0x02,0x06,0x02,0x04,
0x40,0x80,0x04,0x05,0x05,0x06,0x01,0xFF,0x90,0x90,0xB0,0xD0,0x80,0x05,0x06,0x06,
0x06,0x00,0x00,0x78,0xE8,0xE8,0x68,0x28,0x28,0x01,0x01,0x01,0x06,0x02,0x02,0x80,
0x02,0x02,0x02,0x06,0x02,0xFE,0x40,0x80,0x03,0x05,0x05,0x06,0x01,0x01,0x40,0xC0,
0x40,0x40,0xE0,0x03,0x05,0x05,0x06,0x01,0x01,0x40,0xA0,0x40,0x00,0xE0,0x05,0x05,
0x05,0x06,0x00,0x00,0xA0,0x50,0x28,0x50,0xA0,0x05,0x08,0x08,0x06,0x00,0xFF,0x40,
0xC0,0x40,0x50,0x70,0x30,0x78,0x10,0x05,0x08,0x08,0x06,0x00,0xFF,0x40,0xC0,0x40,
0x50,0x68,0x08,0x10,0x38,0x05,0x08,0x08,0x06,0x00,0xFF,0xC0,0x20,0x40,0x30,0xF0,
0x30,0x78,0x10,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x00,0x20,0x60,0x80,0x90,0x60,
0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x20,0x20,0x50,0x70,0x88,0x88,0x05,0x07,0x07,
0x06,0x00,0x00,0x10,0x20,0x20,0x50,0x70,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,
0x20,0x50,0x20,0x50,0x70,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x28,0x50,0x20,
0x50,0x70,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x20,0x50,0x70,0x88,
0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x50,0x20,0x50,0x70,0x88,0x88,0x05,0x06,
0x06,0x06,0x00,0x00,0x78,0xA0,0xF0,0xA0,0xA0,0xB8,0x04,0x08,0x08,0x06,0x01,0xFE,
0x60,0x90,0x80,0x80,0x90,0x60,0x20,0x40,0x04,0x07,0x07,0x06,0x01,0x00,0x40,0x20,
0xF0,0x80,0xE0,0x80,0xF0,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x40,0xF0,0x80,0xE0,
0x80,0xF0,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x50,0xF0,0x80,0xE0,0x80,0xF0,0x04,
0x07,0x07,0x06,0x01,0x00,0x50,0x00,0xF0,0x80,0xE0,0x80,0xF0,0x03,0x07,0x07,0x06,
0x01,0x00,0x80,0x40,0xE0,0x40,0x40,0x40,0xE0,0x03,0x07,0x07,0x06,0x01,0x00,0x20,
0x40,0xE0,0x40,0x40,0x40,0xE0,0x03,0x07,0x07,0x06,0x01,0x00,0x40,0xA0,0xE0,0x40,
0x40,0x40,0xE0,0x03,0x07,0x07,0x06,0x01,0x00,0xA0,0x00,0xE0,0x40,0x40,0x40,0xE0,
0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x48,0xE8,0x48,0x48,0x70,0x04,0x07,0x07,0x06,
0x01,0x00,0x50,0xA0,0x90,0xD0,0xB0,0x90,0x90,0x04,0x07,0x07,0x06,0x01,0x00,0x40,
0x20,0x60,0x90,0x90,0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x40,0x60,0x90,
0x90,0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x50,0x60,0x90,0x90,0x90,0x60,
0x04,0x07,0x07,0x06,0x01,0x00,0x50,0xA0,0x60,0x90,0x90,0x90,0x60,0x04,0x07,0x07,
0x06,0x01,0x00,0x50,0x00,0x60,0x90,0x90,0x90,0x60,0x05,0x05,0x05,0x06,0x00,0x00,
0x88,0x50,0x20,0x50,0x88,0x04,0x08,0x08,0x06,0x01,0xFF,0x10,0x70,0xB0,0xB0,0xD0,
0xD0,0xE0,0x80,0x04,0x07,0x07,0x06,0x01,0x00,0x40,0x20,0x90,0x90,0x90,0x90,0x60,
0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x40,0x90,0x90,0x90,0x90,0x60,0x04,0x07,0x07,
0x06,0x01,0x00,0x20,0x50,0x90,0x90,0x90,0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,
0x50,0x00,0x90,0x90,0x90,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x20,0x88,
0x50,0x20,0x20,0x20,0x04,0x06,0x06,0x06,0x01,0x00,0x80,0xE0,0x90,0x90,0xE0,0x80,
0x04,0x06,0x06,0x06,0x01,0x00,0x60,0x90,0xA0,0xA0,0x90,0xA0,0x04,0x07,0x07,0x06,
0x01,0x00,0x40,0x20,0x00,0x70,0x90,0x90,0x70,0x04,0x07,0x07,0x06,0x01,0x00,0x20,
0x40,0x00,0x70,0x90,0x90,0x70,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x50,0x00,0x70,
0x90,0x90,0x70,0x04,0x07,0x07,0x06,0x01,0x00,0x50,0xA0,0x00,0x70,0x90,0x90,0x70,
0x04,0x06,0x06,0x06,0x01,0x00,0x50,0x00,0x70,0x90,0x90,0x70,0x04,0x07,0x07,0x06,
0x01,0x00,0x20,0x50,0x20,0x70,0x90,0x90,0x70,0x05,0x04,0x04,0x06,0x00,0x00,0x70,
0xA8,0xB0,0x78,0x04,0x06,0x06,0x06,0x01,0xFE,0x70,0x80,0x80,0x70,0x20,0x40,0x04,
0x07,0x07,0x06,0x01,0x00,0x40,0x20,0x00,0x60,0xB0,0xC0,0x70,0x04,0x07,0x07,0x06,
0x01,0x00,0x20,0x40,0x00,0x60,0xB0,0xC0,0x70,0x04,0x07,0x07,0x06,0x01,0x00,0x20,
0x50,0x00,0x60,0xB0,0xC0,0x70,0x04,0x06,0x06,0x06,0x01,0x00,0x50,0x00,0x60,0xB0,
0xC0,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0x80,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,
0x07,0x07,0x06,0x01,0x00,0x20,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x07,0x07,0x06,
0x01,0x00,0x40,0xA0,0x00,0xC0,0x40,0x40,0xE0,0x03,0x06,0x06,0x06,0x01,0x00,0xA0,
0x00,0xC0,0x40,0x40,0xE0,0x04,0x07,0x07,0x06,0x01,0x00,0x30,0x60,0x10,0x70,0x90,
0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,0x50,0xA0,0x00,0xE0,0x90,0x90,0x90,0x04,
0x07,0x07,0x06,0x01,0x00,0x40,0x20,0x00,0x60,0x90,0x90,0x60,0x04,0x07,0x07,0x06,
0x01,0x00,0x20,0x40,0x00,0x60,0x90,0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,0x20,
0x50,0x00,0x60,0x90,0x90,0x60,0x04,0x07,0x07,0x06,0x01,0x00,0x50,0xA0,0x00,0x60,
0x90,0x90,0x60,0x04,0x06,0x06,0x06,0x01,0x00,0x50,0x00,0x60,0x90,0x90,0x60,0x05,
0x05,0x05,0x06,0x00,0x00,0x20,0x00,0xF8,0x00,0x20,0x04,0x04,0x04,0x06,0x01,0x00,
0x70,0xB0,0xD0,0xE0,0x04,0x07,0x07,0x06,0x01,0x00,0x40,0x20,0x00,0x90,0x90,0x90,
0x70,0x04,0x07,0x07,0x06,0x01,0x00,0x20,0x40,0x00,0x90,0x90,0x90,0x70,0x04,0x07,
0x07,0x06,0x01,0x00,0x20,0x50,0x00,0x90,0x90,0x90,0x70,0x04,0x06,0x06,0x06,0x01,
0x00,0x50,0x00,0x90,0x90,0x90,0x70,0x04,0x09,0x09,0x06,0x01,0xFE,0x20,0x40,0x00,
0x90,0x90,0x90,0x70,0x90,0x60,0x04,0x08,0x08,0x06,0x01,0xFE,0x80,0x80,0xE0,0x90,
0x90,0xE0,0x80,0x80,0x04,0x08,0x08,0x06,0x01,0xFE,0x50,0x00,0x90,0x90,0x90,0x70,
0x90,0x60};

View File

@@ -0,0 +1,301 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <U8glib.h>
#if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7)
// reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH
/*
Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-90-100-100-C-111-ISO10646-1
Copyright: Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 7 h=10 x= 5 y= 5 dx= 7 dy= 0 ascent= 8 len=10
Font Bounding box w=12 h=15 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 7 descent=-2
X Font ascent = 8 descent=-2
Max Font ascent = 8 descent=-2
*/
const u8g_fntpgm_uint8_t ISO10646_1_5x7[1324] U8G_FONT_SECTION("ISO10646_1_5x7") = {
0x00,0x0C,0x0F,0x00,0xFE,0x07,0x02,0x25,0x03,0xBB,0x01,0x7F,0xFE,0x08,0xFE,0x08,
0xFE,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0xF0,0xC8,0x88,0x88,0x98,0x78,0x10,0x05,
0x08,0x08,0x06,0x00,0x00,0xC0,0xF8,0x88,0x88,0x88,0x88,0x88,0xF8,0x05,0x05,0x05,
0x06,0x00,0x01,0x20,0x30,0xF8,0x30,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x70,
0xF8,0x20,0x20,0x20,0x20,0xE0,0x05,0x09,0x09,0x06,0x00,0xFF,0x20,0x70,0xA8,0xA8,
0xB8,0x88,0x88,0x70,0x20,0x07,0x05,0x05,0x07,0x00,0x01,0xD8,0x6C,0x36,0x6C,0xD8,
0x05,0x09,0x09,0x06,0x00,0xFF,0xF8,0xA8,0x88,0x88,0x88,0x88,0x88,0xA8,0xF8,0x05,
0x0A,0x0A,0x06,0x00,0xFE,0x20,0x50,0x50,0x50,0x50,0x88,0xA8,0xA8,0x88,0x70,0x03,
0x03,0x03,0x06,0x00,0x03,0x40,0xA0,0x40,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
0x00,0x06,0x05,0xFF,0x01,0x07,0x07,0x06,0x02,0x00,0x80,0x80,0x80,0x80,0x80,0x00,
0x80,0x03,0x03,0x03,0x06,0x01,0x05,0xA0,0xA0,0xA0,0x05,0x06,0x06,0x06,0x00,0x00,
0x50,0xF8,0x50,0x50,0xF8,0x50,0x05,0x09,0x09,0x06,0x00,0xFF,0x20,0x70,0xA8,0xA0,
0x70,0x28,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0xC8,0xC8,0x10,0x20,0x40,
0x98,0x98,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0xA0,0xA0,0x40,0xA8,0x90,0x68,0x01,
0x03,0x03,0x06,0x02,0x05,0x80,0x80,0x80,0x03,0x09,0x09,0x06,0x01,0xFF,0x20,0x40,
0x40,0x80,0x80,0x80,0x40,0x40,0x20,0x03,0x09,0x09,0x06,0x01,0xFF,0x80,0x40,0x40,
0x20,0x20,0x20,0x40,0x40,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xA8,0x70,0x20,
0x70,0xA8,0x20,0x05,0x05,0x05,0x06,0x00,0x01,0x20,0x20,0xF8,0x20,0x20,0x02,0x03,
0x03,0x06,0x01,0xFF,0xC0,0x40,0x80,0x05,0x01,0x01,0x06,0x00,0x03,0xF8,0x02,0x02,
0x02,0x06,0x01,0x00,0xC0,0xC0,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x10,0x10,0x20,
0x40,0x40,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x98,0xA8,0xC8,0x88,0x70,
0x03,0x07,0x07,0x06,0x01,0x00,0x40,0xC0,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,
0x06,0x00,0x00,0x70,0x88,0x08,0x10,0x20,0x40,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,
0xF8,0x08,0x10,0x30,0x08,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x30,0x50,
0x90,0xF8,0x10,0x10,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0xF0,0x08,0x08,0x88,
0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x30,0x40,0x80,0xF0,0x88,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x10,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,
0x88,0x78,0x08,0x10,0x60,0x02,0x05,0x05,0x06,0x01,0x00,0xC0,0xC0,0x00,0xC0,0xC0,
0x02,0x06,0x06,0x06,0x01,0xFF,0xC0,0xC0,0x00,0xC0,0x40,0x80,0x03,0x05,0x05,0x06,
0x01,0x01,0x20,0x40,0x80,0x40,0x20,0x05,0x03,0x03,0x06,0x00,0x02,0xF8,0x00,0xF8,
0x03,0x05,0x05,0x06,0x01,0x01,0x80,0x40,0x20,0x40,0x80,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x10,0x20,0x20,0x00,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,
0xB8,0xA8,0xB8,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,
0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0xF0,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,
0x80,0x80,0xF0,0x80,0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,
0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x98,0x88,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x03,0x07,0x07,
0x06,0x01,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,
0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,
0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,
0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,
0x88,0xF0,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0xA8,
0x90,0x68,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,
0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,
0x50,0x50,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,0xA8,0xA8,0x50,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x05,0x07,0x07,
0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,
0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x03,0x09,0x09,0x06,0x01,0xFF,0xE0,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x40,0x40,0x20,
0x10,0x10,0x08,0x03,0x09,0x09,0x06,0x01,0xFF,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0xE0,0x05,0x03,0x03,0x06,0x00,0x05,0x20,0x50,0x88,0x05,0x01,0x01,0x06,0x00,
0xFE,0xF8,0x03,0x03,0x03,0x06,0x01,0x05,0x80,0x40,0x20,0x05,0x05,0x05,0x06,0x00,
0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0xF0,0x88,
0x88,0x88,0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x80,0x80,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0x08,0x08,0x78,0x88,0x88,0x88,0x78,0x05,0x05,0x05,0x06,0x00,
0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x30,0x48,0x40,0xE0,
0x40,0x40,0x40,0x05,0x07,0x07,0x06,0x00,0xFE,0x70,0x88,0x88,0x88,0x78,0x08,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x88,0x03,0x07,0x07,
0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0x40,0xE0,0x04,0x09,0x09,0x06,0x01,0xFE,
0x10,0x00,0x30,0x10,0x10,0x10,0x10,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x80,
0x80,0x88,0x90,0xE0,0x90,0x88,0x03,0x07,0x07,0x06,0x01,0x00,0xC0,0x40,0x40,0x40,
0x40,0x40,0xE0,0x05,0x05,0x05,0x06,0x00,0x00,0xD0,0xA8,0xA8,0xA8,0xA8,0x05,0x05,
0x05,0x06,0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x70,
0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,0xF0,0x80,
0x80,0x05,0x07,0x07,0x06,0x00,0xFE,0x78,0x88,0x88,0x88,0x78,0x08,0x08,0x05,0x05,
0x05,0x06,0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x78,
0x80,0x70,0x08,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0xF8,0x20,0x20,0x20,
0x18,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x05,0x05,0x05,0x06,
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xA8,
0xA8,0x50,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x05,0x07,0x07,
0x06,0x00,0xFE,0x88,0x88,0x88,0x50,0x20,0x40,0x80,0x05,0x05,0x05,0x06,0x00,0x00,
0xF8,0x10,0x20,0x40,0xF8,0x03,0x09,0x09,0x06,0x01,0xFF,0x20,0x40,0x40,0x40,0x80,
0x40,0x40,0x40,0x20,0x01,0x09,0x09,0x06,0x02,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x03,0x09,0x09,0x06,0x01,0xFF,0x80,0x40,0x40,0x40,0x20,0x40,0x40,
0x40,0x80,0x05,0x03,0x03,0x06,0x00,0x02,0x48,0xA8,0x90,0xFF};
#else
// extended (original) font (symbols 1 - 255)
/*
Fontname: -Marlin6x12-Fixed-Medium-R-SemiCondensed--12-90-100-100-C-111-ISO10646-1
Copyright: Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1
Capital A Height: 7, '1' Height: 7
Calculated Max Values w= 7 h=10 x= 5 y= 7 dx= 7 dy= 0 ascent=10 len=10
Font Bounding box w=12 h=15 x= 0 y=-2
Calculated Min Values x= 0 y=-2 dx= 0 dy= 0
Pure Font ascent = 7 descent=-2
X Font ascent = 8 descent=-2
Max Font ascent =10 descent=-2
*/
const u8g_fntpgm_uint8_t ISO10646_1_5x7[2647] U8G_FONT_SECTION("ISO10646_1_5x7") = {
0x00,0x0C,0x0F,0x00,0xFE,0x07,0x02,0x25,0x03,0xBB,0x01,0xFF,0xFE,0x0A,0xFE,0x08,
0xFE,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0xF0,0xC8,0x88,0x88,0x98,0x78,0x10,0x05,
0x08,0x08,0x06,0x00,0x00,0xC0,0xF8,0x88,0x88,0x88,0x88,0x88,0xF8,0x05,0x05,0x05,
0x06,0x00,0x01,0x20,0x30,0xF8,0x30,0x20,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x70,
0xF8,0x20,0x20,0x20,0x20,0xE0,0x05,0x09,0x09,0x06,0x00,0xFF,0x20,0x70,0xA8,0xA8,
0xB8,0x88,0x88,0x70,0x20,0x07,0x05,0x05,0x07,0x00,0x01,0xD8,0x6C,0x36,0x6C,0xD8,
0x05,0x09,0x09,0x06,0x00,0xFF,0xF8,0xA8,0x88,0x88,0x88,0x88,0x88,0xA8,0xF8,0x05,
0x0A,0x0A,0x06,0x00,0xFE,0x20,0x50,0x50,0x50,0x50,0x88,0xA8,0xA8,0x88,0x70,0x03,
0x03,0x03,0x06,0x00,0x03,0x40,0xA0,0x40,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,
0x00,0x06,0x05,0xFF,0x01,0x07,0x07,0x06,0x02,0x00,0x80,0x80,0x80,0x80,0x80,0x00,
0x80,0x03,0x03,0x03,0x06,0x01,0x05,0xA0,0xA0,0xA0,0x05,0x06,0x06,0x06,0x00,0x00,
0x50,0xF8,0x50,0x50,0xF8,0x50,0x05,0x09,0x09,0x06,0x00,0xFF,0x20,0x70,0xA8,0xA0,
0x70,0x28,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0xC8,0xC8,0x10,0x20,0x40,
0x98,0x98,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0xA0,0xA0,0x40,0xA8,0x90,0x68,0x01,
0x03,0x03,0x06,0x02,0x05,0x80,0x80,0x80,0x03,0x09,0x09,0x06,0x01,0xFF,0x20,0x40,
0x40,0x80,0x80,0x80,0x40,0x40,0x20,0x03,0x09,0x09,0x06,0x01,0xFF,0x80,0x40,0x40,
0x20,0x20,0x20,0x40,0x40,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xA8,0x70,0x20,
0x70,0xA8,0x20,0x05,0x05,0x05,0x06,0x00,0x01,0x20,0x20,0xF8,0x20,0x20,0x02,0x03,
0x03,0x06,0x01,0xFF,0xC0,0x40,0x80,0x05,0x01,0x01,0x06,0x00,0x03,0xF8,0x02,0x02,
0x02,0x06,0x01,0x00,0xC0,0xC0,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x10,0x10,0x20,
0x40,0x40,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x98,0xA8,0xC8,0x88,0x70,
0x03,0x07,0x07,0x06,0x01,0x00,0x40,0xC0,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,
0x06,0x00,0x00,0x70,0x88,0x08,0x10,0x20,0x40,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,
0xF8,0x08,0x10,0x30,0x08,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x30,0x50,
0x90,0xF8,0x10,0x10,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0xF0,0x08,0x08,0x88,
0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x30,0x40,0x80,0xF0,0x88,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x10,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,
0x88,0x78,0x08,0x10,0x60,0x02,0x05,0x05,0x06,0x01,0x00,0xC0,0xC0,0x00,0xC0,0xC0,
0x02,0x06,0x06,0x06,0x01,0xFF,0xC0,0xC0,0x00,0xC0,0x40,0x80,0x03,0x05,0x05,0x06,
0x01,0x01,0x20,0x40,0x80,0x40,0x20,0x05,0x03,0x03,0x06,0x00,0x02,0xF8,0x00,0xF8,
0x03,0x05,0x05,0x06,0x01,0x01,0x80,0x40,0x20,0x40,0x80,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x10,0x20,0x20,0x00,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,
0xB8,0xA8,0xB8,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,
0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0xF0,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,
0x80,0x80,0xF0,0x80,0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,
0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x98,0x88,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x03,0x07,0x07,
0x06,0x01,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,
0x38,0x10,0x10,0x10,0x10,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,
0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,
0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,
0x88,0xF0,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0xA8,
0x90,0x68,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0xA0,0x90,0x88,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,
0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,
0x50,0x50,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,0xA8,0xA8,0x50,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x05,0x07,0x07,
0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,
0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x03,0x09,0x09,0x06,0x01,0xFF,0xE0,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x40,0x40,0x20,
0x10,0x10,0x08,0x03,0x09,0x09,0x06,0x01,0xFF,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,
0x20,0xE0,0x05,0x03,0x03,0x06,0x00,0x05,0x20,0x50,0x88,0x05,0x01,0x01,0x06,0x00,
0xFE,0xF8,0x03,0x03,0x03,0x06,0x01,0x05,0x80,0x40,0x20,0x05,0x05,0x05,0x06,0x00,
0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0xF0,0x88,
0x88,0x88,0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x80,0x80,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0x08,0x08,0x78,0x88,0x88,0x88,0x78,0x05,0x05,0x05,0x06,0x00,
0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x30,0x48,0x40,0xE0,
0x40,0x40,0x40,0x05,0x07,0x07,0x06,0x00,0xFE,0x70,0x88,0x88,0x88,0x78,0x08,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x88,0x03,0x07,0x07,
0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0x40,0xE0,0x04,0x09,0x09,0x06,0x01,0xFE,
0x10,0x00,0x30,0x10,0x10,0x10,0x10,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x80,
0x80,0x88,0x90,0xE0,0x90,0x88,0x03,0x07,0x07,0x06,0x01,0x00,0xC0,0x40,0x40,0x40,
0x40,0x40,0xE0,0x05,0x05,0x05,0x06,0x00,0x00,0xD0,0xA8,0xA8,0xA8,0xA8,0x05,0x05,
0x05,0x06,0x00,0x00,0xB0,0xC8,0x88,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x70,
0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,0xF0,0x80,
0x80,0x05,0x07,0x07,0x06,0x00,0xFE,0x78,0x88,0x88,0x88,0x78,0x08,0x08,0x05,0x05,
0x05,0x06,0x00,0x00,0xB0,0xC8,0x80,0x80,0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x78,
0x80,0x70,0x08,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0xF8,0x20,0x20,0x20,
0x18,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0x88,0x98,0x68,0x05,0x05,0x05,0x06,
0x00,0x00,0x88,0x88,0x88,0x50,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xA8,
0xA8,0x50,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x05,0x07,0x07,
0x06,0x00,0xFE,0x88,0x88,0x88,0x50,0x20,0x40,0x80,0x05,0x05,0x05,0x06,0x00,0x00,
0xF8,0x10,0x20,0x40,0xF8,0x03,0x09,0x09,0x06,0x01,0xFF,0x20,0x40,0x40,0x40,0x80,
0x40,0x40,0x40,0x20,0x01,0x09,0x09,0x06,0x02,0xFF,0x80,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x03,0x09,0x09,0x06,0x01,0xFF,0x80,0x40,0x40,0x40,0x20,0x40,0x40,
0x40,0x80,0x05,0x03,0x03,0x06,0x00,0x02,0x48,0xA8,0x90,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x06,
0x05,0xFF,0x01,0x07,0x07,0x06,0x02,0x00,0x80,0x00,0x80,0x80,0x80,0x80,0x80,0x05,
0x07,0x07,0x06,0x00,0xFF,0x20,0x70,0xA8,0xA0,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,
0x00,0x00,0x30,0x48,0x40,0xE0,0x40,0x48,0xB0,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,
0x50,0x88,0x50,0xA8,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x50,0xF8,0x20,0xF8,0x20,
0x20,0x01,0x07,0x07,0x06,0x02,0x00,0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x04,0x08,
0x08,0x06,0x01,0x00,0x70,0x80,0x60,0x90,0x90,0x60,0x10,0xE0,0x03,0x01,0x01,0x06,
0x01,0x07,0xA0,0x06,0x07,0x07,0x06,0x00,0x00,0x78,0x84,0xB4,0xA4,0xB4,0x84,0x78,
0x03,0x05,0x05,0x06,0x01,0x04,0x60,0xA0,0x60,0x00,0xE0,0x05,0x05,0x05,0x06,0x00,
0x00,0x28,0x50,0xA0,0x50,0x28,0x05,0x03,0x03,0x06,0x00,0x01,0xF8,0x08,0x08,0x03,
0x01,0x01,0x06,0x01,0x03,0xE0,0x06,0x07,0x07,0x06,0x00,0x00,0x78,0x84,0xB4,0xA4,
0xA4,0x84,0x78,0x05,0x01,0x01,0x06,0x00,0x07,0xF8,0x04,0x04,0x04,0x06,0x01,0x05,
0x60,0x90,0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0xF8,0x20,0x20,0x00,
0xF8,0x03,0x05,0x05,0x06,0x01,0x04,0x40,0xA0,0x20,0x40,0xE0,0x03,0x05,0x05,0x06,
0x01,0x04,0xC0,0x20,0x40,0x20,0xC0,0x03,0x03,0x03,0x06,0x01,0x05,0x20,0x40,0x80,
0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,0x98,0xE8,0x80,0x80,0x05,0x08,0x08,
0x06,0x00,0x00,0x78,0xE8,0xE8,0xE8,0x68,0x28,0x28,0x28,0x02,0x02,0x02,0x06,0x02,
0x03,0xC0,0xC0,0x03,0x02,0x02,0x06,0x01,0xFE,0x20,0xC0,0x03,0x05,0x05,0x06,0x01,
0x04,0x40,0xC0,0x40,0x40,0xE0,0x03,0x05,0x05,0x06,0x01,0x05,0x40,0xA0,0x40,0x00,
0xE0,0x05,0x05,0x05,0x06,0x00,0x00,0xA0,0x50,0x28,0x50,0xA0,0x05,0x0A,0x0A,0x06,
0x00,0x00,0x40,0xC0,0x48,0x50,0x60,0x50,0xB0,0x50,0x78,0x10,0x05,0x0A,0x0A,0x06,
0x00,0x00,0x40,0xC0,0x48,0x50,0x60,0x50,0xA8,0x08,0x10,0x38,0x05,0x0A,0x0A,0x06,
0x00,0x00,0xC0,0x20,0x48,0x30,0xE0,0x50,0xB0,0x50,0x78,0x10,0x05,0x07,0x07,0x06,
0x00,0x00,0x20,0x00,0x20,0x20,0x40,0x88,0x70,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,
0x20,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,
0x20,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x20,
0x50,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x68,
0xB0,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x50,
0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x20,0x50,
0x20,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x78,0xA0,
0xA0,0xF0,0xA0,0xA0,0xB8,0x05,0x09,0x09,0x06,0x00,0xFE,0x70,0x88,0x80,0x80,0x80,
0x88,0x70,0x10,0x60,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x20,0x00,0xF8,0x80,0x80,
0xF0,0x80,0x80,0xF8,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0xF8,0x80,0x80,
0xF0,0x80,0x80,0xF8,0x05,0x0A,0x0A,0x06,0x00,0x00,0x20,0x50,0x00,0xF8,0x80,0x80,
0xF0,0x80,0x80,0xF8,0x05,0x09,0x09,0x06,0x00,0x00,0x50,0x00,0xF8,0x80,0x80,0xF0,
0x80,0x80,0xF8,0x03,0x0A,0x0A,0x06,0x01,0x00,0x80,0x40,0x00,0xE0,0x40,0x40,0x40,
0x40,0x40,0xE0,0x03,0x0A,0x0A,0x06,0x01,0x00,0x20,0x40,0x00,0xE0,0x40,0x40,0x40,
0x40,0x40,0xE0,0x03,0x0A,0x0A,0x06,0x01,0x00,0x40,0xA0,0x00,0xE0,0x40,0x40,0x40,
0x40,0x40,0xE0,0x03,0x09,0x09,0x06,0x01,0x00,0xA0,0x00,0xE0,0x40,0x40,0x40,0x40,
0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x48,0x48,0xE8,0x48,0x48,0x70,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x68,0xB0,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x40,0x20,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x20,0x50,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x68,0xB0,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,
0x09,0x09,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x05,
0x05,0x06,0x00,0x01,0x88,0x50,0x20,0x50,0x88,0x05,0x09,0x09,0x06,0x00,0xFF,0x08,
0x70,0x98,0xA8,0xA8,0xA8,0xC8,0x70,0x80,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x20,
0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,
0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x0A,0x0A,0x06,0x00,0x00,0x20,0x50,
0x00,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x09,0x09,0x06,0x00,0x00,0x50,0x00,
0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,
0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x04,0x07,0x07,0x06,0x01,0x00,0x80,0xE0,0x90,
0x90,0x90,0xE0,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x90,0xA0,0x90,0x88,
0xB0,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0x20,0x00,0x70,0x08,0x78,0x88,0x78,0x05,
0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x08,0x08,
0x06,0x00,0x00,0x20,0x50,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x08,0x08,0x06,0x00,
0x00,0x68,0xB0,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x50,
0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x50,0x20,0x70,
0x08,0x78,0x88,0x78,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x28,0x70,0xA0,0x78,0x05,
0x07,0x07,0x06,0x00,0xFE,0x70,0x88,0x80,0x88,0x70,0x10,0x60,0x05,0x08,0x08,0x06,
0x00,0x00,0x40,0x20,0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x08,0x08,0x06,0x00,0x00,
0x10,0x20,0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x50,
0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,
0xF0,0x80,0x70,0x03,0x08,0x08,0x06,0x01,0x00,0x80,0x40,0x00,0xC0,0x40,0x40,0x40,
0xE0,0x03,0x08,0x08,0x06,0x01,0x00,0x20,0x40,0x00,0xC0,0x40,0x40,0x40,0xE0,0x03,
0x08,0x08,0x06,0x01,0x00,0x40,0xA0,0x00,0xC0,0x40,0x40,0x40,0xE0,0x03,0x07,0x07,
0x06,0x01,0x00,0xA0,0x00,0xC0,0x40,0x40,0x40,0xE0,0x05,0x09,0x09,0x06,0x00,0x00,
0x50,0x20,0x50,0x08,0x78,0x88,0x88,0x88,0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x68,
0xB0,0x00,0xB0,0xC8,0x88,0x88,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0x20,0x00,
0x70,0x88,0x88,0x88,0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,
0x88,0x88,0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x50,0x00,0x70,0x88,0x88,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x68,0xB0,0x00,0x70,0x88,0x88,0x88,0x70,0x05,
0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,
0x00,0x01,0x20,0x00,0xF8,0x00,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x78,0x98,0xA8,
0xC8,0xF0,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0x20,0x00,0x88,0x88,0x88,0x88,0x70,
0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x88,0x88,0x88,0x88,0x70,0x05,0x08,
0x08,0x06,0x00,0x00,0x20,0x50,0x00,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0x50,0x00,0x88,0x88,0x88,0x88,0x70,0x05,0x0A,0x0A,0x06,0x00,0xFE,0x10,
0x20,0x00,0x88,0x88,0x88,0x50,0x20,0x40,0x80,0x05,0x09,0x09,0x06,0x00,0xFE,0x80,
0x80,0xF0,0x88,0x88,0x88,0xF0,0x80,0x80,0x05,0x09,0x09,0x06,0x00,0xFE,0x50,0x00,
0x88,0x88,0x88,0x50,0x20,0x40,0x80};
#endif

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,77 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_8_144_149[96] U8G_FONT_SECTION("fontpage_8_144_149") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x95,0x00,0x07,0xFF,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0xF0,0x80,0x80,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,
0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,
0x80,0x80,0x80,0x80,0x80,0x05,0x08,0x08,0x06,0x00,0xFF,0x30,0x50,0x50,0x50,0x50,
0x50,0xF8,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8
};
const u8g_fntpgm_uint8_t fontpage_8_151_152[43] U8G_FONT_SECTION("fontpage_8_151_152") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x97,0x98,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x08,0x70,0x08,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x88,0x98,0xA8,0xC8,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_8_154_164[160] U8G_FONT_SECTION("fontpage_8_154_164") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0xA4,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x48,0x48,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,
0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,
0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0x88,0x88,0x05,
0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x05,0x07,0x07,0x06,
0x00,0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,
0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,
0x78,0x08,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,0xA8,0xA8,0xA8,0x70,0x20
};
const u8g_fntpgm_uint8_t fontpage_8_166_166[32] U8G_FONT_SECTION("fontpage_8_166_166") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x07,0xFE,0x00,
0x00,0x05,0x09,0x09,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0x90,0x90,0xF8,0x08,0x08
};
const u8g_fntpgm_uint8_t fontpage_8_175_195[260] U8G_FONT_SECTION("fontpage_8_175_195") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAF,0xC3,0x00,0x08,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x78,0x88,0x88,0x78,0x28,0x48,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x70,
0x80,0xF0,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF0,0x88,0xF0,0x88,
0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x05,0x06,0x06,0x06,
0x00,0xFF,0x30,0x50,0x50,0x50,0xF8,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,
0xF0,0x80,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0x70,0x20,0x70,0xA8,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x30,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x88,
0x98,0xA8,0xC8,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x88,0x98,0xA8,
0xC8,0x88,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,0x90,0x05,0x05,0x05,
0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0xD8,
0xA8,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xF8,0x88,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,
0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,0xF0,0x80,
0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x05,0x05,0x05,0x06,
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,
0x88,0x78,0x08,0x70};
const u8g_fntpgm_uint8_t fontpage_8_197_200[63] U8G_FONT_SECTION("fontpage_8_197_200") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC5,0xC8,0x00,0x05,0xFE,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x05,0x07,0x07,0x06,
0x00,0xFE,0x90,0x90,0x90,0x90,0xF8,0x08,0x08,0x05,0x05,0x05,0x06,0x00,0x00,0x88,
0x88,0x78,0x08,0x08,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,0xF8};
const u8g_fntpgm_uint8_t fontpage_8_202_202[28] U8G_FONT_SECTION("fontpage_8_202_202") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCA,0xCA,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0xC0,0x40,0x70,0x48,0x70};
const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206_207") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCE,0xCF,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06,
0x01,0x00,0x70,0x90,0x70,0x50,0x90};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е'
FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И'
FONTDATA_ITEM(8, 154, 164, fontpage_8_154_164), // 'К' -- 'Ф'
FONTDATA_ITEM(8, 166, 166, fontpage_8_166_166), // 'Ц' -- 'Ц'
FONTDATA_ITEM(8, 175, 195, fontpage_8_175_195), // 'Я' -- 'у'
FONTDATA_ITEM(8, 197, 200, fontpage_8_197_200), // 'х' -- 'ш'
FONTDATA_ITEM(8, 202, 202, fontpage_8_202_202), // 'ъ' -- 'ъ'
FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,54 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_140_141[47] U8G_FONT_SECTION("fontpage_2_140_141") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x80,0x80,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_2_143_143[33] U8G_FONT_SECTION("fontpage_2_143_143") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8F,0x8F,0x00,0x0A,0x00,0x00,
0x00,0x06,0x0A,0x0A,0x06,0x00,0x00,0x14,0x08,0x00,0x08,0x08,0x78,0x88,0x88,0x88,
0x78};
const u8g_fntpgm_uint8_t fontpage_2_154_155[47] U8G_FONT_SECTION("fontpage_2_154_155") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0x9B,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,
0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0xF0,0x80,0x70};
const u8g_fntpgm_uint8_t fontpage_2_200_200[31] U8G_FONT_SECTION("fontpage_2_200_200") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xB0,0xC8,0x88,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_2_216_217[47] U8G_FONT_SECTION("fontpage_2_216_217") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD8,0xD9,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF0,0x88,0x88,0xF0,0xA0,0x90,
0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xB0,0xC8,0x80,0x80,0x80};
const u8g_fntpgm_uint8_t fontpage_2_224_225[47] U8G_FONT_SECTION("fontpage_2_224_225") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
const u8g_fntpgm_uint8_t fontpage_2_229_229[33] U8G_FONT_SECTION("fontpage_2_229_229") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE5,0xE5,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x20,0x20,0xF8,0x20,0x20,0x20,
0x18};
const u8g_fntpgm_uint8_t fontpage_2_239_239[31] U8G_FONT_SECTION("fontpage_2_239_239") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xEF,0xEF,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x20,0x50,0x20,0x88,0x88,0x88,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253_254") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFD,0xFE,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,
0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'
FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď'
FONTDATA_ITEM(2, 154, 155, fontpage_2_154_155), // 'Ě' -- 'ě'
FONTDATA_ITEM(2, 200, 200, fontpage_2_200_200), // 'ň' -- 'ň'
FONTDATA_ITEM(2, 216, 217, fontpage_2_216_217), // 'Ř' -- 'ř'
FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š'
FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť'
FONTDATA_ITEM(2, 239, 239, fontpage_2_239_239), // 'ů' -- 'ů'
FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,90 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x80,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,
0xF8};
const u8g_fntpgm_uint8_t fontpage_7_145_157[186] U8G_FONT_SECTION("fontpage_7_145_157") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x9D,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,
0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,
0x50,0x50,0x88,0x88,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80,
0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x05,
0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,
0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0xE0,
0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0,
0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88,0x88,0x88,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07,
0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_159_161[56] U8G_FONT_SECTION("fontpage_7_159_161") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0xA1,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,0x80};
const u8g_fntpgm_uint8_t fontpage_7_163_167[82] U8G_FONT_SECTION("fontpage_7_163_167") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA3,0xA7,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x40,0x20,0x10,0x20,0x40,0xF8,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,
0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,
0xA8,0xA8,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x50,
0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_172_175[75] U8G_FONT_SECTION("fontpage_7_172_175") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAC,0xAF,0x00,0x08,0xFE,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x68,0x90,0x90,0x90,0x68,0x05,
0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x60,0x88,0x70,0x05,0x0A,0x0A,
0x06,0x00,0xFE,0x10,0x20,0x00,0xB0,0xC8,0x88,0x88,0x88,0x08,0x08,0x03,0x08,0x08,
0x06,0x01,0x00,0x40,0x80,0x00,0x80,0x80,0x80,0xA0,0x40};
const u8g_fntpgm_uint8_t fontpage_7_177_181[80] U8G_FONT_SECTION("fontpage_7_177_181") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB5,0x00,0x07,0xFE,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x68,0x90,0x90,0x90,0x68,0x05,0x09,0x09,0x06,
0x00,0xFE,0x60,0x90,0x90,0xB0,0x88,0x88,0xF0,0x80,0x80,0x05,0x07,0x07,0x06,0x00,
0xFE,0x88,0x88,0x50,0x50,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x80,
0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x60,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_7_183_199[226] U8G_FONT_SECTION("fontpage_7_183_199") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB7,0xC7,0x00,0x09,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0xFE,0xB0,0xC8,0x88,0x88,0x88,0x08,0x08,0x04,0x07,
0x07,0x06,0x01,0x00,0x60,0x90,0x90,0xF0,0x90,0x90,0x60,0x03,0x05,0x05,0x06,0x02,
0x00,0x80,0x80,0x80,0xA0,0x40,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,
0x90,0x05,0x09,0x09,0x06,0x00,0x00,0x80,0x40,0x40,0x20,0x20,0x50,0x50,0x88,0x88,
0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,0x98,0xE8,0x80,0x80,0x05,0x05,0x05,
0x06,0x00,0x00,0x88,0x88,0x50,0x50,0x20,0x05,0x09,0x09,0x06,0x00,0xFE,0xF8,0x20,
0x40,0x70,0x80,0x80,0x70,0x08,0x10,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x88,
0x88,0x70,0x06,0x05,0x05,0x06,0x00,0x00,0xF8,0x50,0x50,0x54,0x48,0x05,0x07,0x07,
0x06,0x00,0xFE,0x70,0x88,0x88,0xC8,0xB0,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0xFE,
0x70,0x88,0x80,0x80,0x70,0x08,0x30,0x05,0x05,0x05,0x06,0x00,0x00,0x78,0x90,0x88,
0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x20,0x20,0x28,0x10,0x05,0x05,0x05,
0x06,0x00,0x00,0x90,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0xFE,0x10,0xA8,
0xA8,0xA8,0x70,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x50,0x20,0x50,
0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_201_201[28] U8G_FONT_SECTION("fontpage_7_201_201") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x50,0x88,0xA8,0xA8,0x50};
const u8g_fntpgm_uint8_t fontpage_7_204_206[59] U8G_FONT_SECTION("fontpage_7_204_206") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCC,0xCE,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x88,0x88,0x70,0x05,
0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x90,0x88,0x88,0x88,0x70,0x05,0x08,0x08,
0x06,0x00,0x00,0x10,0x20,0x00,0x50,0x88,0xA8,0xA8,0x50};
const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_166_166") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00,
0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'
FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ'
FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ'
FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί'
FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε'
FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ'
FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω'
FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ'
FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…'
};

View File

@@ -0,0 +1,90 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x80,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,
0xF8};
const u8g_fntpgm_uint8_t fontpage_7_145_157[186] U8G_FONT_SECTION("fontpage_7_145_157") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x9D,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,
0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,
0x50,0x50,0x88,0x88,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80,
0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,0xF8,0x05,
0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,
0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0xE0,
0x40,0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0,
0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x50,0x50,0x88,0x88,0x88,
0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07,
0x06,0x00,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_159_161[56] U8G_FONT_SECTION("fontpage_7_159_161") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9F,0xA1,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,0x80};
const u8g_fntpgm_uint8_t fontpage_7_163_167[82] U8G_FONT_SECTION("fontpage_7_163_167") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA3,0xA7,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x40,0x20,0x10,0x20,0x40,0xF8,0x05,0x07,
0x07,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,
0x00,0x88,0x88,0x50,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,
0xA8,0xA8,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x50,
0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_172_175[75] U8G_FONT_SECTION("fontpage_7_172_175") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAC,0xAF,0x00,0x08,0xFE,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x68,0x90,0x90,0x90,0x68,0x05,
0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x60,0x88,0x70,0x05,0x0A,0x0A,
0x06,0x00,0xFE,0x10,0x20,0x00,0xB0,0xC8,0x88,0x88,0x88,0x08,0x08,0x03,0x08,0x08,
0x06,0x01,0x00,0x40,0x80,0x00,0x80,0x80,0x80,0xA0,0x40};
const u8g_fntpgm_uint8_t fontpage_7_177_181[80] U8G_FONT_SECTION("fontpage_7_177_181") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB5,0x00,0x07,0xFE,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x68,0x90,0x90,0x90,0x68,0x05,0x09,0x09,0x06,
0x00,0xFE,0x60,0x90,0x90,0xB0,0x88,0x88,0xF0,0x80,0x80,0x05,0x07,0x07,0x06,0x00,
0xFE,0x88,0x88,0x50,0x50,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x80,
0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x60,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_7_183_199[226] U8G_FONT_SECTION("fontpage_7_183_199") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB7,0xC7,0x00,0x09,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0xFE,0xB0,0xC8,0x88,0x88,0x88,0x08,0x08,0x04,0x07,
0x07,0x06,0x01,0x00,0x60,0x90,0x90,0xF0,0x90,0x90,0x60,0x03,0x05,0x05,0x06,0x02,
0x00,0x80,0x80,0x80,0xA0,0x40,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,
0x90,0x05,0x09,0x09,0x06,0x00,0x00,0x80,0x40,0x40,0x20,0x20,0x50,0x50,0x88,0x88,
0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,0x98,0xE8,0x80,0x80,0x05,0x05,0x05,
0x06,0x00,0x00,0x88,0x88,0x50,0x50,0x20,0x05,0x09,0x09,0x06,0x00,0xFE,0xF8,0x20,
0x40,0x70,0x80,0x80,0x70,0x08,0x10,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x88,
0x88,0x70,0x06,0x05,0x05,0x06,0x00,0x00,0xF8,0x50,0x50,0x54,0x48,0x05,0x07,0x07,
0x06,0x00,0xFE,0x70,0x88,0x88,0xC8,0xB0,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0xFE,
0x70,0x88,0x80,0x80,0x70,0x08,0x30,0x05,0x05,0x05,0x06,0x00,0x00,0x78,0x90,0x88,
0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x20,0x20,0x28,0x10,0x05,0x05,0x05,
0x06,0x00,0x00,0x90,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0xFE,0x10,0xA8,
0xA8,0xA8,0x70,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x50,0x20,0x50,
0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_7_201_201[28] U8G_FONT_SECTION("fontpage_7_201_201") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x50,0x88,0xA8,0xA8,0x50};
const u8g_fntpgm_uint8_t fontpage_7_204_206[59] U8G_FONT_SECTION("fontpage_7_204_206") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCC,0xCE,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x88,0x88,0x70,0x05,
0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x90,0x88,0x88,0x88,0x70,0x05,0x08,0x08,
0x06,0x00,0x00,0x10,0x20,0x00,0x50,0x88,0xA8,0xA8,0x50};
const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_166_166") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00,
0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ'
FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν'
FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ'
FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ'
FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί'
FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε'
FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ'
FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω'
FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ'
FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,32 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_135_135[31] U8G_FONT_SECTION("fontpage_2_135_135") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_2_140_141[47] U8G_FONT_SECTION("fontpage_2_140_141") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x80,0x80,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_2_145_145[31] U8G_FONT_SECTION("fontpage_2_145_145") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x91,0x91,0x00,0x08,0x00,0x00,
0x00,0x06,0x08,0x08,0x06,0x00,0x00,0x08,0x1C,0x08,0x78,0x88,0x88,0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_2_225_225[31] U8G_FONT_SECTION("fontpage_2_225_225") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE1,0xE1,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254_254") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'
FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č'
FONTDATA_ITEM(2, 145, 145, fontpage_2_145_145), // 'đ' -- 'đ'
FONTDATA_ITEM(2, 225, 225, fontpage_2_225_225), // 'š' -- 'š'
FONTDATA_ITEM(2, 254, 254, fontpage_2_254_254), // 'ž' -- 'ž'
};

View File

@@ -0,0 +1,15 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x48,0x90,0x00,0x88,0x88,0x88,0x88,0x70};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,111 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_97_161_164[65] U8G_FONT_SECTION("fontpage_97_161_164") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA4,0x00,0x07,0x00,0x00,
0x00,0x04,0x05,0x05,0x06,0x00,0x00,0xF0,0x10,0x60,0x40,0x80,0x05,0x07,0x07,0x06,
0x00,0x00,0xF8,0x08,0x28,0x30,0x20,0x20,0x40,0x04,0x05,0x05,0x06,0x00,0x00,0x10,
0x20,0x60,0xA0,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x10,0x20,0x60,0xA0,0x20,
0x20};
const u8g_fntpgm_uint8_t fontpage_97_166_166[30] U8G_FONT_SECTION("fontpage_97_166_166") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xF8,0x88,0x88,0x08,0x10,0x60};
const u8g_fntpgm_uint8_t fontpage_97_168_168[29] U8G_FONT_SECTION("fontpage_97_168_168") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x00,0x06,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0xF8};
const u8g_fntpgm_uint8_t fontpage_97_170_187[268] U8G_FONT_SECTION("fontpage_97_170_187") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAA,0xBB,0x00,0x0D,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0xF8,0x10,0x30,0x50,0x90,0x10,0x05,0x07,
0x07,0x06,0x00,0x00,0x40,0xF8,0x48,0x48,0x48,0x48,0x98,0x05,0x09,0x09,0x06,0x00,
0x00,0x28,0x08,0x40,0xF8,0x48,0x48,0x48,0x48,0x98,0x05,0x07,0x07,0x06,0x00,0x00,
0x20,0xF8,0x20,0x20,0xF8,0x10,0x10,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x20,
0xF8,0x20,0x20,0xF8,0x10,0x10,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x78,0x48,0x88,
0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x40,0x78,0x48,0x88,0x08,
0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x80,0xF8,0x90,0x90,0x10,0x10,0x20,0x05,
0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x80,0xF8,0x90,0x90,0x10,0x10,0x20,0x05,0x06,
0x06,0x06,0x00,0x00,0xF8,0x08,0x08,0x08,0x08,0xF8,0x05,0x09,0x09,0x06,0x00,0x00,
0x28,0x28,0x00,0xF8,0x08,0x08,0x08,0x08,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0x50,
0xF8,0x50,0x50,0x50,0x10,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x50,0xF8,
0x50,0x50,0x50,0x10,0x20,0x05,0x06,0x06,0x06,0x00,0x00,0xC0,0x08,0xC8,0x08,0x10,
0xE0,0x07,0x0D,0x0D,0x06,0x00,0x00,0x02,0x00,0x00,0x00,0x28,0x28,0x00,0xC0,0x08,
0xC8,0x08,0x10,0xE0,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x10,0x10,0x20,0x50,0x88,
0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x70,0x10,0x10,0x20,0x50,0x88,0x05,
0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xF8,0x48,0x50,0x40,0x38};
const u8g_fntpgm_uint8_t fontpage_97_189_193[85] U8G_FONT_SECTION("fontpage_97_189_193") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBD,0xC1,0x00,0x09,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x48,0x48,0x10,0x10,0x20,0x05,0x09,0x09,
0x06,0x00,0x00,0x28,0x28,0x00,0x88,0x48,0x48,0x10,0x10,0x20,0x05,0x07,0x07,0x06,
0x00,0x00,0x40,0x78,0x48,0xA8,0x18,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,
0x08,0x40,0x78,0x48,0xA8,0x18,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x60,
0x20,0xF8,0x20,0x20,0x40};
const u8g_fntpgm_uint8_t fontpage_97_195_211[241] U8G_FONT_SECTION("fontpage_97_195_211") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC3,0xD3,0x00,0x09,0x00,0x00,
0x00,0x05,0x04,0x04,0x06,0x00,0x00,0xA8,0xA8,0x08,0x30,0x05,0x06,0x06,0x06,0x00,
0x00,0xA8,0xA8,0xA8,0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,
0xA8,0xA8,0xA8,0x08,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x00,0xF8,0x20,
0x20,0x20,0x40,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x70,0x00,0xF8,0x20,0x20,
0x20,0x40,0x04,0x07,0x07,0x06,0x01,0x00,0x80,0x80,0xC0,0xA0,0x90,0x80,0x80,0x04,
0x09,0x09,0x06,0x01,0x00,0x50,0x10,0x80,0x80,0xC0,0xA0,0x90,0x80,0x80,0x05,0x07,
0x07,0x06,0x00,0x00,0x20,0x20,0xF8,0x20,0x20,0x40,0x80,0x05,0x06,0x06,0x06,0x00,
0x00,0x70,0x00,0x00,0x00,0x00,0xF8,0x05,0x06,0x06,0x06,0x00,0x00,0x78,0x08,0x28,
0x10,0x28,0xC0,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,0x10,0x20,0x70,0xA8,0x20,
0x03,0x06,0x06,0x06,0x01,0x00,0x20,0x20,0x20,0x40,0x40,0x80,0x05,0x06,0x06,0x06,
0x00,0x00,0x10,0x50,0x50,0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,
0x00,0x10,0x50,0x50,0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x18,0x18,0x00,
0x10,0x50,0x50,0x48,0x88,0x88,0x04,0x06,0x06,0x06,0x00,0x00,0x80,0x90,0xE0,0x80,
0x80,0x70,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x80,0x90,0xE0,0x80,0x80,
0x70};
const u8g_fntpgm_uint8_t fontpage_97_213_217[84] U8G_FONT_SECTION("fontpage_97_213_217") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD5,0xD9,0x00,0x09,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,
0x06,0x00,0x00,0x28,0x28,0x00,0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,0x06,
0x00,0x00,0x18,0x18,0x00,0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x05,0x05,0x06,0x00,
0x01,0x60,0xA0,0x10,0x10,0x08,0x05,0x08,0x08,0x06,0x00,0x01,0x28,0x28,0x00,0x60,
0xA0,0x10,0x10,0x08};
const u8g_fntpgm_uint8_t fontpage_97_219_220[45] U8G_FONT_SECTION("fontpage_97_219_220") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDB,0xDC,0x00,0x09,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xF8,0x20,0xA8,0xA8,0xA8,0x20,0x05,0x09,
0x09,0x06,0x00,0x00,0x28,0x08,0x20,0xF8,0x20,0xA8,0xA8,0xA8,0x20};
const u8g_fntpgm_uint8_t fontpage_97_222_223[41] U8G_FONT_SECTION("fontpage_97_222_223") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDE,0xDF,0x00,0x06,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x08,0x08,0x50,0x20,0x10,0x04,0x06,0x06,
0x06,0x01,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x30};
const u8g_fntpgm_uint8_t fontpage_97_225_237[174] U8G_FONT_SECTION("fontpage_97_225_237") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE1,0xED,0x00,0x07,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0x08,0x48,0x30,0x10,0x28,0xC0,0x05,0x06,0x06,
0x06,0x00,0x00,0xF0,0x40,0xF8,0x40,0x40,0x38,0x05,0x05,0x05,0x06,0x00,0x00,0x40,
0xF8,0x48,0x50,0x40,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xF8,0x48,0x50,0x40,
0x40,0x04,0x05,0x05,0x06,0x00,0x00,0x60,0x20,0x20,0x20,0xF0,0x05,0x06,0x06,0x06,
0x00,0x00,0x70,0x10,0x10,0x10,0x10,0xF8,0x04,0x05,0x05,0x06,0x00,0x00,0xF0,0x10,
0xF0,0x10,0xF0,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x08,0xF8,0x08,0x08,0xF8,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x00,0xF8,0x08,0x08,0x10,0x60,0x04,0x07,0x07,0x06,
0x00,0x00,0x10,0x90,0x90,0x90,0x90,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x20,
0x20,0xA0,0xA0,0xA8,0xA8,0xB0,0x05,0x06,0x06,0x06,0x00,0x00,0x80,0x80,0x80,0x88,
0xB0,0xC0,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0xF8};
const u8g_fntpgm_uint8_t fontpage_97_242_243[41] U8G_FONT_SECTION("fontpage_97_242_243") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF2,0xF3,0x00,0x06,0x00,0x00,
0x00,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x08,0xF8,0x08,0x10,0x60,0x05,0x06,0x06,
0x06,0x00,0x00,0xC0,0x08,0x08,0x08,0x10,0xE0};
const u8g_fntpgm_uint8_t fontpage_97_252_252[25] U8G_FONT_SECTION("fontpage_97_252_252") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x05,0x00,0x00,
0x00,0x05,0x02,0x02,0x06,0x00,0x03,0x80,0x78};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ'
FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ'
FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ'
FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ'
FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ'
FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ'
FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ'
FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ'
FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ'
FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ'
FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン'
FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー'
};

View File

@@ -0,0 +1,547 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_344_240_240[34] U8G_FONT_SECTION("fontpage_344_240_240") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0x11,0x17,0x21,0x41,0x81,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_345_224_224[41] U8G_FONT_SECTION("fontpage_345_224_224") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x08,
0x80,0x08,0x80,0x09,0x00,0x08,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_347_248_248[41] U8G_FONT_SECTION("fontpage_347_248_248") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,
0x80,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_348_137_137[45] U8G_FONT_SECTION("fontpage_348_137_137") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x89,0x89,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x00,0x80,0x00,0x80,0x01,0x00,0xFF,
0xC0,0x00,0x00,0x20,0x80,0x20,0x80,0x3F,0x00,0x20,0x80,0x3F,0x00};
const u8g_fntpgm_uint8_t fontpage_348_176_176[34] U8G_FONT_SECTION("fontpage_348_176_176") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB0,0xB0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0x11,0x11,0x21,0x41,0x81,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_348_197_197[34] U8G_FONT_SECTION("fontpage_348_197_197") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC5,0xC5,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0x11,0x21,0xC1,0x1E,0x21,0x41,
0x21,0x1E};
const u8g_fntpgm_uint8_t fontpage_352_196_196[41] U8G_FONT_SECTION("fontpage_352_196_196") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC4,0xC4,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x7F,0x80,0x08,0x80,0x08,0x80,0x08,0x80,0x08,
0x80,0x08,0x80,0x10,0x80,0x11,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_353_180_180[34] U8G_FONT_SECTION("fontpage_353_180_180") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB4,0xB4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x85,0x85,0x85,0x85,0x87,0x85,0x85,0xFD,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_354_248_248[41] U8G_FONT_SECTION("fontpage_354_248_248") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x3F,
0x80,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_356_132_132[43] U8G_FONT_SECTION("fontpage_356_132_132") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x00,0x09,0xFF,0x00,
0x00,0x0A,0x0A,0x14,0x0A,0x00,0xFF,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x3F,
0x80,0x00,0x00,0xFF,0xC0,0x04,0x00,0x04,0x00,0x04,0x00};
const u8g_fntpgm_uint8_t fontpage_356_244_244[43] U8G_FONT_SECTION("fontpage_356_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0xFF,0x00,
0x00,0x0A,0x0A,0x14,0x0A,0x00,0xFF,0x20,0x00,0x20,0x00,0x20,0x00,0x3F,0x80,0x00,
0x00,0x00,0x00,0xFF,0xC0,0x12,0x00,0x12,0x00,0x12,0x00};
const u8g_fntpgm_uint8_t fontpage_357_200_200[34] U8G_FONT_SECTION("fontpage_357_200_200") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x7D,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_357_228_228[45] U8G_FONT_SECTION("fontpage_357_228_228") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xE4,0xE4,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x81,0x00,0x81,0x00,0x81,0x00,0x81,
0x80,0x81,0x00,0x81,0x00,0xFD,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_357_249_249[45] U8G_FONT_SECTION("fontpage_357_249_249") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF9,0xF9,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x81,0x00,0x81,0x00,0x81,0x80,0x81,
0x00,0xFD,0x00,0x00,0x00,0x3E,0x00,0x41,0x00,0x41,0x00,0x3E,0x00};
const u8g_fntpgm_uint8_t fontpage_359_196_196[41] U8G_FONT_SECTION("fontpage_359_196_196") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC4,0xC4,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x20,0x00,0x20,0x00,0x20,0x00,0x3F,
0x80,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_359_204_204[45] U8G_FONT_SECTION("fontpage_359_204_204") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x20,0x00,0x3F,0x80,0x04,0x00,0xFF,
0xC0,0x00,0x00,0x3F,0x00,0x00,0x80,0x3F,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_359_217_217[45] U8G_FONT_SECTION("fontpage_359_217_217") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD9,0xD9,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x20,0x00,0x20,0x00,0x3F,0x80,0x04,
0x00,0xFF,0xC0,0x00,0x00,0x1F,0x00,0x20,0x80,0x20,0x80,0x1F,0x00};
const u8g_fntpgm_uint8_t fontpage_360_152_152[45] U8G_FONT_SECTION("fontpage_360_152_152") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x98,0x98,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7C,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x7E,
0x80,0x10,0x80,0x10,0x80,0xFF,0x80,0x00,0x80,0x00,0x80,0x00,0x80};
const u8g_fntpgm_uint8_t fontpage_360_156_156[45] U8G_FONT_SECTION("fontpage_360_156_156") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7C,0x80,0x40,0x80,0x40,0x80,0x7C,0x80,0x10,
0x80,0x10,0x80,0xFF,0x80,0x00,0x80,0x20,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_360_168_168[34] U8G_FONT_SECTION("fontpage_360_168_168") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x81,0x81,0xF9,0x21,0xFF,0x00,0x7F,0x41,
0x41,0x7F};
const u8g_fntpgm_uint8_t fontpage_361_164_164[45] U8G_FONT_SECTION("fontpage_361_164_164") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA4,0xA4,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7C,0x80,0x40,0x80,0x40,0x80,0x40,0x80,0x7C,
0x80,0x00,0x80,0xFE,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80};
const u8g_fntpgm_uint8_t fontpage_361_220_220[41] U8G_FONT_SECTION("fontpage_361_220_220") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xDC,0xDC,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x20,0x00,0x20,0x00,0x20,0x00,0x20,
0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_362_148_148[34] U8G_FONT_SECTION("fontpage_362_148_148") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x94,0x94,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x81,0x81,0x81,0x81,0x81,0x81,0xFD,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_366_252_252[45] U8G_FONT_SECTION("fontpage_366_252_252") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x09,0x00,0xF9,0x00,0x81,
0x80,0x81,0x00,0x81,0x00,0xFD,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_367_236_236[34] U8G_FONT_SECTION("fontpage_367_236_236") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xEC,0xEC,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF1,0x09,0x09,0xF1,0x87,0x81,0x81,0xF9,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_368_136_136[34] U8G_FONT_SECTION("fontpage_368_136_136") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF5,0x15,0x15,0xF5,0x8D,0x85,0x85,0xFD,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_368_165_165[34] U8G_FONT_SECTION("fontpage_368_165_165") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA5,0xA5,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF1,0x17,0xF1,0x87,0x81,0xF9,0x00,0x7F,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_368_220_220[41] U8G_FONT_SECTION("fontpage_368_220_220") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xDC,0xDC,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x00,0x80,0x3F,0x80,0x20,0x00,0x20,
0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_369_204_204[41] U8G_FONT_SECTION("fontpage_369_204_204") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x00,0x80,0x3F,0x80,0x20,0x00,0x20,
0x00,0x3F,0x80,0x12,0x00,0x12,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_370_244_244[41] U8G_FONT_SECTION("fontpage_370_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x00,0x80,0x3F,0x80,0x20,0x00,0x20,
0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_371_172_172[34] U8G_FONT_SECTION("fontpage_371_172_172") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0xF9,0x81,0x81,0x81,0xFD,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_371_176_176[34] U8G_FONT_SECTION("fontpage_371_176_176") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB0,0xB0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0xF9,0x81,0x81,0xFD,0x01,0x20,
0x20,0x3F};
const u8g_fntpgm_uint8_t fontpage_371_189_189[34] U8G_FONT_SECTION("fontpage_371_189_189") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xBD,0xBD,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0xF9,0x81,0x81,0xFD,0x00,0x41,0x3F,
0x41,0x3F};
const u8g_fntpgm_uint8_t fontpage_371_193_193[34] U8G_FONT_SECTION("fontpage_371_193_193") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC1,0xC1,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0xF9,0x81,0x81,0xFD,0x01,0x3E,0x21,
0x21,0x3E};
const u8g_fntpgm_uint8_t fontpage_372_200_200[34] U8G_FONT_SECTION("fontpage_372_200_200") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x89,0x89,0x8F,0x89,0xF9,0x00,0x3F,0x41,
0x41,0x3F};
const u8g_fntpgm_uint8_t fontpage_372_212_212[34] U8G_FONT_SECTION("fontpage_372_212_212") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD4,0xD4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF5,0x95,0x95,0x9D,0x95,0x95,0x95,0xF5,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_372_244_244[34] U8G_FONT_SECTION("fontpage_372_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x89,0x8F,0x89,0x8F,0xF9,0x01,0x21,0x20,
0x20,0x3F};
const u8g_fntpgm_uint8_t fontpage_373_168_168[41] U8G_FONT_SECTION("fontpage_373_168_168") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x20,0x80,0x20,0x80,0x20,0x80,0x3F,
0x80,0x04,0x00,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_373_187_187[45] U8G_FONT_SECTION("fontpage_373_187_187") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xBB,0xBB,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x20,0x80,0x20,0x80,0x3F,0x00,0x04,
0x00,0xFF,0xC0,0x00,0x00,0x04,0x00,0x0C,0x00,0x1A,0x00,0x61,0x80};
const u8g_fntpgm_uint8_t fontpage_375_248_248[34] U8G_FONT_SECTION("fontpage_375_248_248") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x89,0x89,0x89,0x89,0x89,0x89,0xF9,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_376_128_128[34] U8G_FONT_SECTION("fontpage_376_128_128") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x89,0x89,0x89,0xF9,0x00,0x3F,0x01,0x3F,
0x40,0x3F};
const u8g_fntpgm_uint8_t fontpage_376_148_148[45] U8G_FONT_SECTION("fontpage_376_148_148") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x94,0x94,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x89,0x00,0x89,0x00,0x89,0x00,0xF9,0x00,0x89,
0x80,0x89,0x00,0x89,0x00,0xF9,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_377_132_132[34] U8G_FONT_SECTION("fontpage_377_132_132") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x89,0x89,0x89,0xFF,0x89,0x89,0x89,0xF9,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_377_160_160[34] U8G_FONT_SECTION("fontpage_377_160_160") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA0,0xA0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x95,0x95,0x95,0xF5,0x9D,0x95,0x95,0xF5,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_377_168_168[34] U8G_FONT_SECTION("fontpage_377_168_168") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x95,0x95,0xFD,0x95,0xF5,0x00,0x3F,0x01,0x3F,
0x40,0x3F};
const u8g_fntpgm_uint8_t fontpage_377_248_248[45] U8G_FONT_SECTION("fontpage_377_248_248") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x20,0x80,0x20,0x80,0x3F,0x00,0x20,0x80,0x3F,
0x00,0x04,0x00,0xFF,0xC0,0x00,0x00,0x20,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_380_196_196[34] U8G_FONT_SECTION("fontpage_380_196_196") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC4,0xC4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x89,0x89,0x89,0xF9,0x89,0x89,0x89,0xF9,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_385_172_172[45] U8G_FONT_SECTION("fontpage_385_172_172") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x21,0x00,0x21,0x00,0x21,0x00,0x21,0x00,0x61,
0x80,0x51,0x00,0x99,0x00,0x89,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_385_189_189[45] U8G_FONT_SECTION("fontpage_385_189_189") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xBD,0xBD,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x21,0x00,0x21,0x00,0x21,0x00,0x51,0x80,0xD9,
0x00,0x89,0x00,0x00,0x00,0x41,0x00,0x7E,0x00,0x41,0x00,0x7E,0x00};
const u8g_fntpgm_uint8_t fontpage_385_200_200[34] U8G_FONT_SECTION("fontpage_385_200_200") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x25,0x25,0x25,0x45,0x67,0x65,0x95,0x95,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_386_164_164[34] U8G_FONT_SECTION("fontpage_386_164_164") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA4,0xA4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x21,0x21,0x27,0x51,0x89,0x00,0x3F,0x01,0x3F,
0x40,0x3F};
const u8g_fntpgm_uint8_t fontpage_387_140_141[69] U8G_FONT_SECTION("fontpage_387_140_141") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x04,0x00,0x0C,0x00,0x0C,0x00,0x12,0x00,0x31,
0x00,0x44,0x80,0x04,0x00,0x04,0x00,0xFF,0xC0,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x04,
0x00,0x0C,0x00,0x13,0x00,0x65,0x80,0x04,0x00,0xFF,0xC0,0x00,0x00,0x3F,0x00,0x00,
0x80,0x00,0x80,0x00,0x80};
const u8g_fntpgm_uint8_t fontpage_389_164_164[41] U8G_FONT_SECTION("fontpage_389_164_164") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA4,0xA4,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x04,0x00,0x0C,0x00,0x0C,0x00,0x12,0x00,0x31,
0x00,0x40,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_389_172_172[45] U8G_FONT_SECTION("fontpage_389_172_172") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x04,0x00,0x1A,0x00,0x61,0x80,0x00,0x00,0xFF,
0xC0,0x00,0x00,0x3F,0x00,0x00,0x80,0x3F,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_389_220_221[51] U8G_FONT_SECTION("fontpage_389_220_221") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xDC,0xDD,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x21,0x21,0x21,0x21,0x21,0x51,0xC9,0x89,0x01,
0x01,0x01,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x21,0x21,0x21,0x51,0xD9,0x89,0x00,0x7F,
0x01,0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_395_180_180[34] U8G_FONT_SECTION("fontpage_395_180_180") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB4,0xB4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x89,0x89,0x8F,0x89,0x89,0x89,0x71,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_395_198_198[45] U8G_FONT_SECTION("fontpage_395_198_198") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x71,0x00,0x89,0x00,0x8F,0x00,0x89,0x00,0x89,
0x00,0x71,0x00,0x00,0x00,0x4A,0x00,0x72,0x00,0x4D,0x00,0x74,0x80};
const u8g_fntpgm_uint8_t fontpage_395_209_209[34] U8G_FONT_SECTION("fontpage_395_209_209") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x65,0x95,0x95,0x9D,0x95,0x65,0x00,0x7F,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_395_212_212[45] U8G_FONT_SECTION("fontpage_395_212_212") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD4,0xD4,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x65,0x00,0x95,0x00,0x95,0x00,0x9D,0x00,0x95,
0x00,0x65,0x00,0x05,0x00,0x25,0x00,0x20,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_395_244_244[34] U8G_FONT_SECTION("fontpage_395_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x8F,0x89,0x8F,0x71,0x00,0x3F,0x01,0x3F,
0x40,0x3F};
const u8g_fntpgm_uint8_t fontpage_396_136_136[34] U8G_FONT_SECTION("fontpage_396_136_136") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x65,0x95,0x9D,0x95,0x95,0x9D,0x95,0x65,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_396_164_164[41] U8G_FONT_SECTION("fontpage_396_164_164") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA4,0xA4,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x1E,0x00,0x21,0x00,0x20,0x80,0x20,0x80,0x21,
0x00,0x1E,0x00,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_396_168_168[45] U8G_FONT_SECTION("fontpage_396_168_168") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA8,0xA8,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x1F,0x00,0x20,0x80,0x20,0x80,0x1F,0x00,0x04,
0x00,0x04,0x00,0xFF,0xC0,0x00,0x00,0x20,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_396_196_196[45] U8G_FONT_SECTION("fontpage_396_196_196") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC4,0xC4,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x38,0x80,0x44,0x80,0x44,0x80,0x44,0x80,0x38,
0xC0,0x10,0x80,0xFE,0x80,0x00,0x80,0x20,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_397_208_208[34] U8G_FONT_SECTION("fontpage_397_208_208") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD0,0xD0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x89,0x89,0x71,0x01,0xFF,0x21,0x27,0x41,
0x40,0x7F};
const u8g_fntpgm_uint8_t fontpage_398_132_132[45] U8G_FONT_SECTION("fontpage_398_132_132") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x38,0x80,0x44,0x80,0x42,0x80,0x44,0x80,0x38,
0x80,0x00,0x80,0xFE,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80};
const u8g_fntpgm_uint8_t fontpage_398_188_188[41] U8G_FONT_SECTION("fontpage_398_188_188") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xBC,0xBC,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x1E,0x00,0x21,0x00,0x20,0x80,0x20,0x80,0x21,
0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_398_204_204[45] U8G_FONT_SECTION("fontpage_398_204_204") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x1E,0x00,0x21,0x00,0x21,0x00,0x1E,0x00,0x00,
0x00,0xFF,0xC0,0x00,0x00,0x3F,0x00,0x20,0x80,0x20,0x80,0x3F,0x00};
const u8g_fntpgm_uint8_t fontpage_398_244_244[34] U8G_FONT_SECTION("fontpage_398_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x49,0x89,0x89,0x89,0x89,0x49,0x71,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_398_252_253[51] U8G_FONT_SECTION("fontpage_398_252_253") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xFC,0xFD,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x89,0x89,0x89,0x71,0x00,0x3F,0x01,0x3F,
0x40,0x3F,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x89,0x89,0x89,0x71,0x00,0x77,0x11,
0x71,0x41,0x79};
const u8g_fntpgm_uint8_t fontpage_399_133_133[34] U8G_FONT_SECTION("fontpage_399_133_133") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x85,0x85,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x89,0x89,0x89,0x89,0x71,0x00,0x41,0x3F,
0x41,0x3F};
const u8g_fntpgm_uint8_t fontpage_399_144_145[73] U8G_FONT_SECTION("fontpage_399_144_145") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x90,0x91,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x11,0x00,0x11,0x00,0x21,
0x80,0x71,0x00,0xC9,0x00,0x85,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x09,0x0B,0x16,
0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x11,0x00,0x31,0x80,0x49,0x00,0x85,0x00,0x00,
0x00,0x7E,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_399_152_152[45] U8G_FONT_SECTION("fontpage_399_152_152") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x98,0x98,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x11,0x00,0x11,0x80,0x79,0x00,0x85,
0x00,0x00,0x00,0x7E,0x00,0x01,0x00,0x7E,0x00,0x40,0x00,0x7F,0x00};
const u8g_fntpgm_uint8_t fontpage_399_165_165[45] U8G_FONT_SECTION("fontpage_399_165_165") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA5,0xA5,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x11,0x00,0x31,0x80,0x79,
0x00,0x85,0x00,0x00,0x00,0x3E,0x00,0x41,0x00,0x41,0x00,0x3E,0x00};
const u8g_fntpgm_uint8_t fontpage_399_172_172[45] U8G_FONT_SECTION("fontpage_399_172_172") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7A,0x80,0x0A,0x80,0x0A,0x80,0x12,0x80,0x13,
0x80,0x2A,0x80,0x6A,0x80,0xC6,0x80,0x02,0x80,0x02,0x80,0x02,0x80};
const u8g_fntpgm_uint8_t fontpage_400_128_128[34] U8G_FONT_SECTION("fontpage_400_128_128") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x11,0x17,0x31,0x71,0xC9,0x85,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_400_132_132[34] U8G_FONT_SECTION("fontpage_400_132_132") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x17,0x31,0x49,0x85,0x01,0x21,0x20,
0x20,0x3F};
const u8g_fntpgm_uint8_t fontpage_400_149_149[34] U8G_FONT_SECTION("fontpage_400_149_149") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x95,0x95,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x17,0x31,0x49,0x85,0x00,0x3E,0x21,
0x21,0x3E};
const u8g_fntpgm_uint8_t fontpage_400_156_156[45] U8G_FONT_SECTION("fontpage_400_156_156") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x7A,0x80,0x0A,0x80,0x0A,0x80,0x16,0x80,0x12,
0x80,0x2A,0x80,0x4A,0x80,0x86,0x80,0x02,0x80,0x02,0x80,0x02,0x80};
const u8g_fntpgm_uint8_t fontpage_401_253_253[45] U8G_FONT_SECTION("fontpage_401_253_253") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xFD,0xFD,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x01,0x00,0x0E,0x00,0x71,0x80,0x00,
0x00,0xFF,0xC0,0x04,0x00,0x3F,0x00,0x00,0x80,0x00,0x80,0x00,0x80};
const u8g_fntpgm_uint8_t fontpage_402_128_128[45] U8G_FONT_SECTION("fontpage_402_128_128") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x01,0x00,0x0E,0x00,0x71,0x80,0x00,
0x00,0xFF,0xC0,0x04,0x00,0x24,0x00,0x24,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_402_145_145[45] U8G_FONT_SECTION("fontpage_402_145_145") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x91,0x91,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x01,0x00,0x0E,0x00,0x71,0x80,0x00,
0x00,0xFF,0xC0,0x04,0x00,0x1F,0x00,0x20,0x80,0x20,0x80,0x1F,0x00};
const u8g_fntpgm_uint8_t fontpage_403_144_144[45] U8G_FONT_SECTION("fontpage_403_144_144") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x90,0x90,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x3F,0x00,0x0E,0x00,0x71,0x80,0x00,0x00,0xFF,
0xC0,0x00,0x00,0x3F,0x00,0x00,0x80,0x3F,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_403_192_192[34] U8G_FONT_SECTION("fontpage_403_192_192") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x09,0x11,0x31,0x31,0xC9,0x85,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_409_152_152[34] U8G_FONT_SECTION("fontpage_409_152_152") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x98,0x98,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xF9,0x11,0x17,0x31,0x49,0x85,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_410_136_136[41] U8G_FONT_SECTION("fontpage_410_136_136") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x1E,0x00,0x00,0x00,0x3F,0x00,0x02,0x00,0x0E,
0x00,0x71,0x80,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_411_149_149[45] U8G_FONT_SECTION("fontpage_411_149_149") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x95,0x95,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x1E,0x00,0x00,0x00,0x3F,0x00,0x0C,0x00,0x73,
0x80,0x00,0x00,0xFF,0xC0,0x04,0x00,0x3F,0x00,0x00,0x80,0x00,0x80};
const u8g_fntpgm_uint8_t fontpage_411_156_156[47] U8G_FONT_SECTION("fontpage_411_156_156") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFD,0x00,
0x00,0x0A,0x0C,0x18,0x0A,0x00,0xFD,0x1E,0x00,0x00,0x00,0x3F,0x00,0x1A,0x00,0x21,
0x00,0xFF,0xC0,0x04,0x00,0x3F,0x00,0x00,0x80,0x3F,0x00,0x20,0x00,0x3F,0x80};
const u8g_fntpgm_uint8_t fontpage_411_164_164[45] U8G_FONT_SECTION("fontpage_411_164_164") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA4,0xA4,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x1E,0x00,0x00,0x00,0x3F,0x00,0x0C,0x00,0x73,
0x80,0x00,0x00,0xFF,0xC0,0x04,0x00,0x3F,0x00,0x20,0x80,0x3F,0x00};
const u8g_fntpgm_uint8_t fontpage_411_232_232[45] U8G_FONT_SECTION("fontpage_411_232_232") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xE8,0xE8,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x00,0xFE,0x38,0x80,0x00,0x80,0x7C,0x80,0x18,0x80,0x66,
0x80,0x00,0x80,0xFE,0x80,0x10,0x80,0x10,0x80,0x10,0x80,0x10,0x80};
const u8g_fntpgm_uint8_t fontpage_412_216_216[34] U8G_FONT_SECTION("fontpage_412_216_216") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD8,0xD8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xF9,0x09,0x11,0x31,0x49,0x85,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_412_232_232[34] U8G_FONT_SECTION("fontpage_412_232_232") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xE8,0xE8,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xF9,0x09,0x31,0xCD,0x00,0x3F,0x41,
0x41,0x3F};
const u8g_fntpgm_uint8_t fontpage_412_244_244[45] U8G_FONT_SECTION("fontpage_412_244_244") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF4,0xF4,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x09,0x00,0x09,0x00,0xF1,0x00,0x11,
0x80,0x21,0x00,0x41,0x00,0x81,0x00,0x01,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_414_156_156[34] U8G_FONT_SECTION("fontpage_414_156_156") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x09,0x0F,0xF1,0x11,0x2F,0x41,0x81,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_417_209_209[45] U8G_FONT_SECTION("fontpage_417_209_209") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0xF9,0x00,0x81,0x00,0xF9,0x80,0x81,0x00,0x81,
0x00,0xFD,0x00,0x00,0x00,0x41,0x00,0x7E,0x00,0x41,0x00,0x7E,0x00};
const u8g_fntpgm_uint8_t fontpage_418_176_176[34] U8G_FONT_SECTION("fontpage_418_176_176") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB0,0xB0,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF9,0x81,0x81,0xF7,0x81,0x81,0x81,0xF9,0x01,
0x01,0x01};
const u8g_fntpgm_uint8_t fontpage_418_204_204[34] U8G_FONT_SECTION("fontpage_418_204_204") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0xF5,0x85,0x85,0xED,0x85,0x85,0x85,0xFD,0x05,
0x05,0x05};
const u8g_fntpgm_uint8_t fontpage_419_160_160[41] U8G_FONT_SECTION("fontpage_419_160_160") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xA0,0xA0,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x20,0x00,0x3F,0x00,0x20,0x00,0x20,
0x00,0x3F,0x80,0x04,0x00,0x04,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_421_184_184[41] U8G_FONT_SECTION("fontpage_421_184_184") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xB8,0xB8,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x20,0x00,0x3F,0x00,0x20,0x00,0x20,
0x00,0x3F,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_423_156_156[45] U8G_FONT_SECTION("fontpage_423_156_156") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x9C,0x9C,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0xFA,0x80,0x4A,0x80,0x4E,0x80,0x4A,0x80,0x4A,
0x80,0xFE,0x80,0x02,0x80,0x12,0x80,0x10,0x00,0x10,0x00,0x1F,0xC0};
const u8g_fntpgm_uint8_t fontpage_426_132_132[41] U8G_FONT_SECTION("fontpage_426_132_132") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x84,0x84,0x00,0x09,0x00,0x00,
0x00,0x0A,0x09,0x12,0x0A,0x00,0x00,0x3F,0x80,0x12,0x00,0x12,0x00,0x12,0x00,0x12,
0x00,0x7F,0x80,0x00,0x00,0x00,0x00,0xFF,0xC0};
const u8g_fntpgm_uint8_t fontpage_426_216_216[45] U8G_FONT_SECTION("fontpage_426_216_216") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD8,0xD8,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x71,0x00,0x01,0x00,0xFD,0x00,0x01,0x00,0x71,
0x80,0x89,0x00,0x89,0x00,0x89,0x00,0x71,0x00,0x01,0x00,0x01,0x00};
const u8g_fntpgm_uint8_t fontpage_426_233_233[45] U8G_FONT_SECTION("fontpage_426_233_233") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xE9,0xE9,0x00,0x09,0xFE,0x00,
0x00,0x09,0x0B,0x16,0x0A,0x01,0xFE,0x71,0x00,0x01,0x00,0xFD,0x00,0x49,0x80,0x89,
0x00,0x79,0x00,0x00,0x00,0x41,0x00,0x7E,0x00,0x41,0x00,0x7E,0x00};
const u8g_fntpgm_uint8_t fontpage_428_200_200[45] U8G_FONT_SECTION("fontpage_428_200_200") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xC8,0xC8,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x0E,0x00,0x00,0x00,0x7F,0x80,0x21,0x00,0x1E,
0x00,0x04,0x00,0xFF,0xC0,0x00,0x00,0x3F,0x00,0x20,0x80,0x3F,0x00};
const u8g_fntpgm_uint8_t fontpage_428_212_212[45] U8G_FONT_SECTION("fontpage_428_212_212") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xD4,0xD4,0x00,0x09,0xFE,0x00,
0x00,0x0A,0x0B,0x16,0x0A,0x00,0xFE,0x38,0x80,0x00,0x80,0x7E,0x80,0x00,0x80,0x38,
0x80,0x44,0xC0,0x3C,0x80,0x10,0x80,0xFE,0x80,0x00,0x80,0x00,0x80};
const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431_136_136") = {
0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x09,0xFE,0x00,
0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xFD,0x01,0x71,0x49,0x89,0x49,0x71,
0x01,0x01};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거'
FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고'
FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그'
FONTDATA_ITEM(348, 137, 137, fontpage_348_137_137), // '급' -- '급'
FONTDATA_ITEM(348, 176, 176, fontpage_348_176_176), // '기' -- '기'
FONTDATA_ITEM(348, 197, 197, fontpage_348_197_197), // '깅' -- '깅'
FONTDATA_ITEM(352, 196, 196, fontpage_352_196_196), // '끄' -- '끄'
FONTDATA_ITEM(353, 180, 180, fontpage_353_180_180), // '내' -- '내'
FONTDATA_ITEM(354, 248, 248, fontpage_354_248_248), // '노' -- '노'
FONTDATA_ITEM(356, 132, 132, fontpage_356_132_132), // '누' -- '누'
FONTDATA_ITEM(356, 244, 244, fontpage_356_244_244), // '뉴' -- '뉴'
FONTDATA_ITEM(357, 200, 200, fontpage_357_200_200), // '니' -- '니'
FONTDATA_ITEM(357, 228, 228, fontpage_357_228_228), // '다' -- '다'
FONTDATA_ITEM(357, 249, 249, fontpage_357_249_249), // '당' -- '당'
FONTDATA_ITEM(359, 196, 196, fontpage_359_196_196), // '도' -- '도'
FONTDATA_ITEM(359, 204, 204, fontpage_359_204_204), // '돌' -- '돌'
FONTDATA_ITEM(359, 217, 217, fontpage_359_217_217), // '동' -- '동'
FONTDATA_ITEM(360, 152, 152, fontpage_360_152_152), // '되' -- '되'
FONTDATA_ITEM(360, 156, 156, fontpage_360_156_156), // '된' -- '된'
FONTDATA_ITEM(360, 168, 168, fontpage_360_168_168), // '됨' -- '됨'
FONTDATA_ITEM(361, 164, 164, fontpage_361_164_164), // '뒤' -- '뒤'
FONTDATA_ITEM(361, 220, 220, fontpage_361_220_220), // '드' -- '드'
FONTDATA_ITEM(362, 148, 148, fontpage_362_148_148), // '디' -- '디'
FONTDATA_ITEM(366, 252, 252, fontpage_366_252_252), // '라' -- '라'
FONTDATA_ITEM(367, 236, 236, fontpage_367_236_236), // '러' -- '러'
FONTDATA_ITEM(368, 136, 136, fontpage_368_136_136), // '레' -- '레'
FONTDATA_ITEM(368, 165, 165, fontpage_368_165_165), // '력' -- '력'
FONTDATA_ITEM(368, 220, 220, fontpage_368_220_220), // '로' -- '로'
FONTDATA_ITEM(369, 204, 204, fontpage_369_204_204), // '료' -- '료'
FONTDATA_ITEM(370, 244, 244, fontpage_370_244_244), // '르' -- '르'
FONTDATA_ITEM(371, 172, 172, fontpage_371_172_172), // '리' -- '리'
FONTDATA_ITEM(371, 176, 176, fontpage_371_176_176), // '린' -- '린'
FONTDATA_ITEM(371, 189, 189, fontpage_371_189_189), // '립' -- '립'
FONTDATA_ITEM(371, 193, 193, fontpage_371_193_193), // '링' -- '링'
FONTDATA_ITEM(372, 200, 200, fontpage_372_200_200), // '멈' -- '멈'
FONTDATA_ITEM(372, 212, 212, fontpage_372_212_212), // '메' -- '메'
FONTDATA_ITEM(372, 244, 244, fontpage_372_244_244), // '면' -- '면'
FONTDATA_ITEM(373, 168, 168, fontpage_373_168_168), // '모' -- '모'
FONTDATA_ITEM(373, 187, 187, fontpage_373_187_187), // '못' -- '못'
FONTDATA_ITEM(375, 248, 248, fontpage_375_248_248), // '미' -- '미'
FONTDATA_ITEM(376, 128, 128, fontpage_376_128_128), // '밀' -- '밀'
FONTDATA_ITEM(376, 148, 148, fontpage_376_148_148), // '바' -- '바'
FONTDATA_ITEM(377, 132, 132, fontpage_377_132_132), // '버' -- '버'
FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베'
FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨'
FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본'
FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비'
FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사'
FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽'
FONTDATA_ITEM(385, 200, 200, fontpage_385_200_200), // '새' -- '새'
FONTDATA_ITEM(386, 164, 164, fontpage_386_164_164), // '설' -- '설'
FONTDATA_ITEM(387, 140, 141, fontpage_387_140_141), // '소' -- '속'
FONTDATA_ITEM(389, 164, 164, fontpage_389_164_164), // '스' -- '스'
FONTDATA_ITEM(389, 172, 172, fontpage_389_172_172), // '슬' -- '슬'
FONTDATA_ITEM(389, 220, 221, fontpage_389_220_221), // '시' -- '식'
FONTDATA_ITEM(395, 180, 180, fontpage_395_180_180), // '어' -- '어'
FONTDATA_ITEM(395, 198, 198, fontpage_395_198_198), // '없' -- '없'
FONTDATA_ITEM(395, 209, 209, fontpage_395_209_209), // '엑' -- '엑'
FONTDATA_ITEM(395, 212, 212, fontpage_395_212_212), // '엔' -- '엔'
FONTDATA_ITEM(395, 244, 244, fontpage_395_244_244), // '열' -- '열'
FONTDATA_ITEM(396, 136, 136, fontpage_396_136_136), // '예' -- '예'
FONTDATA_ITEM(396, 164, 164, fontpage_396_164_164), // '오' -- '오'
FONTDATA_ITEM(396, 168, 168, fontpage_396_168_168), // '온' -- '온'
FONTDATA_ITEM(396, 196, 196, fontpage_396_196_196), // '완' -- '완'
FONTDATA_ITEM(397, 208, 208, fontpage_397_208_208), // '원' -- '원'
FONTDATA_ITEM(398, 132, 132, fontpage_398_132_132), // '위' -- '위'
FONTDATA_ITEM(398, 188, 188, fontpage_398_188_188), // '으' -- '으'
FONTDATA_ITEM(398, 204, 204, fontpage_398_204_204), // '음' -- '음'
FONTDATA_ITEM(398, 244, 244, fontpage_398_244_244), // '이' -- '이'
FONTDATA_ITEM(398, 252, 253, fontpage_398_252_253), // '일' -- '읽'
FONTDATA_ITEM(399, 133, 133, fontpage_399_133_133), // '입' -- '입'
FONTDATA_ITEM(399, 144, 145, fontpage_399_144_145), // '자' -- '작'
FONTDATA_ITEM(399, 152, 152, fontpage_399_152_152), // '잘' -- '잘'
FONTDATA_ITEM(399, 165, 165, fontpage_399_165_165), // '장' -- '장'
FONTDATA_ITEM(399, 172, 172, fontpage_399_172_172), // '재' -- '재'
FONTDATA_ITEM(400, 128, 128, fontpage_400_128_128), // '저' -- '저'
FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전'
FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정'
FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제'
FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽'
FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준'
FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중'
FONTDATA_ITEM(403, 144, 144, fontpage_403_144_144), // '즐' -- '즐'
FONTDATA_ITEM(403, 192, 192, fontpage_403_192_192), // '지' -- '지'
FONTDATA_ITEM(409, 152, 152, fontpage_409_152_152), // '처' -- '처'
FONTDATA_ITEM(410, 136, 136, fontpage_410_136_136), // '초' -- '초'
FONTDATA_ITEM(411, 149, 149, fontpage_411_149_149), // '축' -- '축'
FONTDATA_ITEM(411, 156, 156, fontpage_411_156_156), // '출' -- '출'
FONTDATA_ITEM(411, 164, 164, fontpage_411_164_164), // '춤' -- '춤'
FONTDATA_ITEM(411, 232, 232, fontpage_411_232_232), // '취' -- '취'
FONTDATA_ITEM(412, 216, 216, fontpage_412_216_216), // '치' -- '치'
FONTDATA_ITEM(412, 232, 232, fontpage_412_232_232), // '침' -- '침'
FONTDATA_ITEM(412, 244, 244, fontpage_412_244_244), // '카' -- '카'
FONTDATA_ITEM(414, 156, 156, fontpage_414_156_156), // '켜' -- '켜'
FONTDATA_ITEM(417, 209, 209, fontpage_417_209_209), // '탑' -- '탑'
FONTDATA_ITEM(418, 176, 176, fontpage_418_176_176), // '터' -- '터'
FONTDATA_ITEM(418, 204, 204, fontpage_418_204_204), // '테' -- '테'
FONTDATA_ITEM(419, 160, 160, fontpage_419_160_160), // '토' -- '토'
FONTDATA_ITEM(421, 184, 184, fontpage_421_184_184), // '트' -- '트'
FONTDATA_ITEM(423, 156, 156, fontpage_423_156_156), // '펜' -- '펜'
FONTDATA_ITEM(426, 132, 132, fontpage_426_132_132), // '프' -- '프'
FONTDATA_ITEM(426, 216, 216, fontpage_426_216_216), // '하' -- '하'
FONTDATA_ITEM(426, 233, 233, fontpage_426_233_233), // '합' -- '합'
FONTDATA_ITEM(428, 200, 200, fontpage_428_200_200), // '홈' -- '홈'
FONTDATA_ITEM(428, 212, 212, fontpage_428_212_212), // '화' -- '화'
FONTDATA_ITEM(431, 136, 136, fontpage_431_136_136), // '히' -- '히'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,40 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_132_133[45] U8G_FONT_SECTION("fontpage_2_132_133") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x84,0x85,0x00,0x07,0xFE,0x00,
0x00,0x05,0x09,0x09,0x06,0x00,0xFE,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x10,0x08,
0x05,0x07,0x07,0x06,0x00,0xFE,0x70,0x08,0x78,0x88,0x78,0x20,0x30};
const u8g_fntpgm_uint8_t fontpage_2_135_135[31] U8G_FONT_SECTION("fontpage_2_135_135") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_2_153_153[30] U8G_FONT_SECTION("fontpage_2_153_153") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x99,0x99,0x00,0x05,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0xFE,0x70,0x88,0xF0,0x80,0x70,0x20,0x30};
const u8g_fntpgm_uint8_t fontpage_2_193_196[73] U8G_FONT_SECTION("fontpage_2_193_196") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC1,0xC4,0x00,0x0A,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x40,0x60,0xC0,0x40,0x40,0x78,0x03,0x07,
0x07,0x06,0x01,0x00,0xC0,0x40,0x60,0xC0,0x40,0x40,0xE0,0x05,0x0A,0x0A,0x06,0x00,
0x00,0x10,0x20,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,0x88,0x05,0x08,0x08,0x06,0x00,
0x00,0x10,0x20,0x00,0xB0,0xC8,0x88,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_2_218_219[47] U8G_FONT_SECTION("fontpage_2_218_219") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDA,0xDB,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x10,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252_252") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 132, 133, fontpage_2_132_133), // 'Ą' -- 'ą'
FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć'
FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę'
FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń'
FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś'
FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż'
};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,9 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {};

View File

@@ -0,0 +1,73 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_8_144_168[348] U8G_FONT_SECTION("fontpage_8_144_168") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0xA8,0x00,0x0A,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0xF0,0x80,0x80,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,
0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,
0x80,0x80,0x80,0x80,0x80,0x05,0x08,0x08,0x06,0x00,0xFF,0x30,0x50,0x50,0x50,0x50,
0x50,0xF8,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,
0x05,0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0x70,0x20,0x70,0xA8,0xA8,0x05,0x07,0x07,
0x06,0x00,0x00,0x70,0x88,0x08,0x70,0x08,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,
0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x88,0x70,0x00,
0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,
0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x48,0x48,
0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x88,
0x88,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,
0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x05,
0x07,0x07,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,
0x00,0x00,0x88,0x88,0x88,0x88,0x78,0x08,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x20,
0x70,0xA8,0xA8,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,
0x50,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0x90,0x90,0xF8,
0x08,0x08,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x78,0x08,0x08,0x08,0x05,
0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xF8};
const u8g_fntpgm_uint8_t fontpage_8_171_173[56] U8G_FONT_SECTION("fontpage_8_171_173") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAB,0xAD,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xC8,0xA8,0xA8,0xC8,0x04,0x07,
0x07,0x06,0x01,0x00,0x80,0x80,0x80,0xE0,0x90,0x90,0xE0,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x08,0x78,0x08,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_8_175_207[400] U8G_FONT_SECTION("fontpage_8_175_207") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAF,0xCF,0x00,0x08,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x78,0x88,0x88,0x78,0x28,0x48,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x70,
0x80,0xF0,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF0,0x88,0xF0,0x88,
0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x05,0x06,0x06,0x06,
0x00,0xFF,0x30,0x50,0x50,0x50,0xF8,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,
0xF0,0x80,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0x70,0x20,0x70,0xA8,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x30,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x88,
0x98,0xA8,0xC8,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x88,0x98,0xA8,
0xC8,0x88,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,0x90,0x05,0x05,0x05,
0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0xD8,
0xA8,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xF8,0x88,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,
0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,0xF0,0x80,
0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x05,0x05,0x05,0x06,
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,
0x88,0x78,0x08,0x70,0x05,0x09,0x09,0x06,0x00,0xFE,0x20,0x20,0x70,0xA8,0xA8,0xA8,
0x70,0x20,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x05,0x07,
0x07,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0xF8,0x08,0x08,0x05,0x05,0x05,0x06,0x00,
0x00,0x88,0x88,0x78,0x08,0x08,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,
0xF8,0x05,0x07,0x07,0x06,0x00,0xFE,0xA8,0xA8,0xA8,0xA8,0xF8,0x08,0x08,0x05,0x05,
0x05,0x06,0x00,0x00,0xC0,0x40,0x70,0x48,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x88,
0x88,0xC8,0xA8,0xC8,0x04,0x05,0x05,0x06,0x01,0x00,0x80,0x80,0xE0,0x90,0xE0,0x04,
0x05,0x05,0x06,0x01,0x00,0xE0,0x10,0x70,0x10,0xE0,0x05,0x05,0x05,0x06,0x00,0x00,
0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06,0x01,0x00,0x70,0x90,0x70,0x50,0x90
};
const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209_209") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xF0,0x80,0x70};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 144, 168, fontpage_8_144_168), // 'А' -- 'Ш'
FONTDATA_ITEM(8, 171, 173, fontpage_8_171_173), // 'Ы' -- 'Э'
FONTDATA_ITEM(8, 175, 207, fontpage_8_175_207), // 'Я' -- 'я'
FONTDATA_ITEM(8, 209, 209, fontpage_8_209_209), // 'ё' -- 'ё'
};

View File

@@ -0,0 +1,49 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_140_143[79] U8G_FONT_SECTION("fontpage_2_140_143") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8F,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x80,0x80,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x88,0x70,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0xF0,0x06,
0x0A,0x0A,0x06,0x00,0x00,0x14,0x08,0x00,0x08,0x08,0x78,0x88,0x88,0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_2_186_186[33] U8G_FONT_SECTION("fontpage_2_186_186") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBA,0xBA,0x00,0x0A,0x00,0x00,
0x00,0x03,0x0A,0x0A,0x06,0x01,0x00,0x20,0x40,0x00,0xC0,0x40,0x40,0x40,0x40,0x40,
0xE0};
const u8g_fntpgm_uint8_t fontpage_2_189_190[49] U8G_FONT_SECTION("fontpage_2_189_190") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBD,0xBE,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x80,0x80,0x80,0x80,0x80,0x80,
0xF8,0x03,0x0A,0x0A,0x06,0x01,0x00,0xA0,0x40,0x00,0xC0,0x40,0x40,0x40,0x40,0x40,
0xE0};
const u8g_fntpgm_uint8_t fontpage_2_199_200[47] U8G_FONT_SECTION("fontpage_2_199_200") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC8,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x88,0x88,0xC8,0xA8,0x98,0x88,
0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xB0,0xC8,0x88,0x88,0x88};
const u8g_fntpgm_uint8_t fontpage_2_224_225[47] U8G_FONT_SECTION("fontpage_2_224_225") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE0,0xE1,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x70,0x88,0x80,0x70,0x08,0x88,
0x70,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0x78,0x80,0x70,0x08,0xF0};
const u8g_fntpgm_uint8_t fontpage_2_229_229[33] U8G_FONT_SECTION("fontpage_2_229_229") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE5,0xE5,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0x20,0x20,0xF8,0x20,0x20,0x20,
0x18};
const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253_254") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFD,0xFE,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80,
0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď'
FONTDATA_ITEM(2, 186, 186, fontpage_2_186_186), // 'ĺ' -- 'ĺ'
FONTDATA_ITEM(2, 189, 190, fontpage_2_189_190), // 'Ľ' -- 'ľ'
FONTDATA_ITEM(2, 199, 200, fontpage_2_199_200), // 'Ň' -- 'ň'
FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š'
FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť'
FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž'
};

View File

@@ -0,0 +1,231 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_8_128_255[1677] U8G_FONT_SECTION("fontpage_8_128_255") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x00,0x0A,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,0x20,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,
0xF8,0x05,0x09,0x09,0x06,0x00,0x00,0x50,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,
0x05,0x09,0x09,0x06,0x00,0xFE,0xE0,0x40,0x40,0x70,0x48,0x48,0x48,0x08,0x30,0x05,
0x0A,0x0A,0x06,0x00,0x00,0x10,0x20,0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,
0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0xF0,0x80,0x88,0x70,0x05,0x07,0x07,0x06,
0x00,0x00,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x03,0x07,0x07,0x06,0x01,0x00,0xE0,
0x40,0x40,0x40,0x40,0x40,0xE0,0x03,0x09,0x09,0x06,0x01,0x00,0xA0,0x00,0xE0,0x40,
0x40,0x40,0x40,0x40,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x38,0x10,0x10,0x10,0x10,
0x90,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x60,0xA0,0xA0,0xB0,0xA8,0xA8,0xB0,0x05,
0x07,0x07,0x06,0x00,0x00,0xA0,0xA0,0xA0,0xF0,0xA8,0xA8,0xB0,0x05,0x07,0x07,0x06,
0x00,0x00,0xE0,0x40,0x40,0x70,0x48,0x48,0x48,0x05,0x0A,0x0A,0x06,0x00,0x00,0x10,
0x20,0x00,0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x40,
0x20,0x00,0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x88,
0x70,0x00,0x88,0x88,0x88,0x88,0x78,0x08,0x70,0x05,0x09,0x09,0x06,0x00,0xFE,0x88,
0x88,0x88,0x88,0x88,0x88,0xF8,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,
0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x80,0x80,0xF0,0x88,
0x88,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,
0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x80,0x80,0x05,0x08,0x08,0x06,
0x00,0xFF,0x30,0x50,0x50,0x50,0x50,0x50,0xF8,0x88,0x05,0x07,0x07,0x06,0x00,0x00,
0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0x70,
0x20,0x70,0xA8,0xA8,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x08,0x70,0x08,0x88,
0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x0A,
0x0A,0x06,0x00,0x00,0x88,0x70,0x00,0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x90,0xA0,0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x38,0x48,0x48,0x48,0x48,0x48,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,
0xA8,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,
0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,
0x07,0x07,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,
0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,
0x88,0x80,0x80,0x80,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,
0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x88,0x78,0x08,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x70,0xA8,0xA8,0xA8,0x70,0x20,0x05,0x07,0x07,
0x06,0x00,0x00,0x88,0x88,0x50,0x20,0x50,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0xFE,
0x90,0x90,0x90,0x90,0x90,0x90,0xF8,0x08,0x08,0x05,0x07,0x07,0x06,0x00,0x00,0x88,
0x88,0x88,0x78,0x08,0x08,0x08,0x05,0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,
0xA8,0xA8,0xF8,0x05,0x09,0x09,0x06,0x00,0xFE,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xF8,
0x08,0x08,0x05,0x07,0x07,0x06,0x00,0x00,0xC0,0x40,0x40,0x70,0x48,0x48,0x70,0x05,
0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xC8,0xA8,0xA8,0xC8,0x04,0x07,0x07,0x06,
0x01,0x00,0x80,0x80,0x80,0xE0,0x90,0x90,0xE0,0x05,0x07,0x07,0x06,0x00,0x00,0x70,
0x88,0x08,0x78,0x08,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x90,0xA8,0xA8,0xE8,
0xA8,0xA8,0x90,0x05,0x07,0x07,0x06,0x00,0x00,0x78,0x88,0x88,0x78,0x28,0x48,0x88,
0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x80,0xF0,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF0,0x88,
0xF0,0x88,0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x05,0x06,
0x06,0x06,0x00,0xFF,0x30,0x50,0x50,0x50,0xF8,0x88,0x05,0x05,0x05,0x06,0x00,0x00,
0x70,0x88,0xF0,0x80,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0x70,0x20,0x70,0xA8,
0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x30,0x88,0x70,0x05,0x05,0x05,0x06,0x00,
0x00,0x88,0x98,0xA8,0xC8,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x88,
0x98,0xA8,0xC8,0x88,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,0x90,0x05,
0x05,0x05,0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x88,0x05,0x05,0x05,0x06,0x00,0x00,
0x88,0xD8,0xA8,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xF8,0x88,0x88,
0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,
0x00,0xF8,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,
0xF0,0x80,0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x05,0x05,
0x05,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,
0x88,0x88,0x88,0x78,0x08,0x70,0x05,0x09,0x09,0x06,0x00,0xFE,0x20,0x20,0x70,0xA8,
0xA8,0xA8,0x70,0x20,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,
0x05,0x07,0x07,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0xF8,0x08,0x08,0x05,0x05,0x05,
0x06,0x00,0x00,0x88,0x88,0x78,0x08,0x08,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0xA8,
0xA8,0xA8,0xF8,0x05,0x07,0x07,0x06,0x00,0xFE,0xA8,0xA8,0xA8,0xA8,0xF8,0x08,0x08,
0x05,0x05,0x05,0x06,0x00,0x00,0xC0,0x40,0x70,0x48,0x70,0x05,0x05,0x05,0x06,0x00,
0x00,0x88,0x88,0xC8,0xA8,0xC8,0x04,0x05,0x05,0x06,0x01,0x00,0x80,0x80,0xE0,0x90,
0xE0,0x04,0x05,0x05,0x06,0x01,0x00,0xE0,0x10,0x70,0x10,0xE0,0x05,0x05,0x05,0x06,
0x00,0x00,0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06,0x01,0x00,0x70,0x90,0x70,
0x50,0x90,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0x20,0x00,0x70,0x88,0xF0,0x80,0x70,
0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xF0,0x80,0x70,0x05,0x09,0x09,
0x06,0x00,0xFE,0x40,0xE0,0x40,0x70,0x48,0x48,0x48,0x08,0x10,0x05,0x08,0x08,0x06,
0x00,0x00,0x10,0x20,0x00,0xF8,0x80,0x80,0x80,0x80,0x04,0x05,0x05,0x06,0x01,0x00,
0x70,0x80,0xE0,0x80,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x78,0x80,0x70,0x08,0xF0,
0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x06,0x06,0x06,
0x01,0x00,0xA0,0x00,0xC0,0x40,0x40,0xE0,0x04,0x08,0x08,0x06,0x01,0xFE,0x10,0x00,
0x30,0x10,0x10,0x10,0x90,0x60,0x05,0x05,0x05,0x06,0x00,0x00,0x60,0xA0,0xB0,0xA8,
0xB0,0x05,0x05,0x05,0x06,0x00,0x00,0xA0,0xA0,0xF0,0xA8,0xB0,0x05,0x07,0x07,0x06,
0x00,0x00,0x40,0xE0,0x40,0x70,0x48,0x48,0x48,0x04,0x08,0x08,0x06,0x01,0x00,0x20,
0x40,0x00,0x90,0xA0,0xC0,0xA0,0x90,0x05,0x08,0x08,0x06,0x00,0x00,0x40,0x20,0x00,
0x88,0x98,0xA8,0xC8,0x88,0x05,0x0A,0x0A,0x06,0x00,0xFE,0x88,0x70,0x00,0x88,0x88,
0x88,0x88,0x78,0x08,0x70,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,0x88,0xF8,
0x20,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x88,0x88,0xA8,0xA8,0xA8,0x50,0x05,
0x05,0x05,0x06,0x00,0x00,0x50,0x88,0xA8,0xA8,0x50,0x05,0x07,0x07,0x06,0x00,0x00,
0x40,0xF0,0x40,0x70,0x48,0x48,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xF0,
0x40,0x70,0x48,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x98,0xA0,0xA0,0xF8,0xA0,0xA0,
0x98,0x05,0x05,0x05,0x06,0x00,0x00,0x98,0xA0,0xF8,0xA0,0x98,0x05,0x07,0x07,0x06,
0x00,0x00,0x20,0x50,0x50,0x88,0xF8,0xA8,0xA8,0x05,0x06,0x06,0x06,0x00,0x00,0x20,
0x50,0x50,0x88,0xF8,0xA8,0x05,0x07,0x07,0x06,0x00,0x00,0x90,0x90,0xB8,0xF8,0xB8,
0xB8,0xB8,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0x90,0xF8,0xB8,0xB8,0x05,0x08,0x08,
0x06,0x00,0x00,0xF8,0x88,0x50,0x50,0x70,0xA8,0xA8,0xA8,0x05,0x06,0x06,0x06,0x00,
0x00,0xF8,0x88,0x50,0x70,0xA8,0xA8,0x06,0x08,0x08,0x06,0x00,0x00,0xFC,0xC4,0xA8,
0x90,0xF8,0xB8,0xB8,0xA8,0x06,0x06,0x06,0x06,0x00,0x00,0xFC,0xA8,0x90,0xF8,0xB8,
0xA8,0x05,0x0C,0x0C,0x06,0x00,0xFE,0x50,0x20,0x00,0x70,0x88,0x08,0x30,0x08,0x08,
0x70,0x80,0x70,0x05,0x0A,0x0A,0x06,0x00,0xFE,0x50,0x20,0x00,0x70,0x88,0x30,0x08,
0x70,0x80,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0xA8,0x70,0x20,0x20,0x20,
0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0xA8,0x70,0x20,0x20,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,
0xF8,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0x90,0x50,0x50,0x50,0x20,
0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x90,0x50,0x50,0x20,0x05,0x0A,0x0A,0x06,0x00,
0x00,0x90,0x48,0x00,0x88,0x90,0x90,0x50,0x50,0x50,0x20,0x05,0x08,0x08,0x06,0x00,
0x00,0x90,0x48,0x00,0x88,0x90,0x50,0x50,0x20,0x05,0x09,0x09,0x06,0x00,0xFE,0x40,
0xA0,0xA0,0xB8,0xB8,0xB8,0x58,0x08,0x10,0x05,0x07,0x07,0x06,0x00,0xFE,0x58,0xB8,
0xB8,0xB8,0x58,0x08,0x10,0x05,0x0A,0x0A,0x06,0x00,0xFF,0x20,0x70,0xA8,0x88,0x88,
0x88,0x88,0xA8,0x70,0x20,0x05,0x08,0x08,0x06,0x00,0xFF,0x20,0x70,0xA8,0x88,0x88,
0xA8,0x70,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x70,0x00,0x20,0x20,0x88,0x88,0x88,
0xA8,0x50,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x00,0x20,0xA8,0x88,0xA8,0x50,0x05,
0x0A,0x0A,0x06,0x00,0x00,0xF8,0xA8,0x00,0x50,0x88,0x88,0xA8,0xA8,0xA8,0x50,0x05,
0x08,0x08,0x06,0x00,0x00,0xF8,0xA8,0x00,0x50,0x88,0xA8,0xA8,0x50};
const u8g_fntpgm_uint8_t fontpage_97_129_191[911] U8G_FONT_SECTION("fontpage_97_129_191") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x81,0xBF,0x00,0x0D,0xFF,0x00,
0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,0x08,0x00,0x04,0x00,0x4E,0x00,0x55,0x00,0x64,
0x80,0x48,0x40,0xA8,0x40,0x90,0x40,0x90,0x80,0x61,0x00,0x06,0x00,0x08,0x0B,0x0B,
0x0C,0x01,0xFF,0x20,0x10,0x70,0x1C,0x28,0xE2,0x39,0x21,0x21,0x12,0x0C,0x08,0x07,
0x07,0x0C,0x02,0xFF,0x28,0x2E,0xF5,0x21,0x16,0x10,0x10,0x0B,0x0B,0x16,0x0C,0x00,
0xFF,0x02,0x00,0x37,0x00,0x20,0x00,0x13,0xC0,0x9C,0x20,0x70,0x20,0x09,0xC0,0x08,
0x00,0x08,0x00,0x04,0x00,0x04,0x00,0x07,0x07,0x07,0x0C,0x03,0xFF,0x10,0x9C,0xB2,
0xD2,0x9C,0x10,0x20,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x04,0x00,0x82,0x00,0x47,0x80,
0x4A,0x40,0x52,0x20,0x62,0x20,0x6A,0x40,0x47,0x80,0x42,0x00,0x04,0x00,0x08,0x00,
0x07,0x07,0x07,0x0C,0x02,0xFF,0x10,0x1C,0x10,0x10,0x78,0x96,0x60,0x09,0x0B,0x16,
0x0C,0x01,0xFF,0x10,0x00,0x08,0x00,0x09,0x80,0x0E,0x00,0x08,0x00,0x08,0x00,0x08,
0x00,0x78,0x00,0x8E,0x00,0x89,0x80,0x70,0x00,0x07,0x0B,0x0B,0x0C,0x02,0xFF,0x20,
0x18,0x40,0x80,0x80,0xBC,0xC2,0x82,0x02,0x0C,0x70,0x07,0x0B,0x0B,0x0C,0x02,0xFF,
0x88,0x54,0x52,0x62,0x62,0x42,0x42,0x04,0x04,0x08,0x10,0x08,0x0A,0x0A,0x0C,0x01,
0xFF,0x4E,0x34,0x08,0x10,0x3E,0x61,0x81,0x19,0x26,0x1C,0x0B,0x0B,0x16,0x0C,0x00,
0xFF,0x20,0x00,0x10,0x00,0x13,0x00,0x34,0x80,0xD8,0x80,0x10,0x80,0x10,0x80,0x30,
0x80,0x50,0x80,0xB0,0x60,0x10,0x00,0x08,0x0A,0x0A,0x0C,0x01,0xFF,0x4E,0x34,0x08,
0x10,0x3E,0x61,0x81,0x01,0x06,0x18,0x08,0x07,0x07,0x0C,0x02,0xFF,0x40,0x30,0xEE,
0x31,0x61,0xA2,0x24,0x0B,0x0B,0x16,0x0C,0x00,0xFF,0x20,0x00,0x10,0x00,0x10,0x00,
0x9B,0x80,0x7C,0x40,0x10,0x20,0x10,0x20,0x30,0x20,0x50,0x40,0xB1,0x80,0x10,0x00,
0x0A,0x0A,0x14,0x0C,0x01,0xFF,0x4E,0x00,0x34,0x00,0x04,0x00,0x1F,0x00,0x28,0x80,
0x48,0x40,0x90,0x40,0x96,0x40,0x69,0x80,0x47,0x00,0x0A,0x0B,0x16,0x0C,0x01,0xFF,
0x20,0x00,0x1F,0x00,0x04,0x00,0x1F,0x00,0x20,0x80,0x4C,0x80,0x13,0x00,0x0C,0x00,
0x00,0x00,0x59,0x80,0x86,0x40,0x09,0x0B,0x16,0x0C,0x01,0xFF,0x08,0x00,0x08,0x00,
0x9E,0x00,0x70,0x00,0x21,0x80,0x72,0x00,0x8C,0x00,0x14,0x00,0x24,0x00,0x20,0x00,
0x1F,0x00,0x0A,0x0A,0x14,0x0C,0x01,0xFF,0x10,0x00,0x08,0x00,0x08,0x00,0x10,0x00,
0x10,0x00,0x38,0x00,0x24,0x00,0x44,0x40,0x44,0x80,0x83,0x00,0x0A,0x0B,0x16,0x0C,
0x00,0xFF,0x10,0x00,0x0C,0x80,0x00,0x40,0x1D,0x00,0xE2,0x80,0x02,0x00,0x02,0x00,
0x04,0x00,0x04,0x00,0x08,0x00,0x10,0x00,0xFF,0xFF,0xFF,0xFF,0x04,0x03,0x03,0x06,
0x00,0x05,0x20,0x90,0x40,0xFF,0x04,0x03,0x03,0x06,0x00,0x05,0x20,0x90,0x40,0x03,
0x03,0x03,0x06,0x00,0x05,0x40,0xA0,0x40,0xFF,0xFF,0xFF,0x05,0x03,0x03,0x06,0x00,
0x03,0xF8,0x00,0xF8,0x04,0x05,0x05,0x06,0x00,0x00,0xF0,0x10,0x60,0x40,0x80,0x05,
0x07,0x07,0x06,0x00,0x00,0xF8,0x08,0x28,0x30,0x20,0x20,0x40,0x04,0x05,0x05,0x06,
0x00,0x00,0x10,0x20,0x60,0xA0,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x10,0x20,
0x60,0xA0,0x20,0x20,0x04,0x05,0x05,0x06,0x00,0x00,0x20,0xF0,0x90,0x10,0x20,0x05,
0x07,0x07,0x06,0x00,0x00,0x20,0xF8,0x88,0x88,0x08,0x10,0x60,0x03,0x04,0x04,0x06,
0x00,0x00,0xE0,0x40,0x40,0xE0,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,
0x20,0xF8,0x04,0x05,0x05,0x06,0x00,0x00,0x20,0xF0,0x20,0x60,0xA0,0x05,0x07,0x07,
0x06,0x00,0x00,0x10,0xF8,0x10,0x30,0x50,0x90,0x10,0x05,0x07,0x07,0x06,0x00,0x00,
0x40,0xF8,0x48,0x48,0x48,0x48,0x98,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x40,
0xF8,0x48,0x48,0x48,0x48,0x98,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0xF8,0x20,0x20,
0xF8,0x10,0x10,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x20,0xF8,0x20,0x20,0xF8,
0x10,0x10,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x78,0x48,0x88,0x08,0x10,0x60,0x05,
0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x40,0x78,0x48,0x88,0x08,0x10,0x60,0x05,0x07,
0x07,0x06,0x00,0x00,0x80,0xF8,0x90,0x90,0x10,0x10,0x20,0x05,0x09,0x09,0x06,0x00,
0x00,0x28,0x28,0x80,0xF8,0x90,0x90,0x10,0x10,0x20,0x05,0x06,0x06,0x06,0x00,0x00,
0xF8,0x08,0x08,0x08,0x08,0xF8,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0xF8,
0x08,0x08,0x08,0x08,0xF8,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0xF8,0x50,0x50,0x50,
0x10,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x50,0xF8,0x50,0x50,0x50,0x10,
0x20,0x05,0x06,0x06,0x06,0x00,0x00,0xC0,0x08,0xC8,0x08,0x10,0xE0,0x07,0x0D,0x0D,
0x06,0x00,0x00,0x02,0x00,0x00,0x00,0x28,0x28,0x00,0xC0,0x08,0xC8,0x08,0x10,0xE0,
0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x10,0x10,0x20,0x50,0x88,0x05,0x09,0x09,0x06,
0x00,0x00,0x28,0x28,0x00,0x70,0x10,0x10,0x20,0x50,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x40,0x40,0xF8,0x48,0x50,0x40,0x38,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,
0x40,0x40,0xF8,0x48,0x50,0x40,0x38,0x05,0x06,0x06,0x06,0x00,0x00,0x88,0x48,0x48,
0x10,0x10,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x88,0x48,0x48,0x10,
0x10,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x78,0x48,0xA8,0x18,0x10,0x60};
const u8g_fntpgm_uint8_t fontpage_97_193_255[822] U8G_FONT_SECTION("fontpage_97_193_255") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC1,0xFF,0x00,0x09,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0x60,0x20,0xF8,0x20,0x20,0x40,0x05,0x09,
0x09,0x06,0x00,0x00,0x28,0x08,0x10,0x60,0x20,0xF8,0x20,0x20,0x40,0x05,0x04,0x04,
0x06,0x00,0x00,0xA8,0xA8,0x08,0x30,0x05,0x06,0x06,0x06,0x00,0x00,0xA8,0xA8,0xA8,
0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0xA8,0xA8,0xA8,0x08,
0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x00,0xF8,0x20,0x20,0x20,0x40,0x05,
0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x70,0x00,0xF8,0x20,0x20,0x20,0x40,0x04,0x07,
0x07,0x06,0x01,0x00,0x80,0x80,0xC0,0xA0,0x90,0x80,0x80,0x04,0x09,0x09,0x06,0x01,
0x00,0x50,0x10,0x80,0x80,0xC0,0xA0,0x90,0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,
0x20,0x20,0xF8,0x20,0x20,0x40,0x80,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x00,0x00,
0x00,0x00,0xF8,0x05,0x06,0x06,0x06,0x00,0x00,0x78,0x08,0x28,0x10,0x28,0xC0,0x05,
0x07,0x07,0x06,0x00,0x00,0x20,0x70,0x10,0x20,0x70,0xA8,0x20,0x03,0x06,0x06,0x06,
0x01,0x00,0x20,0x20,0x20,0x40,0x40,0x80,0x05,0x06,0x06,0x06,0x00,0x00,0x10,0x50,
0x50,0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x10,0x50,0x50,
0x48,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0x00,0x18,0x18,0x00,0x10,0x50,0x50,0x48,
0x88,0x88,0x04,0x06,0x06,0x06,0x00,0x00,0x80,0x90,0xE0,0x80,0x80,0x70,0x05,0x09,
0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x80,0x90,0xE0,0x80,0x80,0x70,0x05,0x09,0x09,
0x06,0x00,0x00,0x18,0x18,0x00,0x80,0x90,0xE0,0x80,0x80,0x70,0x05,0x06,0x06,0x06,
0x00,0x00,0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,
0x00,0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x18,0x18,0x00,
0xF8,0x08,0x08,0x08,0x10,0x60,0x05,0x05,0x05,0x06,0x00,0x01,0x60,0xA0,0x10,0x10,
0x08,0x05,0x08,0x08,0x06,0x00,0x01,0x28,0x28,0x00,0x60,0xA0,0x10,0x10,0x08,0x05,
0x08,0x08,0x06,0x00,0x01,0x18,0x18,0x00,0x60,0xA0,0x10,0x10,0x08,0x05,0x07,0x07,
0x06,0x00,0x00,0x20,0xF8,0x20,0xA8,0xA8,0xA8,0x20,0x05,0x09,0x09,0x06,0x00,0x00,
0x28,0x08,0x20,0xF8,0x20,0xA8,0xA8,0xA8,0x20,0x05,0x09,0x09,0x06,0x00,0x00,0x18,
0x18,0x20,0xF8,0x20,0xA8,0xA8,0xA8,0x20,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x08,
0x08,0x50,0x20,0x10,0x04,0x06,0x06,0x06,0x01,0x00,0xE0,0x00,0xE0,0x00,0xC0,0x30,
0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0x20,0x40,0x48,0xF8,0x08,0x05,0x06,0x06,
0x06,0x00,0x00,0x08,0x48,0x30,0x10,0x28,0xC0,0x05,0x06,0x06,0x06,0x00,0x00,0xF0,
0x40,0xF8,0x40,0x40,0x38,0x05,0x05,0x05,0x06,0x00,0x00,0x40,0xF8,0x48,0x50,0x40,
0x05,0x07,0x07,0x06,0x00,0x00,0x40,0x40,0xF8,0x48,0x50,0x40,0x40,0x04,0x05,0x05,
0x06,0x00,0x00,0x60,0x20,0x20,0x20,0xF0,0x05,0x06,0x06,0x06,0x00,0x00,0x70,0x10,
0x10,0x10,0x10,0xF8,0x04,0x05,0x05,0x06,0x00,0x00,0xF0,0x10,0xF0,0x10,0xF0,0x05,
0x06,0x06,0x06,0x00,0x00,0xF8,0x08,0xF8,0x08,0x08,0xF8,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x00,0xF8,0x08,0x08,0x10,0x60,0x04,0x07,0x07,0x06,0x00,0x00,0x10,0x90,
0x90,0x90,0x90,0x10,0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x20,0xA0,0xA0,0xA8,
0xA8,0xB0,0x05,0x06,0x06,0x06,0x00,0x00,0x80,0x80,0x80,0x88,0xB0,0xC0,0x05,0x06,
0x06,0x06,0x00,0x00,0xF8,0x88,0x88,0x88,0x88,0xF8,0x04,0x05,0x05,0x06,0x00,0x00,
0xF0,0x90,0x10,0x10,0x60,0x05,0x06,0x06,0x06,0x00,0x00,0xF8,0x88,0x88,0x08,0x10,
0x60,0x05,0x07,0x07,0x06,0x00,0x00,0x10,0xF8,0x50,0x50,0xF8,0x10,0x10,0x05,0x06,
0x06,0x06,0x00,0x00,0x70,0x10,0x20,0x20,0x20,0xF8,0x05,0x06,0x06,0x06,0x00,0x00,
0xF8,0x08,0xF8,0x08,0x10,0x60,0x05,0x06,0x06,0x06,0x00,0x00,0xC0,0x08,0x08,0x08,
0x10,0xE0,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x20,0xF8,0x88,0x88,0x08,0x10,
0x60,0x04,0x05,0x05,0x06,0x00,0x00,0x40,0xF0,0x50,0x50,0xB0,0x04,0x05,0x05,0x06,
0x00,0x00,0x80,0xF0,0xA0,0x20,0x40,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,
0xF8,0x88,0x88,0x08,0x10,0x60,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x08,0x10,0xF8,
0x50,0x50,0xF8,0x10,0x10,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0x70,0x10,
0x20,0x20,0x20,0xF8,0x05,0x09,0x09,0x06,0x00,0x00,0x28,0x28,0x00,0xF8,0x08,0xF8,
0x08,0x10,0x60,0x02,0x02,0x02,0x06,0x02,0x03,0xC0,0xC0,0x05,0x02,0x02,0x06,0x00,
0x03,0x80,0x78,0x05,0x04,0x04,0x06,0x00,0x02,0x80,0x60,0x10,0x08,0x05,0x07,0x07,
0x06,0x00,0x02,0x28,0x28,0x00,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00,
0xF8,0x08,0x08,0x08,0x08,0x08};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ'
FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ'
FONTDATA_ITEM(97, 193, 255, fontpage_97_193_255), // 'チ' -- 'ヿ'
};

View File

@@ -0,0 +1,27 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_158_159[49] U8G_FONT_SECTION("fontpage_2_158_159") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9E,0x9F,0x00,0x0A,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x88,0x70,0x00,0x70,0x88,0x80,0x80,0x98,0x88,
0x70,0x05,0x0A,0x0A,0x06,0x00,0xFE,0x88,0x70,0x00,0x70,0x88,0x88,0x88,0x78,0x08,
0x70};
const u8g_fntpgm_uint8_t fontpage_2_176_177[43] U8G_FONT_SECTION("fontpage_2_176_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB0,0xB1,0x00,0x09,0x00,0x00,
0x00,0x03,0x09,0x09,0x06,0x01,0x00,0x40,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0,
0x03,0x05,0x05,0x06,0x01,0x00,0xC0,0x40,0x40,0x40,0xE0};
const u8g_fntpgm_uint8_t fontpage_2_222_223[45] U8G_FONT_SECTION("fontpage_2_222_223") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDE,0xDF,0x00,0x07,0xFE,0x00,
0x00,0x05,0x09,0x09,0x06,0x00,0xFE,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x10,0x60,
0x05,0x07,0x07,0x06,0x00,0xFE,0x78,0x80,0x70,0x08,0xF0,0x10,0x60};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 158, 159, fontpage_2_158_159), // 'Ğ' -- 'ğ'
FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı'
FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş'
};

View File

@@ -0,0 +1,85 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_8_134_134[30] U8G_FONT_SECTION("fontpage_8_134_134") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x86,0x86,0x00,0x07,0x00,0x00,
0x00,0x03,0x07,0x07,0x06,0x01,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0xE0};
const u8g_fntpgm_uint8_t fontpage_8_144_169[363] U8G_FONT_SECTION("fontpage_8_144_169") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0xA9,0x00,0x0A,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0xF0,0x80,0x80,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,
0x00,0xF0,0x88,0x88,0xF0,0x88,0x88,0xF0,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,
0x80,0x80,0x80,0x80,0x80,0x05,0x08,0x08,0x06,0x00,0xFF,0x30,0x50,0x50,0x50,0x50,
0x50,0xF8,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x80,0x80,0xF0,0x80,0x80,0xF8,
0x05,0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0x70,0x20,0x70,0xA8,0xA8,0x05,0x07,0x07,
0x06,0x00,0x00,0x70,0x88,0x08,0x70,0x08,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,
0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x0A,0x0A,0x06,0x00,0x00,0x88,0x70,0x00,
0x88,0x88,0x98,0xA8,0xC8,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x90,0xA0,
0xC0,0xA0,0x90,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x48,0x48,
0x88,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0xD8,0xA8,0x88,0x88,0x88,0x88,0x05,0x07,
0x07,0x06,0x00,0x00,0x88,0x88,0x88,0xF8,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,
0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0xF8,0x88,
0x88,0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x88,0x88,0xF0,0x80,
0x80,0x80,0x05,0x07,0x07,0x06,0x00,0x00,0x70,0x88,0x80,0x80,0x80,0x88,0x70,0x05,
0x07,0x07,0x06,0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,
0x00,0x00,0x88,0x88,0x88,0x88,0x78,0x08,0x70,0x05,0x07,0x07,0x06,0x00,0x00,0x20,
0x70,0xA8,0xA8,0xA8,0x70,0x20,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x50,0x20,
0x50,0x88,0x88,0x05,0x09,0x09,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0x90,0x90,0xF8,
0x08,0x08,0x05,0x07,0x07,0x06,0x00,0x00,0x88,0x88,0x88,0x78,0x08,0x08,0x08,0x05,
0x07,0x07,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xF8,0x05,0x09,0x09,0x06,
0x00,0xFE,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xF8,0x08,0x08};
const u8g_fntpgm_uint8_t fontpage_8_172_172[30] U8G_FONT_SECTION("fontpage_8_172_172") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAC,0xAC,0x00,0x07,0x00,0x00,
0x00,0x04,0x07,0x07,0x06,0x01,0x00,0x80,0x80,0x80,0xE0,0x90,0x90,0xE0};
const u8g_fntpgm_uint8_t fontpage_8_175_201[334] U8G_FONT_SECTION("fontpage_8_175_201") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAF,0xC9,0x00,0x08,0xFE,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x78,0x88,0x88,0x78,0x28,0x48,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x08,0x78,0x88,0x78,0x05,0x07,0x07,0x06,0x00,0x00,0x70,
0x80,0xF0,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF0,0x88,0xF0,0x88,
0xF0,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,0x80,0x80,0x80,0x80,0x05,0x06,0x06,0x06,
0x00,0xFF,0x30,0x50,0x50,0x50,0xF8,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,
0xF0,0x80,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0x70,0x20,0x70,0xA8,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x30,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0x88,
0x98,0xA8,0xC8,0x88,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x88,0x98,0xA8,
0xC8,0x88,0x04,0x05,0x05,0x06,0x01,0x00,0x90,0xA0,0xC0,0xA0,0x90,0x05,0x05,0x05,
0x06,0x00,0x00,0x38,0x48,0x48,0x48,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0xD8,
0xA8,0x88,0x88,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x88,0xF8,0x88,0x88,0x05,0x05,
0x05,0x06,0x00,0x00,0x70,0x88,0x88,0x88,0x70,0x05,0x05,0x05,0x06,0x00,0x00,0xF8,
0x88,0x88,0x88,0x88,0x05,0x07,0x07,0x06,0x00,0xFE,0xF0,0x88,0x88,0x88,0xF0,0x80,
0x80,0x05,0x05,0x05,0x06,0x00,0x00,0x70,0x88,0x80,0x88,0x70,0x05,0x05,0x05,0x06,
0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x05,0x07,0x07,0x06,0x00,0xFE,0x88,0x88,0x88,
0x88,0x78,0x08,0x70,0x05,0x09,0x09,0x06,0x00,0xFE,0x20,0x20,0x70,0xA8,0xA8,0xA8,
0x70,0x20,0x20,0x05,0x05,0x05,0x06,0x00,0x00,0x88,0x50,0x20,0x50,0x88,0x05,0x07,
0x07,0x06,0x00,0xFE,0x90,0x90,0x90,0x90,0xF8,0x08,0x08,0x05,0x05,0x05,0x06,0x00,
0x00,0x88,0x88,0x78,0x08,0x08,0x05,0x05,0x05,0x06,0x00,0x00,0xA8,0xA8,0xA8,0xA8,
0xF8,0x05,0x07,0x07,0x06,0x00,0xFE,0xA8,0xA8,0xA8,0xA8,0xF8,0x08,0x08};
const u8g_fntpgm_uint8_t fontpage_8_204_204[28] U8G_FONT_SECTION("fontpage_8_204_204") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0x00,0x05,0x00,0x00,
0x00,0x04,0x05,0x05,0x06,0x01,0x00,0x80,0x80,0xE0,0x90,0xE0};
const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206_207") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCE,0xCF,0x00,0x05,0x00,0x00,
0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06,
0x01,0x00,0x70,0x90,0x70,0x50,0x90};
const u8g_fntpgm_uint8_t fontpage_8_212_212[28] U8G_FONT_SECTION("fontpage_8_212_212") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD4,0xD4,0x00,0x05,0x00,0x00,
0x00,0x04,0x05,0x05,0x06,0x01,0x00,0x70,0x80,0xE0,0x80,0x70};
const u8g_fntpgm_uint8_t fontpage_8_214_215[41] U8G_FONT_SECTION("fontpage_8_214_215") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD6,0xD7,0x00,0x06,0x00,0x00,
0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x06,0x06,
0x06,0x01,0x00,0xA0,0x00,0xC0,0x40,0x40,0xE0};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І'
FONTDATA_ITEM(8, 144, 169, fontpage_8_144_169), // 'А' -- 'Щ'
FONTDATA_ITEM(8, 172, 172, fontpage_8_172_172), // 'Ь' -- 'Ь'
FONTDATA_ITEM(8, 175, 201, fontpage_8_175_201), // 'Я' -- 'щ'
FONTDATA_ITEM(8, 204, 204, fontpage_8_204_204), // 'ь' -- 'ь'
FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я'
FONTDATA_ITEM(8, 212, 212, fontpage_8_212_212), // 'є' -- 'є'
FONTDATA_ITEM(8, 214, 215, fontpage_8_214_215), // 'і' -- 'ї'
};

View File

@@ -0,0 +1,227 @@
/**
* Generated automatically by buildroot/share/fonts/uxggenpages.sh
* Contents will be REPLACED by future processing!
* Use genallfont.sh to generate font data for updated languages.
*/
#include <U8glib.h>
const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x88,0x70,0x00,0x70,0x08,0x78,0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_2_144_145[44] U8G_FONT_SECTION("fontpage_2_144_145") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x91,0x00,0x08,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0xF0,0x48,0x48,0xE8,0x48,0x48,0xF0,0x06,0x08,
0x08,0x06,0x00,0x00,0x08,0x1C,0x08,0x78,0x88,0x88,0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_2_169_169[31] U8G_FONT_SECTION("fontpage_2_169_169") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xA9,0x00,0x08,0x00,0x00,
0x00,0x04,0x08,0x08,0x06,0x00,0x00,0x50,0xA0,0x00,0x60,0x20,0x20,0x20,0x70};
const u8g_fntpgm_uint8_t fontpage_3_161_161[30] U8G_FONT_SECTION("fontpage_3_161_161") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA1,0x00,0x07,0x00,0x00,
0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x08,0x08,0x70,0x88,0x88,0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_3_175_176[43] U8G_FONT_SECTION("fontpage_3_175_176") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAF,0xB0,0x00,0x08,0x00,0x00,
0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x08,0x98,0x90,0x90,0x90,0x90,0x90,0x60,0x05,
0x06,0x06,0x06,0x00,0x00,0x08,0x98,0x90,0x90,0xB0,0x50};
const u8g_fntpgm_uint8_t fontpage_6_131_131[25] U8G_FONT_SECTION("fontpage_6_131_131") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x0A,0x00,0x00,
0x00,0x05,0x02,0x02,0x06,0x00,0x08,0x68,0xB0};
const u8g_fntpgm_uint8_t fontpage_6_137_137[26] U8G_FONT_SECTION("fontpage_6_137_137") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x89,0x89,0x00,0x0A,0x00,0x00,
0x00,0x03,0x03,0x03,0x06,0x01,0x07,0xC0,0x20,0x40};
const u8g_fntpgm_uint8_t fontpage_6_163_163[24] U8G_FONT_SECTION("fontpage_6_163_163") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA3,0xA3,0x00,0x00,0xFE,0x00,
0x00,0x01,0x01,0x01,0x06,0x02,0xFE,0x80};
const u8g_fntpgm_uint8_t fontpage_6_192_193[33] U8G_FONT_SECTION("fontpage_6_192_193") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC0,0xC1,0x00,0x0A,0x00,0x00,
0x00,0x02,0x02,0x02,0x06,0x01,0x08,0x80,0x40,0x02,0x02,0x02,0x06,0x02,0x08,0x40,
0x80};
const u8g_fntpgm_uint8_t fontpage_61_161_161[30] U8G_FONT_SECTION("fontpage_61_161_161") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA1,0x00,0x05,0xFE,0x00,
0x00,0x05,0x07,0x07,0x07,0x00,0xFE,0x70,0x08,0x78,0x88,0x78,0x00,0x20};
const u8g_fntpgm_uint8_t fontpage_61_163_163[32] U8G_FONT_SECTION("fontpage_61_163_163") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA3,0xA3,0x00,0x09,0x00,0x00,
0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x70,0x08,0x78,0x88,0x78
};
const u8g_fntpgm_uint8_t fontpage_61_165_165[33] U8G_FONT_SECTION("fontpage_61_165_165") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA5,0xA5,0x00,0x0A,0x00,0x00,
0x00,0x06,0x0A,0x0A,0x07,0x00,0x00,0x04,0x08,0x30,0x48,0x00,0x70,0x08,0x78,0x88,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_167_167[33] U8G_FONT_SECTION("fontpage_61_167_167") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA7,0xA7,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x10,0x08,0x30,0x48,0x00,0x70,0x08,0x78,0x88,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_169_169[34] U8G_FONT_SECTION("fontpage_61_169_169") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA9,0xA9,0x00,0x0B,0x00,0x00,
0x00,0x06,0x0B,0x0B,0x07,0x00,0x00,0x0C,0x04,0x08,0x30,0x48,0x00,0x70,0x08,0x78,
0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_61_173_173[33] U8G_FONT_SECTION("fontpage_61_173_173") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAD,0xAD,0x00,0x08,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0xFE,0x30,0x48,0x00,0x70,0x08,0x78,0x88,0x78,0x00,
0x20};
const u8g_fntpgm_uint8_t fontpage_61_175_175[33] U8G_FONT_SECTION("fontpage_61_175_175") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xAF,0xAF,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x08,0x10,0x48,0x30,0x00,0x70,0x08,0x78,0x88,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_177_177[33] U8G_FONT_SECTION("fontpage_61_177_177") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB1,0xB1,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x40,0x20,0x48,0x30,0x00,0x70,0x08,0x78,0x88,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_179_179[34] U8G_FONT_SECTION("fontpage_61_179_179") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB3,0xB3,0x00,0x0B,0x00,0x00,
0x00,0x05,0x0B,0x0B,0x07,0x00,0x00,0x18,0x08,0x10,0x48,0x30,0x00,0x70,0x08,0x78,
0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_61_181_181[34] U8G_FONT_SECTION("fontpage_61_181_181") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB5,0xB5,0x00,0x0B,0x00,0x00,
0x00,0x06,0x0B,0x0B,0x07,0x00,0x00,0x14,0x28,0x00,0x48,0x30,0x00,0x70,0x08,0x78,
0x88,0x78};
const u8g_fntpgm_uint8_t fontpage_61_183_183[33] U8G_FONT_SECTION("fontpage_61_183_183") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xB7,0xB7,0x00,0x08,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0xFE,0x48,0x30,0x00,0x70,0x08,0x78,0x88,0x78,0x00,
0x20};
const u8g_fntpgm_uint8_t fontpage_61_191_191[33] U8G_FONT_SECTION("fontpage_61_191_191") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x0A,0x00,0x00,
0x00,0x06,0x0A,0x0A,0x07,0x00,0x00,0x04,0x08,0x20,0x50,0x00,0x70,0x88,0xF0,0x80,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_193_193[33] U8G_FONT_SECTION("fontpage_61_193_193") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC1,0xC1,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x10,0x08,0x20,0x50,0x00,0x70,0x88,0xF0,0x80,
0x78};
const u8g_fntpgm_uint8_t fontpage_61_195_195[34] U8G_FONT_SECTION("fontpage_61_195_195") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC3,0xC3,0x00,0x0B,0x00,0x00,
0x00,0x05,0x0B,0x0B,0x07,0x00,0x00,0x18,0x08,0x10,0x60,0x90,0x00,0x60,0x90,0xF0,
0x80,0x70};
const u8g_fntpgm_uint8_t fontpage_61_199_199[33] U8G_FONT_SECTION("fontpage_61_199_199") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC7,0xC7,0x00,0x08,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0xFE,0x20,0x50,0x00,0x70,0x88,0xF0,0x80,0x78,0x00,
0x20};
const u8g_fntpgm_uint8_t fontpage_61_201_201[32] U8G_FONT_SECTION("fontpage_61_201_201") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xC9,0xC9,0x00,0x09,0x00,0x00,
0x00,0x03,0x09,0x09,0x07,0x02,0x00,0x60,0x20,0x40,0x00,0xC0,0x40,0x40,0x40,0xE0
};
const u8g_fntpgm_uint8_t fontpage_61_203_203[32] U8G_FONT_SECTION("fontpage_61_203_203") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCB,0xCB,0x00,0x07,0xFE,0x00,
0x00,0x03,0x09,0x09,0x07,0x02,0xFE,0x40,0x00,0xC0,0x40,0x40,0x40,0xE0,0x00,0x40
};
const u8g_fntpgm_uint8_t fontpage_61_205_205[30] U8G_FONT_SECTION("fontpage_61_205_205") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCD,0xCD,0x00,0x05,0xFE,0x00,
0x00,0x05,0x07,0x07,0x07,0x00,0xFE,0x70,0x88,0x88,0x88,0x70,0x00,0x20};
const u8g_fntpgm_uint8_t fontpage_61_207_207[32] U8G_FONT_SECTION("fontpage_61_207_207") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xCF,0xCF,0x00,0x09,0x00,0x00,
0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x70,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_209_209[33] U8G_FONT_SECTION("fontpage_61_209_209") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x0A,0x00,0x00,
0x00,0x06,0x0A,0x0A,0x07,0x00,0x00,0x04,0x08,0x20,0x50,0x00,0x70,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_211_211[33] U8G_FONT_SECTION("fontpage_61_211_211") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD3,0xD3,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x10,0x08,0x20,0x50,0x00,0x70,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_213_213[33] U8G_FONT_SECTION("fontpage_61_213_213") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD5,0xD5,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x18,0x08,0x30,0x50,0x00,0x70,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_215_215[34] U8G_FONT_SECTION("fontpage_61_215_215") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD7,0xD7,0x00,0x0B,0x00,0x00,
0x00,0x05,0x0B,0x0B,0x07,0x00,0x00,0x28,0x50,0x00,0x20,0x50,0x00,0x70,0x88,0x88,
0x88,0x70};
const u8g_fntpgm_uint8_t fontpage_61_217_217[33] U8G_FONT_SECTION("fontpage_61_217_217") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD9,0xD9,0x00,0x08,0xFE,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0xFE,0x20,0x50,0x00,0x70,0x88,0x88,0x88,0x70,0x00,
0x20};
const u8g_fntpgm_uint8_t fontpage_61_219_219[32] U8G_FONT_SECTION("fontpage_61_219_219") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDB,0xDB,0x00,0x09,0x00,0x00,
0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x20,0x40,0x10,0x08,0x70,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_221_221[32] U8G_FONT_SECTION("fontpage_61_221_221") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDD,0xDD,0x00,0x09,0x00,0x00,
0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x80,0x40,0x10,0x08,0x70,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_223_223[33] U8G_FONT_SECTION("fontpage_61_223_223") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xDF,0xDF,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x60,0x20,0x40,0x10,0x08,0x70,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_225_225[32] U8G_FONT_SECTION("fontpage_61_225_225") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE1,0xE1,0x00,0x09,0x00,0x00,
0x00,0x05,0x09,0x09,0x07,0x00,0x00,0x50,0xA0,0x10,0x08,0x70,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_227_227[32] U8G_FONT_SECTION("fontpage_61_227_227") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE3,0xE3,0x00,0x07,0xFE,0x00,
0x00,0x05,0x09,0x09,0x00,0x00,0xFE,0x10,0x08,0x70,0x88,0x88,0x88,0x70,0x00,0x20
};
const u8g_fntpgm_uint8_t fontpage_61_229_229[30] U8G_FONT_SECTION("fontpage_61_229_229") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE5,0xE5,0x00,0x05,0xFE,0x00,
0x00,0x05,0x07,0x07,0x07,0x00,0xFE,0x88,0x88,0x88,0x88,0x70,0x00,0x20};
const u8g_fntpgm_uint8_t fontpage_61_231_231[33] U8G_FONT_SECTION("fontpage_61_231_231") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE7,0xE7,0x00,0x0A,0x00,0x00,
0x00,0x05,0x0A,0x0A,0x07,0x00,0x00,0x30,0x10,0x20,0x00,0x00,0x88,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_233_233[32] U8G_FONT_SECTION("fontpage_61_233_233") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xE9,0xE9,0x00,0x09,0x00,0x00,
0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x10,0x20,0x0C,0x04,0x88,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_235_235[32] U8G_FONT_SECTION("fontpage_61_235_235") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xEB,0xEB,0x00,0x09,0x00,0x00,
0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x40,0x20,0x0C,0x04,0x88,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_237_237[33] U8G_FONT_SECTION("fontpage_61_237_237") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xED,0xED,0x00,0x0A,0x00,0x00,
0x00,0x06,0x0A,0x0A,0x07,0x00,0x00,0x30,0x10,0x20,0x0C,0x04,0x88,0x88,0x88,0x88,
0x70};
const u8g_fntpgm_uint8_t fontpage_61_239_239[32] U8G_FONT_SECTION("fontpage_61_239_239") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xEF,0xEF,0x00,0x09,0x00,0x00,
0x00,0x06,0x09,0x09,0x07,0x00,0x00,0x28,0x50,0x0C,0x04,0x88,0x88,0x88,0x88,0x70
};
const u8g_fntpgm_uint8_t fontpage_61_241_241[32] U8G_FONT_SECTION("fontpage_61_241_241") = {
0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x07,0xFE,0x00,
0x00,0x06,0x09,0x09,0x07,0x00,0xFE,0x0C,0x04,0x88,0x88,0x88,0x88,0x70,0x00,0x20
};
#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data }
static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {
FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă'
FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ'
FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ'
FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ'
FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư'
FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃'
FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉'
FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣'
FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́'
FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ'
FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả'
FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ'
FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ'
FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ'
FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ'
FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ'
FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ'
FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ'
FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ'
FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ'
FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế'
FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề'
FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể'
FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ'
FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ'
FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị'
FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ'
FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ'
FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố'
FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ'
FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ'
FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ'
FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ'
FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ'
FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ'
FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở'
FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ'
FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ'
FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ'
FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ'
FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ'
FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ'
FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử'
FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ'
FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự'
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
/**
* @file lcdprint_u8g.cpp
* @brief LCD print api for u8glib
* @author Yunhui Fu (yhfudev@gmail.com)
* @version 1.0
* @date 2016-08-19
* @copyright GPL/BSD
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include "marlinui_DOGM.h"
#include "../marlinui.h"
#include "../../MarlinCore.h"
#include "../fontutils.h"
#include "u8g_fontutf8.h"
#include "../lcdprint.h"
int lcd_glyph_height() { return u8g_GetFontBBXHeight(u8g.getU8g()); }
void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { u8g.setPrintPos(col, row); }
void lcd_put_int(const int i) { u8g.print(i); }
// return < 0 on error
// return the advanced pixels
int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) {
if (c < 256) {
u8g.print((char)c);
return u8g_GetFontBBXWidth(u8g.getU8g());
}
u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(),
ret = uxg_DrawWchar(u8g.getU8g(), x, y, c, max_length);
u8g.setPrintPos(x + ret, y);
return ret;
}
int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) {
u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(),
ret = uxg_DrawUtf8Str(u8g.getU8g(), x, y, utf8_str, max_length);
u8g.setPrintPos(x + ret, y);
return ret;
}
int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) {
u8g_uint_t x = u8g.getPrintCol(), y = u8g.getPrintRow(),
ret = uxg_DrawUtf8StrP(u8g.getU8g(), x, y, utf8_str_P, max_length);
u8g.setPrintPos(x + ret, y);
return ret;
}
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,716 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/dogm/marlinui_DOGM.h
*
* Implementation of the LCD display routines for a DOGM128 graphic display.
* by STB for ErikZalm/Marlin. Common LCD 128x64 pixel graphic displays.
*
* Demonstrator: https://www.reprap.org/wiki/STB_Electronics
* License: https://opensource.org/licenses/BSD-3-Clause
*
* With the use of:
* u8glib by Oliver Kraus
* https://github.com/olikraus/U8glib_Arduino
* License: https://opensource.org/licenses/BSD-3-Clause
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include "marlinui_DOGM.h"
#include "u8g_fontutf8.h"
#if ENABLED(SHOW_BOOTSCREEN)
#include "dogm_Bootscreen.h"
#endif
#include "../lcdprint.h"
#include "../fontutils.h"
#include "../../libs/numtostr.h"
#include "../marlinui.h"
#include "../../sd/cardreader.h"
#include "../../module/temperature.h"
#include "../../module/printcounter.h"
#include "../../MarlinCore.h"
#if ENABLED(SDSUPPORT)
#include "../../libs/duration_t.h"
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "../../feature/bedlevel/bedlevel.h"
#endif
/**
* Include all needed font files
* (See https://marlinfw.org/docs/development/fonts.html)
*/
#include "fontdata/fontdata_ISO10646_1.h"
#if ENABLED(USE_SMALL_INFOFONT)
#include "fontdata/fontdata_6x9_marlin.h"
#define FONT_STATUSMENU_NAME u8g_font_6x9
#else
#define FONT_STATUSMENU_NAME MENU_FONT_NAME
#endif
U8G_CLASS u8g;
#include LANGUAGE_DATA_INCL(LCD_LANGUAGE)
#if HAS_LCD_CONTRAST
int16_t MarlinUI::contrast = DEFAULT_LCD_CONTRAST;
void MarlinUI::set_contrast(const int16_t value) {
contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX);
u8g.setContrast(contrast);
}
#endif
void MarlinUI::set_font(const MarlinFont font_nr) {
static char currentfont = 0;
if (font_nr != currentfont) {
switch ((currentfont = font_nr)) {
case FONT_STATUSMENU : u8g.setFont(FONT_STATUSMENU_NAME); break;
case FONT_EDIT : u8g.setFont(EDIT_FONT_NAME); break;
default:
case FONT_MENU : u8g.setFont(MENU_FONT_NAME); break;
}
}
}
bool MarlinUI::detected() { return true; }
#if ENABLED(SHOW_BOOTSCREEN)
#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
// Draws a slice of a particular frame of the custom bootscreen, without the u8g loop
void MarlinUI::draw_custom_bootscreen(const uint8_t frame/*=0*/) {
constexpr u8g_uint_t left = u8g_uint_t((LCD_PIXEL_WIDTH - (CUSTOM_BOOTSCREEN_BMPWIDTH)) / 2),
top = u8g_uint_t(CUSTOM_BOOTSCREEN_Y);
#if ENABLED(CUSTOM_BOOTSCREEN_INVERTED)
constexpr u8g_uint_t right = left + CUSTOM_BOOTSCREEN_BMPWIDTH,
bottom = top + CUSTOM_BOOTSCREEN_BMPHEIGHT;
#endif
#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED)
#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME)
const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&custom_bootscreen_animation[frame].bitmap);
#else
const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&custom_bootscreen_animation[frame]);
#endif
#else
const u8g_pgm_uint8_t * const bmp = custom_start_bmp;
#endif
UNUSED(frame);
u8g.drawBitmapP(left, top, CUSTOM_BOOTSCREEN_BMP_BYTEWIDTH, CUSTOM_BOOTSCREEN_BMPHEIGHT, bmp);
#if ENABLED(CUSTOM_BOOTSCREEN_INVERTED)
if (frame == 0) {
u8g.setColorIndex(1);
if (top) u8g.drawBox(0, 0, LCD_PIXEL_WIDTH, top);
if (left) u8g.drawBox(0, top, left, CUSTOM_BOOTSCREEN_BMPHEIGHT);
if (right < LCD_PIXEL_WIDTH) u8g.drawBox(right, top, LCD_PIXEL_WIDTH - right, CUSTOM_BOOTSCREEN_BMPHEIGHT);
if (bottom < LCD_PIXEL_HEIGHT) u8g.drawBox(0, bottom, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT - bottom);
}
#endif
}
// Shows the custom bootscreen, with the u8g loop, animations and delays
void MarlinUI::show_custom_bootscreen() {
#if DISABLED(CUSTOM_BOOTSCREEN_ANIMATED)
constexpr millis_t frame_time = 0;
constexpr uint8_t f = 0;
#else
#if DISABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME)
constexpr millis_t frame_time = CUSTOM_BOOTSCREEN_FRAME_TIME;
#endif
LOOP_L_N(f, COUNT(custom_bootscreen_animation))
#endif
{
#if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME)
const uint8_t fr = _MIN(f, COUNT(custom_bootscreen_animation) - 1);
const millis_t frame_time = pgm_read_word(&custom_bootscreen_animation[fr].duration);
#endif
u8g.firstPage();
do { draw_custom_bootscreen(f); } while (u8g.nextPage());
if (frame_time) safe_delay(frame_time);
}
#ifndef CUSTOM_BOOTSCREEN_TIMEOUT
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#endif
#if CUSTOM_BOOTSCREEN_TIMEOUT
safe_delay(CUSTOM_BOOTSCREEN_TIMEOUT);
#endif
}
#endif // SHOW_CUSTOM_BOOTSCREEN
// Two-part needed to display all info
constexpr bool two_part = ((LCD_PIXEL_HEIGHT) - (START_BMPHEIGHT)) < ((MENU_FONT_ASCENT) * 2);
constexpr uint8_t bootscreen_pages = 1 + two_part;
// Draw the static Marlin bootscreen from a u8g loop
// or the animated boot screen within its own u8g loop
void MarlinUI::draw_marlin_bootscreen(const bool line2/*=false*/) {
// Determine text space needed
constexpr u8g_uint_t text_width_1 = u8g_uint_t((sizeof(SHORT_BUILD_VERSION) - 1) * (MENU_FONT_WIDTH)),
text_width_2 = u8g_uint_t((sizeof(MARLIN_WEBSITE_URL) - 1) * (MENU_FONT_WIDTH)),
text_max_width = _MAX(text_width_1, text_width_2),
text_total_height = (MENU_FONT_HEIGHT) * 2,
width = LCD_PIXEL_WIDTH, height = LCD_PIXEL_HEIGHT,
rspace = width - (START_BMPWIDTH);
u8g_int_t offx, offy, txt_base, txt_offx_1, txt_offx_2;
// Can the text fit to the right of the bitmap?
if (text_max_width < rspace) {
constexpr int8_t inter = (width - text_max_width - (START_BMPWIDTH)) / 3; // Evenly distribute horizontal space
offx = inter; // First the boot logo...
offy = (height - (START_BMPHEIGHT)) / 2; // ...V-aligned in the full height
txt_offx_1 = txt_offx_2 = inter + (START_BMPWIDTH) + inter; // Text right of the bitmap
txt_base = (height + MENU_FONT_ASCENT + text_total_height - (MENU_FONT_HEIGHT)) / 2; // Text vertical center
}
else {
constexpr int8_t inter = (height - text_total_height - (START_BMPHEIGHT)) / 3; // Evenly distribute vertical space
offx = rspace / 2; // Center the boot logo in the whole space
offy = inter; // V-align boot logo proportionally
txt_offx_1 = (width - text_width_1) / 2; // Text 1 centered
txt_offx_2 = (width - text_width_2) / 2; // Text 2 centered
txt_base = offy + START_BMPHEIGHT + offy + text_total_height - (MENU_FONT_DESCENT); // Even spacing looks best
}
NOLESS(offx, 0);
NOLESS(offy, 0);
auto _draw_bootscreen_bmp = [&](const uint8_t *bitmap) {
u8g.drawBitmapP(offx, offy, START_BMP_BYTEWIDTH, START_BMPHEIGHT, bitmap);
set_font(FONT_MENU);
if (!two_part || !line2) lcd_put_u8str_P(txt_offx_1, txt_base - (MENU_FONT_HEIGHT), PSTR(SHORT_BUILD_VERSION));
if (!two_part || line2) lcd_put_u8str_P(txt_offx_2, txt_base, PSTR(MARLIN_WEBSITE_URL));
};
auto draw_bootscreen_bmp = [&](const uint8_t *bitmap) {
u8g.firstPage(); do { _draw_bootscreen_bmp(bitmap); } while (u8g.nextPage());
};
#if DISABLED(BOOT_MARLIN_LOGO_ANIMATED)
draw_bootscreen_bmp(start_bmp);
#else
constexpr millis_t frame_time = MARLIN_BOOTSCREEN_FRAME_TIME;
LOOP_L_N(f, COUNT(marlin_bootscreen_animation)) {
draw_bootscreen_bmp((uint8_t*)pgm_read_ptr(&marlin_bootscreen_animation[f]));
if (frame_time) safe_delay(frame_time);
}
#endif
}
// Show the Marlin bootscreen, with the u8g loop and delays
void MarlinUI::show_marlin_bootscreen() {
for (uint8_t q = bootscreen_pages; q--;) {
draw_marlin_bootscreen(q == 0);
if (q) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages);
}
}
void MarlinUI::show_bootscreen() {
TERN_(SHOW_CUSTOM_BOOTSCREEN, show_custom_bootscreen());
show_marlin_bootscreen();
}
void MarlinUI::bootscreen_completion(const millis_t sofar) {
if ((BOOTSCREEN_TIMEOUT) / bootscreen_pages > sofar) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages - sofar);
}
#endif // SHOW_BOOTSCREEN
#if ENABLED(LIGHTWEIGHT_UI)
#include "status_screen_lite_ST7920.h"
#endif
// Initialize or re-initialize the LCD
void MarlinUI::init_lcd() {
static bool did_init_u8g = false;
if (!did_init_u8g) {
u8g.init(U8G_PARAM);
did_init_u8g = true;
}
#if PIN_EXISTS(LCD_BACKLIGHT)
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
#endif
#if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER)
SET_OUTPUT(LCD_PINS_DC);
#ifndef LCD_RESET_PIN
#define LCD_RESET_PIN LCD_PINS_RS
#endif
#endif
#if PIN_EXISTS(LCD_RESET)
// Perform a clean hardware reset with needed delays
OUT_WRITE(LCD_RESET_PIN, LOW);
_delay_ms(5);
WRITE(LCD_RESET_PIN, HIGH);
_delay_ms(5);
u8g.begin();
#endif
#if PIN_EXISTS(LCD_BACKLIGHT) && ENABLED(DELAYED_BACKLIGHT_INIT)
WRITE(LCD_BACKLIGHT_PIN, HIGH);
#endif
TERN_(HAS_LCD_CONTRAST, refresh_contrast());
TERN_(LCD_SCREEN_ROT_90, u8g.setRot90());
TERN_(LCD_SCREEN_ROT_180, u8g.setRot180());
TERN_(LCD_SCREEN_ROT_270, u8g.setRot270());
uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo));
}
// The kill screen is displayed for unrecoverable conditions
void MarlinUI::draw_kill_screen() {
TERN_(LIGHTWEIGHT_UI, ST7920_Lite_Status_Screen::clear_text_buffer());
const u8g_uint_t h4 = u8g.getHeight() / 4;
u8g.firstPage();
do {
set_font(FONT_MENU);
lcd_put_u8str(0, h4 * 1, status_message);
lcd_put_u8str_P(0, h4 * 2, GET_TEXT(MSG_HALTED));
lcd_put_u8str_P(0, h4 * 3, GET_TEXT(MSG_PLEASE_RESET));
} while (u8g.nextPage());
}
void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
#if HAS_LCD_MENU
#include "../menu/menu.h"
u8g_uint_t row_y1, row_y2;
#if ENABLED(ADVANCED_PAUSE_FEATURE)
void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) {
row_y1 = row * (MENU_FONT_HEIGHT) + 1;
row_y2 = row_y1 + MENU_FONT_HEIGHT - 1;
if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return;
lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2, 'E');
lcd_put_wchar((char)('1' + extruder));
lcd_put_wchar(' ');
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
lcd_put_wchar('/');
if (get_blink() || !thermalManager.heater_idle[extruder].timed_out)
lcd_put_u8str(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
}
#endif // ADVANCED_PAUSE_FEATURE
// Mark a menu item and set font color if selected.
// Return 'false' if the item is not on screen.
static bool mark_as_selected(const uint8_t row, const bool sel) {
row_y1 = row * (MENU_FONT_HEIGHT) + 1;
row_y2 = row_y1 + MENU_FONT_HEIGHT - 1;
if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return false;
if (sel) {
#if ENABLED(MENU_HOLLOW_FRAME)
u8g.drawHLine(0, row_y1 + 1, LCD_PIXEL_WIDTH);
u8g.drawHLine(0, row_y2 + 2, LCD_PIXEL_WIDTH);
#else
u8g.setColorIndex(1); // solid outline
u8g.drawBox(0, row_y1 + 2, LCD_PIXEL_WIDTH, MENU_FONT_HEIGHT - 1);
u8g.setColorIndex(0); // inverted text
#endif
}
#if DISABLED(MENU_HOLLOW_FRAME)
else u8g.setColorIndex(1); // solid text
#endif
if (!PAGE_CONTAINS(row_y1, row_y2)) return false;
lcd_moveto(0, row_y2);
return true;
}
// Draw a static line of text in the same idiom as a menu item
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
if (mark_as_selected(row, style & SS_INVERT)) {
pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
const int plen = pstr ? calculateWidth(pstr) : 0,
vlen = vstr ? utf8_strlen(vstr) : 0;
if (style & SS_CENTER) {
int pad = (LCD_PIXEL_WIDTH - plen - vlen * MENU_FONT_WIDTH) / MENU_FONT_WIDTH / 2;
while (--pad >= 0) n -= lcd_put_wchar(' ');
}
if (plen) n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
if (vlen) n -= lcd_put_u8str_max(vstr, n);
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
}
}
// Draw a generic menu item
void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char, const char post_char) {
if (mark_as_selected(row, sel)) {
pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 1) * (MENU_FONT_WIDTH);
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
lcd_put_wchar(LCD_PIXEL_WIDTH - (MENU_FONT_WIDTH), row_y2, post_char);
lcd_put_wchar(' ');
}
}
// Draw a menu item with an editable value
void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm) {
if (mark_as_selected(row, sel)) {
const uint8_t vallen = (pgm ? utf8_strlen_P(inStr) : utf8_strlen((char*)inStr)),
pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), inStr) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), (char*)inStr));
const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1;
pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vallen * prop) * (MENU_FONT_WIDTH);
if (vallen) {
lcd_put_wchar(':');
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
lcd_moveto(LCD_PIXEL_WIDTH - _MAX((MENU_FONT_WIDTH) * vallen, pixelwidth + 2), row_y2);
if (pgm) lcd_put_u8str_P(inStr); else lcd_put_u8str((char*)inStr);
}
}
}
void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
ui.encoder_direction_normal();
const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1;
const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);
bool extra_row = labellen * prop > LCD_WIDTH - 2 - vallen * prop;
#if ENABLED(USE_BIG_EDIT_FONT)
// Use the menu font if the label won't fit on a single line
constexpr u8g_uint_t lcd_edit_width = (LCD_PIXEL_WIDTH) / (EDIT_FONT_WIDTH);
u8g_uint_t lcd_chr_fit, one_chr_width;
if (labellen * prop <= lcd_edit_width - 1) {
if (labellen * prop + vallen * prop + 1 > lcd_edit_width) extra_row = true;
lcd_chr_fit = lcd_edit_width + 1;
one_chr_width = EDIT_FONT_WIDTH;
ui.set_font(FONT_EDIT);
}
else {
lcd_chr_fit = LCD_WIDTH;
one_chr_width = MENU_FONT_WIDTH;
ui.set_font(FONT_MENU);
}
#else
constexpr u8g_uint_t lcd_chr_fit = LCD_WIDTH,
one_chr_width = MENU_FONT_WIDTH;
#endif
// Center the label and value lines on the middle line
u8g_uint_t baseline = extra_row ? (LCD_PIXEL_HEIGHT) / 2 - 1
: (LCD_PIXEL_HEIGHT + EDIT_FONT_ASCENT) / 2;
// Assume the label is alpha-numeric (with a descender)
bool onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline + EDIT_FONT_DESCENT);
if (onpage) lcd_put_u8str_ind_P(0, baseline, pstr, itemIndex, itemString);
// If a value is included, print a colon, then print the value right-justified
if (value) {
lcd_put_wchar(':');
if (extra_row) {
// Assume that value is numeric (with no descender)
baseline += EDIT_FONT_ASCENT + 2;
onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline);
}
if (onpage) {
lcd_put_wchar(((lcd_chr_fit - 1) - (vallen * prop + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space
lcd_put_u8str(value);
}
}
TERN_(USE_BIG_EDIT_FONT, ui.set_font(FONT_MENU));
}
inline void draw_boxed_string(const u8g_uint_t x, const u8g_uint_t y, PGM_P const pstr, const bool inv) {
const u8g_uint_t len = utf8_strlen_P(pstr),
by = (y + 1) * (MENU_FONT_HEIGHT);
const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1;
const pixel_len_t bw = len * prop * (MENU_FONT_WIDTH), bx = x * prop * (MENU_FONT_WIDTH);
if (inv) {
u8g.setColorIndex(1);
u8g.drawBox(bx / prop - 1, by - (MENU_FONT_ASCENT), bw + 2, MENU_FONT_HEIGHT);
u8g.setColorIndex(0);
}
lcd_put_u8str_P(bx / prop, by, pstr);
if (inv) u8g.setColorIndex(1);
}
void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) {
ui.draw_select_screen_prompt(pref, string, suff);
draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno);
draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) * (USE_WIDE_GLYPH ? 2 : 1) + 1), LCD_HEIGHT - 1, yes, yesno);
}
#if ENABLED(SDSUPPORT)
void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) {
if (mark_as_selected(row, sel)) {
const uint8_t maxlen = LCD_WIDTH - isDir;
if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]);
const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH);
pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw);
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
}
}
#endif // SDSUPPORT
#if ENABLED(AUTO_BED_LEVELING_UBL)
/**
* UBL LCD "radar" map data
*/
#define MAP_UPPER_LEFT_CORNER_X 35 // These probably should be moved to the .h file But for now,
#define MAP_UPPER_LEFT_CORNER_Y 8 // it is easier to play with things having them here
#define MAP_MAX_PIXELS_X 53
#define MAP_MAX_PIXELS_Y 49
void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) {
// Scale the box pixels appropriately
u8g_uint_t x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X),
y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y),
pixels_per_x_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X),
pixels_per_y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y),
x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2,
y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2;
// Clear the Mesh Map
if (PAGE_CONTAINS(y_offset - 2, y_offset + y_map_pixels + 4)) {
u8g.setColorIndex(1); // First draw the bigger box in White so we have a border around the mesh map box
u8g.drawBox(x_offset - 2, y_offset - 2, x_map_pixels + 4, y_map_pixels + 4);
if (PAGE_CONTAINS(y_offset, y_offset + y_map_pixels)) {
u8g.setColorIndex(0); // Now actually clear the mesh map box
u8g.drawBox(x_offset, y_offset, x_map_pixels, y_map_pixels);
}
}
// Display Mesh Point Locations
u8g.setColorIndex(1);
const u8g_uint_t sx = x_offset + pixels_per_x_mesh_pnt / 2;
u8g_uint_t y = y_offset + pixels_per_y_mesh_pnt / 2;
for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++, y += pixels_per_y_mesh_pnt)
if (PAGE_CONTAINS(y, y))
for (uint8_t i = 0, x = sx; i < GRID_MAX_POINTS_X; i++, x += pixels_per_x_mesh_pnt)
u8g.drawBox(x, y, 1, 1);
// Fill in the Specified Mesh Point
const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y) - 1 - y_plot; // The origin is typically in the lower right corner. We need to
// invert the Y to get it to plot in the right location.
const u8g_uint_t by = y_offset + y_plot_inv * pixels_per_y_mesh_pnt;
if (PAGE_CONTAINS(by, by + pixels_per_y_mesh_pnt))
u8g.drawBox(
x_offset + x_plot * pixels_per_x_mesh_pnt, by,
pixels_per_x_mesh_pnt, pixels_per_y_mesh_pnt
);
// Put Relevant Text on Display
// Show X and Y positions at top of screen
u8g.setColorIndex(1);
if (PAGE_UNDER(7)) {
const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) },
lpos = pos.asLogical();
lcd_put_u8str_P(5, 7, X_LBL);
lcd_put_u8str(ftostr52(lpos.x));
lcd_put_u8str_P(74, 7, Y_LBL);
lcd_put_u8str(ftostr52(lpos.y));
}
// Print plot position
if (PAGE_CONTAINS(LCD_PIXEL_HEIGHT - (INFO_FONT_HEIGHT - 1), LCD_PIXEL_HEIGHT)) {
lcd_put_wchar(5, LCD_PIXEL_HEIGHT, '(');
u8g.print(x_plot);
lcd_put_wchar(',');
u8g.print(y_plot);
lcd_put_wchar(')');
// Show the location value
lcd_put_u8str_P(74, LCD_PIXEL_HEIGHT, Z_LBL);
if (!isnan(ubl.z_values[x_plot][y_plot]))
lcd_put_u8str(ftostr43sign(ubl.z_values[x_plot][y_plot]));
else
lcd_put_u8str_P(PSTR(" -----"));
}
}
#endif // AUTO_BED_LEVELING_UBL
#if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY)
//
// Draw knob rotation => Z motion key for:
// - menu.cpp:lcd_babystep_zoffset
// - menu_ubl.cpp:_lcd_mesh_fine_tune
//
const unsigned char cw_bmp[] PROGMEM = {
B00000000,B11111110,B00000000,
B00000011,B11111111,B10000000,
B00000111,B11000111,B11000000,
B00000111,B00000001,B11100000,
B00000000,B00000000,B11100000,
B00000000,B00000000,B11110000,
B00000000,B00000000,B01110000,
B00000100,B00000000,B01110000,
B00001110,B00000000,B01110000,
B00011111,B00000000,B01110000,
B00111111,B10000000,B11110000,
B00001110,B00000000,B11100000,
B00001111,B00000001,B11100000,
B00000111,B11000111,B11000000,
B00000011,B11111111,B10000000,
B00000000,B11111110,B00000000
};
const unsigned char ccw_bmp[] PROGMEM = {
B00000000,B11111110,B00000000,
B00000011,B11111111,B10000000,
B00000111,B11000111,B11000000,
B00001111,B00000001,B11100000,
B00001110,B00000000,B11100000,
B00111111,B10000000,B11110000,
B00011111,B00000000,B01110000,
B00001110,B00000000,B01110000,
B00000100,B00000000,B01110000,
B00000000,B00000000,B01110000,
B00000000,B00000000,B11110000,
B00000000,B00000000,B11100000,
B00000111,B00000001,B11100000,
B00000111,B11000111,B11000000,
B00000011,B11111111,B10000000,
B00000000,B11111110,B00000000
};
const unsigned char up_arrow_bmp[] PROGMEM = {
B00000100,B00000000,
B00001110,B00000000,
B00011111,B00000000,
B00111111,B10000000,
B01111111,B11000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000
};
const unsigned char down_arrow_bmp[] PROGMEM = {
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B00001110,B00000000,
B01111111,B11000000,
B00111111,B10000000,
B00011111,B00000000,
B00001110,B00000000,
B00000100,B00000000
};
const unsigned char offset_bedline_bmp[] PROGMEM = {
B11111111,B11111111,B11111111
};
const unsigned char nozzle_bmp[] PROGMEM = {
B01111111,B10000000,
B11111111,B11000000,
B11111111,B11000000,
B11111111,B11000000,
B01111111,B10000000,
B01111111,B10000000,
B11111111,B11000000,
B11111111,B11000000,
B11111111,B11000000,
B00111111,B00000000,
B00011110,B00000000,
B00001100,B00000000
};
void _lcd_zoffset_overlay_gfx(const_float_t zvalue) {
// Determine whether the user is raising or lowering the nozzle.
static int8_t dir;
static float old_zvalue;
if (zvalue != old_zvalue) {
dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0;
old_zvalue = zvalue;
}
const unsigned char *rot_up = TERN(OVERLAY_GFX_REVERSE, ccw_bmp, cw_bmp),
*rot_down = TERN(OVERLAY_GFX_REVERSE, cw_bmp, ccw_bmp);
const int left = TERN(USE_BIG_EDIT_FONT, 0, 5),
right = TERN(USE_BIG_EDIT_FONT, 45, 90),
nozzle = TERN(USE_BIG_EDIT_FONT, 95, 60);
// Draw nozzle lowered or raised according to direction moved
if (PAGE_CONTAINS( 3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp);
if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20 , 3, 1, offset_bedline_bmp);
// Draw cw/ccw indicator and up/down arrows.
if (PAGE_CONTAINS(47, 62)) {
u8g.drawBitmapP(right + 0, 48 - dir, 2, 13, up_arrow_bmp);
u8g.drawBitmapP(left + 0, 49 - dir, 2, 13, down_arrow_bmp);
u8g.drawBitmapP(left + 13, 47 , 3, 16, rot_down);
u8g.drawBitmapP(right + 13, 47 , 3, 16, rot_up);
}
}
#endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY
#endif // HAS_LCD_MENU
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,234 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/dogm/marlinui_DOGM.h
*/
#include "../../inc/MarlinConfigPre.h"
#include <U8glib.h>
#include "HAL_LCD_class_defines.h"
//#define ALTERNATIVE_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
// RepRapWorld Graphical LCD
#define U8G_CLASS U8GLIB_ST7920_128X64_4X
#if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_ENABLE == SD_MOSI_PIN)
#define U8G_PARAM LCD_PINS_RS
#else
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS
#endif
#elif ENABLED(U8GLIB_ST7920)
// RepRap Discount Full Graphics Smart Controller
// and other variant LCDs using ST7920
#if DISABLED(SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN) && (LCD_PINS_ENABLE == SD_MOSI_PIN)
#define U8G_CLASS U8GLIB_ST7920_128X64_4X_HAL // 2 stripes, HW SPI (Shared with SD card. Non-standard LCD adapter on AVR.)
#define U8G_PARAM LCD_PINS_RS
#else
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_ST7920_128X64_4X // 2 stripes, SW SPI (Original u8glib device)
#else
#define U8G_CLASS U8GLIB_ST7920_128X64_RRD // Adjust stripes with PAGE_HEIGHT in ultralcd_st7920_u8glib_rrd.h
#endif
#define U8G_PARAM LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS // AVR version ignores these pin settings
// HAL version uses these pin settings
#endif
#elif ENABLED(CARTESIO_UI)
// CartesioUI LCD
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes
#define FORCE_SOFT_SPI // SW-SPI
#else
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes (HW-SPI)
#endif
#elif ENABLED(U8GLIB_LM6059_AF)
// Based on the Adafruit ST7565 (https://www.adafruit.com/products/250)
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_LM6059 // 8 stripes (HW-SPI)
#else
#define U8G_CLASS U8GLIB_LM6059_2X // 4 stripes (HW-SPI)
#endif
#elif ENABLED(U8GLIB_ST7565_64128N)
// MaKrPanel, Mini Viki, Viki 2.0, AZSMZ 12864 ST7565 controller
#define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF)
#define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI)
#if (SMART_RAMPS && defined(__SAM3X8E__)) || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN
#define FORCE_SOFT_SPI // SW-SPI
#endif
#elif ANY(FYSETC_MINI_12864, MKS_MINI_12864, ENDER2_STOCKDISPLAY)
// The FYSETC Mini 12864 display // "4 stripes"
// The MKS_MINI_12864 V1/V2 aren't exact copies of the MiniPanel.
// Panel management is in u8g_dev_uc1701_mini12864_HAL.cpp with
// extra delays added to remove glitches seen with fast MCUs.
#define U8G_CLASS U8GLIB_MINI12864_2X_HAL // 8 stripes (HW-SPI)
#elif ENABLED(MINIPANEL)
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_MINI12864
#else
#define U8G_CLASS U8GLIB_MINI12864_2X // 8 stripes (HW-SPI)
#endif
#elif ENABLED(MKS_12864OLED_SSD1306)
// MKS 128x64 (SSD1306) OLED I2C LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes
#endif
#elif EITHER(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER)
// FYSETC OLED 2.42" 128 × 64 Full Graphics Controller
// or K3D OLED 2.42" 128 × 64 Full Graphics Controller
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1309_128X64_HAL
#endif
#elif ENABLED(ZONESTAR_12864OLED_SSD1306)
// Zonestar SSD1306 OLED SPI LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1306_128X64 // 8 stripes
#endif
#elif EITHER(MKS_12864OLED, ZONESTAR_12864OLED)
// MKS 128x64 (SH1106) OLED I2C LCD
// - or -
// Zonestar SH1106 OLED SPI LCD
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1106_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1106_128X64 // 8 stripes
#endif
#elif ENABLED(U8GLIB_SH1106_EINSTART)
// Connected via motherboard header
#define U8G_CLASS U8GLIB_SH1106_128X64
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, LCD_PINS_DC, LCD_PINS_RS
#elif ENABLED(U8GLIB_SH1106)
// Generic SH1106 OLED I2C LCD
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SH1106_128X64_2X_I2C_2_WIRE // 4 stripes
#else
#define U8G_CLASS U8GLIB_SH1106_128X64_2X // 4 stripes
#endif
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST) // I2C
#elif ENABLED(U8GLIB_SSD1309)
// Generic support for SSD1309 OLED I2C LCDs
#define U8G_CLASS U8GLIB_SSD1309_128X64
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST) // I2C
#elif ENABLED(U8GLIB_SSD1306)
// Generic SSD1306 OLED I2C LCD
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#endif
#define U8G_PARAM (U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST)
#elif TFT_SCALED_DOGLCD
// Unspecified 320x240 TFT pre-initialized by built-in bootloader
#define U8G_CLASS U8GLIB_TFT_320X240_UPSCALE_FROM_128X64
#if HAS_FSMC_GRAPHICAL_TFT
#define U8G_PARAM FSMC_CS_PIN, FSMC_RS_PIN
#else
#define U8G_PARAM -1, -1
#endif
#else
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_DOGM128 // 8 stripes (HW-SPI)
#else
#define U8G_CLASS U8GLIB_DOGM128_2X // 4 stripes (HW-SPI)
#endif
#endif
// Use HW-SPI if no other option is specified
#ifndef U8G_PARAM
#if ENABLED(FORCE_SOFT_SPI)
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // SW-SPI
#else
#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // HW-SPI
#endif
#endif
// For selective rendering within a Y range
#define PAGE_OVER(ya) ((ya) <= u8g.getU8g()->current_page.y1) // Does the current page follow a region top?
#define PAGE_UNDER(yb) ((yb) >= u8g.getU8g()->current_page.y0) // Does the current page precede a region bottom?
#define PAGE_CONTAINS(ya, yb) ((yb) >= u8g.getU8g()->current_page.y0 && (ya) <= u8g.getU8g()->current_page.y1) // Do two vertical regions overlap?
extern U8G_CLASS u8g;

View File

@@ -0,0 +1,68 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/ammeter.h - Status Screen Laser Ammeter bitmaps
//
#define STATUS_AMMETER_WIDTH 20
const unsigned char status_ammeter_bmp_mA[] PROGMEM = {
B00000000,B11111100,B00000000,
B00000011,B00000011,B00000000,
B00000100,B00000000,B10000000,
B00001000,B00000000,B01000000,
B00010000,B00000110,B00100000,
B00010000,B00001001,B00100000,
B00100000,B00001001,B00010000,
B00100011,B01001111,B00010000,
B11100010,B10101001,B00011100,
B00100010,B10101001,B00010000,
B00100010,B10101001,B00010000,
B00010000,B00000000,B00100000,
B00010000,B00000000,B00100000,
B00001000,B00000000,B01000000,
B00000100,B00000000,B10000000,
B00000011,B00000011,B00000000,
B00000000,B11111100,B00000000
};
const unsigned char status_ammeter_bmp_A[] PROGMEM = {
B00000000,B11111100,B00000000,
B00000011,B00000011,B00000000,
B00000100,B00000000,B10000000,
B00001000,B00000000,B01000000,
B00010000,B00000000,B00100000,
B00010000,B00110000,B00100000,
B00100000,B01001000,B00010000,
B00100000,B01001000,B00010000,
B11100000,B01111000,B00011100,
B00100000,B01001000,B00010000,
B00100000,B01001000,B00010000,
B00010000,B01001000,B00100000,
B00010000,B00000000,B00100000,
B00001000,B00000000,B01000000,
B00000100,B00000000,B10000000,
B00000011,B00000011,B00000000,
B00000000,B11111100,B00000000,
};

View File

@@ -0,0 +1,110 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/bed.h - Status Screen Bed bitmaps
//
#if ENABLED(STATUS_ALT_BED_BITMAP)
#define STATUS_BED_ANIM
#define STATUS_BED_WIDTH 24
#ifndef STATUS_BED_X
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif
#define STATUS_BED_TEXT_X (STATUS_BED_X + 11)
const unsigned char status_bed_bmp[] PROGMEM = {
B11111111,B11111111,B11000000,
B01000000,B00000000,B00100000,
B00100000,B00000000,B00010000,
B00010000,B00000000,B00001000,
B00001000,B00000000,B00000100,
B00000100,B00000000,B00000010,
B00000011,B11111111,B11111111
};
const unsigned char status_bed_on_bmp[] PROGMEM = {
B00000010,B00100010,B00000000,
B00000100,B01000100,B00000000,
B00000100,B01000100,B00000000,
B00000010,B00100010,B00000000,
B00000001,B00010001,B00000000,
B11111111,B11111111,B11000000,
B01000000,B10001000,B10100000,
B00100001,B00010001,B00010000,
B00010010,B00100010,B00001000,
B00001000,B00000000,B00000100,
B00000100,B00000000,B00000010,
B00000011,B11111111,B11111111
};
#else
#define STATUS_BED_WIDTH 21
#ifndef STATUS_BED_X
#define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#endif
#ifdef STATUS_BED_ANIM
const unsigned char status_bed_bmp[] PROGMEM = {
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
const unsigned char status_bed_on_bmp[] PROGMEM = {
B00000100,B00010000,B01000000,
B00000010,B00001000,B00100000,
B00000010,B00001000,B00100000,
B00000100,B00010000,B01000000,
B00001000,B00100000,B10000000,
B00010000,B01000001,B00000000,
B00010000,B01000001,B00000000,
B00001000,B00100000,B10000000,
B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
#else
const unsigned char status_bed_bmp[] PROGMEM = {
B00000100,B00010000,B01000000,
B00000010,B00001000,B00100000,
B00000010,B00001000,B00100000,
B00000100,B00010000,B01000000,
B00001000,B00100000,B10000000,
B00010000,B01000001,B00000000,
B00010000,B01000001,B00000000,
B00001000,B00100000,B10000000,
B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
#endif
#endif

View File

@@ -0,0 +1,89 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/chamber.h - Status Screen Chamber bitmaps
//
#define STATUS_CHAMBER_WIDTH 21
#if STATUS_HEATERS_WIDTH
#if ENABLED(STATUS_COMBINE_HEATERS)
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - 2 - (STATUS_CHAMBER_BYTEWIDTH) * 8)
#elif HAS_FAN0 && HAS_HEATED_BED && HOTENDS <= 2
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - 2 - (STATUS_HEATERS_BYTEWIDTH - STATUS_CHAMBER_BYTEWIDTH) * 8)
#elif HAS_FAN0 && !HAS_HEATED_BED
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8)
#else
#define STATUS_CHAMBER_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH) * 8)
#endif
#endif
#ifdef STATUS_CHAMBER_ANIM
const unsigned char status_chamber_bmp[] PROGMEM = {
B00011111,B11111111,B11111000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00010000,B00000000,B00001000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
const unsigned char status_chamber_on_bmp[] PROGMEM = {
B00011111,B11111111,B11111000,
B00010000,B00000000,B00001000,
B00010000,B10000100,B00001000,
B00010000,B01000010,B00001000,
B00010000,B01000010,B00001000,
B00010000,B10000100,B00001000,
B00010001,B00001000,B00001000,
B00010001,B00001000,B00001000,
B00010000,B10000100,B00001000,
B00010000,B00000000,B00001000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
#else
const unsigned char status_chamber_bmp[] PROGMEM = {
B00011111,B11111111,B11111000,
B00010000,B00000000,B00001000,
B00010000,B10000100,B00001000,
B00010000,B01000010,B00001000,
B00010000,B01000010,B00001000,
B00010000,B10000100,B00001000,
B00010001,B00001000,B00001000,
B00010001,B00001000,B00001000,
B00010000,B10000100,B00001000,
B00010000,B00000000,B00001000,
B00011111,B11111111,B11111000,
B00011111,B11111111,B11111000
};
#endif

View File

@@ -0,0 +1,309 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/combined.h - Status Screen Combined Heater bitmaps
//
#undef STATUS_HOTEND_ANIM
#undef STATUS_BED_ANIM
#define STATUS_HEATERS_XSPACE 24
//
// Status Screen Combined Heater bitmaps
//
#if HAS_HEATED_BED && HOTENDS <= 4
#if HOTENDS == 0
#define STATUS_HEATERS_WIDTH 96
const unsigned char status_heaters_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000
};
#elif HOTENDS == 1
#define STATUS_HEATERS_WIDTH 96
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000,
B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000
};
#elif HOTENDS == 2
#define STATUS_HEATERS_WIDTH 96
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00000000,B00000000,B00000000,B00000010,B00001000,B00100000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00000000,B00000000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00000000,B00000000,B00000000,B00001000,B00100000,B10000000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000000,B00000000,B00000000,B00000100,B00010000,B01000000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,B11111111,B11111000
};
#elif HOTENDS == 3
#define STATUS_HEATERS_WIDTH 96
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000100,B00010000,B01000000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00000100,B00010000,B01000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00001000,B00100000,B10000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00010000,B01000001,B00000000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00010000,B01000001,B00000000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00001000,B00100000,B10000000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000010,B00001000,B00100000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000100,B00010000,B01000000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00001000,B00100000,B10000000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00001000,B00100000,B10000000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000100,B00010000,B01000000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00011111,B11111111,B11111000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00011111,B11111111,B11111000
};
#else // HOTENDS > 3
#define STATUS_HEATERS_WIDTH 120
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00000100,B00010000,B01000000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00000100,B00010000,B01000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00001000,B00100000,B10000000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00010000,B01000001,B00000000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00010000,B01000001,B00000000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00001000,B00100000,B10000000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00000010,B00001000,B00100000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,B00000000,B00000100,B00010000,B01000000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,B00000000,B00001000,B00100000,B10000000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,B00000000,B00010000,B01000001,B00000000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,B00000000,B00001000,B00100000,B10000000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00000100,B00010000,B01000000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00000000,B00000000,B00000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00011111,B11111111,B11111000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00011111,B11111111,B11111000
};
#endif // HOTENDS
#define STATUS_BED_TEXT_X (STATUS_HEATERS_WIDTH - 10)
#else // !HAS_HEATED_BED || HOTENDS > 3
#if HOTENDS == 0
#define STATUS_HEATERS_WIDTH 0
#elif HOTENDS == 1
#define STATUS_HEATERS_WIDTH 12
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
B00111111,B11110000,
B00111111,B11110000,
B00011111,B11100000,
B00011111,B11100000,
B00111111,B11110000,
B00111111,B11110000,
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#elif HOTENDS == 2
#define STATUS_HEATERS_WIDTH 36
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,
B00111011,B01110000,B00000000,B00111100,B11110000,
B00111011,B01110000,B00000000,B00111010,B11110000,
B00011011,B01100000,B00000000,B00011110,B11100000,
B00011011,B01100000,B00000000,B00011110,B11100000,
B00111011,B01110000,B00000000,B00111110,B11110000,
B00111100,B11110000,B00000000,B00111110,B11110000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,
B00111100,B11110000,B00000000,B00111011,B01110000,
B00111010,B11110000,B00000000,B00111111,B01110000,
B00011110,B11100000,B00000000,B00011110,B11100000,
B00011110,B11100000,B00000000,B00011101,B11100000,
B00111110,B11110000,B00000000,B00111011,B11110000,
B00111110,B11110000,B00000000,B00111000,B01110000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,
B00001111,B11000000,B00000000,B00001111,B11000000,
B00000111,B10000000,B00000000,B00000111,B10000000,
B00000011,B00000000,B00000000,B00000011,B00000000
};
#elif HOTENDS == 3
#define STATUS_HEATERS_WIDTH 60
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111100,B11110000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00111111,B01110000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011110,B11100000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011101,B11100000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00111011,B11110000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111000,B01110000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
};
#elif HOTENDS == 4
#define STATUS_HEATERS_WIDTH 84
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
};
#else // HOTENDS > 4
#define STATUS_HEATERS_WIDTH 108
const unsigned char status_heaters_bmp[] PROGMEM = {
B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,B00000000,B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,
B00111011,B01110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,
B00111011,B01110000,B00000000,B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,
B00011011,B01100000,B00000000,B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,
B00111011,B01110000,B00000000,B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,
B00111100,B11110000,B00000000,B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,
#else
B00111110,B11110000,B00000000,B00111100,B11110000,B00000000,B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111000,B01110000,
B00111100,B11110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B01110000,B00000000,B00111011,B11110000,
B00111010,B11110000,B00000000,B00111111,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,B00000000,B00111000,B11110000,
B00011110,B11100000,B00000000,B00011110,B11100000,B00000000,B00011100,B11100000,B00000000,B00011011,B01100000,B00000000,B00011111,B01100000,
B00011110,B11100000,B00000000,B00011101,B11100000,B00000000,B00011111,B01100000,B00000000,B00011000,B00100000,B00000000,B00011111,B01100000,
B00111110,B11110000,B00000000,B00111011,B11110000,B00000000,B00111011,B01110000,B00000000,B00111111,B01110000,B00000000,B00111011,B01110000,
B00111110,B11110000,B00000000,B00111000,B01110000,B00000000,B00111100,B11110000,B00000000,B00111111,B01110000,B00000000,B00111100,B11110000,
#endif
B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,B00000000,B00111111,B11110000,
B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,B00000000,B00001111,B11000000,
B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,B00000000,B00000111,B10000000,
B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000,B00000000,B00000011,B00000000
};
#endif // HOTENDS
#endif // !HAS_HEATED_BED || HOTENDS > 3

View File

@@ -0,0 +1,119 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/cooler.h - Status Screen Laser Cooler bitmaps
//
#if HAS_COOLER
#define STATUS_COOLER_WIDTH 22
const unsigned char status_cooler_bmp2[] PROGMEM = {
B00000001,B00000000,B10000000,
B00000001,B00100100,B10010000,
B00000101,B01000010,B10100000,
B00000011,B10000001,B11000000,
B00001111,B11101111,B11110000,
B00000011,B10000001,B11000000,
B00000101,B01000010,B10100000,
B00001001,B00001000,B10010000,
B00000001,B00001000,B00000000,
B00000000,B01001001,B00000000,
B00000000,B00101010,B00000000,
B00000000,B00011100,B00000000,
B00000001,B11111111,B11000000,
B00000000,B00011100,B00000000,
B00000000,B00101010,B00000000,
B00000000,B01001001,B00000000
};
const unsigned char status_cooler_bmp1[] PROGMEM = {
B00000001,B00000000,B10000000,
B00000001,B00100100,B10010000,
B00000101,B01000010,B10100000,
B00000010,B10000001,B01000000,
B00001100,B01110110,B00110000,
B00000010,B10000001,B01000000,
B00000101,B01000010,B10100000,
B00001001,B00001000,B10010000,
B00000001,B00001000,B00000000,
B00000000,B01001001,B00000000,
B00000000,B00101010,B00000000,
B00000000,B00010100,B00000000,
B00000001,B11100011,B11000000,
B00000000,B00010100,B00000000,
B00000000,B00101010,B00000000,
B00000000,B01001001,B00000000
};
#endif
#if ENABLED(LASER_COOLANT_FLOW_METER)
#define STATUS_FLOWMETER_WIDTH 24
const unsigned char status_flowmeter_bmp2[] PROGMEM = {
B00000000,B01111110,B00000000,
B00000001,B10000001,B10000000,
B00000010,B00011000,B01000000,
B00000100,B00011000,B00100000,
B00001000,B00011000,B00010000,
B00001000,B00011000,B00010000,
B00010000,B00011000,B00001000,
B00010000,B00011000,B00001000,
B00010111,B11111111,B11101000,
B00010111,B11111111,B11101000,
B00010000,B00011000,B00001000,
B00010000,B00011000,B00001000,
B00001000,B00011000,B00010000,
B00001000,B00011000,B00010000,
B00000100,B00011000,B00100000,
B00000010,B00011000,B01000000,
B00000001,B10000001,B10000000,
B00000000,B01111110,B00000000,
B00000000,B00011000,B00000000,
B00000111,B11111111,B11100000
};
const unsigned char status_flowmeter_bmp1[] PROGMEM = {
B00000000,B01111110,B00000000,
B00000001,B10000001,B10000000,
B00000010,B00000000,B01000000,
B00000101,B00000000,B10100000,
B00001011,B10000001,B11010000,
B00001001,B11000011,B10010000,
B00010000,B11100111,B00001000,
B00010000,B01111110,B00001000,
B00010000,B00111100,B00001000,
B00010000,B00111100,B00001000,
B00010000,B01111110,B00001000,
B00010000,B11100111,B00001000,
B00001001,B11000011,B10010000,
B00001011,B10000001,B11010000,
B00000101,B00000000,B10100000,
B00000010,B00000000,B01000000,
B00000001,B10000001,B10000000,
B00000000,B01111110,B00000000,
B00000000,B00011000,B00000000,
B00000111,B11111111,B11100000
};
#endif

View File

@@ -0,0 +1,123 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/cutter.h - Status Screen Laser / Spindle bitmaps
//
#define STATUS_CUTTER_WIDTH 24
#define STATUS_CUTTER_X 80
#if ENABLED(LASER_FEATURE)
#ifdef STATUS_CUTTER_ANIM
const unsigned char status_cutter_on_bmp[] PROGMEM = {
B00000000,B00100100,B00000000,
B00000000,B01100110,B00000000,
B00000000,B11000011,B00000000,
B00000001,B10011001,B10000000,
B00000011,B00100100,B11000000,
B00000000,B01000010,B00000000,
B00000000,B01000010,B00000000,
B00000011,B00100100,B11000000,
B00000001,B10011001,B10000000,
B00000000,B11000011,B00000000,
B00000000,B01100110,B00000000,
B00000000,B00100100,B00000000
};
const unsigned char status_cutter_bmp[] PROGMEM = {
B00000000,B00100100,B00000000,
B00000000,B01100110,B00000000,
B00000000,B00000000,B00000000,
B00000001,B00000000,B10000000,
B00000011,B00000000,B11000000,
B00000000,B00011000,B00000000,
B00000000,B00011000,B00000000,
B00000011,B00000000,B11000000,
B00000001,B00000000,B10000000,
B00000000,B00000000,B00000000,
B00000000,B01100110,B00000000,
B00000000,B00100100,B00000000
};
#else
const unsigned char status_cutter_bmp[] PROGMEM = {
B00000000,B00100100,B00000000,
B00000000,B01100110,B00000000,
B00000000,B11000011,B00000000,
B00000001,B10000001,B10000000,
B00000011,B00000000,B11000000,
B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,
B00000011,B00000000,B11000000,
B00000001,B10000001,B10000000,
B00000000,B11000011,B00000000,
B00000000,B01100110,B00000000,
B00000000,B00100100,B00000000
};
#endif
#else
#ifdef STATUS_CUTTER_ANIM
const unsigned char status_cutter_on_bmp[] PROGMEM = {
B00000001,B11111110,B10000000,
B00000000,B11000000,B00000000,
B00000001,B10000000,B10000000,
B00000001,B00000000,B10000000,
B00000001,B11111100,B10000000,
B00000000,B11100000,B00000000,
B00000001,B11000000,B10000000,
B00000000,B10000001,B00000000,
B00000000,B01111010,B00000000,
B00000000,B00110100,B00000000,
B00000000,B00011000,B00000000,
B00000000,B00000000,B00000000
};
const unsigned char status_cutter_bmp[] PROGMEM = {
B00000001,B11111110,B10000000,
B00000000,B11000000,B00000000,
B00000001,B10000000,B10000000,
B00000001,B00000000,B10000000,
B00000001,B11111100,B10000000,
B00000000,B11100000,B00000000,
B00000001,B11000000,B10000000,
B00000000,B10000001,B00000000,
B00000000,B01111010,B00000000,
B00000000,B00110100,B00000000,
B00000000,B00011000,B00000000,
B00000000,B00000000,B00000000
};
#else
const unsigned char status_cutter_bmp[] PROGMEM = {
B00000001,B11000010,B10000000,
B00000001,B00011100,B10000000,
B00000000,B11100001,B00000000,
B00000001,B00001110,B10000000,
B00000001,B01110000,B10000000,
B00000000,B10000111,B10000000,
B00000001,B00111111,B10000000,
B00000000,B11111111,B00000000,
B00000000,B01111110,B00000000,
B00000000,B00111100,B00000000,
B00000000,B00011000,B00000000,
B00000000,B00000000,B00000000
};
#endif
#endif

View File

@@ -0,0 +1,443 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/fan.h - Status Screen Fan bitmaps
//
#undef STATUS_FAN_WIDTH
#define STATUS_FAN_WIDTH 20
#if STATUS_FAN_FRAMES <= 2
#define STATUS_FAN_Y 2
#if ENABLED(STATUS_ALT_FAN_BITMAP)
const unsigned char status_fan0_bmp[] PROGMEM = {
B00000001,B11111110,B00000000,
B00000110,B00000001,B10000000,
B00001000,B11111100,B01000000,
B00010000,B11111100,B00100000,
B00010000,B01111000,B00100000,
B00100000,B00110000,B00010000,
B00101100,B00000000,B11010000,
B00101110,B00110001,B11010000,
B00101111,B01111011,B11010000,
B00101111,B01111011,B11010000,
B00101110,B00110001,B11010000,
B00101100,B00000000,B11010000,
B00100000,B00110000,B00010000,
B00010000,B01111000,B00100000,
B00010000,B11111100,B00100000,
B00001000,B11111100,B01000000,
B00000110,B00000001,B10000000,
B00000001,B11111110,B00000000
};
#if STATUS_FAN_FRAMES == 2
const unsigned char status_fan1_bmp[] PROGMEM = {
B00000001,B11111110,B00000000,
B00000110,B00000001,B10000000,
B00001001,B10000110,B01000000,
B00010011,B10000111,B00100000,
B00010111,B10000111,B10100000,
B00101111,B10000111,B11010000,
B00101111,B00000011,B11010000,
B00100000,B00110000,B00010000,
B00100000,B01111000,B00010000,
B00100000,B01111000,B00010000,
B00100000,B00110000,B00010000,
B00101111,B00000011,B11010000,
B00101111,B10000111,B11010000,
B00010111,B10000111,B10100000,
B00010011,B10000111,B00100000,
B00001001,B10000110,B01000000,
B00000110,B00000001,B10000000,
B00000001,B11111110,B00000000
};
#endif
#else // !STATUS_ALT_FAN_BITMAP
const unsigned char status_fan0_bmp[] PROGMEM = {
B00111111,B11111111,B11110000,
B00111000,B00000000,B01110000,
B00110000,B11111100,B00110000,
B00100000,B11111100,B00010000,
B00100000,B01111000,B00010000,
B00100000,B00110000,B00010000,
B00101100,B00000000,B11010000,
B00101110,B00110001,B11010000,
B00101111,B01111011,B11010000,
B00101111,B01111011,B11010000,
B00101110,B00110001,B11010000,
B00101100,B00000000,B11010000,
B00100000,B00110000,B00010000,
B00100000,B01111000,B00010000,
B00100000,B11111100,B00010000,
B00110000,B11111100,B00110000,
B00111000,B00000000,B01110000,
B00111111,B11111111,B11110000
};
#if STATUS_FAN_FRAMES == 2
const unsigned char status_fan1_bmp[] PROGMEM = {
B00111111,B11111111,B11110000,
B00111000,B00000000,B01110000,
B00110001,B10000110,B00110000,
B00100011,B10000111,B00010000,
B00100111,B10000111,B10010000,
B00101111,B10000111,B11010000,
B00101111,B00000011,B11010000,
B00100000,B00110000,B00010000,
B00100000,B01111000,B00010000,
B00100000,B01111000,B00010000,
B00100000,B00110000,B00010000,
B00101111,B00000011,B11010000,
B00101111,B10000111,B11010000,
B00100111,B10000111,B10010000,
B00100011,B10000111,B00010000,
B00110001,B10000110,B00110000,
B00111000,B00000000,B01110000,
B00111111,B11111111,B11110000
};
#endif
#endif // !STATUS_ALT_FAN_BITMAP
#elif STATUS_FAN_FRAMES == 3
#if ENABLED(STATUS_ALT_FAN_BITMAP)
const unsigned char status_fan0_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00000000,B11000000,
B00001001,B00000001,B00100000,
B00010111,B10000011,B11010000,
B00010111,B10000011,B11010000,
B00101111,B11000111,B11101000,
B00100111,B11000111,B11001000,
B00100001,B11111111,B00001000,
B00100000,B01111100,B00001000,
B00100000,B01111100,B00001000,
B00100000,B01111100,B00001000,
B00100001,B11111111,B00001000,
B00100111,B11000111,B11001000,
B00101111,B11000111,B11101000,
B00010111,B10000011,B11010000,
B00010111,B10000011,B11010000,
B00001001,B00000001,B00100000,
B00000110,B00000000,B11000000,
B00000001,B11111111,B00000000
};
const unsigned char status_fan1_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00110000,B11000000,
B00001001,B11110000,B00100000,
B00010001,B11110000,B00010000,
B00010000,B11110000,B00010000,
B00100000,B11110000,B01101000,
B00100000,B00110001,B11101000,
B00100000,B00111001,B11101000,
B00100000,B01111111,B11111000,
B00111111,B11111111,B11111000,
B00111111,B11111100,B00001000,
B00101111,B00111000,B00001000,
B00101110,B00011000,B00001000,
B00101100,B00011110,B00001000,
B00010000,B00011110,B00010000,
B00010000,B00011111,B00010000,
B00001000,B00011111,B00100000,
B00000110,B00011000,B11000000,
B00000001,B11111111,B00000000
};
const unsigned char status_fan2_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00011000,B11000000,
B00001000,B00011111,B00100000,
B00010000,B00011111,B10010000,
B00010100,B00011111,B00010000,
B00101110,B00011110,B00001000,
B00101111,B00011100,B00001000,
B00101111,B10111000,B00001000,
B00111111,B11111100,B00001000,
B00111111,B11111111,B11111000,
B00100000,B01111111,B11111000,
B00100000,B00111011,B11101000,
B00100000,B01110001,B11101000,
B00100000,B11110000,B11101000,
B00010001,B11110000,B01010000,
B00010011,B11110000,B00010000,
B00001001,B11110000,B00100000,
B00000110,B00110000,B11000000,
B00000001,B11111111,B00000000
};
#else // !STATUS_ALT_FAN_BITMAP
const unsigned char status_fan0_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00000000,B11111000,
B00111001,B00000001,B00111000,
B00110111,B10000011,B11011000,
B00110111,B10000011,B11011000,
B00101111,B11000111,B11101000,
B00100111,B11000111,B11001000,
B00100001,B11111111,B00001000,
B00100000,B01111100,B00001000,
B00100000,B01111100,B00001000,
B00100000,B01111100,B00001000,
B00100001,B11111111,B00001000,
B00100111,B11000111,B11001000,
B00101111,B11000111,B11101000,
B00110111,B10000011,B11011000,
B00110111,B10000011,B11011000,
B00111001,B00000001,B00111000,
B00111110,B00000000,B11111000,
B00111111,B11111111,B11111000
};
const unsigned char status_fan1_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00110000,B11111000,
B00111001,B11110000,B00111000,
B00110001,B11110000,B00011000,
B00110000,B11110000,B00011000,
B00100000,B11110000,B01101000,
B00100000,B00110001,B11101000,
B00100000,B00111001,B11101000,
B00100000,B01111111,B11111000,
B00111111,B11111111,B11111000,
B00111111,B11111100,B00001000,
B00101111,B00111000,B00001000,
B00101110,B00011000,B00001000,
B00101100,B00011110,B00001000,
B00110000,B00011110,B00011000,
B00110000,B00011111,B00011000,
B00111000,B00011111,B00111000,
B00111110,B00011000,B11111000,
B00111111,B11111111,B11111000
};
const unsigned char status_fan2_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00011000,B11111000,
B00111000,B00011111,B00111000,
B00110000,B00011111,B10011000,
B00110100,B00011111,B00011000,
B00101110,B00011110,B00001000,
B00101111,B00011100,B00001000,
B00101111,B10111000,B00001000,
B00111111,B11111100,B00001000,
B00111111,B11111111,B11111000,
B00100000,B01111111,B11111000,
B00100000,B00111011,B11101000,
B00100000,B01110001,B11101000,
B00100000,B11110000,B11101000,
B00110001,B11110000,B01011000,
B00110011,B11110000,B00011000,
B00111001,B11110000,B00111000,
B00111110,B00110000,B11111000,
B00111111,B11111111,B11111000
};
#endif // !STATUS_ALT_FAN_BITMAP
#elif STATUS_FAN_FRAMES == 4
#if ENABLED(STATUS_ALT_FAN_BITMAP)
const unsigned char status_fan0_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00000000,B11000000,
B00001000,B00111111,B00100000,
B00010000,B01111110,B00010000,
B00010000,B01111100,B00010000,
B00101000,B01111100,B00001000,
B00101100,B00111000,B00001000,
B00101111,B00111001,B11001000,
B00101111,B11111111,B11101000,
B00101111,B11000111,B11101000,
B00101111,B11111111,B11101000,
B00100111,B00111001,B11101000,
B00100000,B00111000,B01101000,
B00100000,B01111100,B00101000,
B00010000,B01111100,B00010000,
B00010000,B11111100,B00010000,
B00001001,B11111000,B00100000,
B00000110,B00000000,B11000000,
B00000001,B11111111,B00000000
};
const unsigned char status_fan1_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00000000,B11000000,
B00001000,B00001111,B00100000,
B00010100,B00011111,B11010000,
B00010110,B00011111,B10010000,
B00101111,B00011111,B00001000,
B00101111,B10011110,B00001000,
B00101111,B11111100,B00001000,
B00101111,B11011100,B00001000,
B00100111,B11101111,B11001000,
B00100000,B01110111,B11101000,
B00100000,B01111111,B11101000,
B00100000,B11110011,B11101000,
B00100001,B11110001,B11101000,
B00010011,B11110000,B11010000,
B00010111,B11110000,B01010000,
B00001001,B11100000,B00100000,
B00000110,B00000000,B11000000,
B00000001,B11111111,B00000000
};
const unsigned char status_fan2_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B10000000,B11000000,
B00001001,B10000000,B00100000,
B00010111,B10000001,B11010000,
B00010111,B11000011,B11010000,
B00100111,B11000111,B11101000,
B00100011,B11000111,B11111000,
B00100001,B11111111,B10001000,
B00100000,B01101100,B00001000,
B00100000,B01101100,B00001000,
B00100000,B01101100,B00001000,
B00100011,B11111111,B00001000,
B00111111,B11000111,B10001000,
B00101111,B11000111,B11001000,
B00010111,B10000111,B11010000,
B00010111,B00000011,B11010000,
B00001000,B00000011,B00100000,
B00000110,B00000010,B11000000,
B00000001,B11111111,B00000000
};
const unsigned char status_fan3_bmp[] PROGMEM = {
B00000001,B11111111,B00000000,
B00000110,B00000000,B11000000,
B00001001,B11110000,B00100000,
B00010001,B11100000,B00010000,
B00010001,B11100000,B00010000,
B00100001,B11100001,B11101000,
B00100000,B11110011,B11101000,
B00100000,B01111111,B11101000,
B00100000,B01110111,B11101000,
B00101000,B11101110,B00101000,
B00101111,B11011100,B00001000,
B00101111,B11111100,B00001000,
B00101111,B10011110,B00001000,
B00101111,B00001111,B00001000,
B00010000,B00001111,B00010000,
B00010000,B00001111,B00010000,
B00001000,B00011111,B00100000,
B00000110,B00000000,B11000000,
B00000001,B11111111,B00000000
};
#else // !STATUS_ALT_FAN_BITMAP
const unsigned char status_fan0_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00000000,B11111000,
B00111000,B00111111,B00111000,
B00110000,B01111110,B00011000,
B00110000,B01111100,B00011000,
B00101000,B01111100,B00001000,
B00101100,B00111000,B00001000,
B00101111,B00111001,B11001000,
B00101111,B11111111,B11101000,
B00101111,B11000111,B11101000,
B00101111,B11111111,B11101000,
B00100111,B00111001,B11101000,
B00100000,B00111000,B01101000,
B00100000,B01111100,B00101000,
B00110000,B01111100,B00011000,
B00110000,B11111100,B00011000,
B00111001,B11111000,B00111000,
B00111110,B00000000,B11111000,
B00111111,B11111111,B11111000
};
const unsigned char status_fan1_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00000000,B11111000,
B00111000,B00001111,B00111000,
B00110100,B00011111,B11011000,
B00110110,B00011111,B10011000,
B00101111,B00011111,B00001000,
B00101111,B10011110,B00001000,
B00101111,B11111100,B00001000,
B00101111,B11011100,B00001000,
B00100111,B11101111,B11001000,
B00100000,B01110111,B11101000,
B00100000,B01111111,B11101000,
B00100000,B11110011,B11101000,
B00100001,B11110001,B11101000,
B00110011,B11110000,B11011000,
B00110111,B11110000,B01011000,
B00111001,B11100000,B00111000,
B00111110,B00000000,B11111000,
B00111111,B11111111,B11111000
};
const unsigned char status_fan2_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B10000000,B11111000,
B00111001,B10000000,B00111000,
B00110111,B10000001,B11011000,
B00110111,B11000011,B11011000,
B00100111,B11000111,B11101000,
B00100011,B11000111,B11111000,
B00100001,B11111111,B10001000,
B00100000,B01101100,B00001000,
B00100000,B01101100,B00001000,
B00100000,B01101100,B00001000,
B00100011,B11111111,B00001000,
B00111111,B11000111,B10001000,
B00101111,B11000111,B11001000,
B00110111,B10000111,B11011000,
B00110111,B00000011,B11011000,
B00111000,B00000011,B00111000,
B00111110,B00000010,B11111000,
B00111111,B11111111,B11111000
};
const unsigned char status_fan3_bmp[] PROGMEM = {
B00111111,B11111111,B11111000,
B00111110,B00000000,B11111000,
B00111001,B11110000,B00111000,
B00110001,B11100000,B00011000,
B00110001,B11100000,B00011000,
B00100001,B11100001,B11101000,
B00100000,B11110011,B11101000,
B00100000,B01111111,B11101000,
B00100000,B01110111,B11101000,
B00101000,B11101110,B00101000,
B00101111,B11011100,B00001000,
B00101111,B11111100,B00001000,
B00101111,B10011110,B00001000,
B00101111,B00001111,B00001000,
B00110000,B00001111,B00011000,
B00110000,B00001111,B00011000,
B00111000,B00011111,B00111000,
B00111110,B00000000,B11111000,
B00111111,B11111111,B11111000
};
#endif // !STATUS_ALT_FAN_BITMAP
#endif

View File

@@ -0,0 +1,759 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
//
// lcd/dogm/status/hotend.h - Status Screen Hotends bitmaps
//
#if HAS_MMU
#define STATUS_HOTEND_BITMAPS EXTRUDERS
#define MAX_HOTEND_BITMAPS 8
#else
#define STATUS_HOTEND_BITMAPS HOTENDS
#define MAX_HOTEND_BITMAPS 5
#endif
#if STATUS_HOTEND_BITMAPS > MAX_HOTEND_BITMAPS
#undef STATUS_HOTEND_BITMAPS
#define STATUS_HOTEND_BITMAPS MAX_HOTEND_BITMAPS
#endif
#define STATUS_HOTEND1_WIDTH 16
#if STATUS_HOTEND_BITMAPS == 1 || defined(STATUS_HOTEND_NUMBERLESS)
const unsigned char status_hotend_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if defined(STATUS_HOTEND_INVERTED) && !defined(STATUS_HOTEND_ANIM)
B00100000,B00010000,
B00100000,B00010000,
B00100000,B00010000,
B00010000,B00100000,
B00010000,B00100000,
B00100000,B00010000,
B00100000,B00010000,
B00110000,B00110000,
B00001000,B01000000,
B00000100,B10000000,
#else
B00111111,B11110000,
B00111111,B11110000,
B00111111,B11110000,
B00011111,B11100000,
B00011111,B11100000,
B00111111,B11110000,
B00111111,B11110000,
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
#endif
B00000011,B00000000
};
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
B00100000,B00010000,
B00100000,B00010000,
B00010000,B00100000,
B00010000,B00100000,
B00100000,B00010000,
B00100000,B00010000,
B00110000,B00110000,
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#endif
#elif STATUS_HOTEND_BITMAPS > 1
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend1_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011011,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111110,B11110000,
B00111100,B11110000,
B00011010,B11100000,
B00011110,B11100000,
B00111110,B11110000,
B00111110,B11110000,
B00111110,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend1_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100011,B00010000,
B00100100,B10010000,
B00010100,B10100000,
B00010100,B10100000,
B00100100,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#else
B00100001,B00010000,
B00100011,B00010000,
B00010101,B00100000,
B00010001,B00100000,
B00100001,B00010000,
B00100001,B00010000,
B00110001,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend2_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111110,B11110000,
B00111100,B11110000,
B00011010,B11100000,
B00011110,B11100000,
B00111110,B11110000,
B00111110,B11110000,
B00111110,B11110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00011111,B01100000,
B00011110,B11100000,
B00111101,B11110000,
B00111011,B11110000,
B00111000,B01110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend2_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100001,B00010000,
B00100011,B00010000,
B00010101,B00100000,
B00010001,B00100000,
B00100001,B00010000,
B00100001,B00010000,
B00110001,B00110000,
#else
B00100011,B00010000,
B00100100,B10010000,
B00010000,B10100000,
B00010001,B00100000,
B00100010,B00010000,
B00100100,B00010000,
B00110111,B10110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend1_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011011,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111110,B11110000,
B00111100,B11110000,
B00111010,B11110000,
B00011110,B11100000,
B00011110,B11100000,
B00111110,B11110000,
B00111110,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend2_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111110,B11110000,
B00111100,B11110000,
B00111010,B11110000,
B00011110,B11100000,
B00011110,B11100000,
B00111110,B11110000,
B00111110,B11110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00111111,B01110000,
B00011110,B11100000,
B00011101,B11100000,
B00111011,B11110000,
B00111000,B01110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#if STATUS_HOTEND_BITMAPS >= 3
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend3_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00011111,B01100000,
B00011110,B11100000,
B00111101,B11110000,
B00111011,B11110000,
B00111000,B01110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00011111,B01100000,
B00011100,B11100000,
B00111111,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend3_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100011,B00010000,
B00100100,B10010000,
B00010000,B10100000,
B00010001,B00100000,
B00100010,B00010000,
B00100100,B00010000,
B00110111,B10110000,
#else
B00100011,B00010000,
B00100100,B10010000,
B00010000,B10100000,
B00010011,B00100000,
B00100000,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend3_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00111111,B01110000,
B00011110,B11100000,
B00011101,B11100000,
B00111011,B11110000,
B00111000,B01110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00111111,B01110000,
B00011100,B11100000,
B00011111,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#if STATUS_HOTEND_BITMAPS >= 4
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend4_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00011111,B01100000,
B00011100,B11100000,
B00111111,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011011,B01100000,
B00111000,B00110000,
B00111111,B01110000,
B00111111,B01110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend4_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100011,B00010000,
B00100100,B10010000,
B00010000,B10100000,
B00010011,B00100000,
B00100000,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#else
B00100100,B10010000,
B00100100,B10010000,
B00010100,B10100000,
B00010100,B10100000,
B00100111,B11010000,
B00100000,B10010000,
B00110000,B10110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend4_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B11110000,
B00111011,B01110000,
B00111111,B01110000,
B00011100,B11100000,
B00011111,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111011,B01110000,
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011000,B00100000,
B00111111,B01110000,
B00111111,B01110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#if STATUS_HOTEND_BITMAPS >= 5
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend5_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011011,B01100000,
B00111000,B00110000,
B00111111,B01110000,
B00111111,B01110000,
#else
B00111000,B01110000,
B00111011,B11110000,
B00011000,B11100000,
B00011111,B01100000,
B00111111,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend5_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100100,B10010000,
B00100100,B10010000,
B00010100,B10100000,
B00010100,B10100000,
B00100111,B11010000,
B00100000,B10010000,
B00110000,B10110000,
#else
B00100111,B10010000,
B00100100,B00010000,
B00010111,B00100000,
B00010000,B10100000,
B00100000,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend5_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111011,B01110000,
B00111011,B01110000,
B00111011,B01110000,
B00011011,B01100000,
B00011000,B00100000,
B00111111,B01110000,
B00111111,B01110000,
#else
B00111000,B01110000,
B00111011,B11110000,
B00111000,B11110000,
B00011111,B01100000,
B00011111,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#if STATUS_HOTEND_BITMAPS >= 6
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend6_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111000,B01110000,
B00111011,B11110000,
B00011000,B11100000,
B00011111,B01100000,
B00111111,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111100,B01110000,
B00111011,B11110000,
B00011011,B11100000,
B00011000,B11100000,
B00111011,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend6_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100111,B10010000,
B00100100,B00010000,
B00010111,B00100000,
B00010000,B10100000,
B00100000,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#else
B00100011,B10010000,
B00100100,B00010000,
B00010100,B00100000,
B00010111,B00100000,
B00100100,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend6_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111000,B01110000,
B00111011,B11110000,
B00111000,B11110000,
B00011111,B01100000,
B00011111,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111100,B01110000,
B00111011,B11110000,
B00111011,B11110000,
B00011000,B11100000,
B00011011,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#if STATUS_HOTEND_BITMAPS >= 7
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend7_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111100,B01110000,
B00111011,B11110000,
B00011011,B11100000,
B00011000,B11100000,
B00111011,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111000,B01110000,
B00111011,B01110000,
B00011111,B01100000,
B00011110,B11100000,
B00111110,B11110000,
B00111101,B11110000,
B00111101,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend7_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100011,B10010000,
B00100100,B00010000,
B00010100,B00100000,
B00010111,B00100000,
B00100100,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#else
B00100111,B10010000,
B00100100,B10010000,
B00010000,B10100000,
B00010001,B00100000,
B00100001,B00010000,
B00100010,B00010000,
B00110010,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend7_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111100,B01110000,
B00111011,B11110000,
B00111011,B11110000,
B00011000,B11100000,
B00011011,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#else
B00111000,B01110000,
B00111011,B01110000,
B00111111,B01110000,
B00011110,B11100000,
B00011110,B11100000,
B00111101,B11110000,
B00111101,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#if STATUS_HOTEND_BITMAPS >= 8
#ifdef STATUS_HOTEND_ANIM
const unsigned char status_hotend8_a_bmp[] PROGMEM = {
B00011111,B11100000,
B00111111,B11110000,
#if LCD_FIRST_TOOL == 0
B00111000,B01110000,
B00111011,B01110000,
B00011111,B01100000,
B00011110,B11100000,
B00111110,B11110000,
B00111101,B11110000,
B00111101,B11110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00011011,B01100000,
B00011100,B11100000,
B00111011,B01110000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
const unsigned char status_hotend8_b_bmp[] PROGMEM = {
B00011111,B11100000,
B00100000,B00010000,
#if LCD_FIRST_TOOL == 0
B00100111,B10010000,
B00100100,B10010000,
B00010000,B10100000,
B00010001,B00100000,
B00100001,B00010000,
B00100010,B00010000,
B00110010,B00110000,
#else
B00100011,B00010000,
B00100100,B10010000,
B00010100,B10100000,
B00010011,B00100000,
B00100100,B10010000,
B00100100,B10010000,
B00110011,B00110000,
#endif
B00001000,B01000000,
B00000100,B10000000,
B00000011,B00000000
};
#else
const unsigned char status_hotend8_a_bmp[] PROGMEM = {
B00011111,B11100000,
#if LCD_FIRST_TOOL == 0
B00111000,B01110000,
B00111011,B01110000,
B00111111,B01110000,
B00011110,B11100000,
B00011110,B11100000,
B00111101,B11110000,
B00111101,B11110000,
#else
B00111100,B11110000,
B00111011,B01110000,
B00111011,B01110000,
B00011100,B11100000,
B00011011,B01100000,
B00111011,B01110000,
B00111100,B11110000,
#endif
B00111111,B11110000,
B00001111,B11000000,
B00000111,B10000000,
B00000011,B00000000
};
#endif
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,920 @@
/**
* Lightweight Status Screen for the RepRapDiscount Full
* Graphics Smart Controller (ST7920-based 128x64 LCD)
*
* (c) 2017 Aleph Objects, Inc.
*
* The code in this page is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License (GNU GPL) as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version. The code is distributed WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
*/
/**
* Implementation of a Status Screen for the RepRapDiscount
* Full Graphics Smart Controller using native ST7920 commands
* instead of U8Glib.
*
* This alternative Status Screen makes use of the built-in character
* generation capabilities of the ST7920 to update the Status Screen
* with less SPI traffic and CPU use. In particular:
*
* - The fan and bed animations are handled using custom characters
* that are stored in CGRAM. This allows for the animation to be
* updated by writing a single character to the text-buffer (DDRAM).
*
* - All the information in the Status Screen is text that is written
* to DDRAM, so the work of generating the bitmaps is offloaded to
* the ST7920 rather than being render by U8Glib on the MCU.
*
* - The graphics buffer (GDRAM) is only used for static graphics
* elements (nozzle and feedrate bitmaps) and for the progress
* bar, so updates are sporadic.
*/
//
// status_screen_lite_ST7920.cpp
// Lightweight Status Screen for Graphical Display
//
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(LIGHTWEIGHT_UI)
#include "status_screen_lite_ST7920.h"
#include "../marlinui.h"
#include "../fontutils.h"
#include "../lcdprint.h"
#include "../../libs/duration_t.h"
#include "../../module/motion.h"
#include "../../module/printcounter.h"
#include "../../module/temperature.h"
#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#endif
#if ENABLED(LCD_SHOW_E_TOTAL)
#include "../../MarlinCore.h" // for printingIsActive
#endif
#define TEXT_MODE_LCD_WIDTH 16
#define BUFFER_WIDTH 256
#define BUFFER_HEIGHT 32
#define DDRAM_LINE_1 0x00
#define DDRAM_LINE_2 0x10
#define DDRAM_LINE_3 0x08
#define DDRAM_LINE_4 0x18
ST7920_Lite_Status_Screen::st7920_state_t ST7920_Lite_Status_Screen::current_bits;
void ST7920_Lite_Status_Screen::cmd(const uint8_t cmd) {
if (!current_bits.synced || !current_bits.cmd) {
current_bits.synced = true;
current_bits.cmd = true;
sync_cmd();
}
write_byte(cmd);
}
void ST7920_Lite_Status_Screen::begin_data() {
if (!current_bits.synced || current_bits.cmd) {
current_bits.synced = true;
current_bits.cmd = false;
sync_dat();
}
}
void ST7920_Lite_Status_Screen::write_str(const char *str) {
while (*str) write_byte(*str++);
}
void ST7920_Lite_Status_Screen::write_str(const char *str, uint8_t len) {
while (*str && len--) write_byte(*str++);
}
void ST7920_Lite_Status_Screen::write_str_P(PGM_P const str) {
PGM_P p_str = (PGM_P)str;
while (char c = pgm_read_byte(p_str++)) write_byte(c);
}
void ST7920_Lite_Status_Screen::write_number(const int16_t value, const uint8_t digits/*=3*/) {
char str[7];
PGM_P fmt;
switch (digits) {
case 6: fmt = PSTR("%6d"); break;
case 5: fmt = PSTR("%5d"); break;
case 4: fmt = PSTR("%4d"); break;
case 3: fmt = PSTR("%3d"); break;
case 2: fmt = PSTR("%2d"); break;
case 1: fmt = PSTR("%1d"); break;
default: return;
}
sprintf_P(str, fmt, value);
write_str(str);
}
void ST7920_Lite_Status_Screen::display_status(const bool display_on, const bool cursor_on, const bool blink_on) {
extended_function_set(false);
cmd(0b00001000 |
(display_on ? 0b0100 : 0) |
(cursor_on ? 0b0010 : 0) |
(blink_on ? 0b0001 : 0)
);
}
// Sets the extended and graphics bits simultaneously, regardless of
// the current state. This is a helper function for extended_function_set()
// and graphics()
void ST7920_Lite_Status_Screen::_extended_function_set(const bool extended, const bool graphics) {
cmd( 0b00100000 |
(extended ? 0b00000100 : 0) |
(graphics ? 0b00000010 : 0)
);
current_bits.extended = extended;
current_bits.graphics = graphics;
}
void ST7920_Lite_Status_Screen::extended_function_set(const bool extended) {
if (extended != current_bits.extended)
_extended_function_set(extended, current_bits.graphics);
}
void ST7920_Lite_Status_Screen::graphics(const bool graphics) {
if (graphics != current_bits.graphics)
_extended_function_set(current_bits.extended, graphics);
}
void ST7920_Lite_Status_Screen::entry_mode_select(const bool ac_increase, const bool shift) {
extended_function_set(false);
cmd(0b00000100 |
(ac_increase ? 0b00000010 : 0) |
(shift ? 0b00000001 : 0)
);
}
// Sets the sa bit regardless of the current state. This is a helper
// function for scroll_or_addr_select()
void ST7920_Lite_Status_Screen::_scroll_or_addr_select(const bool sa) {
extended_function_set(true);
cmd(0b00000010 | (sa ? 0b00000001 : 0));
current_bits.sa = sa;
}
void ST7920_Lite_Status_Screen::scroll_or_addr_select(const bool sa) {
if (sa != current_bits.sa)
_scroll_or_addr_select(sa);
}
void ST7920_Lite_Status_Screen::set_ddram_address(const uint8_t addr) {
extended_function_set(false);
cmd(0b10000000 | (addr & 0b00111111));
}
void ST7920_Lite_Status_Screen::set_cgram_address(const uint8_t addr) {
extended_function_set(false);
cmd(0b01000000 | (addr & 0b00111111));
}
void ST7920_Lite_Status_Screen::set_gdram_address(const uint8_t x, const uint8_t y) {
extended_function_set(true);
cmd(0b10000000 | (y & 0b01111111));
cmd(0b10000000 | (x & 0b00001111));
}
void ST7920_Lite_Status_Screen::clear() {
extended_function_set(false);
cmd(0x00000001);
delay(15); //delay for CGRAM clear
}
void ST7920_Lite_Status_Screen::home() {
extended_function_set(false);
cmd(0x00000010);
}
/* This fills the entire text buffer with spaces */
void ST7920_Lite_Status_Screen::clear_ddram() {
set_ddram_address(DDRAM_LINE_1);
begin_data();
for (uint8_t i = 64; i--;) write_byte(' ');
}
/* This fills the entire graphics buffer with zeros */
void ST7920_Lite_Status_Screen::clear_gdram() {
LOOP_L_N(y, BUFFER_HEIGHT) {
set_gdram_address(0, y);
begin_data();
for (uint8_t i = (BUFFER_WIDTH) / 16; i--;) write_word(0);
}
}
void ST7920_Lite_Status_Screen::load_cgram_icon(const uint16_t addr, const void *data) {
const uint16_t *p_word = (const uint16_t *)data;
set_cgram_address(addr);
begin_data();
for (uint8_t i = 16; i--;)
write_word(pgm_read_word(p_word++));
}
/**
* Draw an icon in GDRAM. Position specified in DDRAM
* coordinates. i.e., X from 1 to 8, Y from 1 to 4.
*/
void ST7920_Lite_Status_Screen::draw_gdram_icon(uint8_t x, uint8_t y, const void *data) {
const uint16_t *p_word = (const uint16_t *)data;
// Handle display folding
if (y > 1) y -= 2, x += 8;
for (int i = 0; i < 16; i++) {
set_gdram_address(x, i + y * 16);
begin_data();
write_word(pgm_read_word(p_word++));
}
}
/************************** ICON DEFINITIONS *************************************/
#define CGRAM_ICON_1_ADDR 0x00
#define CGRAM_ICON_2_ADDR 0x10
#define CGRAM_ICON_3_ADDR 0x20
#define CGRAM_ICON_4_ADDR 0x30
#define CGRAM_ICON_1_WORD 0x00
#define CGRAM_ICON_2_WORD 0x02
#define CGRAM_ICON_3_WORD 0x04
#define CGRAM_ICON_4_WORD 0x06
const uint8_t degree_symbol_y_top = 1;
PROGMEM const uint8_t degree_symbol[] = {
0b00110000,
0b01001000,
0b01001000,
0b00110000,
};
const uint16_t nozzle_icon[] PROGMEM = {
0b0000000000000000,
0b0000000000000000,
0b0000111111110000,
0b0001111111111000,
0b0001111111111000,
0b0001111111111000,
0b0000111111110000,
0b0000111111110000,
0b0001111111111000,
0b0001111111111000,
0b0001111111111000,
0b0000011111100000,
0b0000001111000000,
0b0000000110000000,
0b0000000000000000,
0b0000000000000000
};
const uint16_t bed_icon[] PROGMEM = {
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0111111111111110,
0b0111111111111110,
0b0110000000000110,
0b0000000000000000,
0b0000000000000000
};
const uint16_t heat1_icon[] PROGMEM = {
0b0000000000000000,
0b0010001000100000,
0b0001000100010000,
0b0000100010001000,
0b0000100010001000,
0b0001000100010000,
0b0010001000100000,
0b0010001000100000,
0b0001000100010000,
0b0000100010001000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000
};
const uint16_t heat2_icon[] PROGMEM = {
0b0000000000000000,
0b0000100010001000,
0b0000100010001000,
0b0001000100010000,
0b0010001000100000,
0b0010001000100000,
0b0001000100010000,
0b0000100010001000,
0b0000100010001000,
0b0001000100010000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000
};
const uint16_t fan1_icon[] PROGMEM = {
0b0000000000000000,
0b0111111111111110,
0b0111000000001110,
0b0110001111000110,
0b0100001111000010,
0b0100000110000010,
0b0101100000011010,
0b0101110110111010,
0b0101100000011010,
0b0100000110000010,
0b0100001111000010,
0b0110001111000110,
0b0111000000001110,
0b0111111111111110,
0b0000000000000000,
0b0000000000000000
};
const uint16_t fan2_icon[] PROGMEM = {
0b0000000000000000,
0b0111111111111110,
0b0111000000001110,
0b0110010000100110,
0b0100111001110010,
0b0101111001111010,
0b0100110000110010,
0b0100000110000010,
0b0100110000110010,
0b0101111001111010,
0b0100111001110010,
0b0110010000100110,
0b0111000000001110,
0b0111111111111110,
0b0000000000000000,
0b0000000000000000
};
const uint16_t feedrate_icon[] PROGMEM = {
0b0000000000000000,
0b0111111000000000,
0b0110000000000000,
0b0110000000000000,
0b0110000000000000,
0b0111111011111000,
0b0110000011001100,
0b0110000011001100,
0b0110000011001100,
0b0110000011111000,
0b0000000011001100,
0b0000000011001100,
0b0000000011001100,
0b0000000011001100,
0b0000000000000000,
0b0000000000000000
};
/************************** MAIN SCREEN *************************************/
/**
* The ST7920 has no degree character, so draw it to GDRAM.
* This function takes character position xy
* i.e., x is [0-15], while the y position is [0-3]
*/
void ST7920_Lite_Status_Screen::draw_degree_symbol(uint8_t x, uint8_t y, const bool draw) {
const uint8_t *p_bytes = degree_symbol;
// Handle display folding
if (y > 1) y -= 2, x += 16;
const bool oddChar = x & 1;
const uint8_t x_word = x >> 1,
y_top = degree_symbol_y_top,
y_bot = y_top + COUNT(degree_symbol);
LOOP_S_L_N(i, y_top, y_bot) {
uint8_t byte = pgm_read_byte(p_bytes++);
set_gdram_address(x_word, i + y * 16);
begin_data();
if (draw) {
write_byte(oddChar ? 0x00 : byte);
write_byte(oddChar ? byte : 0x00);
}
else
write_word(0x0000);
}
}
void ST7920_Lite_Status_Screen::draw_static_elements() {
scroll_or_addr_select(0);
// Load the animated bed and fan icons
load_cgram_icon(CGRAM_ICON_1_ADDR, heat1_icon);
load_cgram_icon(CGRAM_ICON_2_ADDR, heat2_icon);
load_cgram_icon(CGRAM_ICON_3_ADDR, fan1_icon);
load_cgram_icon(CGRAM_ICON_4_ADDR, fan2_icon);
// Draw the static icons in GDRAM
draw_gdram_icon(0, 0, nozzle_icon);
#if HAS_MULTI_HOTEND
draw_gdram_icon(0, 1, nozzle_icon);
draw_gdram_icon(0, 2, bed_icon);
#else
draw_gdram_icon(0, 1, bed_icon);
#endif
draw_gdram_icon(5, 1, feedrate_icon);
// Draw the initial fan icon
draw_fan_icon(false);
}
/**
* Although this is undocumented, the ST7920 allows the character
* data buffer (DDRAM) to be used in conjunction with the graphics
* bitmap buffer (CGRAM). The contents of the graphics buffer is
* XORed with the data from the character generator. This allows
* us to make the progess bar out of graphical data (the bar) and
* text data (the percentage).
*/
void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) {
#if HOTENDS == 1
// If we have only one extruder, draw a long progress bar on the third line
constexpr uint8_t top = 1, // Top in pixels
bottom = 13, // Bottom in pixels
left = 12, // Left edge, in 16-bit words
width = 4; // Width of progress bar, in 16-bit words
#else
constexpr uint8_t top = 16 + 1,
bottom = 16 + 13,
left = 5,
width = 3;
#endif
const uint8_t char_pcnt = 100 / width; // How many percent does each 16-bit word represent?
// Draw the progress bar as a bitmap in CGRAM
LOOP_S_LE_N(y, top, bottom) {
set_gdram_address(left, y);
begin_data();
LOOP_L_N(x, width) {
uint16_t gfx_word = 0x0000;
if ((x + 1) * char_pcnt <= value)
gfx_word = 0xFFFF; // Draw completely filled bytes
else if ((x * char_pcnt) < value)
gfx_word = int(0x8000) >> (value % char_pcnt) * 16 / char_pcnt; // Draw partially filled bytes
// Draw the frame around the progress bar
if (y == top || y == bottom)
gfx_word = 0xFFFF; // Draw top/bottom border
else if (x == width - 1)
gfx_word |= 0x0001; // Draw right border
else if (x == 0)
gfx_word |= 0x8000; // Draw left border
write_word(gfx_word);
}
}
// Draw the percentage as text in DDRAM
#if HOTENDS == 1
set_ddram_address(DDRAM_LINE_3 + 4);
begin_data();
write_byte(' ');
#else
set_ddram_address(DDRAM_LINE_2 + left);
begin_data();
#endif
// Draw centered
if (value > 9) {
write_number(value, 4);
write_str_P(PSTR("% "));
}
else {
write_number(value, 3);
write_str_P(PSTR("% "));
}
}
void ST7920_Lite_Status_Screen::draw_fan_icon(const bool whichIcon) {
set_ddram_address(DDRAM_LINE_1 + 5);
begin_data();
write_word(whichIcon ? CGRAM_ICON_3_WORD : CGRAM_ICON_4_WORD);
}
void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool heating) {
set_ddram_address(
#if HOTENDS == 1
DDRAM_LINE_2
#else
DDRAM_LINE_3
#endif
);
begin_data();
if (heating)
write_word(whichIcon ? CGRAM_ICON_1_WORD : CGRAM_ICON_2_WORD);
else {
write_byte(' ');
write_byte(' ');
}
}
#define FAR(a,b) (((a > b) ? (a-b) : (b-a)) > 2)
static struct {
bool E1_show_target : 1;
bool E2_show_target : 1;
#if ENABLED(HAS_HEATED_BED)
bool bed_show_target : 1;
#endif
} display_state = {
true, true, TERN_(HAS_HEATED_BED, true)
};
void ST7920_Lite_Status_Screen::draw_temps(uint8_t line, const int16_t temp, const int16_t target, bool showTarget, bool targetStateChange) {
switch (line) {
case 0: set_ddram_address(DDRAM_LINE_1 + 1); break;
case 1: set_ddram_address(DDRAM_LINE_2 + 1); break;
case 2: set_ddram_address(DDRAM_LINE_3 + 1); break;
case 3: set_ddram_address(DDRAM_LINE_3 + 1); break;
}
begin_data();
write_number(temp);
if (showTarget) {
write_byte('\x1A');
write_number(target);
};
if (targetStateChange) {
if (!showTarget) write_str_P(PSTR(" "));
draw_degree_symbol(5, line, !showTarget);
draw_degree_symbol(9, line, showTarget);
}
}
void ST7920_Lite_Status_Screen::draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
const bool show_target = target && FAR(temp, target);
draw_temps(0, temp, target, show_target, display_state.E1_show_target != show_target || forceUpdate);
display_state.E1_show_target = show_target;
}
void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
const bool show_target = target && FAR(temp, target);
draw_temps(1, temp, target, show_target, display_state.E2_show_target != show_target || forceUpdate);
display_state.E2_show_target = show_target;
}
#if HAS_HEATED_BED
void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) {
const bool show_target = target && FAR(temp, target);
draw_temps(TERN(HAS_MULTI_HOTEND, 2, 1), temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate);
display_state.bed_show_target = show_target;
}
#endif
void ST7920_Lite_Status_Screen::draw_fan_speed(const uint8_t value) {
set_ddram_address(DDRAM_LINE_1 + 6);
begin_data();
write_number(value, 3);
write_byte('%');
}
void ST7920_Lite_Status_Screen::draw_print_time(const duration_t &elapsed, char suffix) {
#if HOTENDS == 1
set_ddram_address(DDRAM_LINE_3);
#else
set_ddram_address(DDRAM_LINE_3 + 5);
#endif
char str[7];
int str_length = elapsed.toDigital(str);
str[str_length++] = suffix;
begin_data();
write_str(str, str_length);
}
void ST7920_Lite_Status_Screen::draw_feedrate_percentage(const uint16_t percentage) {
// We only have enough room for the feedrate when
// we have one extruder
#if HOTENDS == 1
set_ddram_address(DDRAM_LINE_2 + 6);
begin_data();
write_number(percentage, 3);
write_byte('%');
#else
UNUSED(percentage);
#endif
}
void ST7920_Lite_Status_Screen::draw_status_message() {
const char *str = ui.status_message;
set_ddram_address(DDRAM_LINE_4);
begin_data();
#if ENABLED(STATUS_MESSAGE_SCROLLING)
uint8_t slen = utf8_strlen(str);
if (slen <= TEXT_MODE_LCD_WIDTH) {
// String fits the LCD, so just print it
write_str(str);
while (slen < TEXT_MODE_LCD_WIDTH) { write_byte(' '); ++slen; }
}
else {
// String is larger than the available space in screen.
// Get a pointer to the next valid UTF8 character
// and the string remaining length
uint8_t rlen;
const char *stat = ui.status_and_len(rlen);
write_str(stat, TEXT_MODE_LCD_WIDTH);
// If the remaining string doesn't completely fill the screen
if (rlen < TEXT_MODE_LCD_WIDTH) {
uint8_t chars = TEXT_MODE_LCD_WIDTH - rlen; // Amount of space left in characters
write_byte(' '); // Always at 1+ spaces left, draw a space
if (--chars) { // Draw a second space if there's room
write_byte(' ');
if (--chars) { // Draw a third space if there's room
write_byte(' ');
if (--chars) write_str(str, chars); // Print a second copy of the message
}
}
}
ui.advance_status_scroll();
}
#else
uint8_t slen = utf8_strlen(str);
write_str(str, TEXT_MODE_LCD_WIDTH);
for (; slen < TEXT_MODE_LCD_WIDTH; ++slen) write_byte(' ');
#endif
}
void ST7920_Lite_Status_Screen::draw_position(const xyze_pos_t &pos, const bool position_trusted) {
char str[7];
set_ddram_address(DDRAM_LINE_4);
begin_data();
// If position is unknown, flash the labels.
const unsigned char alt_label = position_trusted ? 0 : (ui.get_blink() ? ' ' : 0);
if (TERN1(LCD_SHOW_E_TOTAL, !printingIsActive())) {
write_byte(alt_label ? alt_label : 'X');
write_str(dtostrf(pos.x, -4, 0, str), 4);
write_byte(alt_label ? alt_label : 'Y');
write_str(dtostrf(pos.y, -4, 0, str), 4);
}
else {
#if ENABLED(LCD_SHOW_E_TOTAL)
char tmp[15];
const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(tmp, PSTR("E%-7ld%cm "), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
write_str(tmp);
#endif
}
write_byte(alt_label ? alt_label : 'Z');
write_str(dtostrf(pos.z, -5, 1, str), 5);
}
bool ST7920_Lite_Status_Screen::indicators_changed() {
// We only add the target temperatures to the checksum
// because the actual temps fluctuate so by updating
// them only during blinks we gain a bit of stability.
const bool blink = ui.get_blink();
const uint16_t feedrate_perc = feedrate_percentage;
const uint16_t fs = thermalManager.scaledFanSpeed(0);
const celsius_t extruder_1_target = thermalManager.degTargetHotend(0);
#if HAS_MULTI_HOTEND
const celsius_t extruder_2_target = thermalManager.degTargetHotend(1);
#endif
#if HAS_HEATED_BED
const celsius_t bed_target = thermalManager.degTargetBed();
#endif
static uint16_t last_checksum = 0;
const uint16_t checksum = blink ^ feedrate_perc ^ fs ^ extruder_1_target
^ TERN0(HAS_MULTI_HOTEND, extruder_2_target)
^ TERN0(HAS_HEATED_BED, bed_target);
if (last_checksum == checksum) return false;
last_checksum = checksum;
return true;
}
void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
if (forceUpdate || indicators_changed()) {
const bool blink = ui.get_blink();
const duration_t elapsed = print_job_timer.duration();
duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time());
const uint16_t feedrate_perc = feedrate_percentage;
const celsius_t extruder_1_temp = thermalManager.wholeDegHotend(0),
extruder_1_target = thermalManager.degTargetHotend(0);
#if HAS_MULTI_HOTEND
const celsius_t extruder_2_temp = thermalManager.wholeDegHotend(1),
extruder_2_target = thermalManager.degTargetHotend(1);
#endif
#if HAS_HEATED_BED
const celsius_t bed_temp = thermalManager.wholeDegBed(),
bed_target = thermalManager.degTargetBed();
#endif
draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate);
TERN_(HAS_MULTI_HOTEND, draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate));
TERN_(HAS_HEATED_BED, draw_bed_temp(bed_temp, bed_target, forceUpdate));
uint8_t spd = thermalManager.fan_speed[0];
#if ENABLED(ADAPTIVE_FAN_SLOWING)
if (!blink && thermalManager.fan_speed_scaler[0] < 128)
spd = thermalManager.scaledFanSpeed(0, spd);
#endif
draw_fan_speed(thermalManager.pwmToPercent(spd));
// Draw elapsed/remaining time
const bool show_remaining = ENABLED(SHOW_REMAINING_TIME) && (DISABLED(ROTATE_PROGRESS_DISPLAY) || blink);
if (show_remaining && !remaining.second()) {
const auto progress = ui.get_progress_percent();
if (progress)
remaining = elapsed.second() * (100 - progress) / progress;
}
if (show_remaining && remaining.second())
draw_print_time(remaining, 'R');
else
draw_print_time(elapsed);
draw_feedrate_percentage(feedrate_perc);
// Update the fan and bed animations
if (spd) draw_fan_icon(blink);
TERN_(HAS_HEATED_BED, draw_heat_icon(bed_target > 0 && blink, bed_target > 0));
}
}
bool ST7920_Lite_Status_Screen::position_changed() {
const xyz_pos_t pos = current_position;
const uint8_t checksum = uint8_t(pos.x) ^ uint8_t(pos.y) ^ uint8_t(pos.z);
static uint8_t last_checksum = 0, changed = last_checksum != checksum;
if (changed) last_checksum = checksum;
return changed;
}
bool ST7920_Lite_Status_Screen::status_changed() {
uint8_t checksum = 0;
for (const char *p = ui.status_message; *p; p++) checksum ^= *p;
static uint8_t last_checksum = 0;
bool changed = last_checksum != checksum;
if (changed) last_checksum = checksum;
return changed;
}
bool ST7920_Lite_Status_Screen::blink_changed() {
static uint8_t last_blink = 0;
const bool blink = ui.get_blink(), changed = last_blink != blink;
if (changed) last_blink = blink;
return changed;
}
#ifndef STATUS_EXPIRE_SECONDS
#define STATUS_EXPIRE_SECONDS 20
#endif
void ST7920_Lite_Status_Screen::update_status_or_position(bool forceUpdate) {
#if STATUS_EXPIRE_SECONDS
static uint8_t countdown = 0;
#endif
/**
* There's only enough room for either the status message or the position,
* so draw one or the other. When the status message changes, show it for
* a few seconds, then return to the position display once the head moves.
*
* countdown > 1 -- Show status
* countdown = 1 -- Show status, until movement
* countdown = 0 -- Show position
*
* If STATUS_EXPIRE_SECONDS is zero, only the status is shown.
*/
if (forceUpdate || status_changed()) {
TERN_(STATUS_MESSAGE_SCROLLING, ui.status_scroll_offset = 0);
#if STATUS_EXPIRE_SECONDS
countdown = ui.status_message[0] ? STATUS_EXPIRE_SECONDS : 0;
#endif
draw_status_message();
blink_changed(); // Clear changed flag
}
#if !STATUS_EXPIRE_SECONDS
else if (TERN0(STATUS_MESSAGE_SCROLLING, blink_changed()))
draw_status_message();
#else
else if (blink_changed()) {
if (countdown > 1) {
countdown--;
TERN_(STATUS_MESSAGE_SCROLLING, draw_status_message());
}
else if (countdown > 0) {
if (position_changed()) {
countdown--;
forceUpdate = true;
}
TERN_(STATUS_MESSAGE_SCROLLING, draw_status_message());
}
}
if (countdown == 0 && (forceUpdate || position_changed() || TERN(DISABLE_REDUCED_ACCURACY_WARNING, 0, blink_changed())))
draw_position(current_position, TERN(DISABLE_REDUCED_ACCURACY_WARNING, 1, all_axes_trusted()));
#endif
}
void ST7920_Lite_Status_Screen::update_progress(const bool forceUpdate) {
#if EITHER(LCD_SET_PROGRESS_MANUALLY, SDSUPPORT)
// Since the progress bar involves writing
// quite a few bytes to GDRAM, only do this
// when an update is actually necessary.
static uint8_t last_progress = 0;
const uint8_t progress = ui.get_progress_percent();
if (forceUpdate || last_progress != progress) {
last_progress = progress;
draw_progress_bar(progress);
}
#else
UNUSED(forceUpdate);
#endif
}
void ST7920_Lite_Status_Screen::update(const bool forceUpdate) {
cs();
update_indicators(forceUpdate);
update_status_or_position(forceUpdate);
update_progress(forceUpdate);
ncs();
}
void ST7920_Lite_Status_Screen::reset_state_from_unknown() {
_extended_function_set(true, true); // Do it twice as only one bit
_extended_function_set(true, true); // get set at a time.
_scroll_or_addr_select(false);
}
void ST7920_Lite_Status_Screen::on_entry() {
cs();
reset_state_from_unknown();
clear();
clear_gdram();
draw_static_elements();
update(true);
ncs();
}
void ST7920_Lite_Status_Screen::on_exit() {
cs();
clear();
_extended_function_set(true, true); // Restore state to what u8g expects.
ncs();
}
// Called prior to the KILL screen to
// clear the screen, preventing a garbled display.
void ST7920_Lite_Status_Screen::clear_text_buffer() {
cs();
reset_state_from_unknown();
clear();
_extended_function_set(true, true); // Restore state to what u8g expects.
ncs();
}
void MarlinUI::draw_status_screen() {
ST7920_Lite_Status_Screen::update(false);
}
// This method is called before each screen update and
// fires on_entry() and on_exit() events upon entering
// or exiting the Status Screen.
void MarlinUI::lcd_in_status(const bool inStatus) {
static bool lastInStatus = false;
if (lastInStatus == inStatus) return;
if ((lastInStatus = inStatus))
ST7920_Lite_Status_Screen::on_entry();
else
ST7920_Lite_Status_Screen::on_exit();
}
#endif // LIGHTWEIGHT_UI

View File

@@ -0,0 +1,106 @@
/**
* Lightweight Status Screen for the RepRapDiscount Full
* Graphics Smart Controller (ST7920-based 128x64 LCD)
*
* (c) 2017 Aleph Objects, Inc.
*
* The code in this page is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License (GNU GPL) as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version. The code is distributed WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
*/
#pragma once
#include "../../HAL/shared/HAL_ST7920.h"
#include "../../core/types.h"
#include "../../core/macros.h"
#include "../../libs/duration_t.h"
class ST7920_Lite_Status_Screen {
private:
static struct st7920_state_t {
uint8_t synced : 1; // Whether a sync has been sent
uint8_t cmd : 1; // Whether the sync was cmd or data
uint8_t extended : 1;
uint8_t graphics : 1;
uint8_t sa : 1;
} current_bits;
static void cs() { ST7920_cs(); current_bits.synced = false; }
static void ncs() { ST7920_cs(); current_bits.synced = false; }
static void sync_cmd() { ST7920_set_cmd(); }
static void sync_dat() { ST7920_set_dat(); }
static void write_byte(const uint8_t w) { ST7920_write_byte(w); }
FORCE_INLINE static void write_word(const uint16_t w) {
write_byte((w >> 8) & 0xFF);
write_byte((w >> 0) & 0xFF);
}
static void cmd(const uint8_t cmd);
static void begin_data();
static void write_str(const char *str);
static void write_str(const char *str, const uint8_t len);
static void write_str_P(PGM_P const str);
static void write_number(const int16_t value, const uint8_t digits=3);
static void _extended_function_set(const bool extended, const bool graphics);
static void _scroll_or_addr_select(const bool sa);
static void reset_state_from_unknown();
static void home();
static void display_status(const bool display_on, const bool cursor_on, const bool blink_on);
static void extended_function_set(const bool extended);
static void graphics(const bool graphics);
static void entry_mode_select(const bool ac_increase, const bool shift);
static void scroll_or_addr_select(const bool sa);
static void set_ddram_address(const uint8_t addr);
static void set_cgram_address(const uint8_t addr);
static void set_gdram_address(const uint8_t x, const uint8_t y);
static void clear();
static void clear_ddram();
static void clear_gdram();
static void load_cgram_icon(const uint16_t addr, const void *data);
static void draw_gdram_icon(uint8_t x, uint8_t y, const void *data);
static uint8_t string_checksum(const char *str);
protected:
static void draw_degree_symbol(uint8_t x, uint8_t y, const bool draw);
static void draw_static_elements();
static void draw_progress_bar(const uint8_t value);
static void draw_fan_icon(const bool whichIcon);
static void draw_heat_icon(const bool whichIcon, const bool heating);
static void draw_temps(uint8_t line, const int16_t temp, const int16_t target, bool showTarget, bool targetStateChange);
static void draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
static void draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
static void draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate=false);
static void draw_fan_speed(const uint8_t value);
static void draw_print_time(const duration_t &elapsed, char suffix=' ');
static void draw_feedrate_percentage(const uint16_t percentage);
static void draw_status_message();
static void draw_position(const xyze_pos_t &pos, bool position_known=true);
static bool indicators_changed();
static bool position_changed();
static bool blink_changed();
static bool status_changed();
static void update_indicators(const bool forceUpdate);
static void update_position(const bool forceUpdate, bool resetChecksum);
static void update_status_or_position(bool forceUpdate);
static void update_progress(const bool forceUpdate);
public:
static void update(const bool forceUpdate);
static void on_entry();
static void on_exit();
static void clear_text_buffer();
};

View File

@@ -0,0 +1,302 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Based on u8g_dev_ssd1306_128x64.c
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2015, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* These routines are meant for two wire I2C interfaces.
*
* Three and four wire I2C interfaces have an A0 line. That line is
* used to switch between command and data modes.
*
* The two wire LCDs use an instruction byte to signal if data or
* command info is to follow. The command stream needs the instruction
* byte between eack command byte. The data stream needs one at the
* beginning.
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include "HAL_LCD_com_defines.h"
#define WIDTH 128
#define HEIGHT 64
#define PAGE_HEIGHT 8
uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_seq);
// The sh1106 is compatible to the ssd1306, but is 132x64. 128x64 display area is centered within
// the 132x64.
static const uint8_t u8g_dev_sh1106_128x64_data_start_2_wire[] PROGMEM = {
0x010, // set upper 4 bit of the col adr to 0
0x002, // set lower 4 bit of the col adr to 2 (centered display with ssd1306)
U8G_ESC_END // end of sequence
};
#define SH1106_PAGE_ADR(N) (0x20), (N)
#define SH1106_COLUMN_RANGE(N) (0x21), (((N) >> 8) & 0xFF), ((N) & 0xFF)
#define SH1106_PAGE_RANGE(N,O) (0x22), (N), (O)
#define SH1106_SCROLL(N) ((N) ? 0x2F : 0x2E)
#define SH1106_START_LINE(N) (0x40 | (N))
#define SH1106_CONTRAST(N) (0x81), (N)
#define SH1106_CHARGE_PUMP(N) (0x8D), ((N) ? 0x14 : 0x10)
#define SH1106_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
#define SH1106_ALL_PIX(N) ((N) ? 0xA5 : 0xA4)
#define SH1106_INVERTED(N) ((N) ? 0xA7 : 0xA6)
#define SH1106_MUX_RATIO(N) (0xA8), (N)
#define SH1106_ON(N) ((N) ? 0xAF : 0xAE)
#define SH1106_OUT_MODE(N) ((N) ? 0xC8 : 0xC0)
#define SH1106_DISP_OFFS(N) (0xD3), (N)
#define SH1106_OSC_FREQ(R,F) (0xD5), ((F) << 4 | (R))
#define SH1106_CHARGE_PER(P,D) (0xD9), ((D) << 4 | (P))
#define SH1106_COM_CONFIG(N) (0xDA), ((N) ? 0x12 : 0x02)
#define SH1106_VCOM_DESEL(N) (0xDB), (N)
#define SH1106_NOOP() (0xE3)
static const uint8_t u8g_dev_sh1106_128x64_init_seq_2_wire[] PROGMEM = {
U8G_ESC_ADR(0), // Initiate command mode
SH1106_ON(0), // Display off, sleep mode
SH1106_MUX_RATIO(0x3F), // Mux ratio
SH1106_DISP_OFFS(0), // Display offset
SH1106_START_LINE(0), // Start line
SH1106_ADC_REVERSE(1), // Segment remap A0/A1
SH1106_OUT_MODE(1), // C0: scan dir normal, C8: reverse
SH1106_COM_CONFIG(1), // Com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5)
SH1106_CONTRAST(0xCF), // [2] set contrast control
SH1106_PAGE_ADR(0x02), // 2012-05-27: page addressing mode
SH1106_COLUMN_RANGE(0x281), // Set column range from 0 through 131
SH1106_PAGE_RANGE(0, 7), // Set page range from 0 through 7
SH1106_CHARGE_PER(0x1, 0xF), // [2] pre-charge period 0x22/F1
SH1106_VCOM_DESEL(0x40), // Vcomh deselect level
SH1106_ALL_PIX(0), // Output ram to display
SH1106_INVERTED(0), // Normal display mode
SH1106_OSC_FREQ(0, 8), // Clock divide ratio (0:1) and oscillator frequency (8)
SH1106_CHARGE_PUMP(1), // [2] charge pump setting (P62): 0x14 enable, 0x10 disable
SH1106_SCROLL(0), // 2012-05-27: Deactivate scroll
SH1106_ON(1), // Display on
U8G_ESC_END // End of sequence
};
uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_sh1106_128x64_init_seq_2_wire);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_SetAddress(u8g, dev, 0); // instruction mode
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_sh1106_128x64_data_start_2_wire);
u8g_WriteByte(u8g, dev, 0x0B0 | (pb->p.page*2)); // select current page
u8g_SetAddress(u8g, dev, 1); // data mode
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *) pb->buf);
u8g_SetChipSelect(u8g, dev, 0);
u8g_SetAddress(u8g, dev, 0); // instruction mode
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_sh1106_128x64_data_start_2_wire);
u8g_WriteByte(u8g, dev, 0x0B0 | (pb->p.page*2+1)); // select current page
u8g_SetAddress(u8g, dev, 1); // data mode
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
u8g_SetChipSelect(u8g, dev, 0);
}
break;
case U8G_DEV_MSG_SLEEP_ON:
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
return 1;
}
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf};
u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire = { u8g_dev_sh1106_128x64_2x_2_wire_fn, &u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL };
/////////////////////////////////////////////////////////////////////////////////////////////
static const uint8_t u8g_dev_ssd1306_128x64_data_start_2_wire[] PROGMEM = {
0x010, // set upper 4 bit of the col adr to 0
0x000, // set lower 4 bit of the col adr to 0
U8G_ESC_END // end of sequence
};
static const uint8_t u8g_dev_ssd1306_128x64_init_seq_2_wire[] PROGMEM = {
U8G_ESC_ADR(0), // initiate command mode
0x0AE, // display off, sleep mode
0x0A8, 0x03F, // mux ratio
0x0D3, 0x00, // display offset
0x040, // start line
0x0A1, // segment remap a0/a1
0x0C8, // c0: scan dir normal, c8: reverse
0x0DA, 0x012, // com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5)
0x081, 0x0CF, // [2] set contrast control
0x020, 0x002, // 2012-05-27: page addressing mode
0x21, 0, 0x7F, // set column range from 0 through 127
0x22, 0, 7, // set page range from 0 through 7
0x0D9, 0x0F1, // [2] pre-charge period 0x022/f1
0x0DB, 0x040, // vcomh deselect level
0x0A4, // output ram to display
0x0A6, // none inverted normal display mode
0x0D5, 0x080, // clock divide ratio (0x00=1) and oscillator frequency (0x8)
0x08D, 0x014, // [2] charge pump setting (p62): 0x014 enable, 0x010 disable
0x02E, // 2012-05-27: Deactivate scroll
0x0AF, // display on
U8G_ESC_END // end of sequence
};
uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_ssd1306_128x64_init_seq_2_wire);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_SetAddress(u8g, dev, 0); // instruction mode
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_ssd1306_128x64_data_start_2_wire);
u8g_WriteByte(u8g, dev, 0x0B0 | (pb->p.page*2)); // select current page
u8g_SetAddress(u8g, dev, 1); // data mode
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *) pb->buf);
u8g_SetChipSelect(u8g, dev, 0);
u8g_SetAddress(u8g, dev, 0); // instruction mode
u8g_WriteEscSeqP_2_wire(u8g, dev, u8g_dev_ssd1306_128x64_data_start_2_wire);
u8g_WriteByte(u8g, dev, 0x0B0 | (pb->p.page*2+1)); // select current page
u8g_SetAddress(u8g, dev, 1); // data mode
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
u8g_SetChipSelect(u8g, dev, 0);
}
break;
case U8G_DEV_MSG_SLEEP_ON:
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
return 1;
}
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf};
u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL };
/////////////////////////////////////////////////////////////////////////////////////////////
// This routine adds the instruction byte in between the command bytes. This makes the init
// sequences a lot easier to read.
#define I2C_CMD_MODE 0x080
uint8_t u8g_WriteEscSeqP_2_wire(u8g_t *u8g, u8g_dev_t *dev, const uint8_t *esc_seq) {
uint8_t is_escape = 0;
for (;;) {
uint8_t value = u8g_pgm_read(esc_seq);
if (is_escape == 0) {
if (value != 255) {
if (u8g_WriteByte(u8g, dev, value) == 0 )
return 0;
if (u8g_WriteByte(u8g, dev, I2C_CMD_MODE) == 0 )
return 0;
}
else {
is_escape = 1;
}
}
else {
if (value == 255) {
if (u8g_WriteByte(u8g, dev, value) == 0 )
return 0;
if (u8g_WriteByte(u8g, dev, I2C_CMD_MODE) == 0 )
return 0;
}
else if (value == 254) {
break;
}
else if (value >= 0x0F0) {
/* not yet used, do nothing */
}
else if (value >= 0xE0 ) {
u8g_SetAddress(u8g, dev, value & 0x0F);
}
else if (value >= 0xD0) {
u8g_SetChipSelect(u8g, dev, value & 0x0F);
}
else if (value >= 0xC0) {
u8g_SetResetLow(u8g, dev);
value &= 0x0F;
value <<= 4;
value+=2;
u8g_Delay(value);
u8g_SetResetHigh(u8g, dev);
u8g_Delay(value);
}
else if (value >= 0xBE) { /* not yet implemented */
/* u8g_SetVCC(u8g, dev, value & 0x01); */
}
else if (value <= 127) {
u8g_Delay(value);
}
is_escape = 0;
}
esc_seq++;
}
return 1;
}
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,128 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include "HAL_LCD_com_defines.h"
#include <U8glib.h>
#define WIDTH 128
#define HEIGHT 64
#define PAGE_HEIGHT 8
// SSD1309 init sequence
static const uint8_t u8g_dev_ssd1309_128x64_init_seq[] PROGMEM = {
U8G_ESC_CS(0), // Disable chip
U8G_ESC_ADR(0), // Instruction mode
U8G_ESC_RST(1), // Do reset low pulse with (1*16)+2 milliseconds
U8G_ESC_CS(1), // Enable chip
0xFD,0x12, // Command Lock
0xAE, // Set Display Off
0xD5,0xA0, // Set Display Clock Divide Ratio/Oscillator Frequency
0xA8,0x3F, // Set Multiplex Ratio
0x3D,0x00, // Set Display Offset
0x40, // Set Display Start Line
0xA1, // Set Segment Re-Map
0xC8, // Set COM Output Scan Direction
0xDA,0x12, // Set COM Pins Hardware Configuration
0x81,0xDF, // Set Current Control
0xD9,0x82, // Set Pre-Charge Period
0xDB,0x34, // Set VCOMH Deselect Level
0xA4, // Set Entire Display On/Off
0xA6, // Set Normal/Inverse Display
U8G_ESC_VCC(1), // Power up VCC & Stabilized
U8G_ESC_DLY(50),
0xAF, // Set Display On
U8G_ESC_DLY(50),
U8G_ESC_CS(0), // Disable chip
U8G_ESC_END // End of sequence
};
// Select one init sequence here
#define u8g_dev_ssd1309_128x64_init_seq u8g_dev_ssd1309_128x64_init_seq
static const uint8_t u8g_dev_ssd1309_128x64_data_start[] PROGMEM = {
U8G_ESC_ADR(0), // Instruction mode
U8G_ESC_CS(1), // Enable chip
0x010, // Set upper 4 bit of the col adr to 0
0x000, // Set lower 4 bit of the col adr to 4
U8G_ESC_END // End of sequence
};
static const uint8_t u8g_dev_ssd13xx_sleep_on[] PROGMEM = {
U8G_ESC_ADR(0), // Instruction mode
U8G_ESC_CS(1), // Enable chip
0x0AE, // Display off
U8G_ESC_CS(0), // Disable chip
U8G_ESC_END // End of sequence
};
static const uint8_t u8g_dev_ssd13xx_sleep_off[] PROGMEM = {
U8G_ESC_ADR(0), // Instruction mode
U8G_ESC_CS(1), // Enable chip
0x0AF, // Display on
U8G_ESC_DLY(50), // Delay 50 ms
U8G_ESC_CS(0), // Disable chip
U8G_ESC_END // End of sequence
};
uint8_t u8g_dev_ssd1309_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd1309_128x64_init_seq);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd1309_128x64_data_start);
u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); // Select current page (SSD1306)
u8g_SetAddress(u8g, dev, 1); // Data mode
if (u8g_pb_WriteBuffer(pb, u8g, dev) == 0) return 0;
u8g_SetChipSelect(u8g, dev, 0);
}
break;
case U8G_DEV_MSG_CONTRAST:
u8g_SetChipSelect(u8g, dev, 1);
u8g_SetAddress(u8g, dev, 0); // Instruction mode
u8g_WriteByte(u8g, dev, 0x081);
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) ); // 11 Jul 2015: fixed contrast calculation
u8g_SetChipSelect(u8g, dev, 0);
return 1;
case U8G_DEV_MSG_SLEEP_ON:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd13xx_sleep_on);
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd13xx_sleep_off);
return 1;
}
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_ssd1309_buf[WIDTH*2] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_ssd1309_pb = { {8, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1309_buf};
u8g_dev_t u8g_dev_ssd1309_sw_spi = { u8g_dev_ssd1309_128x64_fn, &u8g_dev_ssd1309_pb, U8G_COM_HAL_SW_SPI_FN };
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,236 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Based on u8g_dev_st7565_64128n_HAL.c (Displaytech)
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2011, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../../inc/MarlinConfig.h"
#if HAS_MARLINUI_U8GLIB
#include <U8glib.h>
#include "HAL_LCD_com_defines.h"
#define WIDTH 128
#define HEIGHT 64
#define PAGE_HEIGHT 8
#define ST7565_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
#define ST7565_BIAS_MODE(N) ((N) ? 0xA3 : 0xA2)
#define ST7565_ALL_PIX(N) ((N) ? 0xA5 : 0xA4)
#define ST7565_INVERTED(N) ((N) ? 0xA7 : 0xA6)
#define ST7565_ON(N) ((N) ? 0xAF : 0xAE)
#define ST7565_OUT_MODE(N) ((N) ? 0xC8 : 0xC0)
#define ST7565_POWER_CONTROL(N) (0x28 | (N))
#define ST7565_V0_RATIO(N) (0x10 | ((N) & 0x7))
#define ST7565_V5_RATIO(N) (0x20 | ((N) & 0x7))
#define ST7565_CONTRAST(N) (0x81), (N)
#define ST7565_COLUMN_ADR(N) (0x10 | (((N) >> 4) & 0xF)), ((N) & 0xF)
#define ST7565_PAGE_ADR(N) (0xB0 | (N))
#define ST7565_START_LINE(N) (0x40 | (N))
#define ST7565_SLEEP_MODE() (0xAC) // ,(N) needed?
#define ST7565_NOOP() (0xE3)
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */
static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
U8G_ESC_CS(0), // disable chip
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
ST7565_BIAS_MODE(0), // 0xA2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
ST7565_ADC_REVERSE(0), // Normal ADC Select (according to Displaytech 64128N datasheet)
ST7565_OUT_MODE(1), // common output mode: set scan direction
ST7565_START_LINE(0), // Display start line for Displaytech 64128N
ST7565_POWER_CONTROL(0x4), // power control: turn on voltage converter
U8G_ESC_DLY(50), // delay 50 ms
ST7565_POWER_CONTROL(0x6), // power control: turn on voltage regulator
U8G_ESC_DLY(50), // delay 50 ms
ST7565_POWER_CONTROL(0x7), // power control: turn on voltage follower
U8G_ESC_DLY(50), // delay 50 ms
ST7565_V0_RATIO(0), // Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N
ST7565_INVERTED(0), // display normal, bit val 0: LCD pixel off.
ST7565_CONTRAST(0x1E), // Contrast value. Setting for controlling brightness of Displaytech 64128N
ST7565_ON(1), // display on
U8G_ESC_DLY(100), // delay 100 ms
ST7565_ALL_PIX(1), // display all points, ST7565
U8G_ESC_DLY(100), // delay 100 ms
U8G_ESC_DLY(100), // delay 100 ms
ST7565_ALL_PIX(0), // normal display
U8G_ESC_CS(0), // disable chip
U8G_ESC_END // end of sequence
};
static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
ST7565_COLUMN_ADR(0x00), // high 4 bits to 0, low 4 bits to 0. Changed for DisplayTech 64128N
U8G_ESC_END // end of sequence
};
static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_on[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
ST7565_SLEEP_MODE(), // static indicator off
//0x00, // indicator register set (not sure if this is required)
ST7565_ON(0), // display off
ST7565_ALL_PIX(1), // all points on
U8G_ESC_CS(0), // disable chip, bugfix 12 nov 2014
U8G_ESC_END // end of sequence
};
static const uint8_t u8g_dev_st7565_64128n_HAL_sleep_off[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
ST7565_ALL_PIX(0), // all points off
ST7565_ON(1), // display on
U8G_ESC_DLY(50), // delay 50 ms
U8G_ESC_CS(0), // disable chip, bugfix 12 nov 2014
U8G_ESC_END // end of sequence
};
uint8_t u8g_dev_st7565_64128n_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_400NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_init_seq);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(pb->p.page)); /* select current page (ST7565R) */
u8g_SetAddress(u8g, dev, 1); /* data mode */
if (!u8g_pb_WriteBuffer(pb, u8g, dev)) return 0;
u8g_SetChipSelect(u8g, dev, 0);
}
break;
case U8G_DEV_MSG_CONTRAST:
u8g_SetChipSelect(u8g, dev, 1);
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
u8g_WriteByte(u8g, dev, 0x81);
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
u8g_SetChipSelect(u8g, dev, 0);
return 1;
case U8G_DEV_MSG_SLEEP_ON:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_sleep_on);
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_sleep_off);
return 1;
}
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_st7565_64128n_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, const uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_400NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_init_seq);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page)); /* select current page (ST7565R) */
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
u8g_SetChipSelect(u8g, dev, 0);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_data_start);
u8g_WriteByte(u8g, dev, ST7565_PAGE_ADR(2 * pb->p.page + 1)); /* select current page (ST7565R) */
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
u8g_SetChipSelect(u8g, dev, 0);
}
break;
case U8G_DEV_MSG_CONTRAST:
u8g_SetChipSelect(u8g, dev, 1);
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
u8g_WriteByte(u8g, dev, 0x81);
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
u8g_SetChipSelect(u8g, dev, 0);
return 1;
case U8G_DEV_MSG_SLEEP_ON:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_sleep_on);
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7565_64128n_HAL_sleep_off);
return 1;
}
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
}
U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_sw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_SW_SPI_FN);
uint8_t u8g_dev_st7565_64128n_HAL_2x_buf[WIDTH*2] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_st7565_64128n_HAL_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_st7565_64128n_HAL_2x_buf};
u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN };
U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_HW_SPI_FN);
u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi = { u8g_dev_st7565_64128n_HAL_2x_fn, &u8g_dev_st7565_64128n_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,208 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Based on u8g_dev_st7920_128x64.c
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2011, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB && DISABLED(TFT_CLASSIC_UI)
#include "HAL_LCD_com_defines.h"
#define PAGE_HEIGHT 8
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */
static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
U8G_ESC_CS(0), // disable chip
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)
U8G_ESC_DLY(100), // 8 Dez 2012: additional delay 100 ms because of reset
U8G_ESC_CS(1), // enable chip
U8G_ESC_DLY(50), // delay 50 ms
0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0)
0x00C, // display on, cursor & blink off; 0x08: all off
0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift
0x002, // disable scroll, enable CGRAM adress
0x001, // clear RAM, needs 1.6 ms
U8G_ESC_DLY(100), // delay 100 ms
U8G_ESC_CS(0), // disable chip
U8G_ESC_END // end of sequence
};
void clear_graphics_DRAM(u8g_t *u8g, u8g_dev_t *dev) {
u8g_SetChipSelect(u8g, dev, 1);
u8g_Delay(1);
u8g_SetAddress(u8g, dev, 0); // cmd mode
u8g_WriteByte(u8g, dev, 0x08); //display off, cursor+blink off
u8g_WriteByte(u8g, dev, 0x3E); //extended mode + GDRAM active
LOOP_L_N(y, (LCD_PIXEL_HEIGHT) / 2) { //clear GDRAM
u8g_WriteByte(u8g, dev, 0x80 | y); //set y
u8g_WriteByte(u8g, dev, 0x80); //set x = 0
u8g_SetAddress(u8g, dev, 1); /* data mode */
LOOP_L_N(i, 2 * (LCD_PIXEL_WIDTH) / 8) //2x width clears both segments
u8g_WriteByte(u8g, dev, 0);
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
}
u8g_WriteByte(u8g, dev, 0x0C); //display on, cursor+blink off
u8g_SetChipSelect(u8g, dev, 0);
}
uint8_t u8g_dev_st7920_128x64_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_400NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7920_128x64_HAL_init_seq);
clear_graphics_DRAM(u8g, dev);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
uint8_t y, i;
uint8_t *ptr;
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
u8g_SetChipSelect(u8g, dev, 1);
y = pb->p.page_y0;
ptr = (uint8_t *)pb->buf;
for (i = 0; i < 8; i ++) {
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
u8g_WriteByte(u8g, dev, 0x03E ); /* enable extended mode */
if (y < 32) {
u8g_WriteByte(u8g, dev, 0x080 | y ); /* y pos */
u8g_WriteByte(u8g, dev, 0x080 ); /* set x pos to 0*/
}
else {
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); /* y pos */
u8g_WriteByte(u8g, dev, 0x080 | 8); /* set x pos to 64*/
}
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, (LCD_PIXEL_WIDTH) / 8, ptr);
ptr += (LCD_PIXEL_WIDTH) / 8;
y++;
}
u8g_SetChipSelect(u8g, dev, 0);
}
break;
}
return u8g_dev_pb8h1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_st7920_128x64_HAL_4x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_400NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_st7920_128x64_HAL_init_seq);
clear_graphics_DRAM(u8g, dev);
break;
case U8G_DEV_MSG_STOP:
break;
case U8G_DEV_MSG_PAGE_NEXT: {
uint8_t y, i;
uint8_t *ptr;
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
u8g_SetChipSelect(u8g, dev, 1);
y = pb->p.page_y0;
ptr = (uint8_t *)pb->buf;
for (i = 0; i < 32; i ++) {
u8g_SetAddress(u8g, dev, 0); /* cmd mode */
u8g_WriteByte(u8g, dev, 0x03E ); /* enable extended mode */
if (y < 32) {
u8g_WriteByte(u8g, dev, 0x080 | y ); /* y pos */
u8g_WriteByte(u8g, dev, 0x080 ); /* set x pos to 0*/
}
else {
u8g_WriteByte(u8g, dev, 0x080 | (y-32) ); /* y pos */
u8g_WriteByte(u8g, dev, 0x080 | 8); /* set x pos to 64*/
}
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, (LCD_PIXEL_WIDTH) / 8, ptr);
ptr += (LCD_PIXEL_WIDTH) / 8;
y++;
}
u8g_SetChipSelect(u8g, dev, 0);
}
break;
}
return u8g_dev_pb32h1_base_fn(u8g, dev, msg, arg);
}
U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_sw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT, PAGE_HEIGHT, u8g_dev_st7920_128x64_HAL_fn, U8G_COM_ST7920_HAL_SW_SPI);
#define QWIDTH ((LCD_PIXEL_WIDTH) * 4)
uint8_t u8g_dev_st7920_128x64_HAL_4x_buf[QWIDTH] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_st7920_128x64_HAL_4x_pb = { { 32, LCD_PIXEL_HEIGHT, 0, 0, 0 }, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_HAL_4x_buf};
u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_hw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT, PAGE_HEIGHT, u8g_dev_st7920_128x64_HAL_fn, U8G_COM_ST7920_HAL_HW_SPI);
u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_HW_SPI };
#if NONE(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32) || defined(U8G_HAL_LINKS)
// Also use this device for HAL version of rrd class. This results in the same device being used
// for the ST7920 for HAL systems no matter what is selected in marlinui_DOGM.h.
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };
#endif
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,537 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2011, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../../inc/MarlinConfig.h"
#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT)
#include "HAL_LCD_com_defines.h"
#include "marlinui_DOGM.h"
#include <string.h>
#if ANY(LCD_USE_DMA_FSMC, LCD_USE_DMA_SPI, HAS_LTDC_GRAPHICAL_TFT)
#define HAS_LCD_IO 1
#endif
#include "../tft_io/tft_io.h"
TFT_IO tftio;
#define WIDTH LCD_PIXEL_WIDTH
#define HEIGHT LCD_PIXEL_HEIGHT
#define PAGE_HEIGHT 8
#include "../touch/touch_buttons.h"
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
#include "../tft_io/touch_calibration.h"
#include "../marlinui.h"
#endif
#define X_HI (UPSCALE(TFT_PIXEL_OFFSET_X, WIDTH) - 1)
#define Y_HI (UPSCALE(TFT_PIXEL_OFFSET_Y, HEIGHT) - 1)
// 16 bit color generator: https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html
// RGB565 color picker: https://trolsoft.ru/en/articles/rgb565-color-picker
#define COLOR_BLACK 0x0000 // #000000
#define COLOR_WHITE 0xFFFF // #FFFFFF
#define COLOR_SILVER 0xC618 // #C0C0C0
#define COLOR_GREY 0x7BEF // #808080
#define COLOR_DARKGREY 0x4208 // #404040
#define COLOR_DARKGREY2 0x39E7 // #303030
#define COLOR_DARK 0x0003 // #000019
#define COLOR_RED 0xF800 // #FF0000
#define COLOR_LIME 0x7E00 // #00FF00
#define COLOR_BLUE 0x001F // #0000FF
#define COLOR_YELLOW 0xFFE0 // #FFFF00
#define COLOR_MAGENTA 0xF81F // #FF00FF
#define COLOR_FUCHSIA 0xF81F // #FF00FF
#define COLOR_CYAN 0x07FF // #00FFFF
#define COLOR_AQUA 0x07FF // #00FFFF
#define COLOR_MAROON 0x7800 // #800000
#define COLOR_GREEN 0x03E0 // #008000
#define COLOR_NAVY 0x000F // #000080
#define COLOR_OLIVE 0x8400 // #808000
#define COLOR_PURPLE 0x8010 // #800080
#define COLOR_TEAL 0x0410 // #008080
#define COLOR_ORANGE 0xFC00 // #FF7F00
#ifndef TFT_MARLINUI_COLOR
#define TFT_MARLINUI_COLOR COLOR_WHITE
#endif
#ifndef TFT_MARLINBG_COLOR
#define TFT_MARLINBG_COLOR COLOR_BLACK
#endif
#ifndef TFT_DISABLED_COLOR
#define TFT_DISABLED_COLOR COLOR_DARK
#endif
#ifndef TFT_BTCANCEL_COLOR
#define TFT_BTCANCEL_COLOR COLOR_RED
#endif
#ifndef TFT_BTARROWS_COLOR
#define TFT_BTARROWS_COLOR COLOR_BLUE
#endif
#ifndef TFT_BTOKMENU_COLOR
#define TFT_BTOKMENU_COLOR COLOR_RED
#endif
static void setWindow(u8g_t *u8g, u8g_dev_t *dev, uint16_t Xmin, uint16_t Ymin, uint16_t Xmax, uint16_t Ymax) {
tftio.set_window(Xmin, Ymin, Xmax, Ymax);
}
#if HAS_TOUCH_BUTTONS
static const uint8_t buttonD[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00011000,B00110000,B00000001,
B10000000,B00001100,B01100000,B00000001,
B10000000,B00000110,B11000000,B00000001,
B10000000,B00000011,B10000000,B00000001,
B10000000,B00000011,B10000000,B00000001,
B10000000,B00000110,B11000000,B00000001,
B10000000,B00001100,B01100000,B00000001,
B10000000,B00011000,B00110000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
#if ENABLED(REVERSE_MENU_DIRECTION)
static const uint8_t buttonA[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00111111,B11100001,
B10000111,B11111100,B00111111,B11100001,
B10000011,B11111000,B00000000,B00000001,
B10000001,B11110000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B01000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
static const uint8_t buttonB[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B01100000,B00000010,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00001111,B10000001,
B10000000,B01100000,B00011111,B11000001,
B10000111,B11111110,B00111111,B11100001,
B10000111,B11111110,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
#else
static const uint8_t buttonA[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B01000000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000001,B11110000,B00000000,B00000001,
B10000011,B11111000,B00000000,B00000001,
B10000111,B11111100,B00111111,B11100001,
B10000000,B11100000,B00111111,B11100001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B11100000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
static const uint8_t buttonB[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000111,B00000001,
B10000111,B11111110,B00000111,B00000001,
B10000111,B11111110,B00111111,B11100001,
B10000000,B01100000,B00011111,B11000001,
B10000000,B01100000,B00001111,B10000001,
B10000000,B01100000,B00000111,B00000001,
B10000000,B01100000,B00000010,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
#endif
static const uint8_t buttonC[] = {
B01111111,B11111111,B11111111,B11111110,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00011100,B00000001,
B10000000,B00000100,B00011100,B00000001,
B10000000,B00001100,B00011100,B00000001,
B10000000,B00011111,B11111100,B00000001,
B10000000,B00111111,B11111100,B00000001,
B10000000,B00011111,B11111100,B00000001,
B10000000,B00001100,B00000000,B00000001,
B10000000,B00000100,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B10000000,B00000000,B00000000,B00000001,
B01111111,B11111111,B11111111,B11111110,
};
void drawImage(const uint8_t *data, u8g_t *u8g, u8g_dev_t *dev, uint16_t length, uint16_t height, uint16_t color) {
uint16_t buffer[BUTTON_WIDTH * sq(GRAPHICAL_TFT_UPSCALE)];
if (length > BUTTON_WIDTH) return;
for (uint16_t i = 0; i < height; i++) {
uint16_t k = 0;
for (uint16_t j = 0; j < length; j++) {
uint16_t v = TFT_MARLINBG_COLOR;
if (*(data + (i * (length >> 3) + (j >> 3))) & (0x80 >> (j & 7)))
v = color;
else
v = TFT_MARLINBG_COLOR;
LOOP_L_N(n, GRAPHICAL_TFT_UPSCALE) buffer[k++] = v;
}
#if HAS_LCD_IO
LOOP_S_L_N(n, 1, GRAPHICAL_TFT_UPSCALE)
for (uint16_t l = 0; l < UPSCALE0(length); l++)
buffer[l + n * UPSCALE0(length)] = buffer[l];
tftio.WriteSequence(buffer, length * sq(GRAPHICAL_TFT_UPSCALE));
#else
for (uint8_t i = GRAPHICAL_TFT_UPSCALE; i--;)
u8g_WriteSequence(u8g, dev, k << 1, (uint8_t*)buffer);
#endif
}
}
#endif // HAS_TOUCH_BUTTONS
// Used to fill RGB565 (16bits) background
inline void memset2(const void *ptr, uint16_t fill, size_t cnt) {
uint16_t *wptr = (uint16_t*)ptr;
for (size_t i = 0; i < cnt; i += 2) { *wptr = fill; wptr++; }
}
static bool preinit = true;
static uint8_t page;
#if HAS_TOUCH_BUTTONS
static bool redrawTouchButtons = true;
static void drawTouchButtons(u8g_t *u8g, u8g_dev_t *dev) {
if (!redrawTouchButtons) return;
redrawTouchButtons = false;
// Bottom buttons
setWindow(u8g, dev, BUTTOND_X_LO, BUTTON_Y_LO, BUTTOND_X_HI, BUTTON_Y_HI);
drawImage(buttonD, u8g, dev, BUTTON_DRAW_WIDTH, BUTTON_DRAW_HEIGHT, TFT_BTCANCEL_COLOR);
setWindow(u8g, dev, BUTTONA_X_LO, BUTTON_Y_LO, BUTTONA_X_HI, BUTTON_Y_HI);
drawImage(buttonA, u8g, dev, BUTTON_DRAW_WIDTH, BUTTON_DRAW_HEIGHT, TFT_BTARROWS_COLOR);
setWindow(u8g, dev, BUTTONB_X_LO, BUTTON_Y_LO, BUTTONB_X_HI, BUTTON_Y_HI);
drawImage(buttonB, u8g, dev, BUTTON_DRAW_WIDTH, BUTTON_DRAW_HEIGHT, TFT_BTARROWS_COLOR);
setWindow(u8g, dev, BUTTONC_X_LO, BUTTON_Y_LO, BUTTONC_X_HI, BUTTON_Y_HI);
drawImage(buttonC, u8g, dev, BUTTON_DRAW_WIDTH, BUTTON_DRAW_HEIGHT, TFT_BTOKMENU_COLOR);
}
#endif // HAS_TOUCH_BUTTONS
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
#if HAS_LCD_IO
static uint16_t bufferA[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)], bufferB[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)];
uint16_t *buffer = &bufferA[0];
#else
uint16_t buffer[WIDTH * GRAPHICAL_TFT_UPSCALE]; // 16-bit RGB 565 pixel line buffer
#endif
switch (msg) {
case U8G_DEV_MSG_INIT:
dev->com_fn(u8g, U8G_COM_MSG_INIT, U8G_SPI_CLK_CYCLE_NONE, nullptr);
if (preinit) {
preinit = false;
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
}
if (msgInitCount) return -1;
tftio.Init();
tftio.InitTFT();
TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset());
// Clear Screen
setWindow(u8g, dev, 0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1);
#if HAS_LCD_IO
tftio.WriteMultiple(TFT_MARLINBG_COLOR, (TFT_WIDTH) * (TFT_HEIGHT));
#else
memset2(buffer, TFT_MARLINBG_COLOR, (TFT_WIDTH) / 2);
for (uint16_t i = 0; i < (TFT_HEIGHT) * sq(GRAPHICAL_TFT_UPSCALE); i++)
u8g_WriteSequence(u8g, dev, (TFT_WIDTH) / 2, (uint8_t *)buffer);
#endif
return 0;
case U8G_DEV_MSG_STOP: preinit = true; break;
case U8G_DEV_MSG_PAGE_FIRST:
page = 0;
TERN_(HAS_TOUCH_BUTTONS, drawTouchButtons(u8g, dev));
setWindow(u8g, dev, TFT_PIXEL_OFFSET_X, TFT_PIXEL_OFFSET_Y, X_HI, Y_HI);
break;
case U8G_DEV_MSG_PAGE_NEXT:
if (++page > (HEIGHT / PAGE_HEIGHT)) return 1;
LOOP_L_N(y, PAGE_HEIGHT) {
uint32_t k = 0;
#if HAS_LCD_IO
buffer = (y & 1) ? bufferB : bufferA;
#endif
for (uint16_t i = 0; i < (uint32_t)pb->width; i++) {
const uint8_t b = *(((uint8_t *)pb->buf) + i);
const uint16_t c = TEST(b, y) ? TFT_MARLINUI_COLOR : TFT_MARLINBG_COLOR;
LOOP_L_N(n, GRAPHICAL_TFT_UPSCALE) buffer[k++] = c;
}
#if HAS_LCD_IO
LOOP_S_L_N(n, 1, GRAPHICAL_TFT_UPSCALE)
for (uint16_t l = 0; l < UPSCALE0(WIDTH); l++)
buffer[l + n * UPSCALE0(WIDTH)] = buffer[l];
tftio.WriteSequence(buffer, COUNT(bufferA));
#else
uint8_t *bufptr = (uint8_t*) buffer;
for (uint8_t i = GRAPHICAL_TFT_UPSCALE; i--;) {
LOOP_S_L_N(n, 0, GRAPHICAL_TFT_UPSCALE * 2) {
u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH * n]);
}
}
#endif
}
break;
case U8G_DEV_MSG_SLEEP_ON:
// Enter Sleep Mode (10h)
return 1;
case U8G_DEV_MSG_SLEEP_OFF:
// Sleep Out (11h)
return 1;
}
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
if (msgInitCount) {
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
if (msgInitCount) return -1;
}
static uint8_t isCommand;
switch (msg) {
case U8G_COM_MSG_STOP: break;
case U8G_COM_MSG_INIT:
isCommand = 0;
break;
case U8G_COM_MSG_ADDRESS: // define cmd (arg_val = 0) or data mode (arg_val = 1)
isCommand = arg_val == 0 ? 1 : 0;
break;
case U8G_COM_MSG_RESET:
break;
case U8G_COM_MSG_WRITE_BYTE:
tftio.DataTransferBegin(DATASIZE_8BIT);
if (isCommand)
tftio.WriteReg(arg_val);
else
tftio.WriteData((uint16_t)arg_val);
tftio.DataTransferEnd();
break;
case U8G_COM_MSG_WRITE_SEQ:
tftio.DataTransferBegin(DATASIZE_16BIT);
for (uint8_t i = 0; i < arg_val; i += 2)
tftio.WriteData(*(uint16_t *)(((uintptr_t)arg_ptr) + i));
tftio.DataTransferEnd();
break;
}
return 1;
}
U8G_PB_DEV(u8g_dev_tft_320x240_upscale_from_128x64, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_tft_320x240_upscale_from_128x64_fn, U8G_COM_HAL_TFT_FN);
#if ENABLED(TOUCH_SCREEN_CALIBRATION)
static void drawCross(uint16_t x, uint16_t y, uint16_t color) {
tftio.set_window(x - 15, y, x + 15, y);
tftio.WriteMultiple(color, 31);
tftio.set_window(x, y - 15, x, y + 15);
tftio.WriteMultiple(color, 31);
}
void MarlinUI::touch_calibration_screen() {
uint16_t x, y;
calibrationState calibration_stage = touch_calibration.get_calibration_state();
if (calibration_stage == CALIBRATION_NONE) {
// start and clear screen
defer_status_screen(true);
calibration_stage = touch_calibration.calibration_start();
tftio.set_window(0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1);
tftio.WriteMultiple(TFT_MARLINBG_COLOR, uint32_t(TFT_WIDTH) * (TFT_HEIGHT));
}
else {
// clear last cross
x = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].x;
y = touch_calibration.calibration_points[_MIN(calibration_stage - 1, CALIBRATION_BOTTOM_RIGHT)].y;
drawCross(x, y, TFT_MARLINBG_COLOR);
}
const char *str = nullptr;
if (calibration_stage < CALIBRATION_SUCCESS) {
// handle current state
switch (calibration_stage) {
case CALIBRATION_TOP_LEFT: str = GET_TEXT(MSG_TOP_LEFT); break;
case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT(MSG_BOTTOM_LEFT); break;
case CALIBRATION_TOP_RIGHT: str = GET_TEXT(MSG_TOP_RIGHT); break;
case CALIBRATION_BOTTOM_RIGHT: str = GET_TEXT(MSG_BOTTOM_RIGHT); break;
default: break;
}
x = touch_calibration.calibration_points[calibration_stage].x;
y = touch_calibration.calibration_points[calibration_stage].y;
drawCross(x, y, TFT_MARLINUI_COLOR);
}
else {
// end calibration
str = calibration_stage == CALIBRATION_SUCCESS ? GET_TEXT(MSG_CALIBRATION_COMPLETED) : GET_TEXT(MSG_CALIBRATION_FAILED);
defer_status_screen(false);
touch_calibration.calibration_end();
TERN_(HAS_TOUCH_BUTTONS, redrawTouchButtons = true);
}
// draw current message
tftio.set_window(TFT_PIXEL_OFFSET_X, TFT_PIXEL_OFFSET_Y, X_HI, Y_HI);
do {
set_font(FONT_MENU);
lcd_put_u8str(0, LCD_PIXEL_HEIGHT / 2, str);
} while (u8g.nextPage());
drawing_screen = false;
safe_delay(250);
if (calibration_stage == CALIBRATION_SUCCESS) {
safe_delay(500);
ui.goto_previous_screen();
}
}
#endif // TOUCH_SCREEN_CALIBRATION
#endif // HAS_MARLINUI_U8GLIB && (FSMC_CS_PIN || HAS_SPI_GRAPHICAL_TFT)

View File

@@ -0,0 +1,213 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* Based on u8g_dev_uc1701_mini12864.c (dealextreme)
*
* Universal 8bit Graphics Library
*
* Copyright (c) 2011, olikraus@gmail.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include "HAL_LCD_com_defines.h"
#define WIDTH 128
#define HEIGHT 64
#define PAGE_HEIGHT 8
#define UC1701_ADC_REVERSE(N) ((N) ? 0xA1 : 0xA0)
#define UC1701_BIAS_MODE(N) ((N) ? 0xA3 : 0xA2)
#define UC1701_ALL_PIX(N) ((N) ? 0xA5 : 0xA4)
#define UC1701_INVERTED(N) ((N) ? 0xA7 : 0xA6)
#define UC1701_ON(N) ((N) ? 0xAF : 0xAE)
#define UC1701_OUT_MODE(N) ((N) ? 0xC8 : 0xC0)
#define UC1701_POWER_CONTROL(N) (0x28 | (N))
#define UC1701_V5_RATIO(N) (0x20 | ((N) & 0x7))
#define UC1701_CONTRAST(N) (0x81), (N)
#define UC1701_COLUMN_HI(N) (0x10 | (((N) >> 4) & 0xF))
#define UC1701_COLUMN_ADR(N) UC1701_COLUMN_HI(N), ((N) & 0xF)
#define UC1701_PAGE_ADR(N) (0xB0 | (N))
#define UC1701_START_LINE(N) (0x40 | (N))
#define UC1701_INDICATOR(N) (0xAC), (N)
#define UC1701_RESET() (0xE2)
#define UC1701_NOOP() (0xE3)
#define UC1701_BOOST_RATIO(N) (0xF8), (N)
static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = {
U8G_ESC_CS(0), // disable chip
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_RST(1), // do reset low pulse with (1*16)+2 milliseconds
U8G_ESC_CS(1), // enable chip
UC1701_RESET(), // soft reset
UC1701_START_LINE(0), // set display start line to 0
UC1701_ADC_REVERSE(0), // ADC set to reverse
UC1701_OUT_MODE(1), // common output mode
UC1701_INVERTED(0), // display normal, bit val 0: LCD pixel off
UC1701_BIAS_MODE(0), // LCD bias 1/9
UC1701_POWER_CONTROL(0x7), // all power control circuits on
UC1701_BOOST_RATIO(0x0), // set booster ratio to 4x
UC1701_V5_RATIO(3), // set V0 voltage resistor ratio to large
UC1701_CONTRAST(0x27), // set contrast
UC1701_INDICATOR(0), // indicator disable
UC1701_ON(1), // display on
U8G_ESC_CS(0), // disable chip
U8G_ESC_DLY(100), // delay 100 ms
U8G_ESC_CS(1), // enable chip
UC1701_ALL_PIX(1), // display all points, ST7565
U8G_ESC_CS(0), // disable chip
U8G_ESC_DLY(100), // delay 100 ms
U8G_ESC_DLY(100), // delay 100 ms
U8G_ESC_CS(1), // enable chip
UC1701_ALL_PIX(0), // normal display
U8G_ESC_CS(0), // disable chip
U8G_ESC_DLY(150), // delay 150 ms before sending any data
U8G_ESC_END // end of sequence
};
static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
#if ANY(MKS_MINI_12864, ENDER2_STOCKDISPLAY, FYSETC_MINI_12864)
UC1701_START_LINE(0), // set display start line to 0
UC1701_ADC_REVERSE(0), // ADC set to reverse
UC1701_OUT_MODE(1), // common output mode
UC1701_INVERTED(0), // display normal, bit val 0: LCD pixel off
UC1701_BIAS_MODE(0), // LCD bias 1/9
UC1701_POWER_CONTROL(0x7),// all power control circuits on
UC1701_BOOST_RATIO(0x0), // set booster ratio to 4x
UC1701_V5_RATIO(3), // set V0 voltage resistor ratio to large
UC1701_INDICATOR(0), // indicator disable
UC1701_ON(1), // display on
UC1701_COLUMN_HI(0), // set upper 4 bit of the col adr to 0
U8G_ESC_END, // end of sequence
U8G_ESC_DLY(5) // delay 5 ms
#else
UC1701_COLUMN_ADR(0), // address 0
U8G_ESC_END // end of sequence
#endif
};
uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
break;
case U8G_DEV_MSG_STOP: break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
u8g_WriteByte(u8g, dev, 0x0B0 | pb->p.page); /* select current page */
u8g_SetAddress(u8g, dev, 1); /* data mode */
if (!u8g_pb_WriteBuffer(pb, u8g, dev)) return 0;
u8g_SetChipSelect(u8g, dev, 0);
} break;
case U8G_DEV_MSG_CONTRAST:
u8g_SetChipSelect(u8g, dev, 1);
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
u8g_WriteByte(u8g, dev, 0x081);
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
u8g_SetChipSelect(u8g, dev, 0);
return 1;
}
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
}
uint8_t u8g_dev_uc1701_mini12864_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
switch (msg) {
case U8G_DEV_MSG_INIT:
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
break;
case U8G_DEV_MSG_STOP: break;
case U8G_DEV_MSG_PAGE_NEXT: {
u8g_pb_t *pb = (u8g_pb_t *)(dev->dev_mem);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page)); /* select current page */
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)pb->buf);
u8g_SetChipSelect(u8g, dev, 0);
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_data_start);
u8g_WriteByte(u8g, dev, 0x0B0 | (2 * pb->p.page + 1)); /* select current page */
u8g_SetAddress(u8g, dev, 1); /* data mode */
u8g_WriteSequence(u8g, dev, pb->width, (uint8_t *)(pb->buf)+pb->width);
u8g_SetChipSelect(u8g, dev, 0);
} break;
case U8G_DEV_MSG_CONTRAST:
u8g_SetChipSelect(u8g, dev, 1);
u8g_SetAddress(u8g, dev, 0); /* instruction mode */
u8g_WriteByte(u8g, dev, 0x081);
u8g_WriteByte(u8g, dev, (*(uint8_t *)arg) >> 2);
u8g_SetChipSelect(u8g, dev, 0);
return 1;
}
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
}
U8G_PB_DEV(u8g_dev_uc1701_mini12864_HAL_sw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_uc1701_mini12864_HAL_fn, U8G_COM_HAL_SW_SPI_FN);
U8G_PB_DEV(u8g_dev_uc1701_mini12864_HAL_hw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_uc1701_mini12864_HAL_fn, U8G_COM_HAL_HW_SPI_FN);
uint8_t u8g_dev_uc1701_mini12864_HAL_2x_buf[WIDTH*2] U8G_NOCOMMON ;
u8g_pb_t u8g_dev_uc1701_mini12864_HAL_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_uc1701_mini12864_HAL_2x_buf};
u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_SW_SPI_FN };
u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_hw_spi = { u8g_dev_uc1701_mini12864_HAL_2x_fn, &u8g_dev_uc1701_mini12864_HAL_2x_pb, U8G_COM_HAL_HW_SPI_FN };
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,315 @@
/**
* @file u8g_fontutf8.cpp
* @brief font api for u8g lib
* @author Yunhui Fu (yhfudev@gmail.com)
* @version 1.0
* @date 2015-02-19
* @copyright GPL/BSD
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_MARLINUI_U8GLIB
#include <string.h>
#include "../fontutils.h"
#include "u8g_fontutf8.h"
typedef void font_t;
/**
* @brief the callback function to draw something
*
* @param userdata : User's data
* @param msg : the u8g's string
* @param fnt_current : the font
*
* @return 0 on success, 1 to force quit, <0 on error
*
* Get the screen pixel width of a ROM UTF-8 string
*/
typedef int (* fontgroup_cb_draw_t)(void *userdata, const font_t *fnt_current, const char *msg);
/* return v1 - v2 */
static int fontinfo_compare(uxg_fontinfo_t * v1, uxg_fontinfo_t * v2) {
if (v1->page < v2->page) return -1;
else if (v1->page > v2->page) return 1;
if (v1->end < v2->begin) return -1;
else if (v1->begin > v2->end) return 1;
return 0;
}
/*"data_list[idx] - *data_pin"*/
static int pf_bsearch_cb_comp_fntifo_pgm (void *userdata, size_t idx, void *data_pin) {
uxg_fontinfo_t *fntinfo = (uxg_fontinfo_t*)userdata;
uxg_fontinfo_t localval;
memcpy_P(&localval, fntinfo + idx, sizeof(localval));
return fontinfo_compare(&localval, (uxg_fontinfo_t*)data_pin);
}
typedef struct _font_group_t {
const uxg_fontinfo_t * m_fntifo;
int m_fntinfo_num;
} font_group_t;
static int fontgroup_init(font_group_t * root, const uxg_fontinfo_t * fntinfo, int number) {
root->m_fntifo = fntinfo;
root->m_fntinfo_num = number;
return 0;
}
static const font_t* fontgroup_find(font_group_t * root, wchar_t val) {
uxg_fontinfo_t vcmp = {(uint16_t)(val / 128), (uint8_t)(val % 128 + 128), (uint8_t)(val % 128 + 128), 0, 0};
size_t idx = 0;
if (val < 256) return nullptr;
if (pf_bsearch_r((void*)root->m_fntifo, root->m_fntinfo_num, pf_bsearch_cb_comp_fntifo_pgm, (void*)&vcmp, &idx) < 0)
return nullptr;
memcpy_P(&vcmp, root->m_fntifo + idx, sizeof(vcmp));
return vcmp.fntdata;
}
static void fontgroup_drawwchar(font_group_t *group, const font_t *fnt_default, wchar_t val, void * userdata, fontgroup_cb_draw_t cb_draw_ram) {
uint8_t buf[2] = {0, 0};
const font_t * fntpqm = (font_t*)fontgroup_find(group, val);
if (!fntpqm) {
// Unknown char, use default font
buf[0] = (uint8_t)(val & 0xFF);
fntpqm = fnt_default;
}
if (fnt_default != fntpqm) {
buf[0] = (uint8_t)(val & 0x7F);
buf[0] |= 0x80; // use upper page to avoid 0x00 error in C. you may want to generate the font data
}
cb_draw_ram (userdata, fntpqm, (char*) buf);
}
/**
* @brief try to process a utf8 string
*
* @param pu8g : U8G pointer
* @param fnt_default : the default font
* @param utf8_msg : the UTF-8 string
* @param cb_read_byte : how to read the utf8_msg, from RAM or ROM (call read_byte_ram or pgm_read_byte)
* @param userdata : User's data
* @param cb_draw_ram : the callback function of userdata to draw a !RAM! string (actually it is to draw a one byte string in RAM)
*
* @return N/A
*
* Get the screen pixel width of a ROM UTF-8 string
*/
static void fontgroup_drawstring(font_group_t *group, const font_t *fnt_default, const char *utf8_msg, read_byte_cb_t cb_read_byte, void * userdata, fontgroup_cb_draw_t cb_draw_ram) {
uint8_t *p = (uint8_t*)utf8_msg;
for (;;) {
wchar_t val = 0;
p = get_utf8_value_cb(p, cb_read_byte, &val);
if (!val) break;
fontgroup_drawwchar(group, fnt_default, val, userdata, cb_draw_ram);
}
}
static bool flag_fontgroup_was_inited = false;
static font_group_t g_fontgroup_root = { nullptr, 0 };
/**
* @brief check if font is loaded
*/
static inline bool uxg_Utf8FontIsInited() { return flag_fontgroup_was_inited; }
int uxg_SetUtf8Fonts (const uxg_fontinfo_t * fntinfo, int number) {
flag_fontgroup_was_inited = 1;
return fontgroup_init(&g_fontgroup_root, fntinfo, number);
}
struct _uxg_drawu8_data_t {
u8g_t *pu8g;
unsigned int x;
unsigned int y;
unsigned int adv;
unsigned int max_width; // the max pixel width of the string allowed
const void * fnt_prev;
};
static int fontgroup_cb_draw_u8g(void *userdata, const font_t *fnt_current, const char *msg) {
struct _uxg_drawu8_data_t * pdata = (_uxg_drawu8_data_t*)userdata;
if (pdata->fnt_prev != fnt_current) {
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
pdata->fnt_prev = fnt_current;
}
if ((pdata->max_width != PIXEL_LEN_NOLIMIT) && (pdata->adv + u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg) > pdata->max_width))
return 1;
pdata->adv += u8g_DrawStr(pdata->pu8g, pdata->x + pdata->adv, pdata->y, (char*) msg);
return 0;
}
/**
* @brief Draw a wchar_t at the specified position
*
* @param pu8g : U8G pointer
* @param x : position x axis
* @param y : position y axis
* @param ch : the wchar_t
* @param max_width : the pixel width of the string allowed
*
* @return number of pixels advanced
*
* Draw a UTF-8 string at the specified position
*/
unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, wchar_t ch, pixel_len_t max_width) {
struct _uxg_drawu8_data_t data;
font_group_t *group = &g_fontgroup_root;
const font_t *fnt_default = uxg_GetFont(pu8g);
if (!uxg_Utf8FontIsInited()) {
u8g_DrawStrP(pu8g, x, y, (const u8g_pgm_uint8_t *)PSTR("Err: utf8 font not initialized."));
return 0;
}
data.pu8g = pu8g;
data.x = x;
data.y = y;
data.adv = 0;
data.max_width = max_width;
data.fnt_prev = nullptr;
fontgroup_drawwchar(group, fnt_default, ch, (void*)&data, fontgroup_cb_draw_u8g);
u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
return data.adv;
}
/**
* @brief Draw a UTF-8 string at the specified position
*
* @param pu8g : U8G pointer
* @param x : position x axis
* @param y : position y axis
* @param utf8_msg : the UTF-8 string
* @param max_width : the pixel width of the string allowed
*
* @return number of pixels advanced
*
* Draw a UTF-8 string at the specified position
*/
unsigned int uxg_DrawUtf8Str(u8g_t *pu8g, unsigned int x, unsigned int y, const char *utf8_msg, pixel_len_t max_width) {
struct _uxg_drawu8_data_t data;
font_group_t *group = &g_fontgroup_root;
const font_t *fnt_default = uxg_GetFont(pu8g);
if (!uxg_Utf8FontIsInited()) {
u8g_DrawStrP(pu8g, x, y, (const u8g_pgm_uint8_t *)PSTR("Err: utf8 font not initialized."));
return 0;
}
data.pu8g = pu8g;
data.x = x;
data.y = y;
data.adv = 0;
data.max_width = max_width;
data.fnt_prev = nullptr;
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8g);
u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
return data.adv;
}
/**
* @brief Draw a ROM UTF-8 string at the specified position
*
* @param pu8g : U8G pointer
* @param x : position x axis
* @param y : position y axis
* @param utf8_msg : the UTF-8 string
* @param max_width : the pixel width of the string allowed
*
* @return number of pixels advanced
*
* Draw a ROM UTF-8 string at the specified position
*/
unsigned int uxg_DrawUtf8StrP(u8g_t *pu8g, unsigned int x, unsigned int y, PGM_P utf8_msg, pixel_len_t max_width) {
struct _uxg_drawu8_data_t data;
font_group_t *group = &g_fontgroup_root;
const font_t *fnt_default = uxg_GetFont(pu8g);
if (!uxg_Utf8FontIsInited()) {
u8g_DrawStrP(pu8g, x, y, (const u8g_pgm_uint8_t *)PSTR("Err: utf8 font not initialized."));
return 0;
}
data.pu8g = pu8g;
data.x = x;
data.y = y;
data.adv = 0;
data.max_width = max_width;
data.fnt_prev = nullptr;
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8g);
u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
return data.adv;
}
static int fontgroup_cb_draw_u8gstrlen(void *userdata, const font_t *fnt_current, const char *msg) {
struct _uxg_drawu8_data_t * pdata = (_uxg_drawu8_data_t*)userdata;
if (pdata->fnt_prev != fnt_current) {
u8g_SetFont(pdata->pu8g, (const u8g_fntpgm_uint8_t*)fnt_current);
pdata->fnt_prev = fnt_current;
}
pdata->adv += u8g_GetStrPixelWidth(pdata->pu8g, (char*)msg);
return 0;
}
/**
* @brief Get the screen pixel width of a UTF-8 string
*
* @param pu8g : U8G pointer
* @param utf8_msg : the UTF-8 string
*
* @return the pixel width
*
* Get the screen pixel width of a UTF-8 string
*/
int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg) {
struct _uxg_drawu8_data_t data;
font_group_t *group = &g_fontgroup_root;
const font_t *fnt_default = uxg_GetFont(pu8g);
if (!uxg_Utf8FontIsInited()) return -1;
memset(&data, 0, sizeof(data));
data.pu8g = pu8g;
data.adv = 0;
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_ram, (void*)&data, fontgroup_cb_draw_u8gstrlen);
u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
return data.adv;
}
/**
* @brief Get the screen pixel width of a ROM UTF-8 string
*
* @param pu8g : U8G pointer
* @param utf8_msg : the UTF-8 string
*
* @return the pixel width
*
* Get the screen pixel width of a ROM UTF-8 string
*/
int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg) {
struct _uxg_drawu8_data_t data;
font_group_t *group = &g_fontgroup_root;
const font_t *fnt_default = uxg_GetFont(pu8g);
if (!uxg_Utf8FontIsInited()) return -1;
memset(&data, 0, sizeof(data));
data.pu8g = pu8g;
data.adv = 0;
fontgroup_drawstring(group, fnt_default, utf8_msg, read_byte_rom, (void*)&data, fontgroup_cb_draw_u8gstrlen);
u8g_SetFont(pu8g, (const u8g_fntpgm_uint8_t*)fnt_default);
return data.adv;
}
#endif // HAS_MARLINUI_U8GLIB

View File

@@ -0,0 +1,37 @@
/**
* @file fontutf8.h
* @brief font api for u8g lib
* @author Yunhui Fu (yhfudev@gmail.com)
* @version 1.0
* @date 2015-02-19
* @copyright GPL/BSD
*/
#pragma once
#include <U8glib.h>
#include "../fontutils.h"
// the macro to indicate a UTF-8 string
// You should to save the C/C++ source in UTF-8 encoding!
// Once you change your UTF-8 strings, you need to call the script uxggenpages.sh to create the font data file fontutf8-data.h
#define _UxGT(a) a
typedef struct _uxg_fontinfo_t {
uint16_t page;
uint8_t begin;
uint8_t end;
uint16_t size;
const u8g_fntpgm_uint8_t *fntdata;
} uxg_fontinfo_t;
int uxg_SetUtf8Fonts(const uxg_fontinfo_t * fntinfo, int number); // fntinfo is type of PROGMEM
unsigned int uxg_DrawWchar(u8g_t *pu8g, unsigned int x, unsigned int y, wchar_t ch, pixel_len_t max_length);
unsigned int uxg_DrawUtf8Str(u8g_t *pu8g, unsigned int x, unsigned int y, const char *utf8_msg, pixel_len_t max_length);
unsigned int uxg_DrawUtf8StrP(u8g_t *pu8g, unsigned int x, unsigned int y, PGM_P utf8_msg, pixel_len_t max_length);
int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg);
int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg);
#define uxg_GetFont(puxg) ((puxg)->font)

View File

@@ -0,0 +1,200 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
// NOTE - the HAL version of the rrd device uses a generic ST7920 device. See the
// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
#include "../../inc/MarlinConfigPre.h"
#if !defined(U8G_HAL_LINKS) && ANY(__AVR__, ARDUINO_ARCH_STM32, ARDUINO_ARCH_ESP32)
#include "../../inc/MarlinConfig.h"
#if ENABLED(U8GLIB_ST7920)
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
#if F_CPU >= 20000000
#define CPU_ST7920_DELAY_1 DELAY_NS(150)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(150)
#elif MB(3DRAG, K8200, K8400)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(188)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO, SILVER_GATE)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(250)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(RAMBO)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(0)
#elif MB(BQ_ZUM_MEGA_3D)
#define CPU_ST7920_DELAY_1 DELAY_NS(0)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(189)
#elif defined(ARDUINO_ARCH_STM32)
#define CPU_ST7920_DELAY_1 DELAY_NS(300)
#define CPU_ST7920_DELAY_2 DELAY_NS(40)
#define CPU_ST7920_DELAY_3 DELAY_NS(340)
#elif F_CPU == 16000000
#define CPU_ST7920_DELAY_1 DELAY_NS(125)
#define CPU_ST7920_DELAY_2 DELAY_NS(0)
#define CPU_ST7920_DELAY_3 DELAY_NS(188)
#else
#error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd_AVR.h'"
#endif
#ifndef ST7920_DELAY_1
#ifdef BOARD_ST7920_DELAY_1
#define ST7920_DELAY_1 BOARD_ST7920_DELAY_1
#else
#define ST7920_DELAY_1 CPU_ST7920_DELAY_1
#endif
#endif
#ifndef ST7920_DELAY_2
#ifdef BOARD_ST7920_DELAY_2
#define ST7920_DELAY_2 BOARD_ST7920_DELAY_2
#else
#define ST7920_DELAY_2 CPU_ST7920_DELAY_2
#endif
#endif
#ifndef ST7920_DELAY_3
#ifdef BOARD_ST7920_DELAY_3
#define ST7920_DELAY_3 BOARD_ST7920_DELAY_3
#else
#define ST7920_DELAY_3 CPU_ST7920_DELAY_3
#endif
#endif
// Optimize this code with -O3
#pragma GCC optimize (3)
#ifdef ARDUINO_ARCH_STM32F1
#define ST7920_DAT(V) !!((V) & 0x80)
#else
#define ST7920_DAT(V) ((V) & 0x80)
#endif
#define ST7920_SND_BIT do{ \
WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \
WRITE(ST7920_DAT_PIN, ST7920_DAT(val)); ST7920_DELAY_2; \
WRITE(ST7920_CLK_PIN, HIGH); ST7920_DELAY_3; \
val <<= 1; }while(0)
// Optimize this code with -O3
#pragma GCC optimize (3)
void ST7920_SWSPI_SND_8BIT(uint8_t val) {
ST7920_SND_BIT; // 1
ST7920_SND_BIT; // 2
ST7920_SND_BIT; // 3
ST7920_SND_BIT; // 4
ST7920_SND_BIT; // 5
ST7920_SND_BIT; // 6
ST7920_SND_BIT; // 7
ST7920_SND_BIT; // 8
}
uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
uint8_t i, y;
switch (msg) {
case U8G_DEV_MSG_INIT: {
OUT_WRITE(ST7920_CS_PIN, LOW);
OUT_WRITE(ST7920_DAT_PIN, LOW);
OUT_WRITE(ST7920_CLK_PIN, HIGH);
ST7920_CS();
u8g_Delay(120); // Initial delay for boot up
ST7920_SET_CMD();
ST7920_WRITE_BYTE(0x20); // Non-extended mode
ST7920_WRITE_BYTE(0x08); // Display off, cursor+blink off
ST7920_WRITE_BYTE(0x01); // Clear DDRAM ram
u8g_Delay(15); // Delay for DDRAM clear
ST7920_WRITE_BYTE(0x24); // Extended mode
ST7920_WRITE_BYTE(0x26); // Extended mode + GDRAM active
for (y = 0; y < (LCD_PIXEL_HEIGHT) / 2; y++) { // Clear GDRAM
ST7920_WRITE_BYTE(0x80 | y); // Set y
ST7920_WRITE_BYTE(0x80); // Set x = 0
ST7920_SET_DAT();
for (i = 0; i < 2 * (LCD_PIXEL_WIDTH) / 8; i++) // 2x width clears both segments
ST7920_WRITE_BYTE(0);
ST7920_SET_CMD();
}
ST7920_WRITE_BYTE(0x0C); // Display on, cursor+blink off
ST7920_NCS();
}
break;
case U8G_DEV_MSG_STOP: break;
case U8G_DEV_MSG_PAGE_NEXT: {
uint8_t *ptr;
u8g_pb_t *pb = (u8g_pb_t*)(dev->dev_mem);
y = pb->p.page_y0;
ptr = (uint8_t*)pb->buf;
ST7920_CS();
for (i = 0; i < PAGE_HEIGHT; i ++) {
ST7920_SET_CMD();
if (y < 32) {
ST7920_WRITE_BYTE(0x80 | y); // y
ST7920_WRITE_BYTE(0x80); // x = 0
}
else {
ST7920_WRITE_BYTE(0x80 | (y - 32)); // y
ST7920_WRITE_BYTE(0x80 | 8); // x = 64
}
ST7920_SET_DAT();
ST7920_WRITE_BYTES(ptr, (LCD_PIXEL_WIDTH) / 8); // ptr incremented inside of macro!
y++;
}
ST7920_NCS();
}
break;
}
#if PAGE_HEIGHT == 8
return u8g_dev_pb8h1_base_fn(u8g, dev, msg, arg);
#elif PAGE_HEIGHT == 16
return u8g_dev_pb16h1_base_fn(u8g, dev, msg, arg);
#else
return u8g_dev_pb32h1_base_fn(u8g, dev, msg, arg);
#endif
}
uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U8G_NOCOMMON;
u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = { { PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0 }, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf };
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn };
#pragma GCC reset_options
#if ENABLED(LIGHTWEIGHT_UI)
#include "../../HAL/shared/HAL_ST7920.h"
void ST7920_cs() { ST7920_CS(); }
void ST7920_ncs() { ST7920_NCS(); }
void ST7920_set_cmd() { ST7920_SET_CMD(); }
void ST7920_set_dat() { ST7920_SET_DAT(); }
void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
#endif
#endif // U8GLIB_ST7920
#endif // !U8G_HAL_LINKS && (__AVR__ || ARDUINO_ARCH_STM32 || ARDUINO_ARCH_ESP32)

View File

@@ -0,0 +1,53 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
// NOTE - the HAL version of the rrd device uses a generic ST7920 device. See the
// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
#include "../../inc/MarlinConfig.h"
#include "../../HAL/shared/Delay.h"
#define ST7920_CLK_PIN LCD_PINS_D4
#define ST7920_DAT_PIN LCD_PINS_ENABLE
#define ST7920_CS_PIN LCD_PINS_RS
//#define PAGE_HEIGHT 8 // 128 byte framebuffer
#define PAGE_HEIGHT 16 // 256 byte framebuffer
//#define PAGE_HEIGHT 32 // 512 byte framebuffer
#include <U8glib.h>
void ST7920_SWSPI_SND_8BIT(uint8_t val);
#if DOGM_SPI_DELAY_US > 0
#define U8G_DELAY() DELAY_US(DOGM_SPI_DELAY_US)
#else
#define U8G_DELAY() DELAY_US(10)
#endif
#define ST7920_CS() { WRITE(ST7920_CS_PIN, HIGH); U8G_DELAY(); }
#define ST7920_NCS() { WRITE(ST7920_CS_PIN, LOW); }
#define ST7920_SET_CMD() { ST7920_SWSPI_SND_8BIT(0xF8); U8G_DELAY(); }
#define ST7920_SET_DAT() { ST7920_SWSPI_SND_8BIT(0xFA); U8G_DELAY(); }
#define ST7920_WRITE_BYTE(a) { ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xF0u)); ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4U)); U8G_DELAY(); }
#define ST7920_WRITE_BYTES(p,l) { for (uint8_t i = l + 1; --i;) { ST7920_SWSPI_SND_8BIT(*p&0xF0); ST7920_SWSPI_SND_8BIT(*p<<4); p++; } U8G_DELAY(); }

View File

@@ -0,0 +1,462 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/********************************************************************************
* @file dwin_lcd.cpp
* @author LEO / Creality3D
* @date 2019/07/18
* @version 2.0.1
* @brief DWIN screen control functions
********************************************************************************/
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(DWIN_CREALITY_LCD)
#include "../../inc/MarlinConfig.h"
#include "dwin_lcd.h"
#include <string.h> // for memset
//#define DEBUG_OUT 1
#include "../../core/debug_out.h"
// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail.
// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters.
uint8_t DWIN_SendBuf[11 + DWIN_WIDTH / 6 * 2] = { 0xAA };
uint8_t DWIN_BufTail[4] = { 0xCC, 0x33, 0xC3, 0x3C };
uint8_t databuf[26] = { 0 };
uint8_t receivedType;
int recnum = 0;
inline void DWIN_Byte(size_t &i, const uint16_t bval) {
DWIN_SendBuf[++i] = bval;
}
inline void DWIN_Word(size_t &i, const uint16_t wval) {
DWIN_SendBuf[++i] = wval >> 8;
DWIN_SendBuf[++i] = wval & 0xFF;
}
inline void DWIN_Long(size_t &i, const uint32_t lval) {
DWIN_SendBuf[++i] = (lval >> 24) & 0xFF;
DWIN_SendBuf[++i] = (lval >> 16) & 0xFF;
DWIN_SendBuf[++i] = (lval >> 8) & 0xFF;
DWIN_SendBuf[++i] = lval & 0xFF;
}
inline void DWIN_String(size_t &i, char * const string) {
const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, strlen(string));
memcpy(&DWIN_SendBuf[i+1], string, len);
i += len;
}
inline void DWIN_String(size_t &i, const __FlashStringHelper * string) {
if (!string) return;
const size_t len = strlen_P((PGM_P)string); // cast it to PGM_P, which is basically const char *, and measure it using the _P version of strlen.
if (len == 0) return;
memcpy(&DWIN_SendBuf[i+1], string, len);
i += len;
}
// Send the data in the buffer and the packet end
inline void DWIN_Send(size_t &i) {
++i;
LOOP_L_N(n, i) { LCD_SERIAL.write(DWIN_SendBuf[n]); delayMicroseconds(1); }
LOOP_L_N(n, 4) { LCD_SERIAL.write(DWIN_BufTail[n]); delayMicroseconds(1); }
}
/*-------------------------------------- System variable function --------------------------------------*/
// Handshake (1: Success, 0: Fail)
bool DWIN_Handshake(void) {
#ifndef LCD_BAUDRATE
#define LCD_BAUDRATE 115200
#endif
LCD_SERIAL.begin(LCD_BAUDRATE);
const millis_t serial_connect_timeout = millis() + 1000UL;
while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
size_t i = 0;
DWIN_Byte(i, 0x00);
DWIN_Send(i);
while (LCD_SERIAL.available() > 0 && recnum < (signed)sizeof(databuf)) {
databuf[recnum] = LCD_SERIAL.read();
// ignore the invalid data
if (databuf[0] != FHONE) { // prevent the program from running.
if (recnum > 0) {
recnum = 0;
ZERO(databuf);
}
continue;
}
delay(10);
recnum++;
}
return ( recnum >= 3
&& databuf[0] == FHONE
&& databuf[1] == '\0'
&& databuf[2] == 'O'
&& databuf[3] == 'K' );
}
// Set the backlight luminance
// luminance: (0x00-0xFF)
void DWIN_Backlight_SetLuminance(const uint8_t luminance) {
size_t i = 0;
DWIN_Byte(i, 0x30);
DWIN_Byte(i, _MAX(luminance, 0x1F));
DWIN_Send(i);
}
// Set screen display direction
// dir: 0=0°, 1=90°, 2=180°, 3=270°
void DWIN_Frame_SetDir(uint8_t dir) {
size_t i = 0;
DWIN_Byte(i, 0x34);
DWIN_Byte(i, 0x5A);
DWIN_Byte(i, 0xA5);
DWIN_Byte(i, dir);
DWIN_Send(i);
}
// Update display
void DWIN_UpdateLCD(void) {
size_t i = 0;
DWIN_Byte(i, 0x3D);
DWIN_Send(i);
}
/*---------------------------------------- Drawing functions ----------------------------------------*/
// Clear screen
// color: Clear screen color
void DWIN_Frame_Clear(const uint16_t color) {
size_t i = 0;
DWIN_Byte(i, 0x01);
DWIN_Word(i, color);
DWIN_Send(i);
}
// Draw a point
// width: point width 0x01-0x0F
// height: point height 0x01-0x0F
// x,y: upper left point
void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y) {
size_t i = 0;
DWIN_Byte(i, 0x02);
DWIN_Byte(i, width);
DWIN_Byte(i, height);
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_Send(i);
}
// Draw a line
// color: Line segment color
// xStart/yStart: Start point
// xEnd/yEnd: End point
void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) {
size_t i = 0;
DWIN_Byte(i, 0x03);
DWIN_Word(i, color);
DWIN_Word(i, xStart);
DWIN_Word(i, yStart);
DWIN_Word(i, xEnd);
DWIN_Word(i, yEnd);
DWIN_Send(i);
}
// Draw a rectangle
// mode: 0=frame, 1=fill, 2=XOR fill
// color: Rectangle color
// xStart/yStart: upper left point
// xEnd/yEnd: lower right point
void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color,
uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) {
size_t i = 0;
DWIN_Byte(i, 0x05);
DWIN_Byte(i, mode);
DWIN_Word(i, color);
DWIN_Word(i, xStart);
DWIN_Word(i, yStart);
DWIN_Word(i, xEnd);
DWIN_Word(i, yEnd);
DWIN_Send(i);
}
// Move a screen area
// mode: 0, circle shift; 1, translation
// dir: 0=left, 1=right, 2=up, 3=down
// dis: Distance
// color: Fill color
// xStart/yStart: upper left point
// xEnd/yEnd: bottom right point
void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) {
size_t i = 0;
DWIN_Byte(i, 0x09);
DWIN_Byte(i, (mode << 7) | dir);
DWIN_Word(i, dis);
DWIN_Word(i, color);
DWIN_Word(i, xStart);
DWIN_Word(i, yStart);
DWIN_Word(i, xEnd);
DWIN_Word(i, yEnd);
DWIN_Send(i);
}
/*---------------------------------------- Text related functions ----------------------------------------*/
// Draw a string
// widthAdjust: true=self-adjust character width; false=no adjustment
// bShow: true=display background color; false=don't display background color
// size: Font size
// color: Character color
// bColor: Background color
// x/y: Upper-left coordinate of the string
// *string: The string
void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size,
uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) {
size_t i = 0;
DWIN_Byte(i, 0x11);
// Bit 7: widthAdjust
// Bit 6: bShow
// Bit 5-4: Unused (0)
// Bit 3-0: size
DWIN_Byte(i, (widthAdjust * 0x80) | (bShow * 0x40) | size);
DWIN_Word(i, color);
DWIN_Word(i, bColor);
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_String(i, string);
DWIN_Send(i);
}
// Draw a positive integer
// bShow: true=display background color; false=don't display background color
// zeroFill: true=zero fill; false=no zero fill
// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space
// size: Font size
// color: Character color
// bColor: Background color
// iNum: Number of digits
// x/y: Upper-left coordinate
// value: Integer value
void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) {
size_t i = 0;
DWIN_Byte(i, 0x14);
// Bit 7: bshow
// Bit 6: 1 = signed; 0 = unsigned number;
// Bit 5: zeroFill
// Bit 4: zeroMode
// Bit 3-0: size
DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size);
DWIN_Word(i, color);
DWIN_Word(i, bColor);
DWIN_Byte(i, iNum);
DWIN_Byte(i, 0); // fNum
DWIN_Word(i, x);
DWIN_Word(i, y);
#if 0
for (char count = 0; count < 8; count++) {
DWIN_Byte(i, value);
value >>= 8;
if (!(value & 0xFF)) break;
}
#else
// Write a big-endian 64 bit integer
const size_t p = i + 1;
for (char count = 8; count--;) { // 7..0
++i;
DWIN_SendBuf[p + count] = value;
value >>= 8;
}
#endif
DWIN_Send(i);
}
// Draw a floating point number
// bShow: true=display background color; false=don't display background color
// zeroFill: true=zero fill; false=no zero fill
// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space
// size: Font size
// color: Character color
// bColor: Background color
// iNum: Number of whole digits
// fNum: Number of decimal digits
// x/y: Upper-left point
// value: Float value
void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) {
//uint8_t *fvalue = (uint8_t*)&value;
size_t i = 0;
DWIN_Byte(i, 0x14);
DWIN_Byte(i, (bShow * 0x80) | (zeroFill * 0x20) | (zeroMode * 0x10) | size);
DWIN_Word(i, color);
DWIN_Word(i, bColor);
DWIN_Byte(i, iNum);
DWIN_Byte(i, fNum);
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_Long(i, value);
/*
DWIN_Byte(i, fvalue[3]);
DWIN_Byte(i, fvalue[2]);
DWIN_Byte(i, fvalue[1]);
DWIN_Byte(i, fvalue[0]);
*/
DWIN_Send(i);
}
/*---------------------------------------- Picture related functions ----------------------------------------*/
// Draw JPG and cached in #0 virtual display area
// id: Picture ID
void DWIN_JPG_ShowAndCache(const uint8_t id) {
size_t i = 0;
DWIN_Word(i, 0x2200);
DWIN_Byte(i, id);
DWIN_Send(i); // AA 23 00 00 00 00 08 00 01 02 03 CC 33 C3 3C
}
// Draw an Icon
// libID: Icon library ID
// picID: Icon ID
// x/y: Upper-left point
void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) {
NOMORE(x, DWIN_WIDTH - 1);
NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl
size_t i = 0;
DWIN_Byte(i, 0x23);
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_Byte(i, 0x80 | libID);
DWIN_Byte(i, picID);
DWIN_Send(i);
}
// Unzip the JPG picture to a virtual display area
// n: Cache index
// id: Picture ID
void DWIN_JPG_CacheToN(uint8_t n, uint8_t id) {
size_t i = 0;
DWIN_Byte(i, 0x25);
DWIN_Byte(i, n);
DWIN_Byte(i, id);
DWIN_Send(i);
}
// Copy area from virtual display area to current screen
// cacheID: virtual area number
// xStart/yStart: Upper-left of virtual area
// xEnd/yEnd: Lower-right of virtual area
// x/y: Screen paste point
void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart,
uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) {
size_t i = 0;
DWIN_Byte(i, 0x27);
DWIN_Byte(i, 0x80 | cacheID);
DWIN_Word(i, xStart);
DWIN_Word(i, yStart);
DWIN_Word(i, xEnd);
DWIN_Word(i, yEnd);
DWIN_Word(i, x);
DWIN_Word(i, y);
DWIN_Send(i);
}
// Animate a series of icons
// animID: Animation ID; 0x00-0x0F
// animate: true on; false off;
// libID: Icon library ID
// picIDs: Icon starting ID
// picIDe: Icon ending ID
// x/y: Upper-left point
// interval: Display time interval, unit 10mS
void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval) {
NOMORE(x, DWIN_WIDTH - 1);
NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl
size_t i = 0;
DWIN_Byte(i, 0x28);
DWIN_Word(i, x);
DWIN_Word(i, y);
// Bit 7: animation on or off
// Bit 6: start from begin or end
// Bit 5-4: unused (0)
// Bit 3-0: animID
DWIN_Byte(i, (animate * 0x80) | 0x40 | animID);
DWIN_Byte(i, libID);
DWIN_Byte(i, picIDs);
DWIN_Byte(i, picIDe);
DWIN_Byte(i, interval);
DWIN_Send(i);
}
// Animation Control
// state: 16 bits, each bit is the state of an animation id
void DWIN_ICON_AnimationControl(uint16_t state) {
size_t i = 0;
DWIN_Byte(i, 0x28);
DWIN_Word(i, state);
DWIN_Send(i);
}
/*---------------------------------------- Memory functions ----------------------------------------*/
// The LCD has an additional 32KB SRAM and 16KB Flash
// Data can be written to the sram and save to one of the jpeg page files
// Write Data Memory
// command 0x31
// Type: Write memory selection; 0x5A=SRAM; 0xA5=Flash
// Address: Write data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash
// Data: data
//
// Flash writing returns 0xA5 0x4F 0x4B
// Read Data Memory
// command 0x32
// Type: Read memory selection; 0x5A=SRAM; 0xA5=Flash
// Address: Read data memory address; 0x000-0x7FFF for SRAM; 0x000-0x3FFF for Flash
// Length: leangth of data to read; 0x01-0xF0
//
// Response:
// Type, Address, Length, Data
// Write Picture Memory
// Write the contents of the 32KB SRAM data memory into the designated image memory space
// Issued: 0x5A, 0xA5, PIC_ID
// Response: 0xA5 0x4F 0x4B
//
// command 0x33
// 0x5A, 0xA5
// PicId: Picture Memory location, 0x00-0x0F
//
// Flash writing returns 0xA5 0x4F 0x4B
#endif // DWIN_CREALITY_LCD

View File

@@ -0,0 +1,213 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/********************************************************************************
* @file dwin_lcd.h
* @author LEO / Creality3D
* @date 2019/07/18
* @version 2.0.1
* @brief 迪文屏控制操作函数
********************************************************************************/
#include <stdint.h>
#define RECEIVED_NO_DATA 0x00
#define RECEIVED_SHAKE_HAND_ACK 0x01
#define FHONE 0xAA
#define DWIN_SCROLL_UP 2
#define DWIN_SCROLL_DOWN 3
#define DWIN_WIDTH 272
#define DWIN_HEIGHT 480
/*-------------------------------------- System variable function --------------------------------------*/
// Handshake (1: Success, 0: Fail)
bool DWIN_Handshake(void);
// Common DWIN startup
void DWIN_Startup(void);
// Set the backlight luminance
// luminance: (0x00-0xFF)
void DWIN_Backlight_SetLuminance(const uint8_t luminance);
// Set screen display direction
// dir: 0=0°, 1=90°, 2=180°, 3=270°
void DWIN_Frame_SetDir(uint8_t dir);
// Update display
void DWIN_UpdateLCD(void);
/*---------------------------------------- Drawing functions ----------------------------------------*/
// Clear screen
// color: Clear screen color
void DWIN_Frame_Clear(const uint16_t color);
// Draw a point
// width: point width 0x01-0x0F
// height: point height 0x01-0x0F
// x,y: upper left point
void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y);
// Draw a line
// color: Line segment color
// xStart/yStart: Start point
// xEnd/yEnd: End point
void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd);
// Draw a Horizontal line
// color: Line segment color
// xStart/yStart: Start point
// xLength: Line Length
inline void DWIN_Draw_HLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xLength) {
DWIN_Draw_Line(color, xStart, yStart, xStart + xLength - 1, yStart);
}
// Draw a Vertical line
// color: Line segment color
// xStart/yStart: Start point
// yLength: Line Length
inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t yLength) {
DWIN_Draw_Line(color, xStart, yStart, xStart, yStart + yLength - 1);
}
// Draw a rectangle
// mode: 0=frame, 1=fill, 2=XOR fill
// color: Rectangle color
// xStart/yStart: upper left point
// xEnd/yEnd: lower right point
void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color,
uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd);
// Draw a box
// mode: 0=frame, 1=fill, 2=XOR fill
// color: Rectangle color
// xStart/yStart: upper left point
// xSize/ySize: box size
inline void DWIN_Draw_Box(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xSize, uint16_t ySize) {
DWIN_Draw_Rectangle(mode, color, xStart, yStart, xStart + xSize - 1, yStart + ySize - 1);
}
// Move a screen area
// mode: 0, circle shift; 1, translation
// dir: 0=left, 1=right, 2=up, 3=down
// dis: Distance
// color: Fill color
// xStart/yStart: upper left point
// xEnd/yEnd: bottom right point
void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis,
uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd);
/*---------------------------------------- Text related functions ----------------------------------------*/
// Draw a string
// widthAdjust: true=self-adjust character width; false=no adjustment
// bShow: true=display background color; false=don't display background color
// size: Font size
// color: Character color
// bColor: Background color
// x/y: Upper-left coordinate of the string
// *string: The string
void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size,
uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string);
class __FlashStringHelper;
inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) {
DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, (char *)title);
}
// Draw a positive integer
// bShow: true=display background color; false=don't display background color
// zeroFill: true=zero fill; false=no zero fill
// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space
// size: Font size
// color: Character color
// bColor: Background color
// iNum: Number of digits
// x/y: Upper-left coordinate
// value: Integer value
void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value);
// Draw a floating point number
// bShow: true=display background color; false=don't display background color
// zeroFill: true=zero fill; false=no zero fill
// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space
// size: Font size
// color: Character color
// bColor: Background color
// iNum: Number of whole digits
// fNum: Number of decimal digits
// x/y: Upper-left point
// value: Float value
void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color,
uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value);
/*---------------------------------------- Picture related functions ----------------------------------------*/
// Draw JPG and cached in #0 virtual display area
// id: Picture ID
void DWIN_JPG_ShowAndCache(const uint8_t id);
// Draw an Icon
// libID: Icon library ID
// picID: Icon ID
// x/y: Upper-left point
void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y);
// Unzip the JPG picture to a virtual display area
// n: Cache index
// id: Picture ID
void DWIN_JPG_CacheToN(uint8_t n, uint8_t id);
// Unzip the JPG picture to virtual display area #1
// id: Picture ID
inline void DWIN_JPG_CacheTo1(uint8_t id) { DWIN_JPG_CacheToN(1, id); }
// Copy area from virtual display area to current screen
// cacheID: virtual area number
// xStart/yStart: Upper-left of virtual area
// xEnd/yEnd: Lower-right of virtual area
// x/y: Screen paste point
void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart,
uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y);
// Animate a series of icons
// animID: Animation ID up to 16
// animate: animation on or off
// libID: Icon library ID
// picIDs: Icon starting ID
// picIDe: Icon ending ID
// x/y: Upper-left point
// interval: Display time interval, unit 10mS
void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs,
uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval);
// Animation Control
// state: 16 bits, each bit is the state of an animation id
void DWIN_ICON_AnimationControl(uint16_t state);

View File

@@ -0,0 +1,7 @@
# DWIN for Creality Ender 3 v2
Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x/config/examples/Creality/Ender-3%20V2).
## Easy Install
Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,412 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* DWIN by Creality3D
*/
#include "../dwin_lcd.h"
#include "rotary_encoder.h"
#include "../../../libs/BL24CXX.h"
#include "../../../inc/MarlinConfigPre.h"
#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT
#define HAS_PREHEAT 1
#if PREHEAT_COUNT < 2
#error "Creality DWIN requires two material preheat presets."
#endif
#endif
enum processID : uint8_t {
// Process ID
MainMenu,
SelectFile,
Prepare,
Control,
Leveling,
PrintProcess,
AxisMove,
TemperatureID,
Motion,
Info,
Tune,
#if HAS_PREHEAT
PLAPreheat,
ABSPreheat,
#endif
MaxSpeed,
MaxSpeed_value,
MaxAcceleration,
MaxAcceleration_value,
MaxJerk,
MaxJerk_value,
Step,
Step_value,
HomeOff,
HomeOffX,
HomeOffY,
HomeOffZ,
// Last Process ID
Last_Prepare,
// Advance Settings
AdvSet,
ProbeOff,
ProbeOffX,
ProbeOffY,
// Back Process ID
Back_Main,
Back_Print,
// Date variable ID
Move_X,
Move_Y,
Move_Z,
#if HAS_HOTEND
Extruder,
ETemp,
#endif
Homeoffset,
#if HAS_HEATED_BED
BedTemp,
#endif
#if HAS_FAN
FanSpeed,
#endif
PrintSpeed,
// Window ID
Print_window,
Popup_Window
};
// Picture ID
#define Start_Process 0
#define Language_English 1
#define Language_Chinese 2
// ICON ID
#define ICON 0x09
#define ICON_LOGO 0
#define ICON_Print_0 1
#define ICON_Print_1 2
#define ICON_Prepare_0 3
#define ICON_Prepare_1 4
#define ICON_Control_0 5
#define ICON_Control_1 6
#define ICON_Leveling_0 7
#define ICON_Leveling_1 8
#define ICON_HotendTemp 9
#define ICON_BedTemp 10
#define ICON_Speed 11
#define ICON_Zoffset 12
#define ICON_Back 13
#define ICON_File 14
#define ICON_PrintTime 15
#define ICON_RemainTime 16
#define ICON_Setup_0 17
#define ICON_Setup_1 18
#define ICON_Pause_0 19
#define ICON_Pause_1 20
#define ICON_Continue_0 21
#define ICON_Continue_1 22
#define ICON_Stop_0 23
#define ICON_Stop_1 24
#define ICON_Bar 25
#define ICON_More 26
#define ICON_Axis 27
#define ICON_CloseMotor 28
#define ICON_Homing 29
#define ICON_SetHome 30
#define ICON_PLAPreheat 31
#define ICON_ABSPreheat 32
#define ICON_Cool 33
#define ICON_Language 34
#define ICON_MoveX 35
#define ICON_MoveY 36
#define ICON_MoveZ 37
#define ICON_Extruder 38
#define ICON_Temperature 40
#define ICON_Motion 41
#define ICON_WriteEEPROM 42
#define ICON_ReadEEPROM 43
#define ICON_ResumeEEPROM 44
#define ICON_Info 45
#define ICON_SetEndTemp 46
#define ICON_SetBedTemp 47
#define ICON_FanSpeed 48
#define ICON_SetPLAPreheat 49
#define ICON_SetABSPreheat 50
#define ICON_MaxSpeed 51
#define ICON_MaxAccelerated 52
#define ICON_MaxJerk 53
#define ICON_Step 54
#define ICON_PrintSize 55
#define ICON_Version 56
#define ICON_Contact 57
#define ICON_StockConfiguraton 58
#define ICON_MaxSpeedX 59
#define ICON_MaxSpeedY 60
#define ICON_MaxSpeedZ 61
#define ICON_MaxSpeedE 62
#define ICON_MaxAccX 63
#define ICON_MaxAccY 64
#define ICON_MaxAccZ 65
#define ICON_MaxAccE 66
#define ICON_MaxSpeedJerkX 67
#define ICON_MaxSpeedJerkY 68
#define ICON_MaxSpeedJerkZ 69
#define ICON_MaxSpeedJerkE 70
#define ICON_StepX 71
#define ICON_StepY 72
#define ICON_StepZ 73
#define ICON_StepE 74
#define ICON_Setspeed 75
#define ICON_SetZOffset 76
#define ICON_Rectangle 77
#define ICON_BLTouch 78
#define ICON_TempTooLow 79
#define ICON_AutoLeveling 80
#define ICON_TempTooHigh 81
#define ICON_NoTips_C 82
#define ICON_NoTips_E 83
#define ICON_Continue_C 84
#define ICON_Continue_E 85
#define ICON_Cancel_C 86
#define ICON_Cancel_E 87
#define ICON_Confirm_C 88
#define ICON_Confirm_E 89
#define ICON_Info_0 90
#define ICON_Info_1 91
#define ICON_AdvSet ICON_Language
#define ICON_HomeOff ICON_AdvSet
#define ICON_HomeOffX ICON_StepX
#define ICON_HomeOffY ICON_StepY
#define ICON_HomeOffZ ICON_StepZ
#define ICON_ProbeOff ICON_AdvSet
#define ICON_ProbeOffX ICON_StepX
#define ICON_ProbeOffY ICON_StepY
#define ICON_PIDNozzle ICON_SetEndTemp
#define ICON_PIDbed ICON_SetBedTemp
/**
* 3-.0The font size, 0x00-0x09, corresponds to the font size below:
* 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28
* 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64
*/
#define font6x12 0x00
#define font8x16 0x01
#define font10x20 0x02
#define font12x24 0x03
#define font14x28 0x04
#define font16x32 0x05
#define font20x40 0x06
#define font24x48 0x07
#define font28x56 0x08
#define font32x64 0x09
// Color
#define Color_White 0xFFFF
#define Color_Yellow 0xFF0F
#define Color_Bg_Window 0x31E8 // Popup background color
#define Color_Bg_Blue 0x1125 // Dark blue background color
#define Color_Bg_Black 0x0841 // Black background color
#define Color_Bg_Red 0xF00F // Red background color
#define Popup_Text_Color 0xD6BA // Popup font background color
#define Line_Color 0x3A6A // Split line color
#define Rectangle_Color 0xEE2F // Blue square cursor color
#define Percent_Color 0xFE29 // Percentage color
#define BarFill_Color 0x10E4 // Fill color of progress bar
#define Select_Color 0x33BB // Selected color
extern uint8_t checkkey;
extern float zprobe_zoffset;
extern char print_filename[16];
extern millis_t dwin_heat_time;
typedef struct {
#if ENABLED(HAS_HOTEND)
celsius_t E_Temp = 0;
#endif
#if ENABLED(HAS_HEATED_BED)
celsius_t Bed_Temp = 0;
#endif
#if ENABLED(HAS_FAN)
int16_t Fan_speed = 0;
#endif
int16_t print_speed = 100;
float Max_Feedspeed = 0;
float Max_Acceleration = 0;
float Max_Jerk_scaled = 0;
float Max_Step_scaled = 0;
float Move_X_scaled = 0;
float Move_Y_scaled = 0;
float Move_Z_scaled = 0;
#if HAS_HOTEND
float Move_E_scaled = 0;
#endif
float offset_value = 0;
int8_t show_mode = 0; // -1: Temperature control 0: Printing temperature
float Home_OffX_scaled = 0;
float Home_OffY_scaled = 0;
float Home_OffZ_scaled = 0;
float Probe_OffX_scaled = 0;
float Probe_OffY_scaled = 0;
} HMI_value_t;
#define DWIN_CHINESE 123
#define DWIN_ENGLISH 0
typedef struct {
uint8_t language;
bool pause_flag:1;
bool pause_action:1;
bool print_finish:1;
bool done_confirm_flag:1;
bool select_flag:1;
bool home_flag:1;
bool heat_flag:1; // 0: heating done 1: during heating
#if ENABLED(PREVENT_COLD_EXTRUSION)
bool ETempTooLow_flag:1;
#endif
#if HAS_LEVELING
bool leveling_offset_flag:1;
#endif
AxisEnum feedspeed_axis, acc_axis, jerk_axis, step_axis;
} HMI_Flag_t;
extern HMI_value_t HMI_ValueStruct;
extern HMI_Flag_t HMI_flag;
// Show ICO
void ICON_Print(bool show);
void ICON_Prepare(bool show);
void ICON_Control(bool show);
void ICON_Leveling(bool show);
void ICON_StartInfo(bool show);
void ICON_Setting(bool show);
void ICON_Pause(bool show);
void ICON_Continue(bool show);
void ICON_Stop(bool show);
#if HAS_HOTEND || HAS_HEATED_BED
// Popup message window
void DWIN_Popup_Temperature(const bool toohigh);
#endif
#if HAS_HOTEND
void Popup_Window_ETempTooLow();
#endif
void Popup_Window_Resume();
void Popup_Window_Home(const bool parking=false);
void Popup_Window_Leveling();
void Goto_PrintProcess();
void Goto_MainMenu();
// Variable control
void HMI_Move_X();
void HMI_Move_Y();
void HMI_Move_Z();
void HMI_Move_E();
void HMI_Zoffset();
#if ENABLED(HAS_HOTEND)
void HMI_ETemp();
#endif
#if ENABLED(HAS_HEATED_BED)
void HMI_BedTemp();
#endif
#if ENABLED(HAS_FAN)
void HMI_FanSpeed();
#endif
void HMI_PrintSpeed();
void HMI_MaxFeedspeedXYZE();
void HMI_MaxAccelerationXYZE();
void HMI_MaxJerkXYZE();
void HMI_StepXYZE();
void update_variable();
void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value);
// SD Card
void HMI_SDCardInit();
void HMI_SDCardUpdate();
// Main Process
void Icon_print(bool value);
void Icon_control(bool value);
void Icon_temperature(bool value);
void Icon_leveling(bool value);
// Other
void Draw_Status_Area(const bool with_update); // Status Area
void HMI_StartFrame(const bool with_update); // Prepare the menu view
void HMI_MainMenu(); // Main process screen
void HMI_SelectFile(); // File page
void HMI_Printing(); // Print page
void HMI_Prepare(); // Prepare page
void HMI_Control(); // Control page
void HMI_Leveling(); // Level the page
void HMI_AxisMove(); // Axis movement menu
void HMI_Temperature(); // Temperature menu
void HMI_Motion(); // Sports menu
void HMI_Info(); // Information menu
void HMI_Tune(); // Adjust the menu
#if HAS_PREHEAT
void HMI_PLAPreheatSetting(); // PLA warm-up setting
void HMI_ABSPreheatSetting(); // ABS warm-up setting
#endif
void HMI_MaxSpeed(); // Maximum speed submenu
void HMI_MaxAcceleration(); // Maximum acceleration submenu
void HMI_MaxJerk(); // Maximum jerk speed submenu
void HMI_Step(); // Transmission ratio
void HMI_Init();
void DWIN_Update();
void EachMomentUpdate();
void DWIN_HandleScreen();
void DWIN_StatusChanged(const char *text);
void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/);
inline void DWIN_StartHoming() { HMI_flag.home_flag = true; }
void DWIN_CompletedHoming();
void DWIN_CompletedLeveling();

View File

@@ -0,0 +1,256 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/*****************************************************************************
* @file rotary_encoder.cpp
* @author LEO / Creality3D
* @date 2019/07/06
* @version 2.0.1
* @brief Rotary encoder functions
*****************************************************************************/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(DWIN_CREALITY_LCD)
#include "rotary_encoder.h"
#include "../../buttons.h"
#include "../../../MarlinCore.h"
#include "../../../HAL/shared/Delay.h"
#if HAS_BUZZER
#include "../../../libs/buzzer.h"
#endif
#include <stdlib.h>
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#endif
ENCODER_Rate EncoderRate;
// Buzzer
void Encoder_tick() {
#if PIN_EXISTS(BEEPER)
WRITE(BEEPER_PIN, HIGH);
delay(10);
WRITE(BEEPER_PIN, LOW);
#endif
}
// Encoder initialization
void Encoder_Configuration() {
#if BUTTON_EXISTS(EN1)
SET_INPUT_PULLUP(BTN_EN1);
#endif
#if BUTTON_EXISTS(EN2)
SET_INPUT_PULLUP(BTN_EN2);
#endif
#if BUTTON_EXISTS(ENC)
SET_INPUT_PULLUP(BTN_ENC);
#endif
#if PIN_EXISTS(BEEPER)
SET_OUTPUT(BEEPER_PIN);
#endif
}
// Analyze encoder value and return state
ENCODER_DiffState Encoder_ReceiveAnalyze() {
const millis_t now = millis();
static uint8_t lastEncoderBits;
uint8_t newbutton = 0;
static signed char temp_diff = 0;
ENCODER_DiffState temp_diffState = ENCODER_DIFF_NO;
if (BUTTON_PRESSED(EN1)) newbutton |= EN_A;
if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
if (BUTTON_PRESSED(ENC)) {
static millis_t next_click_update_ms;
if (ELAPSED(now, next_click_update_ms)) {
next_click_update_ms = millis() + 300;
Encoder_tick();
#if PIN_EXISTS(LCD_LED)
//LED_Action();
#endif
const bool was_waiting = wait_for_user;
wait_for_user = false;
return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER;
}
else return ENCODER_DIFF_NO;
}
if (newbutton != lastEncoderBits) {
switch (newbutton) {
case ENCODER_PHASE_0:
if (lastEncoderBits == ENCODER_PHASE_3) temp_diff++;
else if (lastEncoderBits == ENCODER_PHASE_1) temp_diff--;
break;
case ENCODER_PHASE_1:
if (lastEncoderBits == ENCODER_PHASE_0) temp_diff++;
else if (lastEncoderBits == ENCODER_PHASE_2) temp_diff--;
break;
case ENCODER_PHASE_2:
if (lastEncoderBits == ENCODER_PHASE_1) temp_diff++;
else if (lastEncoderBits == ENCODER_PHASE_3) temp_diff--;
break;
case ENCODER_PHASE_3:
if (lastEncoderBits == ENCODER_PHASE_2) temp_diff++;
else if (lastEncoderBits == ENCODER_PHASE_0) temp_diff--;
break;
}
lastEncoderBits = newbutton;
}
if (abs(temp_diff) >= ENCODER_PULSES_PER_STEP) {
if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW;
else temp_diffState = ENCODER_DIFF_CCW;
#if ENABLED(ENCODER_RATE_MULTIPLIER)
millis_t ms = millis();
int32_t encoderMultiplier = 1;
// if must encoder rati multiplier
if (EncoderRate.enabled) {
const float abs_diff = ABS(temp_diff),
encoderMovementSteps = abs_diff / (ENCODER_PULSES_PER_STEP);
if (EncoderRate.lastEncoderTime) {
// Note that the rate is always calculated between two passes through the
// loop and that the abs of the temp_diff value is tracked.
const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000;
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5;
}
EncoderRate.lastEncoderTime = ms;
}
#else
constexpr int32_t encoderMultiplier = 1;
#endif
// EncoderRate.encoderMoveValue += (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP);
EncoderRate.encoderMoveValue = (temp_diff * encoderMultiplier) / (ENCODER_PULSES_PER_STEP);
if (EncoderRate.encoderMoveValue < 0) EncoderRate.encoderMoveValue = -EncoderRate.encoderMoveValue;
temp_diff = 0;
}
return temp_diffState;
}
#if PIN_EXISTS(LCD_LED)
// Take the low 24 valid bits 24Bit: G7 G6 G5 G4 G3 G2 G1 G0 R7 R6 R5 R4 R3 R2 R1 R0 B7 B6 B5 B4 B3 B2 B1 B0
uint16_t LED_DataArray[LED_NUM];
// LED light operation
void LED_Action() {
LED_Control(RGB_SCALE_WARM_WHITE,0x0F);
delay(30);
LED_Control(RGB_SCALE_WARM_WHITE,0x00);
}
// LED initialization
void LED_Configuration() {
SET_OUTPUT(LCD_LED_PIN);
}
// LED write data
void LED_WriteData() {
uint8_t tempCounter_LED, tempCounter_Bit;
for (tempCounter_LED = 0; tempCounter_LED < LED_NUM; tempCounter_LED++) {
for (tempCounter_Bit = 0; tempCounter_Bit < 24; tempCounter_Bit++) {
if (LED_DataArray[tempCounter_LED] & (0x800000 >> tempCounter_Bit)) {
LED_DATA_HIGH;
DELAY_NS(300);
LED_DATA_LOW;
DELAY_NS(200);
}
else {
LED_DATA_HIGH;
LED_DATA_LOW;
DELAY_NS(200);
}
}
}
}
// LED control
// RGB_Scale: RGB color ratio
// luminance: brightness (0~0xFF)
void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance) {
for (uint8_t i = 0; i < LED_NUM; i++) {
LED_DataArray[i] = 0;
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 5/10; break;
case RGB_SCALE_R10_G7_B4: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 7/10) << 16 | luminance * 4/10; break;
case RGB_SCALE_R10_G8_B7: LED_DataArray[i] = (luminance * 10/10) << 8 | (luminance * 8/10) << 16 | luminance * 7/10; break;
}
}
LED_WriteData();
}
// LED gradient control
// RGB_Scale: RGB color ratio
// luminance: brightness (0~0xFF)
// change_Time: gradient time (ms)
void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval) {
struct { uint8_t g, r, b; } led_data[LED_NUM];
for (uint8_t i = 0; i < LED_NUM; i++) {
switch (RGB_Scale) {
case RGB_SCALE_R10_G7_B5:
led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 5/10 };
break;
case RGB_SCALE_R10_G7_B4:
led_data[i] = { luminance * 7/10, luminance * 10/10, luminance * 4/10 };
break;
case RGB_SCALE_R10_G8_B7:
led_data[i] = { luminance * 8/10, luminance * 10/10, luminance * 7/10 };
break;
}
}
struct { bool g, r, b; } led_flag = { false, false, false };
for (uint8_t i = 0; i < LED_NUM; i++) {
while (1) {
const uint8_t g = uint8_t(LED_DataArray[i] >> 16),
r = uint8_t(LED_DataArray[i] >> 8),
b = uint8_t(LED_DataArray[i]);
if (g == led_data[i].g) led_flag.g = true;
else LED_DataArray[i] += (g > led_data[i].g) ? -0x010000 : 0x010000;
if (r == led_data[i].r) led_flag.r = true;
else LED_DataArray[i] += (r > led_data[i].r) ? -0x000100 : 0x000100;
if (b == led_data[i].b) led_flag.b = true;
else LED_DataArray[i] += (b > led_data[i].b) ? -0x000001 : 0x000001;
LED_WriteData();
if (led_flag.r && led_flag.g && led_flag.b) break;
delay(change_Interval);
}
}
}
#endif // LCD_LED
#endif // DWIN_CREALITY_LCD

View File

@@ -0,0 +1,94 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/*****************************************************************************
* @file rotary_encoder.h
* @author LEO / Creality3D
* @date 2019/07/06
* @version 2.0.1
* @brief Rotary encoder functions
****************************************************************************/
#include "../../../inc/MarlinConfig.h"
/*********************** Encoder Set ***********************/
typedef struct {
bool enabled = false;
int encoderMoveValue = 0;
millis_t lastEncoderTime = 0;
} ENCODER_Rate;
extern ENCODER_Rate EncoderRate;
typedef enum {
ENCODER_DIFF_NO = 0, // no state
ENCODER_DIFF_CW = 1, // clockwise rotation
ENCODER_DIFF_CCW = 2, // counterclockwise rotation
ENCODER_DIFF_ENTER = 3 // click
} ENCODER_DiffState;
// Encoder initialization
void Encoder_Configuration();
// Analyze encoder value and return state
ENCODER_DiffState Encoder_ReceiveAnalyze();
/*********************** Encoder LED ***********************/
#if PIN_EXISTS(LCD_LED)
#define LED_NUM 4
#define LED_DATA_HIGH WRITE(LCD_LED_PIN, 1)
#define LED_DATA_LOW WRITE(LCD_LED_PIN, 0)
#define RGB_SCALE_R10_G7_B5 1
#define RGB_SCALE_R10_G7_B4 2
#define RGB_SCALE_R10_G8_B7 3
#define RGB_SCALE_NEUTRAL_WHITE RGB_SCALE_R10_G7_B5
#define RGB_SCALE_WARM_WHITE RGB_SCALE_R10_G7_B4
#define RGB_SCALE_COOL_WHITE RGB_SCALE_R10_G8_B7
extern unsigned int LED_DataArray[LED_NUM];
// LED light operation
void LED_Action();
// LED initialization
void LED_Configuration();
// LED write data
void LED_WriteData();
// LED control
// RGB_Scale: RGB color ratio
// luminance: brightness (0~0xFF)
void LED_Control(const uint8_t RGB_Scale, const uint8_t luminance);
// LED gradient control
// RGB_Scale: RGB color ratio
// luminance: brightness (0~0xFF)
// change_Time: gradient time (ms)
void LED_GraduallyControl(const uint8_t RGB_Scale, const uint8_t luminance, const uint16_t change_Interval);
#endif // LCD_LED

View File

@@ -0,0 +1,258 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_chiron/FileNavigator.cpp
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*
* The AC panel wants files in block of 4 and can only display a flat list
* This library allows full folder traversal or flat file display and supports both standerd and new style panels.
*
* ## Old Style TFT panel
* Supported chars {}[]-+=_"$%^&*()~<>|
* Max display length 22 chars
* Max path len 29 chars
* (DOS 8.3 filepath max 29chars)
* (long filepath Max 22)
*
* ## New TFT Panel Format file display format
* Supported chars {}[]-+=_!"$%^&*()~<>\|
* Max display length 26 chars
* Max path len 29 chars
* (DOS 8.3 filepath must end '.GCO')
* (long filepath must end '.gcode')
*
*/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(ANYCUBIC_LCD_CHIRON)
#include "FileNavigator.h"
#include "chiron_tft.h"
using namespace ExtUI;
#define DEBUG_OUT ACDEBUG(AC_FILE)
#include "../../../core/debug_out.h"
namespace Anycubic {
FileNavigator filenavigator;
FileList FileNavigator::filelist; // Instance of the Marlin file API
uint16_t FileNavigator::lastpanelindex;
uint16_t FileNavigator::currentindex; // override the panel request
uint8_t FileNavigator::currentfolderdepth;
uint16_t FileNavigator::currentfolderindex[MAX_FOLDER_DEPTH]; // track folder pos for iteration
char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folder path
FileNavigator::FileNavigator() { reset(); }
void FileNavigator::reset() {
DEBUG_ECHOLNPGM("reset()");
currentfoldername[0] = '\0';
currentfolderdepth = 0;
currentindex = 0;
lastpanelindex = 0;
ZERO(currentfolderindex);
// Start at root folder
while (!filelist.isAtRootDir()) filelist.upDir();
refresh();
}
void FileNavigator::refresh() { filelist.refresh(); }
void FileNavigator::changeDIR(const char *folder) {
if (currentfolderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth
DEBUG_ECHOLNPAIR("FD:" , folderdepth, " FP:",currentindex, " currentfolder:", currentfoldername, " enter:", folder);
currentfolderindex[currentfolderdepth] = currentindex;
strcat(currentfoldername, folder);
strcat(currentfoldername, "/");
filelist.changeDir(folder);
currentfolderdepth++;
currentindex = 0;
}
void FileNavigator::upDIR() {
DEBUG_ECHOLNPAIR("upDIR() from D:", currentfolderdepth, " N:", currentfoldername);
if (!filelist.isAtRootDir()) {
filelist.upDir();
currentfolderdepth--;
currentindex = currentfolderindex[currentfolderdepth]; // restore last position in the folder
filelist.seek(currentindex); // restore file information
}
// Remove the child folder from the stored path
if (currentfolderdepth == 0)
currentfoldername[0] = '\0';
else {
char * const pos = strchr(currentfoldername, '/');
*(pos + 1) = '\0';
}
}
void FileNavigator::skiptofileindex(uint16_t skip) {
if (skip == 0) return;
while (skip > 0) {
if (filelist.seek(currentindex)) {
DEBUG_ECHOLNPAIR("CI:", currentindex, " FD:", currentfolderdepth, " N:", skip, " ", filelist.longFilename());
if (!filelist.isDir()) {
skip--;
currentindex++;
}
else
changeDIR(filelist.shortFilename());
} // valid file
if (currentindex == filelist.count()) {
if (currentfolderdepth > 0) {
upDIR();
currentindex++;
}
else break; // end of root folder
} // end of folder
} // files needed
// No more files available.
}
#if ENABLED(AC_SD_FOLDER_VIEW) // SD Folder navigation
void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) {
if (index == 0) currentindex = 0;
// Each time we change folder we reset the file index to 0 and keep track
// of the current position, since the TFT panel isn't aware of folder trees.
if (index > 0) {
--currentindex; // go back a file to take account of the .. we added to the root.
if (index > lastpanelindex)
currentindex += filesneeded;
else
currentindex = currentindex < 4 ? 0 : currentindex - filesneeded;
}
lastpanelindex = index;
DEBUG_ECHOLNPAIR("index=", index, " currentindex=", currentindex);
if (currentindex == 0 && currentfolderdepth > 0) { // Add a link to go up a folder
// The new panel ignores entries that don't end in .GCO or .gcode so add and pad them.
if (paneltype == AC_panel_new) {
TFTSer.println("<<.GCO");
Chiron.SendtoTFTLN(PSTR(".. .gcode"));
}
else {
TFTSer.println("<<");
TFTSer.println("..");
}
filesneeded--;
}
for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++) {
if (filelist.seek(seek)) {
sendFile(paneltype);
DEBUG_ECHOLNPAIR("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'");
}
}
}
void FileNavigator::sendFile(panel_type_t paneltype) {
if (filelist.isDir()) {
// Add mandatory tags for new panel otherwise lines are ignored.
if (paneltype == AC_panel_new) {
TFTSer.print(filelist.shortFilename());
TFTSer.println(".GCO");
TFTSer.print(filelist.shortFilename());
TFTSer.write('/');
// Make sure we fill all 29 chars of the display line to clear the text buffer otherwise the last line is still visible
for (int8_t i = strlen(filelist.shortFilename()); i < 19; i++)
TFTSer.write(' ');
TFTSer.println(".gcode");
}
else {
TFTSer.println(filelist.shortFilename());
TFTSer.print(filelist.shortFilename());
TFTSer.write('/');
TFTSer.println();
}
}
else { // Not DIR
TFTSer.write('/');
if (currentfolderdepth > 0) TFTSer.print(currentfoldername);
TFTSer.println(filelist.shortFilename());
TFTSer.print(filelist.longFilename());
// Make sure we fill all 29 chars of the display line to clear the text buffer otherwise the last line is still visible
if (paneltype == AC_panel_new)
for (int8_t i = strlen(filelist.longFilename()); i < 26; i++)
TFTSer.write(' ');
TFTSer.println();
}
} // AC_SD_FOLDER_VIEW
#else // Flat file list
void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) {
DEBUG_ECHOLNPAIR("getFiles() I:", index," L:", lastpanelindex);
// if we're searching backwards, jump back to start and search forward
if (index < lastpanelindex) {
reset();
skiptofileindex(index);
}
lastpanelindex = index;
while (filesneeded > 0) {
if (filelist.seek(currentindex)) {
if (!filelist.isDir()) {
sendFile(paneltype);
filesneeded--;
currentindex++;
}
else
changeDIR(filelist.shortFilename());
} // valid file
if (currentindex == filelist.count()) {
if (currentfolderdepth > 0) {
upDIR();
currentindex++;
}
else break; // end of root folder
} // end of folder
} // files needed
// No more files available.
}
void FileNavigator::sendFile(panel_type_t paneltype) {
TFTSer.write('/');
if (currentfolderdepth > 0) TFTSer.print(currentfoldername);
TFTSer.println(filelist.shortFilename());
if (currentfolderdepth > 0) TFTSer.print(currentfoldername);
TFTSer.println(filelist.longFilename());
DEBUG_ECHOLNPAIR("/", currentfoldername, "", filelist.shortFilename(), " ", filelist.longFilename());
}
#endif // Flat file list
} // Anycubic namespace
#endif // ANYCUBIC_LCD_CHIRON

View File

@@ -0,0 +1,61 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/anycubic_chiron/FileNavigator.h
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
#include "chiron_tft_defs.h"
#include "../ui_api.h"
using namespace ExtUI;
namespace Anycubic {
class FileNavigator {
public:
FileNavigator();
static void reset();
static void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4);
static void upDIR();
static void changeDIR(const char *);
static void sendFile(panel_type_t);
static void refresh();
static void skiptofileindex(uint16_t);
static FileList filelist;
private:
static uint16_t lastpanelindex;
static uint16_t currentindex;
static uint8_t currentfolderdepth;
static uint16_t currentfolderindex[MAX_FOLDER_DEPTH];
static char currentfoldername[MAX_PATH_LEN + 1];
};
extern FileNavigator filenavigator;
}

View File

@@ -0,0 +1,62 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_chiron/Tunes.cpp
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
/***********************************************************************
* A Utility to play tunes using the buzzer in the printer controller. *
* See Tunes.h for note and tune definitions. *
***********************************************************************/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(ANYCUBIC_LCD_CHIRON)
#include "Tunes.h"
#include "../ui_api.h"
namespace Anycubic {
void PlayTune(uint8_t beeperPin, const uint16_t *tune, uint8_t speed=1) {
uint8_t pos = 1;
uint16_t wholenotelen = tune[0] / speed;
do {
uint16_t freq = tune[pos];
uint16_t notelen = wholenotelen / tune[pos + 1];
::tone(beeperPin, freq, notelen);
ExtUI::delay_ms(notelen);
pos += 2;
if (pos >= MAX_TUNE_LENGTH) break;
} while (tune[pos] != n_END);
}
}
#endif // ANYCUBIC_LCD_CHIRON

View File

@@ -0,0 +1,224 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/anycubic_chiron/Tunes.h
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
/**************************************************************************
* Notes definition from https://pages.mtu.edu/~suits/NoteFreqCalcs.html *
* *
* The format of a tune is: *
* {<whole note time>,<note1>,<length1>, <note2>,<length2>, ... <END>} *
* *
* 1) The first value is the length of a whole note in milliseconds *
* 2) Then a sequence of pitch and duration pairs *
* 3) Finally the END marker so your tunes can be any length up to *
* MAX_TUNE_LEN *
*************************************************************************/
#include <stdint.h>
#define MAX_TUNE_LENGTH 128
// Special notes!
#define n_P 0 // silence or pause
#define n_END 10000 // end of tune marker
// Note duration divisors
#define l_T1 1
#define l_T2 2
#define l_T3 3
#define l_T4 4
#define l_T8 8
#define l_T16 16
// Note Frequency
#define n_C0 16
#define n_CS0 17
#define n_D0 18
#define n_DS0 19
#define n_E0 21
#define n_F0 22
#define n_FS0 23
#define n_G0 25
#define n_GS0 26
#define n_A0 28
#define n_AS0 29
#define n_B0 31
#define n_C1 33
#define n_CS1 35
#define n_D1 37
#define n_DS1 39
#define n_E1 41
#define n_F1 44
#define n_FS1 46
#define n_G1 49
#define n_GS1 52
#define n_A1 55
#define n_AS1 58
#define n_B1 62
#define n_C2 65
#define n_CS2 69
#define n_D2 73
#define n_DS2 78
#define n_E2 82
#define n_F2 87
#define n_FS2 93
#define n_G2 98
#define n_GS2 104
#define n_A2 110
#define n_AS2 117
#define n_B2 123
#define n_C3 131
#define n_CS3 139
#define n_D3 147
#define n_DS3 156
#define n_E3 165
#define n_F3 175
#define n_FS3 185
#define n_G3 196
#define n_GS3 208
#define n_A3 220
#define n_AS3 233
#define n_B3 247
#define n_C4 262
#define n_CS4 277
#define n_D4 294
#define n_DS4 311
#define n_E4 330
#define n_F4 349
#define n_FS4 370
#define n_G4 392
#define n_GS4 415
#define n_A4 440
#define n_AS4 466
#define n_B4 494
#define n_C5 523
#define n_CS5 554
#define n_D5 587
#define n_DS5 622
#define n_E5 659
#define n_F5 698
#define n_FS5 740
#define n_G5 784
#define n_GS5 831
#define n_A5 880
#define n_AS5 932
#define n_B5 988
#define n_C6 1047
#define n_CS6 1109
#define n_D6 1175
#define n_DS6 1245
#define n_E6 1319
#define n_F6 1397
#define n_FS6 1480
#define n_G6 1568
#define n_GS6 1661
#define n_A6 1760
#define n_AS6 1865
#define n_B6 1976
#define n_C7 2093
#define n_CS7 2217
#define n_D7 2349
#define n_DS7 2489
#define n_E7 2637
#define n_F7 2794
#define n_FS7 2960
#define n_G7 3136
#define n_GS7 3322
#define n_A7 3520
#define n_AS7 3729
#define n_B7 3951
#define n_C8 4186
#define n_CS8 4435
#define n_D8 4699
#define n_DS8 4978
#define n_E8 5274
#define n_F8 5587
#define n_FS8 5920
#define n_G8 6272
#define n_GS8 6645
#define n_A8 7040
#define n_AS8 7459
#define n_B8 7902
namespace Anycubic {
void PlayTune(uint8_t beeperPin, const uint16_t *tune, uint8_t speed);
// Only uncomment the tunes you are using to save memory
// This will help you write tunes!
// https://www.apronus.com/music/flashpiano.htm
const uint16_t SOS[] = {
250,
n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1,
n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T3, n_G6,l_T1, n_P,l_T1,
n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T3, n_G6,l_T3, n_P,l_T1,
n_END
};
const uint16_t BeepBeep[] = {
500,
n_C7,l_T8, n_P,l_T16, n_C7,l_T8, n_P,l_T8,
n_END
};
const uint16_t BeepBeepBeeep[] = {
1000,
n_G7,l_T4, n_P,l_T16, n_G7,l_T4, n_P,l_T8, n_G7,l_T2,
n_END
};
const uint16_t Anycubic_PowerOn[] = {
1000,
n_F7,l_T8, n_P,l_T8, n_C7,l_T8, n_P,l_T8, n_D7,l_T8, n_P,l_T8,
n_E7,l_T8, n_P,l_T8, n_D7,l_T4, n_P,l_T4, n_G7,l_T4, n_P,l_T4,
n_A7,l_T2, n_P,l_T1,
n_END
};
const uint16_t GB_PowerOn[] = {
500,
n_C6,l_T4, n_P,l_T16, n_C7,l_T2, n_P,l_T8,
n_END
};
const uint16_t Heater_Timedout[] = {
1000,
n_C6,l_T1,
n_END
};
const uint16_t FilamentOut[] = {
1000,
n_AS7,l_T4, n_P,l_T16, n_FS7,l_T2,
n_END
};
}

View File

@@ -0,0 +1,134 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_chiron/chiron_extui.cpp
*
* Anycubic Chiron TFT support for Marlin
*/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(ANYCUBIC_LCD_CHIRON)
#include "../ui_api.h"
#include "chiron_tft.h"
using namespace Anycubic;
namespace ExtUI {
void onStartup() { Chiron.Startup(); }
void onIdle() { Chiron.IdleLoop(); }
void onPrinterKilled(PGM_P const error, PGM_P const component) {
Chiron.PrinterKilled(error,component);
}
void onMediaInserted() { Chiron.MediaEvent(AC_media_inserted); }
void onMediaError() { Chiron.MediaEvent(AC_media_error); }
void onMediaRemoved() { Chiron.MediaEvent(AC_media_removed); }
void onPlayTone(const uint16_t frequency, const uint16_t duration) {
#if ENABLED(SPEAKER)
::tone(BEEPER_PIN, frequency, duration);
#endif
}
void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); }
void onPrintTimerPaused() { Chiron.TimerEvent(AC_timer_paused); }
void onPrintTimerStopped() { Chiron.TimerEvent(AC_timer_stopped); }
void onFilamentRunout(const extruder_t) { Chiron.FilamentRunout(); }
void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg); }
void onStatusChanged(const char * const msg) { Chiron.StatusChange(msg); }
void onHomingStart() {}
void onHomingComplete() {}
void onPrintFinished() {}
void onFactoryReset() {}
void onStoreSettings(char *buff) {
// Called when saving to EEPROM (i.e. M500). If the ExtUI needs
// permanent data to be stored, it can write up to eeprom_data_size bytes
// into buff.
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(buff, &myDataStruct, sizeof(myDataStruct));
}
void onLoadSettings(const char *buff) {
// Called while loading settings from EEPROM. If the ExtUI
// needs to retrieve data, it should copy up to eeprom_data_size bytes
// from buff
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(&myDataStruct, buff, sizeof(myDataStruct));
}
void onPostprocessSettings() {
// Called after loading or resetting stored settings
}
void onConfigurationStoreWritten(bool success) {
// Called after the entire EEPROM has been written,
// whether successful or not.
}
void onConfigurationStoreRead(bool success) {
// Called after the entire EEPROM has been read,
// whether successful or not.
}
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
//SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval);
}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {
// Called to indicate a special condition
//SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state);
}
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
// Called on resume from power-loss
void onPowerLossResume() { Chiron.PowerLossRecovery(); }
#endif
#if HAS_PID_HEATING
void onPidTuning(const result_t rst) {
// Called for temperature PID tuning result
}
#endif
void onSteppersDisabled() {}
void onSteppersEnabled() {}
}
#endif // ANYCUBIC_LCD_CHIRON

View File

@@ -0,0 +1,975 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_chiron/chiron_tft.cpp
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(ANYCUBIC_LCD_CHIRON)
#include "chiron_tft.h"
#include "Tunes.h"
#include "FileNavigator.h"
#include "../../../gcode/queue.h"
#include "../../../sd/cardreader.h"
#include "../../../libs/numtostr.h"
#include "../../../MarlinCore.h"
namespace Anycubic {
ChironTFT Chiron;
#if AUTO_DETECT_CHIRON_TFT
panel_type_t ChironTFT::panel_type = AC_panel_unknown;
#endif
last_error_t ChironTFT::last_error;
printer_state_t ChironTFT::printer_state;
paused_state_t ChironTFT::pause_state;
heater_state_t ChironTFT::hotend_state;
heater_state_t ChironTFT::hotbed_state;
xy_uint8_t ChironTFT::selectedmeshpoint;
char ChironTFT::selectedfile[MAX_PATH_LEN + 1];
char ChironTFT::panel_command[MAX_CMND_LEN + 1];
uint8_t ChironTFT::command_len;
float ChironTFT::live_Zoffset;
file_menu_t ChironTFT::file_menu;
void ChironTFT::Startup() {
selectedfile[0] = '\0';
panel_command[0] = '\0';
command_len = 0;
last_error = AC_error_none;
printer_state = AC_printer_idle;
pause_state = AC_paused_idle;
hotend_state = AC_heater_off;
hotbed_state = AC_heater_off;
live_Zoffset = 0.0;
file_menu = AC_menu_file;
// Setup pins for powerloss detection
// Two IO pins are connected on the Trigorilla Board
// On a power interruption the OUTAGECON_PIN goes low.
#if ENABLED(POWER_LOSS_RECOVERY)
OUT_WRITE(OUTAGECON_PIN, HIGH);
#endif
// Filament runout is handled by Marlin settings in Configuration.h
// opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
// opt_enable FIL_RUNOUT_PULLUP
TFTSer.begin(115200);
// wait for the TFT panel to initialise and finish the animation
delay_ms(250);
// There are different panels for the Chiron with slightly different commands
// So we need to know what we are working with.
// Panel type can be defined otherwise detect it automatically
if (panel_type == AC_panel_unknown) DetectPanelType();
// Signal Board has reset
SendtoTFTLN(AC_msg_main_board_has_reset);
// Enable leveling and Disable end stops during print
// as Z home places nozzle above the bed so we need to allow it past the end stops
injectCommands_P(AC_cmnd_enable_leveling);
// Startup tunes are defined in Tunes.h
PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1);
#if ACDEBUGLEVEL
SERIAL_ECHOLNPAIR("AC Debug Level ", ACDEBUGLEVEL);
#endif
SendtoTFTLN(AC_msg_ready);
}
void ChironTFT::DetectPanelType() {
#if AUTO_DETECT_CHIRON_TFT
// Send a query to the TFT
SendtoTFTLN(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320'
SendtoTFTLN(AC_Test_for_NewPanel); // the panel will respond with '[0]=0 ' to '[19]=0 '
#endif
}
void ChironTFT::IdleLoop() {
if (ReadTFTCommand()) {
ProcessPanelRequest();
command_len = 0;
}
CheckHeaters();
}
void ChironTFT::PrinterKilled(PGM_P error,PGM_P component) {
SendtoTFTLN(AC_msg_kill_lcd);
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("PrinterKilled()\nerror: ", error , "\ncomponent: ", component);
#endif
}
void ChironTFT::MediaEvent(media_event_t event) {
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("ProcessMediaStatus() ", event);
#endif
switch (event) {
case AC_media_inserted:
SendtoTFTLN(AC_msg_sd_card_inserted);
break;
case AC_media_removed:
SendtoTFTLN(AC_msg_sd_card_removed);
break;
case AC_media_error:
last_error = AC_error_noSD;
SendtoTFTLN(AC_msg_no_sd_card);
break;
}
}
void ChironTFT::TimerEvent(timer_event_t event) {
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("TimerEvent() ", event);
SERIAL_ECHOLNPAIR("Printer State: ", printer_state);
#endif
switch (event) {
case AC_timer_started: {
live_Zoffset = 0.0; // reset print offset
setSoftEndstopState(false); // disable endstops to print
printer_state = AC_printer_printing;
SendtoTFTLN(AC_msg_print_from_sd_card);
} break;
case AC_timer_paused: {
printer_state = AC_printer_paused;
pause_state = AC_paused_idle;
SendtoTFTLN(AC_msg_paused);
} break;
case AC_timer_stopped: {
if (printer_state != AC_printer_idle) {
printer_state = AC_printer_stopping;
SendtoTFTLN(AC_msg_print_complete);
}
setSoftEndstopState(true); // enable endstops
} break;
}
}
void ChironTFT::FilamentRunout() {
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("FilamentRunout() printer_state ", printer_state);
#endif
// 1 Signal filament out
last_error = AC_error_filament_runout;
SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block);
PlayTune(BEEPER_PIN, FilamentOut, 1);
}
void ChironTFT::ConfirmationRequest(const char * const msg) {
// M108 continue
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state);
#endif
switch (printer_state) {
case AC_printer_pausing: {
if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) {
SendtoTFTLN(AC_msg_paused); // enable continue button
printer_state = AC_printer_paused;
}
} break;
case AC_printer_resuming_from_power_outage:
case AC_printer_printing:
case AC_printer_paused: {
// Heater timout, send acknowledgement
if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) {
pause_state = AC_paused_heater_timed_out;
SendtoTFTLN(AC_msg_paused); // enable continue button
PlayTune(BEEPER_PIN,Heater_Timedout,1);
}
// Reheat finished, send acknowledgement
else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) {
pause_state = AC_paused_idle;
SendtoTFTLN(AC_msg_paused); // enable continue button
}
// Filament Purging, send acknowledgement enter run mode
else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) {
pause_state = AC_paused_purging_filament;
SendtoTFTLN(AC_msg_paused); // enable continue button
}
} break;
default:
break;
}
}
void ChironTFT::StatusChange(const char * const msg) {
#if ACDEBUG(AC_MARLIN)
SERIAL_ECHOLNPAIR("StatusChange() ", msg);
SERIAL_ECHOLNPAIR("printer_state:", printer_state);
#endif
bool msg_matched = false;
// The only way to get printer status is to parse messages
// Use the state to minimise the work we do here.
switch (printer_state) {
case AC_printer_probing: {
// If probing completes ok save the mesh and park
// Ignore the custom machine name
if (strcmp_P(msg + strlen(CUSTOM_MACHINE_NAME), MARLIN_msg_ready) == 0) {
injectCommands_P(PSTR("M500\nG27"));
SendtoTFTLN(AC_msg_probing_complete);
printer_state = AC_printer_idle;
msg_matched = true;
}
// If probing fails dont save the mesh raise the probe above the bad point
if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) {
PlayTune(BEEPER_PIN, BeepBeepBeeep, 1);
injectCommands_P(PSTR("G1 Z50 F500"));
SendtoTFTLN(AC_msg_probing_complete);
printer_state = AC_printer_idle;
msg_matched = true;
}
} break;
case AC_printer_printing: {
if (strcmp_P(msg, MARLIN_msg_reheating) == 0) {
SendtoTFTLN(AC_msg_paused); // enable continue button
msg_matched = true;
}
} break;
case AC_printer_pausing: {
if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) {
SendtoTFTLN(AC_msg_paused);
printer_state = AC_printer_paused;
pause_state = AC_paused_idle;
msg_matched = true;
}
} break;
case AC_printer_stopping: {
if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) {
SendtoTFTLN(AC_msg_stop);
printer_state = AC_printer_idle;
msg_matched = true;
}
} break;
default:
break;
}
// If not matched earlier see if this was a heater message
if (!msg_matched) {
if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) {
SendtoTFTLN(AC_msg_nozzle_heating);
hotend_state = AC_heater_temp_set;
}
else if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) {
SendtoTFTLN(AC_msg_bed_heating);
hotbed_state = AC_heater_temp_set;
}
else if (strcmp_P(msg, MARLIN_msg_EEPROM_version) == 0) {
last_error = AC_error_EEPROM;
}
}
}
void ChironTFT::PowerLossRecovery() {
printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover.
last_error = AC_error_powerloss;
PlayTune(BEEPER_PIN, SOS, 1);
SERIAL_ECHOLNPGM_P(AC_msg_powerloss_recovery);
}
void ChironTFT::PrintComplete() {
SendtoTFT(AC_msg_print_complete);
printer_state = AC_printer_idle;
setSoftEndstopState(true); // enable endstops
}
void ChironTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEM string to the panel
#if ACDEBUG(AC_SOME)
SERIAL_ECHOPGM_P(str);
#endif
while (const char c = pgm_read_byte(str++)) TFTSer.write(c);
}
void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) {
if (str) {
#if ACDEBUG(AC_SOME)
SERIAL_ECHOPGM("> ");
#endif
SendtoTFT(str);
#if ACDEBUG(AC_SOME)
SERIAL_EOL();
#endif
}
TFTSer.println();
}
bool ChironTFT::ReadTFTCommand() {
bool command_ready = false;
while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) {
panel_command[command_len] = TFTSer.read();
if (panel_command[command_len] == '\n') {
command_ready = true;
break;
}
command_len++;
}
if (command_ready || command_len == MAX_CMND_LEN) {
panel_command[command_len] = '\0';
#if ACDEBUG(AC_ALL)
SERIAL_ECHOLNPAIR("len(",command_len,") < ", panel_command);
#endif
command_ready = true;
}
return command_ready;
}
int8_t ChironTFT::FindToken(char c) {
int8_t pos = 0;
do {
if (panel_command[pos] == c) {
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Tpos:", pos, " ", c);
#endif
return pos;
}
} while(++pos < command_len);
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Not found: ", c);
#endif
return -1;
}
void ChironTFT::CheckHeaters() {
uint8_t faultDuration = 0;
// if the hotend temp is abnormal, confirm state before signalling panel
celsius_float_t temp = getActualTemp_celsius(E0);
while (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) {
faultDuration++;
if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
last_error = AC_error_abnormal_temp_t0;
SERIAL_ECHOLNPAIR("Extruder temp abnormal! : ", temp);
break;
}
delay_ms(500);
temp = getActualTemp_celsius(E0);
}
// If the hotbed temp is abnormal, confirm state before signaling panel
faultDuration = 0;
temp = getActualTemp_celsius(BED);
while (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) {
faultDuration++;
if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
last_error = AC_error_abnormal_temp_bed;
SERIAL_ECHOLNPAIR("Bed temp abnormal! : ", temp);
break;
}
delay_ms(500);
temp = getActualTemp_celsius(E0);
}
// Update panel with hotend heater status
if (hotend_state != AC_heater_temp_reached) {
if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -(TEMP_WINDOW), TEMP_WINDOW)) {
SendtoTFTLN(AC_msg_nozzle_heating_done);
hotend_state = AC_heater_temp_reached;
}
}
// Update panel with bed heater status
if (hotbed_state != AC_heater_temp_reached) {
if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -(TEMP_BED_WINDOW), TEMP_BED_WINDOW)) {
SendtoTFTLN(AC_msg_bed_heating_done);
hotbed_state = AC_heater_temp_reached;
}
}
}
void ChironTFT::SendFileList(int8_t startindex) {
// Respond to panel request for 4 files starting at index
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("## SendFileList ## ", startindex);
#endif
SendtoTFTLN(PSTR("FN "));
filenavigator.getFiles(startindex, panel_type, 4);
SendtoTFTLN(PSTR("END"));
}
void ChironTFT::SelectFile() {
if (panel_type == AC_panel_new) {
strncpy(selectedfile, panel_command + 4, command_len - 3);
selectedfile[command_len - 4] = '\0';
}
else {
strncpy(selectedfile, panel_command + 4, command_len - 4);
selectedfile[command_len - 5] = '\0';
}
#if ACDEBUG(AC_FILE)
SERIAL_ECHOLNPAIR(" Selected File: ",selectedfile);
#endif
switch (selectedfile[0]) {
case '/': // Valid file selected
SendtoTFTLN(AC_msg_sd_file_open_success);
break;
case '<': // .. (go up folder level)
filenavigator.upDIR();
SendtoTFTLN(AC_msg_sd_file_open_failed);
SendFileList( 0 );
break;
default: // enter sub folder
// for new panel remove the '.GCO' tag that was added to the end of the path
if (panel_type == AC_panel_new)
selectedfile[strlen(selectedfile) - 4] = '\0';
filenavigator.changeDIR(selectedfile);
SendtoTFTLN(AC_msg_sd_file_open_failed);
SendFileList( 0 );
break;
}
}
void ChironTFT::ProcessPanelRequest() {
// Break these up into logical blocks // as its easier to navigate than one huge switch case!
int8_t tpos = FindToken('A');
// Panel request are 'A0' - 'A36'
if (tpos != -1) {
const int8_t req = atoi(&panel_command[tpos+1]);
// Information requests A0 - A8 and A33
if (req <= 8 || req == 33) PanelInfo(req);
// Simple Actions A9 - A28
else if (req <= 28) PanelAction(req);
// Process Initiation
else if (req <= 36) PanelProcess(req);
}
else {
#if AUTO_DETECT_CHIRON_TFT
// This may be a response to a panel type detection query
if (panel_type == AC_panel_unknown) {
tpos = FindToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320'
if (tpos != -1) {
if (panel_command[tpos+1]== 'X' && panel_command[tpos+2]=='Y') {
panel_type = AC_panel_standard;
SERIAL_ECHOLNPGM_P(AC_msg_old_panel_detected);
}
}
else {
tpos = FindToken('['); // new panel will respond to 'J200' with '[0]=0'
if (tpos != -1) {
if (panel_command[tpos+1]== '0' && panel_command[tpos+2]==']') {
panel_type = AC_panel_new;
SERIAL_ECHOLNPGM_P(AC_msg_new_panel_detected);
}
}
}
return;
}
#endif
SendtoTFTLN(); // Ignore unknown requests
}
}
void ChironTFT::PanelInfo(uint8_t req) {
// information requests A0-A8 and A33
switch (req) {
case 0: // A0 Get HOTEND Temp
SendtoTFT(PSTR("A0V "));
TFTSer.println(getActualTemp_celsius(E0));
break;
case 1: // A1 Get HOTEND Target Temp
SendtoTFT(PSTR("A1V "));
TFTSer.println(getTargetTemp_celsius(E0));
break;
case 2: // A2 Get BED Temp
SendtoTFT(PSTR("A2V "));
TFTSer.println(getActualTemp_celsius(BED));
break;
case 3: // A3 Get BED Target Temp
SendtoTFT(PSTR("A3V "));
TFTSer.println(getTargetTemp_celsius(BED));
break;
case 4: // A4 Get FAN Speed
SendtoTFT(PSTR("A4V "));
TFTSer.println(getActualFan_percent(FAN0));
break;
case 5: // A5 Get Current Coordinates
SendtoTFT(PSTR("A5V X: "));
TFTSer.print(getAxisPosition_mm(X));
SendtoTFT(PSTR(" Y: "));
TFTSer.print(getAxisPosition_mm(Y));
SendtoTFT(PSTR(" Z: "));
TFTSer.println(getAxisPosition_mm(Z));
break;
case 6: // A6 Get printing progress
if (isPrintingFromMedia()) {
SendtoTFT(PSTR("A6V "));
TFTSer.println(ui8tostr2(getProgress_percent()));
}
else
SendtoTFTLN(PSTR("A6V ---"));
break;
case 7: { // A7 Get Printing Time
uint32_t time = getProgress_seconds_elapsed() / 60;
SendtoTFT(PSTR("A7V "));
TFTSer.print(ui8tostr2(time / 60));
SendtoTFT(PSTR(" H "));
TFTSer.print(ui8tostr2(time % 60));
SendtoTFT(PSTR(" M"));
#if ACDEBUG(AC_ALL)
SERIAL_ECHOLNPAIR("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60));
#endif
} break;
case 8: // A8 Get SD Card list A8 S0
if (!isMediaInserted()) safe_delay(500);
if (!isMediaInserted()) // Make sure the card is removed
SendtoTFTLN(AC_msg_no_sd_card);
else if (panel_command[3] == 'S')
SendFileList( atoi( &panel_command[4] ) );
break;
case 33: // A33 Get firmware info
SendtoTFT(PSTR("J33 "));
// If there is an error recorded, show that instead of the FW version
if (!GetLastError()) SendtoTFTLN(PSTR(SHORT_BUILD_VERSION));
break;
}
}
void ChironTFT::PanelAction(uint8_t req) {
switch (req) {
case 9: // A9 Pause SD print
if (isPrintingFromMedia()) {
SendtoTFTLN(AC_msg_pause);
pausePrint();
printer_state = AC_printer_pausing;
}
else
SendtoTFTLN(AC_msg_stop);
break;
case 10: // A10 Resume SD Print
if (pause_state == AC_paused_idle || printer_state == AC_printer_resuming_from_power_outage)
resumePrint();
else
setUserConfirmed();
break;
case 11: // A11 Stop SD print
if (isPrintingFromMedia()) {
printer_state = AC_printer_stopping;
stopPrint();
}
else {
if (printer_state == AC_printer_resuming_from_power_outage)
injectCommands_P(PSTR("M1000 C")); // Cancel recovery
SendtoTFTLN(AC_msg_stop);
printer_state = AC_printer_idle;
}
break;
case 12: // A12 Kill printer
kill(); // from marlincore.h
break;
case 13: // A13 Select file
SelectFile();
break;
case 14: { // A14 Start Printing
// Allows printer to restart the job if we dont want to recover
if (printer_state == AC_printer_resuming_from_power_outage) {
injectCommands_P(PSTR("M1000 C")); // Cancel recovery
printer_state = AC_printer_idle;
}
#if ACDebugLevel >= 1
SERIAL_ECHOLNPAIR_F("Print: ", selectedfile);
#endif
printFile(selectedfile);
SendtoTFTLN(AC_msg_print_from_sd_card);
} break;
case 15: // A15 Resuming from outage
if (printer_state == AC_printer_resuming_from_power_outage) {
// Need to home here to restore the Z position
injectCommands_P(AC_cmnd_power_loss_recovery);
injectCommands_P(PSTR("M1000")); // home and start recovery
}
break;
case 16: { // A16 Set HotEnd temp A17 S170
const float set_Htemp = atof(&panel_command[5]);
hotend_state = set_Htemp ? AC_heater_temp_set : AC_heater_off;
switch ((char)panel_command[4]) {
// Set Temp
case 'S': case 'C': setTargetTemp_celsius(set_Htemp, E0);
}
} break;
case 17: { // A17 Set bed temp
const float set_Btemp = atof(&panel_command[5]);
hotbed_state = set_Btemp ? AC_heater_temp_set : AC_heater_off;
if (panel_command[4] == 'S')
setTargetTemp_celsius(set_Btemp, BED);
} break;
case 18: // A18 Set Fan Speed
if (panel_command[4] == 'S')
setTargetFan_percent(atof(&panel_command[5]), FAN0);
break;
case 19: // A19 Motors off
if (!isPrinting()) {
disable_all_steppers(); // from marlincore.h
SendtoTFTLN(AC_msg_ready);
}
break;
case 20: // A20 Read/write print speed
if (panel_command[4] == 'S')
setFeedrate_percent(atoi(&panel_command[5]));
else {
SendtoTFT(PSTR("A20V "));
TFTSer.println(getFeedrate_percent());
}
break;
case 21: // A21 Home Axis A21 X
if (!isPrinting()) {
switch ((char)panel_command[4]) {
case 'X': injectCommands_P(PSTR("G28X")); break;
case 'Y': injectCommands_P(PSTR("G28Y")); break;
case 'Z': injectCommands_P(PSTR("G28Z")); break;
case 'C': injectCommands_P(G28_STR); break;
}
}
break;
case 22: { // A22 Move Axis
// The commands have changed on the new panel
// Old TFT A22 X -1F1500 A22 X +1F1500
// New TFT A22 X-1.0 F1500 A22 X1.0 F1500
// lets just wrap this in a gcode relative nonprint move and let the controller deal with it
// G91 G0 <panel command> G90
if (!isPrinting()) { // Ignore request if printing
char MoveCmnd[30];
sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3);
#if ACDEBUG(AC_ACTION)
SERIAL_ECHOLNPAIR("Move: ", MoveCmnd);
#endif
setSoftEndstopState(true); // enable endstops
injectCommands(MoveCmnd);
}
} break;
case 23: // A23 Preheat PLA
// Ignore request if printing
if (!isPrinting()) {
// Temps defined in configuration.h
setTargetTemp_celsius(PREHEAT_1_TEMP_BED, BED);
setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, E0);
SendtoTFTLN();
hotbed_state = AC_heater_temp_set;
hotend_state = AC_heater_temp_set;
}
break;
case 24: // A24 Preheat ABS
// Ignore request if printing
if (!isPrinting()) {
setTargetTemp_celsius(PREHEAT_2_TEMP_BED, BED);
setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, E0);
SendtoTFTLN();
hotbed_state = AC_heater_temp_set;
hotend_state = AC_heater_temp_set;
}
break;
case 25: // A25 Cool Down
// Ignore request if printing
if (!isPrinting()) {
setTargetTemp_celsius(0, E0);
setTargetTemp_celsius(0, BED);
SendtoTFTLN(AC_msg_ready);
hotbed_state = AC_heater_off;
hotend_state = AC_heater_off;
}
break;
case 26: // A26 Refresh SD
if (card.isMounted())card.release();
card.mount();
safe_delay(500);
filenavigator.reset();
break;
case 27: // A27 Servo Angles adjust
break;
case 28: // A28 Filament set A28 O/C
// Ignore request if printing
if (isPrinting()) break;
SendtoTFTLN();
break;
}
}
void ChironTFT::PanelProcess(uint8_t req) {
switch (req) {
case 29: { // A29 Read Mesh Point A29 X1 Y1
xy_uint8_t pos;
float pos_z;
pos.x = atoi(&panel_command[FindToken('X')+1]);
pos.y = atoi(&panel_command[FindToken('Y')+1]);
pos_z = getMeshPoint(pos);
SendtoTFT(PSTR("A29V "));
TFTSer.println(pos_z * 100);
if (!isPrinting()) {
setSoftEndstopState(true); // disable endstops
// If the same meshpoint is selected twice in a row, move the head to that ready for adjustment
if ((selectedmeshpoint.x == pos.x) && (selectedmeshpoint.y == pos.y)) {
if (!isPositionKnown())
injectCommands_P(G28_STR); // home
if (isPositionKnown()) {
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
#endif
// Go up before moving
setAxisPosition_mm(3.0,Z);
setAxisPosition_mm(17 + (93 * pos.x), X);
setAxisPosition_mm(20 + (93 * pos.y), Y);
setAxisPosition_mm(0.0, Z);
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Current Z: ", getAxisPosition_mm(Z));
#endif
}
}
selectedmeshpoint.x = pos.x;
selectedmeshpoint.y = pos.y;
}
} break;
case 30: { // A30 Auto leveling
if (FindToken('S') != -1) { // Start probing New panel adds spaces..
// Ignore request if printing
if (isPrinting())
SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
else {
SendtoTFTLN(AC_msg_start_probing);
injectCommands_P(PSTR("G28\nG29"));
printer_state = AC_printer_probing;
}
}
else {
SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
}
} break;
case 31: { // A31 Adjust all Probe Points
// The tokens can occur in different places on the new panel so we need to find it.
if (FindToken('C') != -1) { // Restore and apply original offsets
if (!isPrinting()) {
injectCommands_P(PSTR("M501\nM420 S1"));
selectedmeshpoint.x = selectedmeshpoint.y = 99;
SERIAL_ECHOLNPGM_P(AC_msg_mesh_changes_abandoned);
}
}
else if (FindToken('D') != -1) { // Save Z Offset tables and restore leveling state
if (!isPrinting()) {
setAxisPosition_mm(1.0,Z); // Lift nozzle before any further movements are made
injectCommands_P(PSTR("M500"));
SERIAL_ECHOLNPGM_P(AC_msg_mesh_changes_saved);
selectedmeshpoint.x = selectedmeshpoint.y = 99;
}
}
else if (FindToken('G') != -1) { // Get current offset
SendtoTFT(PSTR("A31V "));
// When printing use the live z Offset position
// we will use babystepping to move the print head
if (isPrinting())
TFTSer.println(live_Zoffset);
else {
TFTSer.println(getZOffset_mm());
selectedmeshpoint.x = selectedmeshpoint.y = 99;
}
}
else {
int8_t tokenpos = FindToken('S');
if (tokenpos != -1) { // Set offset (adjusts all points by value)
float Zshift = atof(&panel_command[tokenpos+1]);
setSoftEndstopState(false); // disable endstops
// Allow temporary Z position nudging during print
// From the leveling panel use the all points UI to adjust the print pos.
if (isPrinting()) {
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
#endif
if (isAxisPositionKnown(Z)) {
#if ACDEBUG(AC_INFO)
const float currZpos = getAxisPosition_mm(Z);
SERIAL_ECHOLNPAIR("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
#endif
// Use babystepping to adjust the head position
int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z);
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Steps to move Z: ", steps);
#endif
babystepAxis_steps(steps, Z);
live_Zoffset += Zshift;
}
SendtoTFT(PSTR("A31V "));
TFTSer.println(live_Zoffset);
}
else {
GRID_LOOP(x, y) {
const xy_uint8_t pos { x, y };
const float currval = getMeshPoint(pos);
setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2));
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
#endif
}
const float currZOffset = getZOffset_mm();
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift);
#endif
setZOffset_mm(currZOffset + Zshift);
SendtoTFT(PSTR("A31V "));
TFTSer.println(getZOffset_mm());
if (isAxisPositionKnown(Z)) {
// Move Z axis
const float currZpos = getAxisPosition_mm(Z);
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
#endif
setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
}
}
}
}
} break;
case 32: { // A32 clean leveling beep flag
// Ignore request if printing
//if (isPrinting()) break;
//injectCommands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000"));
//TFTSer.println();
} break;
// A33 firmware info request see PanelInfo()
case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123
if (panel_command[3] == 'C') { // Restore original offsets
injectCommands_P(PSTR("M501\nM420 S1"));
selectedmeshpoint.x = selectedmeshpoint.y = 99;
//printer_state = AC_printer_idle;
}
else {
xy_uint8_t pos;
pos.x = atoi(&panel_command[5]);
pos.y = atoi(&panel_command[8]);
float currmesh = getMeshPoint(pos);
float newval = atof(&panel_command[11])/100;
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Change mesh point x:", pos.x, " y:", pos.y);
SERIAL_ECHOLNPAIR("from ", currmesh, " to ", newval);
#endif
// Update Meshpoint
setMeshPoint(pos,newval);
if (printer_state == AC_printer_idle || printer_state == AC_printer_probing /*!isPrinting()*/) {
// if we are at the current mesh point indicated on the panel Move Z pos +/- 0.05mm
// (The panel changes the mesh value by +/- 0.05mm on each button press)
if (selectedmeshpoint.x == pos.x && selectedmeshpoint.y == pos.y) {
setSoftEndstopState(false);
float currZpos = getAxisPosition_mm(Z);
#if ACDEBUG(AC_INFO)
SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
#endif
setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z);
}
}
}
} break;
case 36: // A36 Auto leveling for new TFT bet that was a typo in the panel code!
SendtoTFTLN(AC_msg_start_probing);
break;
}
}
bool ChironTFT::GetLastError() {
switch (last_error) {
case AC_error_abnormal_temp_bed: SendtoTFTLN(AC_msg_error_bed_temp); break;
case AC_error_abnormal_temp_t0: SendtoTFTLN(AC_msg_error_hotend_temp); break;
case AC_error_noSD: SendtoTFTLN(AC_msg_error_sd_card); break;
case AC_error_powerloss: SendtoTFTLN(AC_msg_power_loss); break;
case AC_error_EEPROM: SendtoTFTLN(AC_msg_eeprom_version); break;
case AC_error_filament_runout: SendtoTFTLN(AC_msg_filament_out); break;
default: return false;
}
last_error = AC_error_none;
return true;
}
} // Anycubic namespace
#endif // ANYCUBIC_LCD_CHIRON

View File

@@ -0,0 +1,89 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/anycubic_chiron/chiron_tft.h
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
#include "chiron_tft_defs.h"
#include "../../../inc/MarlinConfigPre.h"
#include "../ui_api.h"
#if NONE(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW)
#define AUTO_DETECT_CHIRON_TFT 1
#endif
namespace Anycubic {
class ChironTFT {
#if AUTO_DETECT_CHIRON_TFT
static panel_type_t panel_type;
#else
static constexpr panel_type_t panel_type = TERN(CHIRON_TFT_NEW, AC_panel_new, AC_panel_standard);
#endif
static last_error_t last_error;
static printer_state_t printer_state;
static paused_state_t pause_state;
static heater_state_t hotend_state;
static heater_state_t hotbed_state;
static xy_uint8_t selectedmeshpoint;
static char panel_command[MAX_CMND_LEN + 1];
static uint8_t command_len;
static char selectedfile[MAX_PATH_LEN + 1];
static float live_Zoffset;
static file_menu_t file_menu;
public:
static void Startup();
static void IdleLoop();
static void PrinterKilled(PGM_P,PGM_P);
static void MediaEvent(media_event_t);
static void TimerEvent(timer_event_t);
static void FilamentRunout();
static void ConfirmationRequest(const char * const );
static void StatusChange(const char * const );
static void PowerLossRecovery();
static void PrintComplete();
static void SendtoTFT(PGM_P);
static void SendtoTFTLN(PGM_P);
private:
static void DetectPanelType();
static bool ReadTFTCommand();
static int8_t FindToken(char);
static void CheckHeaters();
static void SendFileList(int8_t);
static void SelectFile();
static void InjectCommandandWait(PGM_P);
static void ProcessPanelRequest();
static void PanelInfo(uint8_t);
static void PanelAction(uint8_t);
static void PanelProcess(uint8_t);
static bool GetLastError();
};
extern ChironTFT Chiron;
} // Anycubic namespace

View File

@@ -0,0 +1,178 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_chiron/chiron_defs.h
*
* Extensible_UI implementation for Anycubic Chiron
* Written By Nick Wells, 2020 [https://github.com/SwiftNick]
* (not affiliated with Anycubic, Ltd.)
*/
#pragma once
#include "../../../inc/MarlinConfigPre.h"
//#define ACDEBUGLEVEL 4
#if ACDEBUGLEVEL
// Bit-masks for selective debug:
enum ACDebugMask : uint8_t {
AC_INFO = 1,
AC_ACTION = 2,
AC_FILE = 4,
AC_PANEL = 8,
AC_MARLIN = 16,
AC_SOME = 32,
AC_ALL = 64
};
#define ACDEBUG(mask) ( ((mask) & ACDEBUGLEVEL) == mask ) // Debug flag macro
#else
#define ACDEBUG(mask) false
#endif
#define TFTSer LCD_SERIAL // Serial interface for TFT panel now uses marlinserial
#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path
#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command
#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path
#define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault
#define AC_LOWEST_MESHPOINT_VAL -10 // The lowest value you can set for a single mesh point offset
// TFT panel commands
#define AC_msg_sd_card_inserted PSTR("J00")
#define AC_msg_sd_card_removed PSTR("J01")
#define AC_msg_no_sd_card PSTR("J02")
#define AC_msg_usb_connected PSTR("J03")
#define AC_msg_print_from_sd_card PSTR("J04")
#define AC_msg_pause PSTR("J05")
#define AC_msg_nozzle_heating PSTR("J06")
#define AC_msg_nozzle_heating_done PSTR("J07")
#define AC_msg_bed_heating PSTR("J08")
#define AC_msg_bed_heating_done PSTR("J09")
#define AC_msg_nozzle_temp_abnormal PSTR("J10")
#define AC_msg_kill_lcd PSTR("J11")
#define AC_msg_ready PSTR("J12")
#define AC_msg_low_nozzle_temp PSTR("J13")
#define AC_msg_print_complete PSTR("J14")
#define AC_msg_filament_out_alert PSTR("J15")
#define AC_msg_stop PSTR("J16")
#define AC_msg_main_board_has_reset PSTR("J17")
#define AC_msg_paused PSTR("J18")
#define AC_msg_j19_unknown PSTR("J19")
#define AC_msg_sd_file_open_success PSTR("J20")
#define AC_msg_sd_file_open_failed PSTR("J21")
#define AC_msg_level_monitor_finished PSTR("J22")
#define AC_msg_filament_out_block PSTR("J23")
#define AC_msg_probing_not_allowed PSTR("J24")
#define AC_msg_probing_complete PSTR("J25")
#define AC_msg_start_probing PSTR("J26")
#define AC_msg_version PSTR("J27")
#define AC_msg_mesh_changes_abandoned PSTR("Mesh changes abandoned, previous mesh restored.")
#define AC_msg_mesh_changes_saved PSTR("Mesh changes saved.")
#define AC_msg_old_panel_detected PSTR("Standard TFT panel detected!")
#define AC_msg_new_panel_detected PSTR("New TFT panel detected!")
#define AC_msg_powerloss_recovery PSTR("Resuming from power outage! select the same SD file then press resume")
// Error messages must not contain spaces
#define AC_msg_error_bed_temp PSTR("Abnormal_bed_temp")
#define AC_msg_error_hotend_temp PSTR("Abnormal_hotend_temp")
#define AC_msg_error_sd_card PSTR("SD_card_error")
#define AC_msg_filament_out PSTR("Filament_runout")
#define AC_msg_power_loss PSTR("Power_failure")
#define AC_msg_eeprom_version PSTR("EEPROM_ver_wrong")
#define MARLIN_msg_start_probing PSTR("Probing Point 1/25")
#define MARLIN_msg_probing_failed PSTR("Probing Failed")
#define MARLIN_msg_ready PSTR(" Ready.")
#define MARLIN_msg_print_paused PSTR("Print Paused")
#define MARLIN_msg_print_aborted PSTR("Print Aborted")
#define MARLIN_msg_extruder_heating PSTR("E Heating...")
#define MARLIN_msg_bed_heating PSTR("Bed Heating...")
#define MARLIN_msg_EEPROM_version PSTR("EEPROM Version Error")
#define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked")
#define MARLIN_msg_heater_timeout PSTR("Heater Timeout")
#define MARLIN_msg_reheating PSTR("Reheating...")
#define MARLIN_msg_reheat_done PSTR("Reheat finished.")
#define MARLIN_msg_filament_purging PSTR("Filament Purging...")
#define MARLIN_msg_special_pause PSTR("PB")
#define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine
#define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle
#define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster
#define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82")
#define AC_cmnd_enable_leveling PSTR("M420SV")
#define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position
#define AC_Test_for_OldPanel PSTR("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond.
#define AC_Test_for_NewPanel PSTR("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond
namespace Anycubic {
enum heater_state_t : uint8_t {
AC_heater_off,
AC_heater_temp_set,
AC_heater_temp_reached
};
enum paused_state_t : uint8_t {
AC_paused_heater_timed_out,
AC_paused_purging_filament,
AC_paused_idle
};
enum printer_state_t : uint8_t {
AC_printer_booting,
AC_printer_idle,
AC_printer_probing,
AC_printer_printing,
AC_printer_pausing,
AC_printer_paused,
AC_printer_stopping,
AC_printer_resuming_from_power_outage
};
enum timer_event_t : uint8_t {
AC_timer_started,
AC_timer_paused,
AC_timer_stopped
};
enum media_event_t : uint8_t {
AC_media_inserted,
AC_media_removed,
AC_media_error
};
enum file_menu_t : uint8_t {
AC_menu_file,
AC_menu_command,
AC_menu_change_to_file,
AC_menu_change_to_command
};
enum panel_type_t : uint8_t {
AC_panel_unknown,
AC_panel_standard,
AC_panel_new
};
enum last_error_t : uint8_t {
AC_error_none,
AC_error_abnormal_temp_t0,
AC_error_abnormal_temp_bed,
AC_error_noSD,
AC_error_powerloss,
AC_error_filament_runout,
AC_error_EEPROM
};
} // Anycubic namespace

View File

@@ -0,0 +1,125 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/anycubic_i3mega/anycubic_extui.cpp
*/
#include "../../../inc/MarlinConfigPre.h"
#if ENABLED(ANYCUBIC_LCD_I3MEGA)
#include "anycubic_i3mega_lcd.h"
#include "../ui_api.h"
#include <Arduino.h> // for the ::tone() call
namespace ExtUI {
void onStartup() { AnycubicTFT.OnSetup(); }
void onIdle() { AnycubicTFT.OnCommandScan(); }
void onPrinterKilled(PGM_P const error, PGM_P const component) { AnycubicTFT.OnKillTFT(); }
void onMediaInserted() { AnycubicTFT.OnSDCardStateChange(true); }
void onMediaError() { AnycubicTFT.OnSDCardError(); }
void onMediaRemoved() { AnycubicTFT.OnSDCardStateChange(false); }
void onPlayTone(const uint16_t frequency, const uint16_t duration) {
#if ENABLED(SPEAKER)
::tone(BEEPER_PIN, frequency, duration);
#endif
}
void onPrintTimerStarted() { AnycubicTFT.OnPrintTimerStarted(); }
void onPrintTimerPaused() { AnycubicTFT.OnPrintTimerPaused(); }
void onPrintTimerStopped() { AnycubicTFT.OnPrintTimerStopped(); }
void onFilamentRunout(const extruder_t extruder) { AnycubicTFT.OnFilamentRunout(); }
void onUserConfirmRequired(const char * const msg) { AnycubicTFT.OnUserConfirmRequired(msg); }
void onStatusChanged(const char * const msg) {}
void onHomingStart() {}
void onHomingComplete() {}
void onPrintFinished() {}
void onFactoryReset() {}
void onStoreSettings(char *buff) {
// Called when saving to EEPROM (i.e. M500). If the ExtUI needs
// permanent data to be stored, it can write up to eeprom_data_size bytes
// into buff.
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(buff, &myDataStruct, sizeof(myDataStruct));
}
void onLoadSettings(const char *buff) {
// Called while loading settings from EEPROM. If the ExtUI
// needs to retrieve data, it should copy up to eeprom_data_size bytes
// from buff
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(&myDataStruct, buff, sizeof(myDataStruct));
}
void onPostprocessSettings() {
// Called after loading or resetting stored settings
}
void onConfigurationStoreWritten(bool success) {
// Called after the entire EEPROM has been written,
// whether successful or not.
}
void onConfigurationStoreRead(bool success) {
// Called after the entire EEPROM has been read,
// whether successful or not.
}
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, probe_state_t state) {
// Called when any mesh points are updated
}
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLossResume() {
// Called on resume from power-loss
}
#endif
#if HAS_PID_HEATING
void onPidTuning(const result_t rst) {
// Called for temperature PID tuning result
}
#endif
void onSteppersDisabled() {}
void onSteppersEnabled() {}
}
#endif // ANYCUBIC_LCD_I3MEGA

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,95 @@
/**
* anycubic_i3mega_lcd.h --- Support for Anycubic i3 Mega TFT
* Created by Christian Hopp on 09.12.17.
* Improved by David Ramiro
* Converted to ExtUI by John BouAntoun 21 June 2020
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#pragma once
#include "../../../inc/MarlinConfigPre.h"
#include "../../../sd/SdFatConfig.h" // for the FILENAME_LENGTH macro
#define TFTBUFSIZE 4
#define TFT_MAX_CMD_SIZE 96
enum AnycubicMediaPrintState {
AMPRINTSTATE_NOT_PRINTING,
AMPRINTSTATE_PRINTING,
AMPRINTSTATE_PAUSE_REQUESTED,
AMPRINTSTATE_PAUSED,
AMPRINTSTATE_STOP_REQUESTED
};
enum AnycubicMediaPauseState {
AMPAUSESTATE_NOT_PAUSED,
AMPAUSESTATE_PARKING,
AMPAUSESTATE_PARKED,
AMPAUSESTATE_FILAMENT_OUT,
AMPAUSESTATE_FIAMENT_PRUGING,
AMPAUSESTATE_HEATER_TIMEOUT,
AMPAUSESTATE_REHEATING,
AMPAUSESTATE_REHEAT_FINISHED
};
class AnycubicTFTClass {
public:
AnycubicTFTClass();
static void OnSetup();
static void OnCommandScan();
static void OnKillTFT();
static void OnSDCardStateChange(bool);
static void OnSDCardError();
static void OnFilamentRunout();
static void OnUserConfirmRequired(const char *);
static void OnPrintTimerStarted();
static void OnPrintTimerPaused();
static void OnPrintTimerStopped();
private:
static char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
static int TFTbuflen, TFTbufindr, TFTbufindw;
static char serial3_char;
static int serial3_count;
static char *TFTstrchr_pointer;
static uint8_t SpecialMenu;
static AnycubicMediaPrintState mediaPrintingState;
static AnycubicMediaPauseState mediaPauseState;
static float CodeValue();
static bool CodeSeen(char);
static bool IsNozzleHomed();
static void RenderCurrentFileList();
static void RenderSpecialMenu(uint16_t);
static void RenderCurrentFolder(uint16_t);
static void GetCommandFromTFT();
static void CheckSDCardChange();
static void CheckPauseState();
static void CheckPrintCompletion();
static void HandleSpecialMenu();
static void DoSDCardStateCheck();
static void DoFilamentRunoutCheck();
static void StartPrint();
static void PausePrint();
static void ResumePrint();
static void StopPrint();
static char SelectedDirectory[30];
static char SelectedFile[FILENAME_LENGTH];
};
extern AnycubicTFTClass AnycubicTFT;
extern const char G28_STR[];

View File

@@ -0,0 +1,271 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../../inc/MarlinConfigPre.h"
#if HAS_DGUS_LCD
#if HOTENDS > 2
#warning "More than 2 hotends not implemented on DGUS Display UI."
#endif
#include "../ui_api.h"
#include "../../../MarlinCore.h"
#include "../../../module/motion.h"
#include "../../../gcode/queue.h"
#include "../../../module/planner.h"
#include "../../../libs/duration_t.h"
#include "../../../module/printcounter.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../feature/powerloss.h"
#endif
#include "DGUSDisplay.h"
#include "DGUSVPVariable.h"
#include "DGUSDisplayDef.h"
DGUSDisplay dgusdisplay;
// Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable
constexpr uint8_t DGUS_HEADER1 = 0x5A;
constexpr uint8_t DGUS_HEADER2 = 0xA5;
constexpr uint8_t DGUS_CMD_WRITEVAR = 0x82;
constexpr uint8_t DGUS_CMD_READVAR = 0x83;
#if ENABLED(DEBUG_DGUSLCD)
bool dguslcd_local_debug; // = false;
#endif
void DGUSDisplay::InitDisplay() {
#ifndef LCD_BAUDRATE
#define LCD_BAUDRATE 115200
#endif
LCD_SERIAL.begin(LCD_BAUDRATE);
if (TERN1(POWER_LOSS_RECOVERY, !recovery.valid())) { // If no Power-Loss Recovery is needed...
TERN_(DGUS_LCD_UI_MKS, delay(LOGO_TIME_DELAY)); // Show the logo for a little while
}
RequestScreen(TERN(SHOW_BOOTSCREEN, DGUSLCD_SCREEN_BOOT, DGUSLCD_SCREEN_MAIN));
}
void DGUSDisplay::WriteVariable(uint16_t adr, const void *values, uint8_t valueslen, bool isstr) {
const char* myvalues = static_cast<const char*>(values);
bool strend = !myvalues;
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
while (valueslen--) {
char x;
if (!strend) x = *myvalues++;
if ((isstr && !x) || strend) {
strend = true;
x = ' ';
}
LCD_SERIAL.write(x);
}
}
void DGUSDisplay::WriteVariable(uint16_t adr, uint16_t value) {
value = (value & 0xFFU) << 8U | (value >> 8U);
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint16_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, int16_t value) {
value = (value & 0xFFU) << 8U | (value >> 8U);
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint16_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, uint8_t value) {
WriteVariable(adr, static_cast<const void*>(&value), sizeof(uint8_t));
}
void DGUSDisplay::WriteVariable(uint16_t adr, int8_t value) {
WriteVariable(adr, static_cast<const void*>(&value), sizeof(int8_t));
}
#if ENABLED(DGUS_LCD_UI_MKS)
void DGUSDisplay::MKS_WriteVariable(uint16_t adr, uint8_t value) {
WriteVariable(adr, static_cast<const void *>(&value), sizeof(uint8_t));
}
#endif
void DGUSDisplay::WriteVariable(uint16_t adr, long value) {
union { long l; char lb[4]; } endian;
char tmp[4];
endian.l = value;
tmp[0] = endian.lb[3];
tmp[1] = endian.lb[2];
tmp[2] = endian.lb[1];
tmp[3] = endian.lb[0];
WriteVariable(adr, static_cast<const void*>(&tmp), sizeof(long));
}
void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void *values, uint8_t valueslen, bool isstr) {
const char* myvalues = static_cast<const char*>(values);
bool strend = !myvalues;
WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen);
while (valueslen--) {
char x;
if (!strend) x = pgm_read_byte(myvalues++);
if ((isstr && !x) || strend) {
strend = true;
x = ' ';
}
LCD_SERIAL.write(x);
}
}
void DGUSDisplay::ProcessRx() {
#if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS)
if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) {
// Overrun, but reset the flag only when the buffer is empty
// We want to extract as many as valid datagrams possible...
DEBUG_ECHOPGM("OVFL");
rx_datagram_state = DGUS_IDLE;
//LCD_SERIAL.reset_rx_overun();
LCD_SERIAL.flush();
}
#endif
uint8_t receivedbyte;
while (LCD_SERIAL.available()) {
switch (rx_datagram_state) {
case DGUS_IDLE: // Waiting for the first header byte
receivedbyte = LCD_SERIAL.read();
//DEBUG_ECHOPAIR("< ",x);
if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN;
break;
case DGUS_HEADER1_SEEN: // Waiting for the second header byte
receivedbyte = LCD_SERIAL.read();
//DEBUG_ECHOPAIR(" ",x);
rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE;
break;
case DGUS_HEADER2_SEEN: // Waiting for the length byte
rx_datagram_len = LCD_SERIAL.read();
DEBUG_ECHOPAIR(" (", rx_datagram_len, ") ");
// Telegram min len is 3 (command and one word of payload)
rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE;
break;
case DGUS_WAIT_TELEGRAM: // wait for complete datagram to arrive.
if (LCD_SERIAL.available() < rx_datagram_len) return;
Initialized = true; // We've talked to it, so we defined it as initialized.
uint8_t command = LCD_SERIAL.read();
DEBUG_ECHOPAIR("# ", command);
uint8_t readlen = rx_datagram_len - 1; // command is part of len.
unsigned char tmp[rx_datagram_len - 1];
unsigned char *ptmp = tmp;
while (readlen--) {
receivedbyte = LCD_SERIAL.read();
DEBUG_ECHOPAIR(" ", receivedbyte);
*ptmp++ = receivedbyte;
}
DEBUG_ECHOPGM(" # ");
// mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it.
if (command == DGUS_CMD_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) {
DEBUG_ECHOLNPGM(">");
rx_datagram_state = DGUS_IDLE;
break;
}
/* AutoUpload, (and answer to) Command 0x83 :
| tmp[0 1 2 3 4 ... ]
| Example 5A A5 06 83 20 01 01 78 01 ……
| / / | | \ / | \ \
| Header | | | | \_____\_ DATA (Words!)
| DatagramLen / VPAdr |
| Command DataLen (in Words) */
if (command == DGUS_CMD_READVAR) {
const uint16_t vp = tmp[0] << 8 | tmp[1];
//const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words)
//DEBUG_ECHOPAIR(" vp=", vp, " dlen=", dlen);
DGUS_VP_Variable ramcopy;
if (populate_VPVar(vp, &ramcopy)) {
if (ramcopy.set_by_display_handler)
ramcopy.set_by_display_handler(ramcopy, &tmp[3]);
else
DEBUG_ECHOLNPGM(" VPVar found, no handler.");
}
else
DEBUG_ECHOLNPAIR(" VPVar not found:", vp);
rx_datagram_state = DGUS_IDLE;
break;
}
// discard anything else
rx_datagram_state = DGUS_IDLE;
}
}
}
size_t DGUSDisplay::GetFreeTxBuffer() { return SERIAL_GET_TX_BUFFER_FREE(); }
void DGUSDisplay::WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen) {
LCD_SERIAL.write(DGUS_HEADER1);
LCD_SERIAL.write(DGUS_HEADER2);
LCD_SERIAL.write(payloadlen + 3);
LCD_SERIAL.write(cmd);
LCD_SERIAL.write(adr >> 8);
LCD_SERIAL.write(adr & 0xFF);
}
void DGUSDisplay::WritePGM(const char str[], uint8_t len) {
while (len--) LCD_SERIAL.write(pgm_read_byte(str++));
}
void DGUSDisplay::loop() {
// protect against recursion… ProcessRx() may indirectly call idle() when injecting gcode commands.
if (!no_reentrance) {
no_reentrance = true;
ProcessRx();
no_reentrance = false;
}
}
rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE;
uint8_t DGUSDisplay::rx_datagram_len = 0;
bool DGUSDisplay::Initialized = false;
bool DGUSDisplay::no_reentrance = false;
// A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() asm volatile("": : :"memory");
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) {
// DEBUG_ECHOPAIR("populate_VPVar ", VP);
const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP);
// DEBUG_ECHOLNPAIR(" pvp ", (uint16_t )pvp);
if (!pvp) return false;
memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable));
return true;
}
#endif // HAS_DGUS_LCD

View File

@@ -0,0 +1,123 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/dgus/DGUSDisplay.h
*/
#include "../../../inc/MarlinConfigPre.h"
#include <stdlib.h> // size_t
#if HAS_BED_PROBE
#include "../../../module/probe.h"
#endif
#include "DGUSVPVariable.h"
enum DGUSLCD_Screens : uint8_t;
//#define DEBUG_DGUSLCD
#define DEBUG_OUT ENABLED(DEBUG_DGUSLCD)
#include "../../../core/debug_out.h"
typedef enum : uint8_t {
DGUS_IDLE, //< waiting for DGUS_HEADER1.
DGUS_HEADER1_SEEN, //< DGUS_HEADER1 received
DGUS_HEADER2_SEEN, //< DGUS_HEADER2 received
DGUS_WAIT_TELEGRAM, //< LEN received, Waiting for to receive all bytes.
} rx_datagram_state_t;
// Low-Level access to the display.
class DGUSDisplay {
public:
DGUSDisplay() = default;
static void InitDisplay();
// Variable access.
static void WriteVariable(uint16_t adr, const void *values, uint8_t valueslen, bool isstr=false);
static void WriteVariablePGM(uint16_t adr, const void *values, uint8_t valueslen, bool isstr=false);
static void WriteVariable(uint16_t adr, int16_t value);
static void WriteVariable(uint16_t adr, uint16_t value);
static void WriteVariable(uint16_t adr, uint8_t value);
static void WriteVariable(uint16_t adr, int8_t value);
static void WriteVariable(uint16_t adr, long value);
static void MKS_WriteVariable(uint16_t adr, uint8_t value);
// Utility functions for bridging ui_api and dbus
template<typename T, float(*Getter)(const T), T selector, typename WireType=uint16_t>
static void SetVariable(DGUS_VP_Variable &var) {
WriteVariable(var.VP, (WireType)Getter(selector));
}
template<typename T, void(*Setter)(const float V, const T), T selector>
static void GetVariable(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t newvalue = swap16(*(uint16_t*)val_ptr);
Setter(newvalue, selector);
}
// Until now I did not need to actively read from the display. That's why there is no ReadVariable
// (I extensively use the auto upload of the display)
// Force display into another screen.
// (And trigger update of containing VPs)
// (to implement a pop up message, which may not be nested)
static void RequestScreen(DGUSLCD_Screens screen);
// Periodic tasks, eg. Rx-Queue handling.
static void loop();
public:
// Helper for users of this class to estimate if an interaction would be blocking.
static size_t GetFreeTxBuffer();
// Checks two things: Can we confirm the presence of the display and has we initiliazed it.
// (both boils down that the display answered to our chatting)
static inline bool isInitialized() { return Initialized; }
private:
static void WriteHeader(uint16_t adr, uint8_t cmd, uint8_t payloadlen);
static void WritePGM(const char str[], uint8_t len);
static void ProcessRx();
static inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); }
static rx_datagram_state_t rx_datagram_state;
static uint8_t rx_datagram_len;
static bool Initialized, no_reentrance;
};
#define GET_VARIABLE(f, t, V...) (&DGUSDisplay::GetVariable<decltype(t), f, t, ##V>)
#define SET_VARIABLE(f, t, V...) (&DGUSDisplay::SetVariable<decltype(t), f, t, ##V>)
extern DGUSDisplay dgusdisplay;
// compile-time x^y
constexpr float cpow(const float x, const int y) { return y == 0 ? 1.0 : x * cpow(x, y - 1); }
/// Find the flash address of a DGUS_VP_Variable for the VP.
const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp);
/// Helper to populate a DGUS_VP_Variable for a given VP. Return false if not found.
bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy);

View File

@@ -0,0 +1,57 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/dgus/DGUSDisplayDef.h
* Defines the interaction between Marlin and the display firmware
*/
#include "DGUSVPVariable.h"
#include <stdint.h>
// Information on which screen which VP is displayed.
// As this is a sparse table, two arrays are needed:
// one to list the VPs of one screen and one to map screens to the lists.
// (Strictly this would not be necessary, but allows to only send data the display needs and reducing load on Marlin)
struct VPMapping {
const uint8_t screen;
const uint16_t *VPList; // The list is null-terminated.
};
extern const struct VPMapping VPMap[];
// List of VPs handled by Marlin / The Display.
extern const struct DGUS_VP_Variable ListOfVP[];
#include "../../../inc/MarlinConfig.h"
#if ENABLED(DGUS_LCD_UI_ORIGIN)
#include "origin/DGUSDisplayDef.h"
#elif ENABLED(DGUS_LCD_UI_MKS)
#include "mks/DGUSDisplayDef.h"
#elif ENABLED(DGUS_LCD_UI_FYSETC)
#include "fysetc/DGUSDisplayDef.h"
#elif ENABLED(DGUS_LCD_UI_HIPRECY)
#include "hiprecy/DGUSDisplayDef.h"
#endif

View File

@@ -0,0 +1,775 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../../inc/MarlinConfigPre.h"
#if HAS_DGUS_LCD
#include "DGUSScreenHandler.h"
#include "../../../MarlinCore.h"
#include "../../../gcode/queue.h"
#include "../../../libs/duration_t.h"
#include "../../../module/settings.h"
#include "../../../module/temperature.h"
#include "../../../module/motion.h"
#include "../../../module/planner.h"
#include "../../../module/printcounter.h"
#include "../../../sd/cardreader.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../feature/powerloss.h"
#endif
DGUSScreenHandler ScreenHandler;
uint16_t DGUSScreenHandler::ConfirmVP;
DGUSLCD_Screens DGUSScreenHandler::current_screen;
DGUSLCD_Screens DGUSScreenHandler::past_screens[NUM_PAST_SCREENS];
uint8_t DGUSScreenHandler::update_ptr;
uint16_t DGUSScreenHandler::skipVP;
bool DGUSScreenHandler::ScreenComplete;
void (*DGUSScreenHandler::confirm_action_cb)() = nullptr;
#if ENABLED(SDSUPPORT)
int16_t DGUSScreenHandler::top_file = 0,
DGUSScreenHandler::file_to_print = 0;
static ExtUI::FileList filelist;
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
filament_data_t filament_data;
#endif
void DGUSScreenHandler::sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
DGUS_VP_Variable ramcopy;
if (populate_VPVar(VP_MSGSTR1, &ramcopy)) {
ramcopy.memadr = (void*) line1;
l1inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
}
if (populate_VPVar(VP_MSGSTR2, &ramcopy)) {
ramcopy.memadr = (void*) line2;
l2inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
}
if (populate_VPVar(VP_MSGSTR3, &ramcopy)) {
ramcopy.memadr = (void*) line3;
l3inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
}
if (populate_VPVar(VP_MSGSTR4, &ramcopy)) {
ramcopy.memadr = (void*) line4;
l4inflash ? DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(ramcopy) : DGUSScreenHandler::DGUSLCD_SendStringToDisplay(ramcopy);
}
}
void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1, bool l2, bool l3, bool l4) {
if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first.
PopToOldScreen();
ConfirmVP = VP;
sendinfoscreen(line1, line2, line3, line4, l1, l2, l3, l4);
GotoScreen(DGUSLCD_SCREEN_CONFIRM);
}
void DGUSScreenHandler::setstatusmessage(const char *msg) {
DGUS_VP_Variable ramcopy;
if (populate_VPVar(VP_M117, &ramcopy)) {
ramcopy.memadr = (void*) msg;
DGUSLCD_SendStringToDisplay(ramcopy);
}
}
void DGUSScreenHandler::setstatusmessagePGM(PGM_P const msg) {
DGUS_VP_Variable ramcopy;
if (populate_VPVar(VP_M117, &ramcopy)) {
ramcopy.memadr = (void*) msg;
DGUSLCD_SendStringToDisplayPGM(ramcopy);
}
}
// Send an 8 bit or 16 bit value to the display.
void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
//DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
//DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr);
if (var.size > 1)
dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr);
else
dgusdisplay.WriteVariable(var.VP, *(int8_t*)var.memadr);
}
}
// Send an uint8_t between 0 and 255 to the display, but scale to a percentage (0..100)
void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
//DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP);
//DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr);
uint16_t tmp = *(uint8_t *) var.memadr + 1; // +1 -> avoid rounding issues for the display.
tmp = map(tmp, 0, 255, 0, 100);
dgusdisplay.WriteVariable(var.VP, tmp);
}
}
// Send the current print progress to the display.
void DGUSScreenHandler::DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var) {
//DEBUG_ECHOPAIR(" DGUSLCD_SendPrintProgressToDisplay ", var.VP);
uint16_t tmp = ExtUI::getProgress_percent();
//DEBUG_ECHOLNPAIR(" data ", tmp);
dgusdisplay.WriteVariable(var.VP, tmp);
}
// Send the current print time to the display.
// It is using a hex display for that: It expects BSD coded data in the format xxyyzz
void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var) {
duration_t elapsed = print_job_timer.duration();
char buf[32];
elapsed.toString(buf);
dgusdisplay.WriteVariable(VP_PrintTime, buf, var.size, true);
}
// Send an uint8_t between 0 and 100 to a variable scale to 0..255
void DGUSScreenHandler::DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr) {
if (var.memadr) {
uint16_t value = swap16(*(uint16_t*)val_ptr);
DEBUG_ECHOLNPAIR("FAN value get:", value);
*(uint8_t*)var.memadr = map(constrain(value, 0, 100), 0, 100, 0, 255);
DEBUG_ECHOLNPAIR("FAN value change:", *(uint8_t*)var.memadr);
}
}
// Sends a (RAM located) string to the DGUS Display
// (Note: The DGUS Display does not clear after the \0, you have to
// overwrite the remainings with spaces.// var.size has the display buffer size!
void DGUSScreenHandler::DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var) {
char *tmp = (char*) var.memadr;
dgusdisplay.WriteVariable(var.VP, tmp, var.size, true);
}
// Sends a (flash located) string to the DGUS Display
// (Note: The DGUS Display does not clear after the \0, you have to
// overwrite the remainings with spaces.// var.size has the display buffer size!
void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
char *tmp = (char*) var.memadr;
dgusdisplay.WriteVariablePGM(var.VP, tmp, var.size, true);
}
#if HAS_PID_HEATING
void DGUSScreenHandler::DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var) {
float value = *(float *)var.memadr;
value /= 10;
float valuesend = 0;
switch (var.VP) {
default: return;
#if HAS_HOTEND
case VP_E0_PID_P: valuesend = value; break;
case VP_E0_PID_I: valuesend = unscalePID_i(value); break;
case VP_E0_PID_D: valuesend = unscalePID_d(value); break;
#endif
#if HOTENDS >= 2
case VP_E1_PID_P: valuesend = value; break;
case VP_E1_PID_I: valuesend = unscalePID_i(value); break;
case VP_E1_PID_D: valuesend = unscalePID_d(value); break;
#endif
#if HAS_HEATED_BED
case VP_BED_PID_P: valuesend = value; break;
case VP_BED_PID_I: valuesend = unscalePID_i(value); break;
case VP_BED_PID_D: valuesend = unscalePID_d(value); break;
#endif
}
valuesend *= cpow(10, 1);
union { int16_t i; char lb[2]; } endian;
char tmp[2];
endian.i = valuesend;
tmp[0] = endian.lb[1];
tmp[1] = endian.lb[0];
dgusdisplay.WriteVariable(var.VP, tmp, 2);
}
#endif
#if ENABLED(PRINTCOUNTER)
// Send the accumulate print time to the display.
// It is using a hex display for that: It expects BSD coded data in the format xxyyzz
void DGUSScreenHandler::DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var) {
printStatistics state = print_job_timer.getStats();
char buf[22];
duration_t elapsed = state.printTime;
elapsed.toString(buf);
dgusdisplay.WriteVariable(VP_PrintAccTime, buf, var.size, true);
}
void DGUSScreenHandler::DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var) {
printStatistics state = print_job_timer.getStats();
char buf[10];
sprintf_P(buf, PSTR("%u"), state.totalPrints);
dgusdisplay.WriteVariable(VP_PrintsTotal, buf, var.size, true);
}
#endif
// Send fan status value to the display.
#if HAS_FAN
void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
DEBUG_ECHOPAIR(" DGUSLCD_SendFanStatusToDisplay ", var.VP);
DEBUG_ECHOLNPAIR(" data ", *(uint8_t *)var.memadr);
uint16_t data_to_send = 0;
if (*(uint8_t *) var.memadr) data_to_send = 1;
dgusdisplay.WriteVariable(var.VP, data_to_send);
}
}
#endif
// Send heater status value to the display.
void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
DEBUG_ECHOPAIR(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP);
DEBUG_ECHOLNPAIR(" data ", *(int16_t *)var.memadr);
uint16_t data_to_send = 0;
if (*(int16_t *) var.memadr) data_to_send = 1;
dgusdisplay.WriteVariable(var.VP, data_to_send);
}
}
#if ENABLED(DGUS_UI_WAITING)
void DGUSScreenHandler::DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var) {
// In FYSETC UI design there are 10 statuses to loop
static uint16_t period = 0;
static uint16_t index = 0;
//DEBUG_ECHOPAIR(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP);
//DEBUG_ECHOLNPAIR(" data ", swap16(index));
if (period++ > DGUS_UI_WAITING_STATUS_PERIOD) {
dgusdisplay.WriteVariable(var.VP, index);
//DEBUG_ECHOLNPAIR(" data ", swap16(index));
if (++index >= DGUS_UI_WAITING_STATUS) index = 0;
period = 0;
}
}
#endif
#if ENABLED(SDSUPPORT)
void DGUSScreenHandler::ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr) {
// default action executed when there is a SD card, but not printing
if (ExtUI::isMediaInserted() && !ExtUI::isPrintingFromMedia()) {
ScreenChangeHook(var, val_ptr);
dgusdisplay.RequestScreen(current_screen);
return;
}
// if we are printing, we jump to two screens after the requested one.
// This should host e.g a print pause / print abort / print resume dialog.
// This concept allows to recycle this hook for other file
if (ExtUI::isPrintingFromMedia() && !card.flag.abort_sd_printing) {
GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION);
return;
}
// Don't let the user in the dark why there is no reaction.
if (!ExtUI::isMediaInserted()) {
setstatusmessagePGM(GET_TEXT(MSG_NO_MEDIA));
return;
}
if (card.flag.abort_sd_printing) {
setstatusmessagePGM(GET_TEXT(MSG_MEDIA_ABORTING));
return;
}
}
void DGUSScreenHandler::DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable& var, void *val_ptr) {
auto old_top = top_file;
const int16_t scroll = (int16_t)swap16(*(uint16_t*)val_ptr);
if (scroll) {
top_file += scroll;
DEBUG_ECHOPAIR("new topfile calculated:", top_file);
if (top_file < 0) {
top_file = 0;
DEBUG_ECHOLNPGM("Top of filelist reached");
}
else {
int16_t max_top = filelist.count() - DGUS_SD_FILESPERSCREEN;
NOLESS(max_top, 0);
NOMORE(top_file, max_top);
}
DEBUG_ECHOPAIR("new topfile adjusted:", top_file);
}
else if (!filelist.isAtRootDir()) {
IF_DISABLED(DGUS_LCD_UI_MKS, filelist.upDir());
top_file = 0;
ForceCompleteUpdate();
}
if (old_top != top_file) ForceCompleteUpdate();
}
void DGUSScreenHandler::DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr) {
ExtUI::stopPrint();
GotoScreen(DGUSLCD_SCREEN_MAIN);
}
void DGUSScreenHandler::DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes.
GotoScreen(DGUSLCD_SCREEN_SDPRINTTUNE);
}
void DGUSScreenHandler::SDCardError() {
DGUSScreenHandler::SDCardRemoved();
sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("SD card error"), nullptr, true, true, true, true);
SetupConfirmAction(nullptr);
GotoScreen(DGUSLCD_SCREEN_POPUP);
}
#endif // SDSUPPORT
void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) {
DGUS_VP_Variable ramcopy;
if (!populate_VPVar(ConfirmVP, &ramcopy)) return;
if (ramcopy.set_by_display_handler) ramcopy.set_by_display_handler(ramcopy, val_ptr);
}
const uint16_t* DGUSLCD_FindScreenVPMapList(uint8_t screen) {
const uint16_t *ret;
const struct VPMapping *map = VPMap;
while ((ret = (uint16_t*) pgm_read_ptr(&(map->VPList)))) {
if (pgm_read_byte(&(map->screen)) == screen) return ret;
map++;
}
return nullptr;
}
const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp) {
const DGUS_VP_Variable *ret = ListOfVP;
do {
const uint16_t vpcheck = pgm_read_word(&(ret->VP));
if (vpcheck == 0) break;
if (vpcheck == vp) return ret;
++ret;
} while (1);
DEBUG_ECHOLNPAIR("FindVPVar NOT FOUND ", vp);
return nullptr;
}
void DGUSScreenHandler::ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::isPrinting()) {
ScreenChangeHook(var, val_ptr);
dgusdisplay.RequestScreen(current_screen);
}
}
void DGUSScreenHandler::HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr) {
thermalManager.disable_all_heaters();
ForceCompleteUpdate(); // hint to send all data.
}
void DGUSScreenHandler::HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr) {
celsius_t newvalue = swap16(*(uint16_t*)val_ptr);
celsius_t acceptedvalue;
switch (var.VP) {
default: return;
#if HAS_HOTEND
case VP_T_E0_Set:
NOMORE(newvalue, HEATER_0_MAXTEMP);
thermalManager.setTargetHotend(newvalue, 0);
acceptedvalue = thermalManager.degTargetHotend(0);
break;
#endif
#if HOTENDS >= 2
case VP_T_E1_Set:
NOMORE(newvalue, HEATER_1_MAXTEMP);
thermalManager.setTargetHotend(newvalue, 1);
acceptedvalue = thermalManager.degTargetHotend(1);
break;
#endif
#if HAS_HEATED_BED
case VP_T_Bed_Set:
NOMORE(newvalue, BED_MAXTEMP);
thermalManager.setTargetBed(newvalue);
acceptedvalue = thermalManager.degTargetBed();
break;
#endif
}
// reply to display the new value to update the view if the new value was rejected by the Thermal Manager.
if (newvalue != acceptedvalue && var.send_to_display_handler) var.send_to_display_handler(var);
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr) {
#if HAS_EXTRUDERS
uint16_t newvalue = swap16(*(uint16_t*)val_ptr);
uint8_t target_extruder;
switch (var.VP) {
default: return;
case VP_Flowrate_E0: target_extruder = 0; break;
#if HAS_MULTI_EXTRUDER
case VP_Flowrate_E1: target_extruder = 1; break;
#endif
}
planner.set_flow(target_extruder, newvalue);
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
#else
UNUSED(var); UNUSED(val_ptr);
#endif
}
void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualExtrude");
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
float target = movevalue * 0.01f;
ExtUI::extruder_t target_extruder;
switch (var.VP) {
#if HAS_HOTEND
case VP_MOVE_E0: target_extruder = ExtUI::extruder_t::E0; break;
#if HAS_MULTI_EXTRUDER
case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break;
#endif
#endif
default: return;
}
target += ExtUI::getAxisPosition_mm(target_extruder);
ExtUI::setAxisPosition_mm(target, target_extruder);
skipVP = var.VP;
}
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
void DGUSScreenHandler::HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualMoveOption");
*(uint16_t*)var.memadr = swap16(*(uint16_t*)val_ptr);
}
#endif
void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleMotorLockUnlock");
char buf[4];
const int16_t lock = swap16(*(uint16_t*)val_ptr);
strcpy_P(buf, lock ? PSTR("M18") : PSTR("M17"));
//DEBUG_ECHOPAIR(" ", buf);
queue.enqueue_one_now(buf);
}
void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleSettings");
uint16_t value = swap16(*(uint16_t*)val_ptr);
switch (value) {
default: break;
case 1:
TERN_(PRINTCOUNTER, print_job_timer.initStats());
settings.reset();
settings.save();
break;
case 2: settings.load(); break;
case 3: settings.save(); break;
}
}
void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleStepPerMMChanged");
uint16_t value_raw = swap16(*(uint16_t*)val_ptr);
DEBUG_ECHOLNPAIR("value_raw:", value_raw);
float value = (float)value_raw / 10;
ExtUI::axis_t axis;
switch (var.VP) {
case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break;
case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break;
case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break;
default: return;
}
DEBUG_ECHOLNPAIR_F("value:", value);
ExtUI::setAxisSteps_per_mm(value, axis);
DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis));
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
return;
}
void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged");
uint16_t value_raw = swap16(*(uint16_t*)val_ptr);
DEBUG_ECHOLNPAIR("value_raw:", value_raw);
float value = (float)value_raw / 10;
ExtUI::extruder_t extruder;
switch (var.VP) {
default: return;
#if HAS_EXTRUDERS
case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break;
#if HAS_MULTI_EXTRUDER
case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break;
#endif
#endif
}
DEBUG_ECHOLNPAIR_F("value:", value);
ExtUI::setAxisSteps_per_mm(value, extruder);
DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder));
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
#if HAS_PID_HEATING
void DGUSScreenHandler::HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandlePIDAutotune");
char buf[32] = {0};
switch (var.VP) {
default: break;
#if ENABLED(PIDTEMP)
#if HAS_HOTEND
case VP_PID_AUTOTUNE_E0: // Autotune Extruder 0
sprintf_P(buf, PSTR("M303 E%d C5 S210 U1"), ExtUI::extruder_t::E0);
break;
#endif
#if HOTENDS >= 2
case VP_PID_AUTOTUNE_E1:
sprintf_P(buf, PSTR("M303 E%d C5 S210 U1"), ExtUI::extruder_t::E1);
break;
#endif
#endif
#if ENABLED(PIDTEMPBED)
case VP_PID_AUTOTUNE_BED:
sprintf_P(buf, PSTR("M303 E-1 C5 S70 U1"));
break;
#endif
}
if (buf[0]) queue.enqueue_one_now(buf);
#if ENABLED(DGUS_UI_WAITING)
sendinfoscreen(PSTR("PID is autotuning"), PSTR("please wait"), NUL_STR, NUL_STR, true, true, true, true);
GotoScreen(DGUSLCD_SCREEN_WAITING);
#endif
}
#endif // HAS_PID_HEATING
#if HAS_BED_PROBE
void DGUSScreenHandler::HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleProbeOffsetZChanged");
const float offset = float(int16_t(swap16(*(uint16_t*)val_ptr))) / 100.0f;
ExtUI::setZOffset_mm(offset);
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
return;
}
#endif
#if HAS_FAN
void DGUSScreenHandler::HandleFanControl(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleFanControl");
*(uint8_t*)var.memadr = *(uint8_t*)var.memadr > 0 ? 0 : 255;
}
#endif
void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleHeaterControl");
uint8_t preheat_temp = 0;
switch (var.VP) {
#if HAS_HOTEND
case VP_E0_CONTROL:
#if HOTENDS >= 2
case VP_E1_CONTROL:
#if HOTENDS >= 3
case VP_E2_CONTROL:
#endif
#endif
preheat_temp = PREHEAT_1_TEMP_HOTEND;
break;
#endif
case VP_BED_CONTROL:
preheat_temp = PREHEAT_1_TEMP_BED;
break;
}
*(int16_t*)var.memadr = *(int16_t*)var.memadr > 0 ? 0 : preheat_temp;
}
#if ENABLED(DGUS_PREHEAT_UI)
void DGUSScreenHandler::HandlePreheat(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandlePreheat");
uint8_t e_temp = 0;
#if ENABLED(HAS_HEATED_BED)
uint8_t bed_temp = 0;
#endif
const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
switch (preheat_option) {
default:
case 0: // Preheat PLA
#if defined(PREHEAT_1_TEMP_HOTEND) && defined(PREHEAT_1_TEMP_BED)
e_temp = PREHEAT_1_TEMP_HOTEND;
TERN_(HAS_HEATED_BED, bed_temp = PREHEAT_1_TEMP_BED);
#endif
break;
case 1: // Preheat ABS
#if defined(PREHEAT_2_TEMP_HOTEND) && defined(PREHEAT_2_TEMP_BED)
e_temp = PREHEAT_2_TEMP_HOTEND;
TERN_(HAS_HEATED_BED, bed_temp = PREHEAT_2_TEMP_BED);
#endif
break;
case 2: // Preheat PET
#if defined(PREHEAT_3_TEMP_HOTEND) && defined(PREHEAT_3_TEMP_BED)
e_temp = PREHEAT_3_TEMP_HOTEND;
TERN_(HAS_HEATED_BED, bed_temp = PREHEAT_3_TEMP_BED);
#endif
break;
case 3: // Preheat FLEX
#if defined(PREHEAT_4_TEMP_HOTEND) && defined(PREHEAT_4_TEMP_BED)
e_temp = PREHEAT_4_TEMP_HOTEND;
TERN_(HAS_HEATED_BED, bed_temp = PREHEAT_4_TEMP_BED);
#endif
break;
case 7: break; // Custom preheat
case 9: break; // Cool down
}
switch (var.VP) {
default: return;
#if HAS_HOTEND
case VP_E0_BED_PREHEAT:
thermalManager.setTargetHotend(e_temp, 0);
TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp));
break;
#endif
#if HOTENDS >= 2
case VP_E1_BED_PREHEAT:
thermalManager.setTargetHotend(e_temp, 1);
TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp));
break;
#endif
}
// Go to the preheat screen to show the heating progress
GotoScreen(DGUSLCD_SCREEN_PREHEAT);
}
#endif // DGUS_PREHEAT_UI
#if ENABLED(POWER_LOSS_RECOVERY)
void DGUSScreenHandler::HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t value = swap16(*(uint16_t*)val_ptr);
if (value) {
queue.inject_P(PSTR("M1000"));
dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), 32, true);
GotoScreen(PLR_SCREEN_RECOVER);
}
else {
recovery.cancel();
GotoScreen(PLR_SCREEN_CANCEL);
}
}
#endif
void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) {
DEBUG_ECHOLNPAIR("SetNewScreen: ", newscreen);
if (!popup) {
memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1);
past_screens[0] = current_screen;
}
current_screen = newscreen;
skipVP = 0;
ForceCompleteUpdate();
}
void DGUSScreenHandler::PopToOldScreen() {
DEBUG_ECHOLNPAIR("PopToOldScreen s=", past_screens[0]);
GotoScreen(past_screens[0], true);
memmove(&past_screens[0], &past_screens[1], sizeof(past_screens) - 1);
past_screens[sizeof(past_screens) - 1] = DGUSLCD_SCREEN_MAIN;
}
void DGUSScreenHandler::UpdateScreenVPData() {
DEBUG_ECHOPAIR(" UpdateScreenVPData Screen: ", current_screen);
const uint16_t *VPList = DGUSLCD_FindScreenVPMapList(current_screen);
if (!VPList) {
DEBUG_ECHOLNPAIR(" NO SCREEN FOR: ", current_screen);
ScreenComplete = true;
return; // nothing to do, likely a bug or boring screen.
}
// Round-robin updating of all VPs.
VPList += update_ptr;
bool sent_one = false;
do {
uint16_t VP = pgm_read_word(VPList);
DEBUG_ECHOPAIR(" VP: ", VP);
if (!VP) {
update_ptr = 0;
DEBUG_ECHOLNPGM(" UpdateScreenVPData done");
ScreenComplete = true;
return; // Screen completed.
}
if (VP == skipVP) { skipVP = 0; continue; }
DGUS_VP_Variable rcpy;
if (populate_VPVar(VP, &rcpy)) {
uint8_t expected_tx = 6 + rcpy.size; // expected overhead is 6 bytes + payload.
// Send the VP to the display, but try to avoid overrunning the Tx Buffer.
// But send at least one VP, to avoid getting stalled.
if (rcpy.send_to_display_handler && (!sent_one || expected_tx <= dgusdisplay.GetFreeTxBuffer())) {
//DEBUG_ECHOPAIR(" calling handler for ", rcpy.VP);
sent_one = true;
rcpy.send_to_display_handler(rcpy);
}
else {
// auto x=dgusdisplay.GetFreeTxBuffer();
//DEBUG_ECHOLNPAIR(" tx almost full: ", x);
//DEBUG_ECHOPAIR(" update_ptr ", update_ptr);
ScreenComplete = false;
return; // please call again!
}
}
} while (++update_ptr, ++VPList, true);
}
void DGUSScreenHandler::GotoScreen(DGUSLCD_Screens screen, bool ispopup) {
dgusdisplay.RequestScreen(screen);
UpdateNewScreen(screen, ispopup);
}
void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) {
DEBUG_ECHOLNPAIR("GotoScreen ", screen);
const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) };
WriteVariable(0x84, gotoscreen, sizeof(gotoscreen));
}
#endif // HAS_DGUS_LCD

View File

@@ -0,0 +1,76 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* lcd/extui/dgus/DGUSScreenHandler.h
*/
#include "../../../inc/MarlinConfigPre.h"
#include "../ui_api.h"
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
typedef struct {
ExtUI::extruder_t extruder; // which extruder to operate
uint8_t action; // load or unload
bool heated; // heating done ?
float purge_length; // the length to extrude before unload, prevent filament jam
} filament_data_t;
extern filament_data_t filament_data;
#endif
// endianness swap
inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); }
#if ENABLED(DGUS_LCD_UI_ORIGIN)
#include "origin/DGUSScreenHandler.h"
#elif ENABLED(DGUS_LCD_UI_MKS)
#include "mks/DGUSScreenHandler.h"
#elif ENABLED(DGUS_LCD_UI_FYSETC)
#include "fysetc/DGUSScreenHandler.h"
#elif ENABLED(DGUS_LCD_UI_HIPRECY)
#include "hiprecy/DGUSScreenHandler.h"
#endif
extern DGUSScreenHandler ScreenHandler;
// Helper to define a DGUS_VP_Variable for common use-cases.
#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR) { \
.VP = VPADR, \
.memadr = VPADRVAR, \
.size = sizeof(VPADRVAR), \
.set_by_display_handler = RXFPTR, \
.send_to_display_handler = TXFPTR \
}
// Helper to define a DGUS_VP_Variable when the size of the var cannot be determined automatically (e.g., a string)
#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR) { \
.VP = VPADR, \
.memadr = VPADRVAR, \
.size = STRLEN, \
.set_by_display_handler = RXFPTR, \
.send_to_display_handler = TXFPTR \
}

View File

@@ -0,0 +1,49 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include <stdint.h>
/**
* DGUSVPVariable.h
*
* Created on: Feb 9, 2019
* Author: tobi
*/
struct DGUS_VP_Variable {
uint16_t VP;
void* memadr; // If nullptr, the value cannot be uploaded to the display.
uint8_t size;
// Callback that will be called if the display modified the value.
// nullptr makes it readonly for the display.
void (*set_by_display_handler)(DGUS_VP_Variable &var, void *val_ptr);
void (*send_to_display_handler)(DGUS_VP_Variable &var);
template<typename T>
DGUS_VP_Variable& operator =(T &o) {
*(T*)memadr = o; // warning this is not typesafe.
// TODO: Call out the display or mark as dirty for the next update.
return *this;
}
};

View File

@@ -0,0 +1,160 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/**
* lcd/extui/dgus/dgus_extui.cpp
*/
#include "../../../inc/MarlinConfigPre.h"
#if HAS_DGUS_LCD
#include "../ui_api.h"
#include "DGUSDisplay.h"
#include "DGUSDisplayDef.h"
#include "DGUSScreenHandler.h"
namespace ExtUI {
void onStartup() {
dgusdisplay.InitDisplay();
ScreenHandler.UpdateScreenVPData();
}
void onIdle() { ScreenHandler.loop(); }
void onPrinterKilled(PGM_P const error, PGM_P const component) {
ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
while (!ScreenHandler.loop()); // Wait while anything is left to be sent
}
void onMediaInserted() { TERN_(SDSUPPORT, ScreenHandler.SDCardInserted()); }
void onMediaError() { TERN_(SDSUPPORT, ScreenHandler.SDCardError()); }
void onMediaRemoved() { TERN_(SDSUPPORT, ScreenHandler.SDCardRemoved()); }
void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
void onPrintTimerStarted() {}
void onPrintTimerPaused() {}
void onPrintTimerStopped() {}
void onFilamentRunout(const extruder_t extruder) {}
void onUserConfirmRequired(const char * const msg) {
if (msg) {
ScreenHandler.sendinfoscreen(PSTR("Please confirm."), nullptr, msg, nullptr, true, true, false, true);
ScreenHandler.SetupConfirmAction(setUserConfirmed);
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP);
}
else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP ) {
ScreenHandler.SetupConfirmAction(nullptr);
ScreenHandler.PopToOldScreen();
}
}
void onStatusChanged(const char * const msg) { ScreenHandler.setstatusmessage(msg); }
void onHomingStart() {}
void onHomingComplete() {}
void onPrintFinished() {}
void onFactoryReset() {}
void onStoreSettings(char *buff) {
// Called when saving to EEPROM (i.e. M500). If the ExtUI needs
// permanent data to be stored, it can write up to eeprom_data_size bytes
// into buff.
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(buff, &myDataStruct, sizeof(myDataStruct));
}
void onLoadSettings(const char *buff) {
// Called while loading settings from EEPROM. If the ExtUI
// needs to retrieve data, it should copy up to eeprom_data_size bytes
// from buff
// Example:
// static_assert(sizeof(myDataStruct) <= eeprom_data_size);
// memcpy(&myDataStruct, buff, sizeof(myDataStruct));
}
void onPostprocessSettings() {
// Called after loading or resetting stored settings
}
void onConfigurationStoreWritten(bool success) {
// Called after the entire EEPROM has been written,
// whether successful or not.
}
void onConfigurationStoreRead(bool success) {
// Called after the entire EEPROM has been read,
// whether successful or not.
}
#if HAS_MESH
void onMeshLevelingStart() {}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {
// Called when any mesh points are updated
}
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) {
// Called to indicate a special condition
}
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLossResume() {
// Called on resume from power-loss
IF_DISABLED(DGUS_LCD_UI_MKS, ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS));
}
#endif
#if HAS_PID_HEATING
void onPidTuning(const result_t rst) {
// Called for temperature PID tuning result
switch (rst) {
case PID_BAD_EXTRUDER_NUM:
ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM));
break;
case PID_TEMP_TOO_HIGH:
ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_TEMP_TOO_HIGH));
break;
case PID_TUNING_TIMEOUT:
ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_TIMEOUT));
break;
case PID_DONE:
ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_AUTOTUNE_DONE));
break;
case PID_STARTED: break;
}
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN);
}
#endif
void onSteppersDisabled() {}
void onSteppersEnabled() {}
}
#endif // HAS_DGUS_LCD

View File

@@ -0,0 +1,475 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* DGUS VPs changed by George Fu in 2019 for Marlin */
#include "../../../../inc/MarlinConfigPre.h"
#if ENABLED(DGUS_LCD_UI_FYSETC)
#include "DGUSDisplayDef.h"
#include "../DGUSDisplay.h"
#include "../DGUSScreenHandler.h"
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../module/planner.h"
#include "../../ui_api.h"
#include "../../../marlinui.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = { VP_MARLIN_VERSION, 0x0000 };
const uint16_t VPList_Main[] PROGMEM = {
// VP_M117, for completeness, but it cannot be auto-uploaded.
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS,
#endif
#if HAS_FAN
VP_Fan0_Percentage, VP_FAN0_STATUS,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
VP_PrintProgress_Percentage,
#endif
0x0000
};
const uint16_t VPList_Temp[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_Status[] PROGMEM = {
// VP_M117, for completeness, but it cannot be auto-uploaded
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
VP_PrintProgress_Percentage,
0x0000
};
const uint16_t VPList_Status2[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded */
#if HAS_HOTEND
VP_Flowrate_E0,
#if HAS_MULTI_EXTRUDER
VP_Flowrate_E1,
#endif
#endif
VP_PrintProgress_Percentage,
VP_PrintTime,
0x0000
};
const uint16_t VPList_Preheat[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_ManualMove[] PROGMEM = {
VP_XPos, VP_YPos, VP_ZPos,
0x0000
};
const uint16_t VPList_ManualExtrude[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HAS_MULTI_EXTRUDER
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
VP_EPos,
0x0000
};
const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
VP_Feedrate_Percentage, VP_Fan0_Percentage,
0x0000
};
const uint16_t VPList_SD_FlowRates[] PROGMEM = {
VP_Flowrate_E0, VP_Flowrate_E1,
0x0000
};
const uint16_t VPList_Filament_heating[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
VP_E0_FILAMENT_LOAD_UNLOAD,
#if HAS_MULTI_EXTRUDER
VP_T_E1_Is, VP_T_E1_Set,
VP_E1_FILAMENT_LOAD_UNLOAD,
#endif
#endif
0x0000
};
const uint16_t VPList_Filament_load_unload[] PROGMEM = {
#if HAS_HOTEND
VP_E0_FILAMENT_LOAD_UNLOAD,
#if HAS_MULTI_EXTRUDER
VP_E1_FILAMENT_LOAD_UNLOAD,
#endif
#endif
0x0000
};
const uint16_t VPList_SDFileList[] PROGMEM = {
VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4,
0x0000
};
const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
VP_PrintProgress_Percentage, VP_PrintTime,
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#if FAN_COUNT > 1
VP_Fan1_Percentage,
#endif
#endif
VP_Flowrate_E0,
0x0000
};
const uint16_t VPList_SDPrintTune[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set, VP_Flowrate_E0,
#if HAS_MULTI_EXTRUDER
VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1, // ERROR: Flowrate is per-extruder, not per-hotend
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
VP_Feedrate_Percentage,
VP_SD_Print_ProbeOffsetZ,
0x0000
};
const uint16_t VPList_StepPerMM[] PROGMEM = {
VP_X_STEP_PER_MM,
VP_Y_STEP_PER_MM,
VP_Z_STEP_PER_MM,
#if HAS_EXTRUDERS
VP_E0_STEP_PER_MM,
#if HAS_MULTI_EXTRUDER
VP_E1_STEP_PER_MM,
#endif
#endif
0x0000
};
const uint16_t VPList_PIDE0[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_E0_PID_P,
VP_E0_PID_I,
VP_E0_PID_D,
#endif
0x0000
};
const uint16_t VPList_PIDBED[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_BED_PID_P,
VP_BED_PID_I,
VP_BED_PID_D,
#endif
0x0000
};
const uint16_t VPList_Infos[] PROGMEM = {
VP_MARLIN_VERSION,
VP_PrintTime,
#if ENABLED(PRINTCOUNTER)
VP_PrintAccTime,
VP_PrintsTotal,
#endif
0x0000
};
const uint16_t VPList_PIDTuningWaiting[] PROGMEM = {
VP_WAITING_STATUS,
0x0000
};
const uint16_t VPList_FLCPreheat[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_FLCPrinting[] PROGMEM = {
#if HAS_HOTEND
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const uint16_t VPList_Z_Offset[] PROGMEM = {
#if HAS_HOTEND
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const struct VPMapping VPMap[] PROGMEM = {
{ DGUSLCD_SCREEN_BOOT, VPList_Boot },
{ DGUSLCD_SCREEN_MAIN, VPList_Main },
{ DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp },
{ DGUSLCD_SCREEN_STATUS, VPList_Status },
{ DGUSLCD_SCREEN_STATUS2, VPList_Status2 },
{ DGUSLCD_SCREEN_PREHEAT, VPList_Preheat },
{ DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove },
{ DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude },
{ DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating },
{ DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation },
{ DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList },
{ DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune },
{ DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting },
{ DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat },
{ DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting },
{ DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset },
{ DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM },
{ DGUSLCD_SCREEN_PID_E, VPList_PIDE0 },
{ DGUSLCD_SCREEN_PID_BED, VPList_PIDBED },
{ DGUSLCD_SCREEN_INFOS, VPList_Infos },
{ 0 , nullptr } // List is terminated with an nullptr as table entry.
};
const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
// Helper to detect touch events
VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr),
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr),
#endif
VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr),
#endif
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
#else
VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
#endif
VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr),
#if ENABLED(POWER_LOSS_RECOVERY)
VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
#endif
VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
#if ENABLED(SINGLE_Z_CALIBRATION)
VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr),
#endif
#if ENABLED(FIRST_LAYER_CAL)
VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr),
#endif
{ .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
// M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
{ .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay },
// Temperature Data
#if HAS_HOTEND
VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(DGUS_PREHEAT_UI)
VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
#endif
#if ENABLED(PIDTEMP)
VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
#endif
#endif
#if HOTENDS >= 2
VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), // ERROR: Flow is per-extruder, not per-hotend
VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(PIDTEMP)
VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
#endif
VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
#endif
#if HAS_HEATED_BED
VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(PIDTEMPBED)
VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#endif
// Fan Data
#if HAS_FAN
#define FAN_VPHELPER(N) \
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
REPEAT(FAN_COUNT, FAN_VPHELPER)
#endif
// Feedrate
VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
// Position Data
VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_YPos, &current_position.y, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_ZPos, &current_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
// Print Progress
VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
// Print Time
VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
#if ENABLED(PRINTCOUNTER)
VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay),
VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay),
#endif
VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#if HAS_EXTRUDERS
VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#if HAS_MULTI_EXTRUDER
VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#endif
#endif
// SDCard File listing.
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr),
VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
#if HAS_BED_PROBE
VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
#if ENABLED(BABYSTEPPING)
VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
#endif
#endif
#endif
#if ENABLED(DGUS_UI_WAITING)
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
VPHELPER(0, 0, 0, 0) // must be last entry.
};
#endif // DGUS_LCD_UI_FYSETC

View File

@@ -0,0 +1,296 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../DGUSDisplayDef.h"
enum DGUSLCD_Screens : uint8_t {
DGUSLCD_SCREEN_BOOT = 0,
DGUSLCD_SCREEN_MAIN = 1,
DGUSLCD_SCREEN_STATUS = 1,
DGUSLCD_SCREEN_STATUS2 = 1,
DGUSLCD_SCREEN_TEMPERATURE = 10,
DGUSLCD_SCREEN_PREHEAT = 18,
DGUSLCD_SCREEN_POWER_LOSS = 100,
DGUSLCD_SCREEN_MANUALMOVE = 192,
DGUSLCD_SCREEN_UTILITY = 120,
DGUSLCD_SCREEN_FILAMENT_HEATING = 146,
DGUSLCD_SCREEN_FILAMENT_LOADING = 148,
DGUSLCD_SCREEN_FILAMENT_UNLOADING = 158,
DGUSLCD_SCREEN_MANUALEXTRUDE = 160,
DGUSLCD_SCREEN_SDFILELIST = 71,
DGUSLCD_SCREEN_SDPRINTMANIPULATION = 73,
DGUSLCD_SCREEN_SDPRINTTUNE = 75,
DGUSLCD_SCREEN_FLC_PREHEAT = 94,
DGUSLCD_SCREEN_FLC_PRINTING = 96,
DGUSLCD_SCREEN_STEPPERMM = 212,
DGUSLCD_SCREEN_PID_E = 214,
DGUSLCD_SCREEN_PID_BED = 218,
DGUSLCD_SCREEN_Z_OFFSET = 222,
DGUSLCD_SCREEN_INFOS = 36,
DGUSLCD_SCREEN_CONFIRM = 240,
DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
DGUSLCD_SCREEN_WAITING = 251,
DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen"
DGUSLCD_SCREEN_UNUSED = 255
};
// Display Memory layout used (T5UID)
// Except system variables this is arbitrary, just to organize stuff....
// 0x0000 .. 0x0FFF -- System variables and reserved by the display
// 0x1000 .. 0x1FFF -- Variables to never change location, regardless of UI Version
// 0x2000 .. 0x2FFF -- Controls (VPs that will trigger some action)
// 0x3000 .. 0x4FFF -- Marlin Data to be displayed
// 0x5000 .. -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
// so that we can keep variables nicely together in the address space.
// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000; // Major -- incremented when incompatible
constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001; // Minor -- incremented on new features, but compatible
constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002; // Patch -- fixed which do not change functionality.
constexpr uint16_t VP_UI_FLAVOUR = 0x1010; // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
constexpr uint16_t VP_MSGSTR1 = 0x1100;
constexpr uint8_t VP_MSGSTR1_LEN = 0x20; // might be more place for it...
constexpr uint16_t VP_MSGSTR2 = 0x1140;
constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
constexpr uint16_t VP_MSGSTR3 = 0x1180;
constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
constexpr uint16_t VP_MSGSTR4 = 0x11C0;
constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
// Screenchange request for screens that only make sense when printer is idle.
// e.g movement is only allowed if printer is not printing.
// Marlin must confirm by setting the screen manually.
constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
constexpr uint16_t VP_SCREENCHANGE = 0x2001; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte.
constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002; // Turn all heaters off. Value arbitrary ;)=
constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
// Buttons on the SD-Card File listing.
constexpr uint16_t VP_SD_ScrollEvent = 0x2020; // Data: 0 for "up a directory", numbers are the amount to scroll, e.g -1 one up, 1 one down
constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
constexpr uint16_t VP_SD_Print_Setting = 0x2040;
constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
// (which would limit us to 655.35mm, which is likely not a problem for common setups, but i don't want to rule out hangprinters support)
// A word about the coding: The VP will be per axis and the return code will be an signed 16 bit value in 0.01 mm resolution, telling us
// the relative travel amount t he user wants to do. So eg. if the display sends us VP=2100 with value 100, the user wants us to move X by +1 mm.
constexpr uint16_t VP_MOVE_X = 0x2100;
constexpr uint16_t VP_MOVE_Y = 0x2102;
constexpr uint16_t VP_MOVE_Z = 0x2104;
constexpr uint16_t VP_MOVE_E0 = 0x2110;
constexpr uint16_t VP_MOVE_E1 = 0x2112;
//constexpr uint16_t VP_MOVE_E2 = 0x2114;
//constexpr uint16_t VP_MOVE_E3 = 0x2116;
//constexpr uint16_t VP_MOVE_E4 = 0x2118;
//constexpr uint16_t VP_MOVE_E5 = 0x211A;
constexpr uint16_t VP_HOME_ALL = 0x2120;
constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
// Power loss recovery
constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
// Fan Control Buttons , switch between "off" and "on"
constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
// Heater Control Buttons , triged between "cool down" and "heat PLA" state
constexpr uint16_t VP_E0_CONTROL = 0x2210;
constexpr uint16_t VP_E1_CONTROL = 0x2212;
//constexpr uint16_t VP_E2_CONTROL = 0x2214;
//constexpr uint16_t VP_E3_CONTROL = 0x2216;
//constexpr uint16_t VP_E4_CONTROL = 0x2218;
//constexpr uint16_t VP_E5_CONTROL = 0x221A;
constexpr uint16_t VP_BED_CONTROL = 0x221C;
// Preheat
constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
constexpr uint16_t VP_E1_BED_PREHEAT = 0x2222;
//constexpr uint16_t VP_E2_BED_PREHEAT = 0x2224;
//constexpr uint16_t VP_E3_BED_PREHEAT = 0x2226;
//constexpr uint16_t VP_E4_BED_PREHEAT = 0x2228;
//constexpr uint16_t VP_E5_BED_PREHEAT = 0x222A;
// Filament load and unload
constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2302;
// Settings store , reset
constexpr uint16_t VP_SETTINGS = 0x2400;
// PID autotune
constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
//constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
//constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
//constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
//constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
// Calibrate Z
constexpr uint16_t VP_Z_CALIBRATE = 0x2430;
// First layer cal
constexpr uint16_t VP_Z_FIRST_LAYER_CAL = 0x2500; // Data: 0 - Cancel first layer cal progress, >0 filament type have loaded
// Firmware version on the boot screen.
constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed.
// Place for status messages.
constexpr uint16_t VP_M117 = 0x3020;
constexpr uint8_t VP_M117_LEN = 0x20;
// Temperatures.
constexpr uint16_t VP_T_E0_Is = 0x3060; // 4 Byte Integer
constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
constexpr uint16_t VP_T_E1_Is = 0x3064; // 4 Byte Integer
// reserved to support up to 6 Extruders:
constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
//constexpr uint16_t VP_T_E2_Is = 0x3068; // 4 Byte Integer
//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
//constexpr uint16_t VP_T_E3_Is = 0x306C; // 4 Byte Integer
//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
//constexpr uint16_t VP_T_E4_Is = 0x3070; // 4 Byte Integer
//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
//constexpr uint16_t VP_T_E4_Is = 0x3074; // 4 Byte Integer
//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
//constexpr uint16_t VP_T_E5_Is = 0x3078; // 4 Byte Integer
//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
constexpr uint16_t VP_T_Bed_Is = 0x3080; // 4 Byte Integer
constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
// reserved for up to 6 Extruders:
//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
constexpr uint16_t VP_Fan0_Percentage = 0x3100; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan1_Percentage = 0x3102; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan2_Percentage = 0x3104; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan3_Percentage = 0x3106; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Feedrate_Percentage = 0x3108; // 2 Byte Integer (0..100)
// Actual Position
constexpr uint16_t VP_XPos = 0x3110; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_YPos = 0x3112; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_ZPos = 0x3114; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_EPos = 0x3120; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_PrintProgress_Percentage = 0x3130; // 2 Byte Integer (0..100)
constexpr uint16_t VP_PrintTime = 0x3140;
constexpr uint16_t VP_PrintTime_LEN = 32;
constexpr uint16_t VP_PrintAccTime = 0x3160;
constexpr uint16_t VP_PrintAccTime_LEN = 32;
constexpr uint16_t VP_PrintsTotal = 0x3180;
constexpr uint16_t VP_PrintsTotal_LEN = 16;
// SDCard File Listing
constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
constexpr uint16_t VP_SD_FileName0 = 0x3200;
constexpr uint16_t VP_SD_FileName1 = 0x3220;
constexpr uint16_t VP_SD_FileName2 = 0x3240;
constexpr uint16_t VP_SD_FileName3 = 0x3260;
constexpr uint16_t VP_SD_FileName4 = 0x3280;
constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
constexpr uint16_t VP_SD_Print_Filename = 0x32C0;
// Fan status
constexpr uint16_t VP_FAN0_STATUS = 0x3300;
constexpr uint16_t VP_FAN1_STATUS = 0x3302;
constexpr uint16_t VP_FAN2_STATUS = 0x3304;
constexpr uint16_t VP_FAN3_STATUS = 0x3306;
// Heater status
constexpr uint16_t VP_E0_STATUS = 0x3310;
constexpr uint16_t VP_E1_STATUS = 0x3312;
//constexpr uint16_t VP_E2_STATUS = 0x3314;
//constexpr uint16_t VP_E3_STATUS = 0x3316;
//constexpr uint16_t VP_E4_STATUS = 0x3318;
//constexpr uint16_t VP_E5_STATUS = 0x331A;
constexpr uint16_t VP_BED_STATUS = 0x331C;
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
//constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
//constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
//constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
//constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
constexpr uint16_t VP_E0_PID_I = 0x3702;
constexpr uint16_t VP_E0_PID_D = 0x3704;
constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4
constexpr uint16_t VP_E1_PID_I = 0x3708;
constexpr uint16_t VP_E1_PID_D = 0x370A;
constexpr uint16_t VP_BED_PID_P = 0x3710;
constexpr uint16_t VP_BED_PID_I = 0x3712;
constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...
// located at 0x5000 and up
// Not used yet!
// This can be used e.g to make controls / data display invisible
constexpr uint16_t SP_T_E0_Is = 0x5000;
constexpr uint16_t SP_T_E0_Set = 0x5010;
constexpr uint16_t SP_T_E1_Is = 0x5020;
constexpr uint16_t SP_T_Bed_Is = 0x5030;
constexpr uint16_t SP_T_Bed_Set = 0x5040;

View File

@@ -0,0 +1,418 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../../../inc/MarlinConfigPre.h"
#if ENABLED(DGUS_LCD_UI_FYSETC)
#include "../DGUSScreenHandler.h"
#include "../../../../MarlinCore.h"
#include "../../../../gcode/queue.h"
#include "../../../../libs/duration_t.h"
#include "../../../../module/settings.h"
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../module/planner.h"
#include "../../../../module/printcounter.h"
#include "../../../../sd/cardreader.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
#endif
#if ENABLED(SDSUPPORT)
void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
if (touched_nr > filelist.count()) return;
if (!filelist.seek(touched_nr)) return;
if (filelist.isDir()) {
filelist.changeDir(filelist.filename());
top_file = 0;
ForceCompleteUpdate();
return;
}
#if ENABLED(DGUS_PRINT_FILENAME)
// Send print filename
dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true);
#endif
// Setup Confirmation screen
file_to_print = touched_nr;
HandleUserConfirmationPopUp(VP_SD_FileSelectConfirm, nullptr, PSTR("Print file"), filelist.filename(), PSTR("from SD Card?"), true, true, false, true);
}
void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) {
if (!filelist.seek(file_to_print)) return;
ExtUI::printFile(filelist.shortFilename());
GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION);
}
void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) {
if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes.
switch (swap16(*(uint16_t*)val_ptr)) {
case 0: { // Resume
if (ExtUI::isPrintingFromMediaPaused()) {
ExtUI::resumePrint();
}
} break;
case 1: // Pause
GotoScreen(MKSLCD_SCREEN_PAUSE);
if (!ExtUI::isPrintingFromMediaPaused()) {
ExtUI::pausePrint();
//ExtUI::mks_pausePrint();
}
break;
case 2: // Abort
HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true);
break;
}
}
void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) {
uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN;
if (target_line > DGUS_SD_FILESPERSCREEN) return;
char tmpfilename[VP_SD_FileName_LEN + 1] = "";
var.memadr = (void*)tmpfilename;
if (filelist.seek(top_file + target_line)) {
snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); // snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s"), filelist.filename());
}
DGUSLCD_SendStringToDisplay(var);
}
void DGUSScreenHandler::SDCardInserted() {
top_file = 0;
filelist.refresh();
auto cs = getCurrentScreen();
if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS)
GotoScreen(DGUSLCD_SCREEN_SDFILELIST);
}
void DGUSScreenHandler::SDCardRemoved() {
if (current_screen == DGUSLCD_SCREEN_SDFILELIST
|| (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm))
|| current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION
) GotoScreen(DGUSLCD_SCREEN_MAIN);
}
#endif // SDSUPPORT
void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
uint8_t *tmp = (uint8_t*)val_ptr;
// The keycode in target is coded as <from-frame><to-frame>, so 0x0100A means
// from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special,
// meaning "return to previous screen"
DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1];
DEBUG_ECHOLNPAIR("\n DEBUG target", target);
if (target == DGUSLCD_SCREEN_POPUP) {
// Special handling for popup is to return to previous menu
if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb();
PopToOldScreen();
return;
}
UpdateNewScreen(target);
#ifdef DEBUG_DGUSLCD
if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target);
#endif
}
void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleManualMove");
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
if (movevalue) {
const uint16_t choice = *(uint16_t*)var.memadr;
movevalue = movevalue < 0 ? -choice : choice;
}
#endif
char axiscode;
unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, dont hardcode.
switch (var.VP) {
default: return;
case VP_MOVE_X:
axiscode = 'X';
if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove;
break;
case VP_MOVE_Y:
axiscode = 'Y';
if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove;
break;
case VP_MOVE_Z:
axiscode = 'Z';
speed = 300; // default to 5mm/s
if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove;
break;
case VP_HOME_ALL: // only used for homing
axiscode = '\0';
movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing.
break;
}
if (!movevalue) {
// homing
DEBUG_ECHOPAIR(" homing ", AS_CHAR(axiscode));
char buf[6] = "G28 X";
buf[4] = axiscode;
//DEBUG_ECHOPAIR(" ", buf);
queue.enqueue_one_now(buf);
//DEBUG_ECHOLNPGM(" ✓");
ForceCompleteUpdate();
return;
}
else {
// movement
DEBUG_ECHOPAIR(" move ", AS_CHAR(axiscode));
bool old_relative_mode = relative_mode;
if (!relative_mode) {
//DEBUG_ECHOPGM(" G91");
queue.enqueue_now_P(PSTR("G91"));
//DEBUG_ECHOPGM(" ✓ ");
}
char buf[32]; // G1 X9999.99 F12345
unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s);
char sign[] = "\0";
int16_t value = movevalue / 100;
if (movevalue < 0) { value = -value; sign[0] = '-'; }
int16_t fraction = ABS(movevalue) % 100;
snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed);
//DEBUG_ECHOPAIR(" ", buf);
queue.enqueue_one_now(buf);
//DEBUG_ECHOLNPGM(" ✓ ");
if (backup_speed != speed) {
snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed);
queue.enqueue_one_now(buf);
//DEBUG_ECHOPAIR(" ", buf);
}
// while (!enqueue_and_echo_command(buf)) idle();
//DEBUG_ECHOLNPGM(" ✓ ");
if (!old_relative_mode) {
//DEBUG_ECHOPGM("G90");
queue.enqueue_now_P(PSTR("G90"));
//DEBUG_ECHOPGM(" ✓ ");
}
}
ForceCompleteUpdate();
DEBUG_ECHOLNPGM("manmv done.");
return;
cannotmove:
DEBUG_ECHOLNPAIR(" cannot move ", AS_CHAR(axiscode));
return;
}
#if HAS_PID_HEATING
void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t rawvalue = swap16(*(uint16_t*)val_ptr);
DEBUG_ECHOLNPAIR("V1:", rawvalue);
float value = (float)rawvalue / 10;
DEBUG_ECHOLNPAIR("V2:", value);
float newvalue = 0;
switch (var.VP) {
default: return;
#if HAS_HOTEND
case VP_E0_PID_P: newvalue = value; break;
case VP_E0_PID_I: newvalue = scalePID_i(value); break;
case VP_E0_PID_D: newvalue = scalePID_d(value); break;
#endif
#if HOTENDS >= 2
case VP_E1_PID_P: newvalue = value; break;
case VP_E1_PID_I: newvalue = scalePID_i(value); break;
case VP_E1_PID_D: newvalue = scalePID_d(value); break;
#endif
#if HAS_HEATED_BED
case VP_BED_PID_P: newvalue = value; break;
case VP_BED_PID_I: newvalue = scalePID_i(value); break;
case VP_BED_PID_D: newvalue = scalePID_d(value); break;
#endif
}
DEBUG_ECHOLNPAIR_F("V3:", newvalue);
*(float *)var.memadr = newvalue;
skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel
}
#endif // HAS_PID_HEATING
#if ENABLED(BABYSTEPPING)
void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleLiveAdjustZ");
int16_t flag = swap16(*(uint16_t*)val_ptr),
steps = flag ? -20 : 20;
ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true);
ForceCompleteUpdate();
}
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) {
DEBUG_ECHOLNPGM("HandleFilamentOption");
uint8_t e_temp = 0;
filament_data.heated = false;
uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
if (preheat_option <= 8) { // Load filament type
filament_data.action = 1;
}
else if (preheat_option >= 10) { // Unload filament type
preheat_option -= 10;
filament_data.action = 2;
filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH;
}
else { // Cancel filament operation
filament_data.action = 0;
}
switch (preheat_option) {
case 0: // Load PLA
#ifdef PREHEAT_1_TEMP_HOTEND
e_temp = PREHEAT_1_TEMP_HOTEND;
#endif
break;
case 1: // Load ABS
TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND);
break;
case 2: // Load PET
#ifdef PREHEAT_3_TEMP_HOTEND
e_temp = PREHEAT_3_TEMP_HOTEND;
#endif
break;
case 3: // Load FLEX
#ifdef PREHEAT_4_TEMP_HOTEND
e_temp = PREHEAT_4_TEMP_HOTEND;
#endif
break;
case 9: // Cool down
default:
e_temp = 0;
break;
}
if (filament_data.action == 0) { // Go back to utility screen
#if HAS_HOTEND
thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0);
#endif
#if HOTENDS >= 2
thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1);
#endif
GotoScreen(DGUSLCD_SCREEN_UTILITY);
}
else { // Go to the preheat screen to show the heating progress
switch (var.VP) {
default: return;
#if HAS_HOTEND
case VP_E0_FILAMENT_LOAD_UNLOAD:
filament_data.extruder = ExtUI::extruder_t::E0;
thermalManager.setTargetHotend(e_temp, filament_data.extruder);
break;
#endif
#if HAS_MULTI_EXTRUDER
case VP_E1_FILAMENT_LOAD_UNLOAD:
filament_data.extruder = ExtUI::extruder_t::E1;
thermalManager.setTargetHotend(e_temp, filament_data.extruder);
break;
#endif
}
GotoScreen(DGUSLCD_SCREEN_FILAMENT_HEATING);
}
}
void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) {
DEBUG_ECHOLNPGM("HandleFilamentLoadUnload");
if (filament_data.action <= 0) return;
// If we close to the target temperature, we can start load or unload the filament
if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \
thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) {
float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME;
if (filament_data.action == 1) { // load filament
if (!filament_data.heated) {
//GotoScreen(DGUSLCD_SCREEN_FILAMENT_LOADING);
filament_data.heated = true;
}
movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue;
}
else { // unload filament
if (!filament_data.heated) {
GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING);
filament_data.heated = true;
}
// Before unloading extrude to prevent jamming
if (filament_data.purge_length >= 0) {
movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue;
filament_data.purge_length -= movevalue;
}
else {
movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue;
}
}
ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder);
}
}
#endif // DGUS_FILAMENT_LOADUNLOAD
bool DGUSScreenHandler::loop() {
dgusdisplay.loop();
const millis_t ms = millis();
static millis_t next_event_ms = 0;
if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) {
next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS;
UpdateScreenVPData();
}
#if ENABLED(SHOW_BOOTSCREEN)
static bool booted = false;
if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid()))
booted = true;
if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT)))
booted = true;
#endif
return IsScreenComplete();
}
#endif // DGUS_LCD_UI_FYSETC

View File

@@ -0,0 +1,240 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../DGUSDisplay.h"
#include "../DGUSVPVariable.h"
#include "../DGUSDisplayDef.h"
#include "../../../../inc/MarlinConfig.h"
enum DGUSLCD_Screens : uint8_t;
class DGUSScreenHandler {
public:
DGUSScreenHandler() = default;
static bool loop();
// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
// The bools specifing whether the strings are in RAM or FLASH.
static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
// "M117" Message -- msg is a RAM ptr.
static void setstatusmessage(const char *msg);
// The same for messages from Flash
static void setstatusmessagePGM(PGM_P const msg);
// Callback for VP "Display wants to change screen on idle printer"
static void ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr);
// Callback for VP "Screen has been changed"
static void ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr);
// Callback for VP "All Heaters Off"
static void HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr);
// Hook for "Change this temperature"
static void HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr);
// Hook for "Change Flowrate"
static void HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr);
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
// Hook for manual move option
static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr);
#endif
// Hook for manual move.
static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr);
// Hook for manual extrude.
static void HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr);
// Hook for motor lock and unlook
static void HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr);
#if ENABLED(POWER_LOSS_RECOVERY)
// Hook for power loss recovery.
static void HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr);
#endif
// Hook for settings
static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr);
static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr);
static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr);
#if HAS_PID_HEATING
// Hook for "Change this temperature PID para"
static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr);
// Hook for PID autotune
static void HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr);
#endif
#if HAS_BED_PROBE
// Hook for "Change probe offset z"
static void HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr);
#endif
#if ENABLED(BABYSTEPPING)
// Hook for live z adjust action
static void HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr);
#endif
#if HAS_FAN
// Hook for fan control
static void HandleFanControl(DGUS_VP_Variable &var, void *val_ptr);
#endif
// Hook for heater control
static void HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr);
#if ENABLED(DGUS_PREHEAT_UI)
// Hook for preheat
static void HandlePreheat(DGUS_VP_Variable &var, void *val_ptr);
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
// Hook for filament load and unload filament option
static void HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr);
// Hook for filament load and unload
static void HandleFilamentLoadUnload(DGUS_VP_Variable &var);
#endif
#if ENABLED(SDSUPPORT)
// Callback for VP "Display wants to change screen when there is a SD card"
static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr);
// Scroll buttons on the file listing screen.
static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr);
// File touched.
static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr);
// start print after confirmation received.
static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr);
// User hit the pause, resume or abort button.
static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr);
// User confirmed the abort action
static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr);
// User hit the tune button
static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr);
// Send a single filename to the display.
static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var);
// Marlin informed us that a new SD has been inserted.
static void SDCardInserted();
// Marlin informed us that the SD Card has been removed().
static void SDCardRemoved();
// Marlin informed us about a bad SD Card.
static void SDCardError();
#endif
// OK Button the Confirm screen.
static void ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr);
// Update data after went to new screen (by display or by GotoScreen)
// remember: store the last-displayed screen, so it can get returned to.
// (e.g for pop up messages)
static void UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup=false);
// Recall the remembered screen.
static void PopToOldScreen();
// Make the display show the screen and update all VPs in it.
static void GotoScreen(DGUSLCD_Screens screen, bool ispopup = false);
static void UpdateScreenVPData();
// Helpers to convert and transfer data to the display.
static void DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var);
static void DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var);
static void DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var);
static void DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var);
static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var);
static void DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var);
static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var);
#if ENABLED(PRINTCOUNTER)
static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var);
static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var);
#endif
#if HAS_FAN
static void DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var);
#endif
static void DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var);
#if ENABLED(DGUS_UI_WAITING)
static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var);
#endif
// Send a value from 0..100 to a variable with a range from 0..255
static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr);
template<typename T>
static void DGUSLCD_SetValueDirectly(DGUS_VP_Variable &var, void *val_ptr) {
if (!var.memadr) return;
union { unsigned char tmp[sizeof(T)]; T t; } x;
unsigned char *ptr = (unsigned char*)val_ptr;
LOOP_L_N(i, sizeof(T)) x.tmp[i] = ptr[sizeof(T) - i - 1];
*(T*)var.memadr = x.t;
}
// Send a float value to the display.
// Display will get a 4-byte integer scaled to the number of digits:
// Tell the display the number of digits and it cheats by displaying a dot between...
template<unsigned int decimals>
static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (long)f);
}
}
// Send a float value to the display.
// Display will get a 2-byte integer scaled to the number of digits:
// Tell the display the number of digits and it cheats by displaying a dot between...
template<unsigned int decimals>
static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) {
if (var.memadr) {
float f = *(float *)var.memadr;
DEBUG_ECHOLNPAIR_F(" >> ", f, 6);
f *= cpow(10, decimals);
dgusdisplay.WriteVariable(var.VP, (int16_t)f);
}
}
// Force an update of all VP on the current screen.
static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; }
// Has all VPs sent to the screen
static inline bool IsScreenComplete() { return ScreenComplete; }
static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; }
static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; }
private:
static DGUSLCD_Screens current_screen; //< currently on screen
static constexpr uint8_t NUM_PAST_SCREENS = 4;
static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; //< LIFO with past screens for the "back" button.
static uint8_t update_ptr; //< Last sent entry in the VPList for the actual screen.
static uint16_t skipVP; //< When updating the screen data, skip this one, because the user is interacting with it.
static bool ScreenComplete; //< All VPs sent to screen?
static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK").
#if ENABLED(SDSUPPORT)
static int16_t top_file; //< file on top of file chooser
static int16_t file_to_print; //< touched file to be confirmed
#endif
static void (*confirm_action_cb)();
};
#if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_SCREEN_RECOVER DGUSLCD_SCREEN_SDPRINTMANIPULATION
#define PLR_SCREEN_CANCEL DGUSLCD_SCREEN_STATUS
#endif

View File

@@ -0,0 +1,477 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
/* DGUS VPs changed by George Fu in 2019 for Marlin */
#include "../../../../inc/MarlinConfigPre.h"
#if ENABLED(DGUS_LCD_UI_HIPRECY)
#include "DGUSDisplayDef.h"
#include "../DGUSDisplay.h"
#include "../DGUSScreenHandler.h"
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../module/planner.h"
#include "../../ui_api.h"
#include "../../../marlinui.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = {
VP_MARLIN_VERSION,
0x0000
};
const uint16_t VPList_Main[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded. */
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS,
#endif
#if HAS_FAN
VP_Fan0_Percentage, VP_FAN0_STATUS,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
VP_PrintProgress_Percentage,
#endif
0x0000
};
const uint16_t VPList_Temp[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_Status[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded */
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#endif
VP_XPos, VP_YPos, VP_ZPos,
VP_Fan0_Percentage,
VP_Feedrate_Percentage,
VP_PrintProgress_Percentage,
0x0000
};
const uint16_t VPList_Status2[] PROGMEM = {
/* VP_M117, for completeness, but it cannot be auto-uploaded */
#if HAS_HOTEND
VP_Flowrate_E0,
#if HOTENDS >= 2
VP_Flowrate_E1,
#endif
#endif
VP_PrintProgress_Percentage,
VP_PrintTime,
0x0000
};
const uint16_t VPList_Preheat[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_ManualMove[] PROGMEM = {
VP_XPos, VP_YPos, VP_ZPos,
0x0000
};
const uint16_t VPList_ManualExtrude[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
VP_EPos,
0x0000
};
const uint16_t VPList_FanAndFeedrate[] PROGMEM = {
VP_Feedrate_Percentage, VP_Fan0_Percentage,
0x0000
};
const uint16_t VPList_SD_FlowRates[] PROGMEM = {
VP_Flowrate_E0, VP_Flowrate_E1,
0x0000
};
const uint16_t VPList_Filament_heating[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
VP_E0_FILAMENT_LOAD_UNLOAD,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
0x0000
};
const uint16_t VPList_Filament_load_unload[] PROGMEM = {
#if HAS_HOTEND
VP_E0_FILAMENT_LOAD_UNLOAD,
#if HOTENDS >= 2
VP_E1_FILAMENT_LOAD_UNLOAD,
#endif
#endif
0x0000
};
const uint16_t VPList_SDFileList[] PROGMEM = {
VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4,
0x0000
};
const uint16_t VPList_SD_PrintManipulation[] PROGMEM = {
VP_PrintProgress_Percentage, VP_PrintTime,
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
#if HAS_FAN
VP_Fan0_Percentage,
#if FAN_COUNT > 1
VP_Fan1_Percentage,
#endif
#endif
VP_Flowrate_E0,
0x0000
};
const uint16_t VPList_SDPrintTune[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#if HOTENDS >= 2
VP_T_E1_Is, VP_T_E1_Set,
#endif
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
VP_Feedrate_Percentage,
#if HAS_FAN
VP_Fan0_Percentage,
#endif
VP_Flowrate_E0,
VP_SD_Print_ProbeOffsetZ,
0x0000
};
const uint16_t VPList_StepPerMM[] PROGMEM = {
VP_X_STEP_PER_MM,
VP_Y_STEP_PER_MM,
VP_Z_STEP_PER_MM,
#if HAS_HOTEND
VP_E0_STEP_PER_MM,
#if HOTENDS >= 2
VP_E1_STEP_PER_MM,
#endif
#endif
0x0000
};
const uint16_t VPList_PIDE0[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_E0_PID_P,
VP_E0_PID_I,
VP_E0_PID_D,
#endif
0x0000
};
const uint16_t VPList_PIDBED[] PROGMEM = {
#if ENABLED(PIDTEMP)
VP_BED_PID_P,
VP_BED_PID_I,
VP_BED_PID_D,
#endif
0x0000
};
const uint16_t VPList_Infos[] PROGMEM = {
VP_MARLIN_VERSION,
VP_PrintTime,
#if ENABLED(PRINTCOUNTER)
VP_PrintAccTime,
VP_PrintsTotal,
#endif
0x0000
};
const uint16_t VPList_PIDTuningWaiting[] PROGMEM = {
VP_WAITING_STATUS,
0x0000
};
const uint16_t VPList_FLCPreheat[] PROGMEM = {
#if HAS_HOTEND
VP_T_E0_Is, VP_T_E0_Set,
#endif
#if HAS_HEATED_BED
VP_T_Bed_Is, VP_T_Bed_Set,
#endif
0x0000
};
const uint16_t VPList_FLCPrinting[] PROGMEM = {
#if HAS_HOTEND
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const uint16_t VPList_Z_Offset[] PROGMEM = {
#if HAS_HOTEND
VP_SD_Print_ProbeOffsetZ,
#endif
0x0000
};
const struct VPMapping VPMap[] PROGMEM = {
{ DGUSLCD_SCREEN_BOOT, VPList_Boot },
{ DGUSLCD_SCREEN_MAIN, VPList_Main },
{ DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp },
{ DGUSLCD_SCREEN_STATUS, VPList_Status },
{ DGUSLCD_SCREEN_STATUS2, VPList_Status2 },
{ DGUSLCD_SCREEN_PREHEAT, VPList_Preheat },
{ DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove },
{ DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset },
{ DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude },
{ DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating },
{ DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload },
{ DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation },
{ DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList },
{ DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune },
{ DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting },
{ DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat },
{ DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting },
{ DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM },
{ DGUSLCD_SCREEN_PID_E, VPList_PIDE0 },
{ DGUSLCD_SCREEN_PID_BED, VPList_PIDBED },
{ DGUSLCD_SCREEN_INFOS, VPList_Infos },
{ 0 , nullptr } // List is terminated with an nullptr as table entry.
};
const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION;
const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
// Helper to detect touch events
VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr),
VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr),
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr),
#endif
VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr),
VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr),
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr),
#endif
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr),
#else
VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr),
VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr),
#endif
VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr),
#if ENABLED(POWER_LOSS_RECOVERY)
VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr),
#endif
VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr),
#if ENABLED(SINGLE_Z_CALIBRATION)
VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr),
#endif
#if ENABLED(FIRST_LAYER_CAL)
VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr),
#endif
{ .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
// M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr
{ .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay },
// Temperature Data
#if HAS_HOTEND
VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(DGUS_PREHEAT_UI)
VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr),
#endif
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload),
#endif
#if ENABLED(PIDTEMP)
VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#endif
#if HOTENDS >= 2
VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr),
VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#endif
#if HAS_HEATED_BED
VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr),
VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay),
#if ENABLED(PIDTEMP)
VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID),
VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr),
#endif
#endif
// Fan Data
#if HAS_FAN
#define FAN_VPHELPER(N) \
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay),
REPEAT(FAN_COUNT, FAN_VPHELPER)
#endif
// Feedrate
VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly<int16_t>, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
// Position Data
VPHELPER(VP_XPos, &current_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_YPos, &current_position.y, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_ZPos, &current_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
// Print Progress
VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay),
// Print Time
VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay),
#if ENABLED(PRINTCOUNTER)
VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay),
VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay),
#endif
VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#if HAS_HOTEND
VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#if HOTENDS >= 2
VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>),
#endif
#endif
// SDCard File listing.
#if ENABLED(SDSUPPORT)
VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ),
VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ),
VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ),
VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ),
VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ),
VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr),
VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr),
VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr),
#if HAS_BED_PROBE
VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>),
#if ENABLED(BABYSTEPPING)
VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr),
#endif
#endif
#endif
#if ENABLED(DGUS_UI_WAITING)
VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay),
#endif
// Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content.
{ .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
{ .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM },
VPHELPER(0, 0, 0, 0) // must be last entry.
};
#endif // DGUS_LCD_UI_HIPRECY

View File

@@ -0,0 +1,292 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "../DGUSDisplayDef.h"
enum DGUSLCD_Screens : uint8_t {
DGUSLCD_SCREEN_BOOT = 160,
DGUSLCD_SCREEN_MAIN = 1,
DGUSLCD_SCREEN_STATUS = 1,
DGUSLCD_SCREEN_STATUS2 = 1,
DGUSLCD_SCREEN_POWER_LOSS = 17,
DGUSLCD_SCREEN_TEMPERATURE = 40,
DGUSLCD_SCREEN_MANUALMOVE = 86,
DGUSLCD_SCREEN_PREHEAT = 48,
DGUSLCD_SCREEN_UTILITY = 70,
DGUSLCD_SCREEN_FILAMENT_HEATING = 80,
DGUSLCD_SCREEN_FILAMENT_LOADING = 76,
DGUSLCD_SCREEN_FILAMENT_UNLOADING = 82,
DGUSLCD_SCREEN_MANUALEXTRUDE = 84,
DGUSLCD_SCREEN_Z_OFFSET = 88,
DGUSLCD_SCREEN_SDFILELIST = 3,
DGUSLCD_SCREEN_SDPRINTMANIPULATION = 7,
DGUSLCD_SCREEN_SDPRINTTUNE = 9,
DGUSLCD_SCREEN_FLC_PREHEAT = 94,
DGUSLCD_SCREEN_FLC_PRINTING = 96,
DGUSLCD_SCREEN_STEPPERMM = 122,
DGUSLCD_SCREEN_PID_E = 126,
DGUSLCD_SCREEN_PID_BED = 128,
DGUSLCD_SCREEN_INFOS = 131,
DGUSLCD_SCREEN_CONFIRM = 240,
DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
DGUSLCD_SCREEN_WAITING = 251,
DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen"
DGUSLCD_SCREEN_UNUSED = 255
};
// Display Memory layout used (T5UID)
// Except system variables this is arbitrary, just to organize stuff....
// 0x0000 .. 0x0FFF -- System variables and reserved by the display
// 0x1000 .. 0x1FFF -- Variables to never change location, regardless of UI Version
// 0x2000 .. 0x2FFF -- Controls (VPs that will trigger some action)
// 0x3000 .. 0x4FFF -- Marlin Data to be displayed
// 0x5000 .. -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
// As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
// so that we can keep variables nicely together in the address space.
// UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000; // Major -- incremented when incompatible
constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001; // Minor -- incremented on new features, but compatible
constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002; // Patch -- fixed which do not change functionality.
constexpr uint16_t VP_UI_FLAVOUR = 0x1010; // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
// Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
constexpr uint16_t VP_MSGSTR1 = 0x1100;
constexpr uint8_t VP_MSGSTR1_LEN = 0x20; // might be more place for it...
constexpr uint16_t VP_MSGSTR2 = 0x1140;
constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
constexpr uint16_t VP_MSGSTR3 = 0x1180;
constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
constexpr uint16_t VP_MSGSTR4 = 0x11C0;
constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
// Screenchange request for screens that only make sense when printer is idle.
// e.g movement is only allowed if printer is not printing.
// Marlin must confirm by setting the screen manually.
constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
constexpr uint16_t VP_SCREENCHANGE = 0x2001; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte.
constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002; // Turn all heaters off. Value arbitrary ;)=
constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
// Buttons on the SD-Card File listing.
constexpr uint16_t VP_SD_ScrollEvent = 0x2020; // Data: 0 for "up a directory", numbers are the amount to scroll, e.g -1 one up, 1 one down
constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
constexpr uint16_t VP_SD_Print_Setting = 0x2040;
constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
// Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
// (which would limit us to 655.35mm, which is likely not a problem for common setups, but i don't want to rule out hangprinters support)
// A word about the coding: The VP will be per axis and the return code will be an signed 16 bit value in 0.01 mm resolution, telling us
// the relative travel amount t he user wants to do. So eg. if the display sends us VP=2100 with value 100, the user wants us to move X by +1 mm.
constexpr uint16_t VP_MOVE_X = 0x2100;
constexpr uint16_t VP_MOVE_Y = 0x2102;
constexpr uint16_t VP_MOVE_Z = 0x2104;
constexpr uint16_t VP_MOVE_E0 = 0x2110;
constexpr uint16_t VP_MOVE_E1 = 0x2112;
//constexpr uint16_t VP_MOVE_E2 = 0x2114;
//constexpr uint16_t VP_MOVE_E3 = 0x2116;
//constexpr uint16_t VP_MOVE_E4 = 0x2118;
//constexpr uint16_t VP_MOVE_E5 = 0x211A;
constexpr uint16_t VP_HOME_ALL = 0x2120;
constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
// Power loss recovery
constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
// Fan Control Buttons , switch between "off" and "on"
constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
//constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
//constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
// Heater Control Buttons , triged between "cool down" and "heat PLA" state
constexpr uint16_t VP_E0_CONTROL = 0x2210;
constexpr uint16_t VP_E1_CONTROL = 0x2212;
//constexpr uint16_t VP_E2_CONTROL = 0x2214;
//constexpr uint16_t VP_E3_CONTROL = 0x2216;
//constexpr uint16_t VP_E4_CONTROL = 0x2218;
//constexpr uint16_t VP_E5_CONTROL = 0x221A;
constexpr uint16_t VP_BED_CONTROL = 0x221C;
// Preheat
constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
//constexpr uint16_t VP_E1_BED_PREHEAT = 0x2222;
//constexpr uint16_t VP_E2_BED_PREHEAT = 0x2224;
//constexpr uint16_t VP_E3_BED_PREHEAT = 0x2226;
//constexpr uint16_t VP_E4_BED_PREHEAT = 0x2228;
//constexpr uint16_t VP_E5_BED_PREHEAT = 0x222A;
// Filament load and unload
constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
// Settings store , reset
constexpr uint16_t VP_SETTINGS = 0x2400;
// PID autotune
constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
//constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
//constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
//constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
//constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
//constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
// Calibrate Z
constexpr uint16_t VP_Z_CALIBRATE = 0x2430;
// First layer cal
constexpr uint16_t VP_Z_FIRST_LAYER_CAL = 0x2500; // Data: 0 - Cancel first layer cal progress, >0 filament type have loaded
// Firmware version on the boot screen.
constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed.
// Place for status messages.
constexpr uint16_t VP_M117 = 0x3020;
constexpr uint8_t VP_M117_LEN = 0x20;
// Temperatures.
constexpr uint16_t VP_T_E0_Is = 0x3060; // 4 Byte Integer
constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
constexpr uint16_t VP_T_E1_Is = 0x3064; // 4 Byte Integer
// reserved to support up to 6 Extruders:
//constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
//constexpr uint16_t VP_T_E2_Is = 0x3068; // 4 Byte Integer
//constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
//constexpr uint16_t VP_T_E3_Is = 0x306C; // 4 Byte Integer
//constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
//constexpr uint16_t VP_T_E4_Is = 0x3070; // 4 Byte Integer
//constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
//constexpr uint16_t VP_T_E4_Is = 0x3074; // 4 Byte Integer
//constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
//constexpr uint16_t VP_T_E5_Is = 0x3078; // 4 Byte Integer
//constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
constexpr uint16_t VP_T_Bed_Is = 0x3080; // 4 Byte Integer
constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
// reserved for up to 6 Extruders:
//constexpr uint16_t VP_Flowrate_E2 = 0x3094;
//constexpr uint16_t VP_Flowrate_E3 = 0x3096;
//constexpr uint16_t VP_Flowrate_E4 = 0x3098;
//constexpr uint16_t VP_Flowrate_E5 = 0x309A;
constexpr uint16_t VP_Fan0_Percentage = 0x3100; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan1_Percentage = 0x3102; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan2_Percentage = 0x3104; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Fan3_Percentage = 0x3106; // 2 Byte Integer (0..100)
constexpr uint16_t VP_Feedrate_Percentage = 0x3108; // 2 Byte Integer (0..100)
// Actual Position
constexpr uint16_t VP_XPos = 0x3110; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_YPos = 0x3112; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_ZPos = 0x3114; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_EPos = 0x3120; // 4 Byte Fixed point number; format xxx.yy
constexpr uint16_t VP_PrintProgress_Percentage = 0x3130; // 2 Byte Integer (0..100)
constexpr uint16_t VP_PrintTime = 0x3140;
constexpr uint16_t VP_PrintTime_LEN = 32;
constexpr uint16_t VP_PrintAccTime = 0x3160;
constexpr uint16_t VP_PrintAccTime_LEN = 32;
constexpr uint16_t VP_PrintsTotal = 0x3180;
constexpr uint16_t VP_PrintsTotal_LEN = 16;
// SDCard File Listing
constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
constexpr uint16_t VP_SD_FileName0 = 0x3200;
constexpr uint16_t VP_SD_FileName1 = 0x3220;
constexpr uint16_t VP_SD_FileName2 = 0x3240;
constexpr uint16_t VP_SD_FileName3 = 0x3260;
constexpr uint16_t VP_SD_FileName4 = 0x3280;
constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
constexpr uint16_t VP_SD_Print_Filename = 0x32C0; //
// Fan status
constexpr uint16_t VP_FAN0_STATUS = 0x3300;
constexpr uint16_t VP_FAN1_STATUS = 0x3302;
//constexpr uint16_t VP_FAN2_STATUS = 0x3304;
//constexpr uint16_t VP_FAN3_STATUS = 0x3306;
// Heater status
constexpr uint16_t VP_E0_STATUS = 0x3310;
//constexpr uint16_t VP_E1_STATUS = 0x3312;
//constexpr uint16_t VP_E2_STATUS = 0x3314;
//constexpr uint16_t VP_E3_STATUS = 0x3316;
//constexpr uint16_t VP_E4_STATUS = 0x3318;
//constexpr uint16_t VP_E5_STATUS = 0x331A;
constexpr uint16_t VP_BED_STATUS = 0x331C;
constexpr uint16_t VP_MOVE_OPTION = 0x3400;
// Step per mm
constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
//constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
//constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
//constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
//constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
//constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
//constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
//constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
//constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
// PIDs
constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
constexpr uint16_t VP_E0_PID_I = 0x3702;
constexpr uint16_t VP_E0_PID_D = 0x3704;
constexpr uint16_t VP_BED_PID_P = 0x3710;
constexpr uint16_t VP_BED_PID_I = 0x3712;
constexpr uint16_t VP_BED_PID_D = 0x3714;
// Wating screen status
constexpr uint16_t VP_WAITING_STATUS = 0x3800;
// SPs for certain variables...
// located at 0x5000 and up
// Not used yet!
// This can be used e.g to make controls / data display invisible
constexpr uint16_t SP_T_E0_Is = 0x5000;
constexpr uint16_t SP_T_E0_Set = 0x5010;
constexpr uint16_t SP_T_E1_Is = 0x5020;
constexpr uint16_t SP_T_Bed_Is = 0x5030;
constexpr uint16_t SP_T_Bed_Set = 0x5040;

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