Merge remote-tracking branch 'upstream/bugfix-2.0.x' into bugfix-2.0.x

This commit is contained in:
Foxies 2020-10-21 23:18:10 +02:00
commit 6a436e284e
108 changed files with 4134 additions and 1100 deletions

1
.gitignore vendored
View file

@ -77,7 +77,6 @@ tags
*.out
*.app
#
# C
#

View file

@ -107,7 +107,8 @@
/**
* Select a secondary serial port on the board to use for communication with the host.
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT_2 1
#define NUM_SERIAL 2
@ -335,6 +336,9 @@
//#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80
//#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power
//#define PSU_POWERUP_GCODE "M355 S1" // G-code to run after power-on (e.g., case light on)
//#define PSU_POWEROFF_GCODE "M355 S0" // G-code to run before power-off (e.g., case light off)
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
#if ENABLED(AUTO_POWER_CONTROL)
#define AUTO_POWER_FANS // Turn on PSU if fans need power

View file

@ -3456,6 +3456,13 @@
// Default behavior is limited to Z axis only.
#endif
/**
* Ethernet. Use M552 to enable and set the IP address.
*/
#if HAS_ETHERNET
#define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xF0, 0x0D } // A MAC address unique to your network
#endif
/**
* WiFi Support (Espressif ESP32 WiFi)
*/

View file

@ -86,7 +86,7 @@ volatile int numPWMUsed = 0,
#endif
void HAL_init() { i2s_init(); }
void HAL_init() { TERN_(I2S_STEPPER_STREAM, i2s_init()); }
void HAL_init_board() {

View file

@ -66,6 +66,8 @@
#ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 usbSerial
#elif SERIAL_PORT_2 == -2
#define MYSERIAL1 ethernet.telnetClient
#elif WITHIN(SERIAL_PORT_2, 0, 8)
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
#else

View file

@ -77,6 +77,10 @@
#include "lcd/dwin/e3v2/rotary_encoder.h"
#endif
#if HAS_ETHERNET
#include "feature/ethernet.h"
#endif
#if ENABLED(IIC_BL24CXX_EEPROM)
#include "libs/BL24CXX.h"
#endif
@ -713,6 +717,9 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
HAL_idletask();
#endif
// Check network connection
TERN_(HAS_ETHERNET, ethernet.check());
// Handle Power-Loss Recovery
#if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS)
if (printJobOngoing()) recovery.outage();
@ -968,7 +975,7 @@ void setup() {
MYSERIAL0.begin(BAUDRATE);
uint32_t serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#if HAS_MULTI_SERIAL
#if HAS_MULTI_SERIAL && !HAS_ETHERNET
MYSERIAL1.begin(BAUDRATE);
serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
@ -1090,6 +1097,10 @@ void setup() {
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
// This also updates variables in the planner, elsewhere
#if HAS_ETHERNET
SETUP_RUN(ethernet.init());
#endif
#if HAS_TOUCH_XPT2046
SETUP_RUN(touch.init());
#endif

View file

@ -109,6 +109,9 @@
#define BOARD_COPYMASTER_3D 1153 // Copymaster 3D
#define BOARD_ORTUR_4 1154 // Ortur 4
#define BOARD_TENLOG_D3_HERO 1155 // Tenlog D3 Hero IDEX printer
#define BOARD_RAMPS_S_12_EEFB 1156 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Fan, Bed)
#define BOARD_RAMPS_S_12_EEEB 1157 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend0, Hotend1, Hotend2, Bed)
#define BOARD_RAMPS_S_12_EFFB 1158 // Ramps S 1.2 by Sakul.cz (Power outputs: Hotend, Fan0, Fan1, Bed)
//
// RAMBo and derivatives
@ -308,19 +311,20 @@
#define BOARD_BTT_SKR_MINI_E3_V1_0 4022 // BigTreeTech SKR Mini E3 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_2 4023 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 4024 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4025 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4026 // JGAurora A5S A1 (STM32F103ZET6)
#define BOARD_FYSETC_AIO_II 4027 // FYSETC AIO_II
#define BOARD_FYSETC_CHEETAH 4028 // FYSETC Cheetah
#define BOARD_FYSETC_CHEETAH_V12 4029 // FYSETC Cheetah V1.2
#define BOARD_LONGER3D_LK 4030 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
#define BOARD_CCROBOT_MEEB_3DP 4031 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4032 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CHITU3D_V6 4033 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CREALITY_V4 4034 // Creality v4.x (STM32F103RE)
#define BOARD_CREALITY_V427 4035 // Creality v4.2.7 (STM32F103RE)
#define BOARD_TRIGORILLA_PRO 4036 // Trigorilla Pro (STM32F103ZET6)
#define BOARD_FLY_MINI 4037 // FLY MINI (STM32F103RCT6)
#define BOARD_BTT_SKR_MINI_MZ_V1_0 4025 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4026 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4027 // JGAurora A5S A1 (STM32F103ZET6)
#define BOARD_FYSETC_AIO_II 4028 // FYSETC AIO_II
#define BOARD_FYSETC_CHEETAH 4029 // FYSETC Cheetah
#define BOARD_FYSETC_CHEETAH_V12 4030 // FYSETC Cheetah V1.2
#define BOARD_LONGER3D_LK 4031 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
#define BOARD_CCROBOT_MEEB_3DP 4032 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4033 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CHITU3D_V6 4034 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CREALITY_V4 4035 // Creality v4.x (STM32F103RE)
#define BOARD_CREALITY_V427 4036 // Creality v4.2.7 (STM32F103RE)
#define BOARD_TRIGORILLA_PRO 4037 // Trigorilla Pro (STM32F103ZET6)
#define BOARD_FLY_MINI 4038 // FLY MINI (STM32F103RCT6)
#define BOARD_FLSUN_HISPEED 4038 // FLSUN HiSpeedV1 (STM32F103VET6)
//

View file

@ -23,6 +23,10 @@
#include "../inc/MarlinConfig.h"
#if HAS_ETHERNET
#include "../feature/ethernet.h"
#endif
/**
* Define debug bit-masks
*/
@ -56,8 +60,9 @@ extern uint8_t marlin_debug_flags;
#define SERIAL_OUT(WHAT, V...) (void)CAT(MYSERIAL,SERIAL_CATCHALL).WHAT(V)
#else
#define SERIAL_OUT(WHAT, V...) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \
if ( serial_port_index) (void)MYSERIAL1.WHAT(V); \
const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client); \
if ( serial_port_index == 0 || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \
if ((serial_port_index == 1 || serial_port_index == SERIAL_BOTH) && port2_open) (void)MYSERIAL1.WHAT(V); \
}while(0)
#endif

View file

@ -0,0 +1,175 @@
/**
* 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_ETHERNET
#include "ethernet.h"
#include "../core/serial.h"
#define DEBUG_OUT ENABLED(DEBUG_ETHERNET)
#include "../core/debug_out.h"
bool MarlinEthernet::hardware_enabled, // = false
MarlinEthernet::have_telnet_client; // = false
IPAddress MarlinEthernet::ip,
MarlinEthernet::myDns,
MarlinEthernet::gateway,
MarlinEthernet::subnet;
EthernetClient MarlinEthernet::telnetClient; // connected client
MarlinEthernet ethernet;
EthernetServer server(23); // telnet server
enum linkStates { UNLINKED, LINKING, LINKED, CONNECTING, CONNECTED, NO_HARDWARE } linkState;
#ifdef __IMXRT1062__
static void teensyMAC(uint8_t * const mac) {
const uint32_t m1 = HW_OCOTP_MAC1, m2 = HW_OCOTP_MAC0;
mac[0] = m1 >> 8;
mac[1] = m1 >> 0;
mac[2] = m2 >> 24;
mac[3] = m2 >> 16;
mac[4] = m2 >> 8;
mac[5] = m2 >> 0;
}
#else
byte mac[] = MAC_ADDRESS;
#endif
void ethernet_cable_error() { SERIAL_ERROR_MSG("Ethernet cable is not connected."); }
void MarlinEthernet::init() {
if (!hardware_enabled) return;
SERIAL_ECHO_MSG("Starting network...");
// Init the Ethernet device
#ifdef __IMXRT1062__
uint8_t mac[6];
teensyMAC(mac);
#endif
if (!ip) {
Ethernet.begin(mac); // use DHCP
}
else {
if (!gateway) {
gateway = ip;
gateway[3] = 1;
myDns = gateway;
subnet = IPAddress(255,255,255,0);
}
if (!myDns) myDns = gateway;
if (!subnet) subnet = IPAddress(255,255,255,0);
Ethernet.begin(mac, ip, myDns, gateway, subnet);
}
// Check for Ethernet hardware present
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
SERIAL_ERROR_MSG("No Ethernet hardware found.");
linkState = NO_HARDWARE;
return;
}
linkState = UNLINKED;
if (Ethernet.linkStatus() == LinkOFF)
ethernet_cable_error();
}
void MarlinEthernet::check() {
if (!hardware_enabled) return;
switch (linkState) {
case NO_HARDWARE:
break;
case UNLINKED:
if (Ethernet.linkStatus() == LinkOFF) break;
SERIAL_ECHOLNPGM("Ethernet cable connected");
server.begin();
linkState = LINKING;
break;
case LINKING:
if (!Ethernet.localIP()) break;
SERIAL_ECHOPGM("Successfully started telnet server with IP ");
MYSERIAL0.println(Ethernet.localIP());
linkState = LINKED;
break;
case LINKED:
if (Ethernet.linkStatus() == LinkOFF) {
ethernet_cable_error();
linkState = UNLINKED;
break;
}
telnetClient = server.accept();
if (telnetClient) linkState = CONNECTING;
break;
case CONNECTING:
telnetClient.println("Marlin " SHORT_BUILD_VERSION);
#if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR)
telnetClient.println(
" Last Updated: " STRING_DISTRIBUTION_DATE
" | Author: " STRING_CONFIG_H_AUTHOR
);
#endif
telnetClient.println("Compiled: " __DATE__);
SERIAL_ECHOLNPGM("Client connected");
have_telnet_client = true;
linkState = CONNECTED;
break;
case CONNECTED:
if (telnetClient && !telnetClient.connected()) {
SERIAL_ECHOLNPGM("Client disconnected");
telnetClient.stop();
have_telnet_client = false;
linkState = LINKED;
}
if (Ethernet.linkStatus() == LinkOFF) {
ethernet_cable_error();
if (telnetClient) telnetClient.stop();
linkState = UNLINKED;
}
break;
default: break;
}
}
#endif // HAS_ETHERNET

View file

@ -0,0 +1,39 @@
/**
* 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
#ifdef __IMXRT1062__
#include <NativeEthernet.h>
#endif
// Teensy 4.1 uses internal MAC Address
class MarlinEthernet {
public:
static bool hardware_enabled, have_telnet_client;
static IPAddress ip, myDns, gateway, subnet;
static EthernetClient telnetClient;
static void init();
static void check();
};
extern MarlinEthernet ethernet;

View file

@ -33,6 +33,10 @@
#include "../module/stepper/indirection.h"
#include "../MarlinCore.h"
#if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE)
#include "../gcode/gcode.h"
#endif
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
#include "controllerfan.h"
#endif
@ -107,11 +111,19 @@ void Power::power_on() {
safe_delay(PSU_POWERUP_DELAY);
restore_stepper_drivers();
TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY));
#ifdef PSU_POWERUP_GCODE
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE));
#endif
}
}
void Power::power_off() {
if (powersupply_on) PSU_PIN_OFF();
if (powersupply_on) {
#ifdef PSU_POWEROFF_GCODE
GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE));
#endif
PSU_PIN_OFF();
}
}
#endif // AUTO_POWER_CONTROL

View file

@ -136,7 +136,7 @@
#define G26_ERR true
#if ENABLED(ARC_SUPPORT)
void plan_arc(const xyze_pos_t &cart, const ab_float_t &offset, const uint8_t clockwise);
void plan_arc(const xyze_pos_t&, const ab_float_t&, const bool, const uint8_t);
#endif
constexpr float g26_e_axis_feedrate = 0.025;
@ -783,7 +783,7 @@ void GcodeSuite::G26() {
const feedRate_t old_feedrate = feedrate_mm_s;
feedrate_mm_s = PLANNER_XY_FEEDRATE() * 0.1f;
plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
plan_arc(endpoint, arc_offset, false, 0); // Draw a counter-clockwise arc
feedrate_mm_s = old_feedrate;
destination = current_position;

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/>.
*
*/
#include "../../../inc/MarlinConfigPre.h"
#if HAS_ETHERNET
#include "../../../feature/ethernet.h"
#include "../../../core/serial.h"
#include "../../gcode.h"
void say_ethernet() { SERIAL_ECHOPGM(" Ethernet "); }
void ETH0_report() {
say_ethernet();
SERIAL_ECHO_TERNARY(ethernet.hardware_enabled, "port ", "en", "dis", "abled.\n");
if (ethernet.hardware_enabled) {
say_ethernet();
SERIAL_ECHO_TERNARY(ethernet.have_telnet_client, "client ", "en", "dis", "abled.\n");
}
else
SERIAL_ECHOLNPGM("Send 'M552 S1' to enable.");
}
void MAC_report() {
uint8_t mac[6];
if (ethernet.hardware_enabled) {
Ethernet.MACAddress(mac);
SERIAL_ECHOPGM(" MAC: ");
LOOP_L_N(i, 6) {
SERIAL_PRINTF("%02X", mac[i]);
if (i < 5) SERIAL_CHAR(':');
}
}
SERIAL_EOL();
}
// Display current values when the link is active,
// otherwise show the stored values
void ip_report(const uint16_t cmd, PGM_P const post, const IPAddress &ipo) {
SERIAL_CHAR('M'); SERIAL_ECHO(cmd); SERIAL_CHAR(' ');
LOOP_L_N(i, 4) {
SERIAL_ECHO(ipo[i]);
if (i < 3) SERIAL_CHAR('.');
}
SERIAL_ECHOPGM(" ; ");
SERIAL_ECHOPGM_P(post);
SERIAL_EOL();
}
void M552_report() {
ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip);
}
void M553_report() {
ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet);
}
void M554_report() {
ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway);
}
/**
* M552: Set IP address, enable/disable network interface
*
* S0 : disable networking
* S1 : enable networking
* S-1 : reset network interface
*
* Pnnn : Set IP address, 0.0.0.0 means acquire an IP address using DHCP
*/
void GcodeSuite::M552() {
const bool seenP = parser.seenval('P');
if (seenP) ethernet.ip.fromString(parser.value_string());
const bool seenS = parser.seenval('S');
if (seenS) {
switch (parser.value_int()) {
case -1:
if (ethernet.telnetClient) ethernet.telnetClient.stop();
ethernet.init();
break;
case 0: ethernet.hardware_enabled = false; break;
case 1: ethernet.hardware_enabled = true; break;
default: break;
}
}
const bool nopar = !seenS && !seenP;
if (nopar || seenS) ETH0_report();
if (nopar || seenP) M552_report();
}
/**
* M553 Pnnn - Set netmask
*/
void GcodeSuite::M553() {
if (parser.seenval('P')) ethernet.subnet.fromString(parser.value_string());
M553_report();
}
/**
* M554 Pnnn - Set Gateway
*/
void GcodeSuite::M554() {
if (parser.seenval('P')) ethernet.gateway.fromString(parser.value_string());
M554_report();
}
#endif // HAS_ETHERNET

View file

@ -58,7 +58,7 @@ void GcodeSuite::M510() {
if (password.is_set && parser.ulongval('P') != password.value) {
SERIAL_ECHOLNPGM(STR_WRONG_PASSWORD);
return;
}
}
if (parser.seenval('S')) {
password.value_entry = parser.ulongval('S');

View file

@ -766,6 +766,12 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 540: M540(); break; // M540: Set abort on endstop hit for SD printing
#endif
#if HAS_ETHERNET
case 552: M552(); break; // M552: Set IP address
case 553: M553(); break; // M553: Set gateway
case 554: M554(); break; // M554: Set netmask
#endif
#if ENABLED(BAUD_RATE_GCODE)
case 575: M575(); break; // M575: Set serial baudrate
#endif

View file

@ -230,6 +230,9 @@
* M512 - Set/Change/Remove Password
* M524 - Abort the current SD print job started with M24. (Requires SDSUPPORT)
* M540 - Enable/disable SD card abort on endstop hit: "M540 S<state>". (Requires SD_ABORT_ON_ENDSTOP_HIT)
* M552 - Get or set IP address. Enable/disable network interface. (Requires enabled Ethernet port)
* M553 - Get or set IP netmask. (Requires enabled Ethernet port)
* M554 - Get or set IP gateway. (Requires enabled Ethernet port)
* M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160)
* M600 - Pause for filament change: "M600 X<pos> Y<pos> Z<raise> E<first_retract> L<later_retract>". (Requires ADVANCED_PAUSE_FEATURE)
* M603 - Configure filament change: "M603 T<tool> U<unload_length> L<load_length>". (Requires ADVANCED_PAUSE_FEATURE)
@ -778,6 +781,12 @@ private:
TERN_(SD_ABORT_ON_ENDSTOP_HIT, static void M540());
#if HAS_ETHERNET
static void M552();
static void M553();
static void M554();
#endif
TERN_(BAUD_RATE_GCODE, static void M575());
#if ENABLED(ADVANCED_PAUSE_FEATURE)

View file

@ -52,7 +52,8 @@
void plan_arc(
const xyze_pos_t &cart, // Destination position
const ab_float_t &offset, // Center of rotation relative to current_position
const uint8_t clockwise // Clockwise?
const bool clockwise, // Clockwise?
const uint8_t circles // Take the scenic route
) {
#if ENABLED(CNC_WORKSPACE_PLANES)
AxisEnum p_axis, q_axis, l_axis;
@ -74,9 +75,7 @@ void plan_arc(
center_Q = current_position[q_axis] - rvec.b,
rt_X = cart[p_axis] - center_P,
rt_Y = cart[q_axis] - center_Q,
start_L = current_position[l_axis],
linear_travel = cart[l_axis] - start_L,
extruder_travel = cart.e - current_position.e;
start_L = current_position[l_axis];
// CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required.
float angular_travel = ATAN2(rvec.a * rt_Y - rvec.b * rt_X, rvec.a * rt_X + rvec.b * rt_Y);
@ -90,13 +89,32 @@ void plan_arc(
if (clockwise) angular_travel -= RADIANS(360);
// Make a circle if the angular rotation is 0 and the target is current position
if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis]) {
if (NEAR_ZERO(angular_travel) && NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) {
angular_travel = RADIANS(360);
#ifdef MIN_ARC_SEGMENTS
min_segments = MIN_ARC_SEGMENTS;
#endif
}
float linear_travel = cart[l_axis] - start_L,
extruder_travel = cart.e - current_position.e;
// If circling around...
if (ENABLED(ARC_P_CIRCLES) && circles) {
const float total_angular = angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder
part_per_circle = RADIANS(360) / total_angular, // Each circle's part of the total
l_per_circle = linear_travel * part_per_circle, // L movement per circle
e_per_circle = extruder_travel * part_per_circle; // E movement per circle
xyze_pos_t temp_position = current_position; // for plan_arc to compare to current_position
for (uint16_t n = circles; n--;) {
temp_position.e += e_per_circle; // Destination E axis
temp_position[l_axis] += l_per_circle; // Destination L axis
plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle
}
linear_travel = cart[l_axis] - current_position[l_axis];
extruder_travel = cart.e - current_position.e;
}
const float flat_mm = radius * angular_travel,
mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : ABS(flat_mm);
if (mm_of_travel < 0.001f) return;
@ -150,7 +168,7 @@ void plan_arc(
linear_per_segment = linear_travel / segments,
extruder_per_segment = extruder_travel / segments,
sq_theta_per_segment = sq(theta_per_segment),
sin_T = theta_per_segment - sq_theta_per_segment*theta_per_segment/6,
sin_T = theta_per_segment - sq_theta_per_segment * theta_per_segment / 6,
cos_T = 1 - 0.5f * sq_theta_per_segment; // Small angle approximation
// Initialize the linear axis
@ -320,16 +338,15 @@ void GcodeSuite::G2_G3(const bool clockwise) {
#if ENABLED(ARC_P_CIRCLES)
// P indicates number of circles to do
int8_t circles_to_do = parser.byteval('P');
const int8_t circles_to_do = parser.byteval('P');
if (!WITHIN(circles_to_do, 0, 100))
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
while (circles_to_do--)
plan_arc(current_position, arc_offset, clockwise);
#else
constexpr uint8_t circles_to_do = 0;
#endif
// Send the arc to the planner
plan_arc(destination, arc_offset, clockwise);
plan_arc(destination, arc_offset, clockwise, circles_to_do);
reset_stepper_timeout();
}
else

View file

@ -39,6 +39,10 @@ GCodeQueue queue;
#include "../feature/leds/printer_event_leds.h"
#endif
#if HAS_ETHERNET
#include "../feature/ethernet.h"
#endif
#if ENABLED(BINARY_FILE_TRANSFER)
#include "../feature/binary_stream.h"
#endif
@ -312,15 +316,24 @@ void GCodeQueue::flush_and_request_resend() {
}
inline bool serial_data_available() {
return MYSERIAL0.available() || TERN0(HAS_MULTI_SERIAL, MYSERIAL1.available());
byte data_available = 0;
if (MYSERIAL0.available()) data_available++;
#ifdef SERIAL_PORT_2
const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client);
if (port2_open && MYSERIAL1.available()) data_available++;
#endif
return data_available > 0;
}
inline int read_serial(const uint8_t index) {
switch (index) {
case 0: return MYSERIAL0.read();
#if HAS_MULTI_SERIAL
case 1: return MYSERIAL1.read();
#endif
case 1: {
#if HAS_MULTI_SERIAL
const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client);
if (port2_open) return MYSERIAL1.read();
#endif
}
default: return -1;
}
}

View file

@ -341,7 +341,7 @@
#define DOGLCD
#define IS_ULTIPANEL 1
#define DELAYED_BACKLIGHT_INIT
#elif ENABLED(TFT_LVGL_UI)
#elif HAS_TFT_LVGL_UI
#define DELAYED_BACKLIGHT_INIT
#endif
@ -777,78 +777,71 @@
#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1
#define HAS_USB_SERIAL 1
#endif
#if SERIAL_PORT_2 == -2
#define HAS_ETHERNET 1
#endif
// Fallback Stepper Driver types
// Fallback Stepper Driver types that don't depend on Configuration_adv.h
#ifndef X_DRIVER_TYPE
#define X_DRIVER_TYPE A4988
#define X_DRIVER_TYPE A4988
#endif
#ifndef Y_DRIVER_TYPE
#define Y_DRIVER_TYPE A4988
#endif
#ifndef Z_DRIVER_TYPE
#define Z_DRIVER_TYPE A4988
#endif
#if NONE(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
#undef X2_DRIVER_TYPE
#elif !defined(X2_DRIVER_TYPE)
#ifndef X2_DRIVER_TYPE
#define X2_DRIVER_TYPE A4988
#endif
#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
#undef Y2_DRIVER_TYPE
#elif !defined(Y2_DRIVER_TYPE)
#ifndef Y_DRIVER_TYPE
#define Y_DRIVER_TYPE A4988
#endif
#ifndef Y2_DRIVER_TYPE
#define Y2_DRIVER_TYPE A4988
#endif
#if NUM_Z_STEPPER_DRIVERS < 2
#undef Z2_DRIVER_TYPE
#elif !defined(Z2_DRIVER_TYPE)
#ifndef Z_DRIVER_TYPE
#define Z_DRIVER_TYPE A4988
#endif
#ifndef Z2_DRIVER_TYPE
#define Z2_DRIVER_TYPE A4988
#endif
#if NUM_Z_STEPPER_DRIVERS < 3
#undef Z3_DRIVER_TYPE
#elif !defined(Z3_DRIVER_TYPE)
#ifndef Z3_DRIVER_TYPE
#define Z3_DRIVER_TYPE A4988
#endif
#if NUM_Z_STEPPER_DRIVERS < 4
#undef Z4_DRIVER_TYPE
#elif !defined(Z4_DRIVER_TYPE)
#ifndef Z4_DRIVER_TYPE
#define Z4_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 1
#if E_STEPPERS <= 0
#undef E0_DRIVER_TYPE
#elif !defined(E0_DRIVER_TYPE)
#define E0_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 2
#if E_STEPPERS <= 1
#undef E1_DRIVER_TYPE
#elif !defined(E1_DRIVER_TYPE)
#define E1_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 3
#if E_STEPPERS <= 2
#undef E2_DRIVER_TYPE
#elif !defined(E2_DRIVER_TYPE)
#define E2_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 4
#if E_STEPPERS <= 3
#undef E3_DRIVER_TYPE
#elif !defined(E3_DRIVER_TYPE)
#define E3_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 5
#if E_STEPPERS <= 4
#undef E4_DRIVER_TYPE
#elif !defined(E4_DRIVER_TYPE)
#define E4_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 6
#if E_STEPPERS <= 5
#undef E5_DRIVER_TYPE
#elif !defined(E5_DRIVER_TYPE)
#define E5_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 7
#if E_STEPPERS <= 6
#undef E6_DRIVER_TYPE
#elif !defined(E6_DRIVER_TYPE)
#define E6_DRIVER_TYPE A4988
#endif
#if E_STEPPERS < 8
#if E_STEPPERS <= 7
#undef E7_DRIVER_TYPE
#elif !defined(E7_DRIVER_TYPE)
#define E7_DRIVER_TYPE A4988
@ -964,16 +957,16 @@
// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h
#if ENABLED(TFT_INTERFACE_FSMC)
#define HAS_FSMC_TFT 1
#if ENABLED(TFT_CLASSIC_UI)
#if TFT_SCALED_DOGLCD
#define HAS_FSMC_GRAPHICAL_TFT 1
#elif ENABLED(TFT_LVGL_UI)
#elif HAS_TFT_LVGL_UI
#define HAS_TFT_LVGL_UI_FSMC 1
#endif
#elif ENABLED(TFT_INTERFACE_SPI)
#define HAS_SPI_TFT 1
#if ENABLED(TFT_CLASSIC_UI)
#if TFT_SCALED_DOGLCD
#define HAS_SPI_GRAPHICAL_TFT 1
#elif ENABLED(TFT_LVGL_UI)
#elif HAS_TFT_LVGL_UI
#define HAS_TFT_LVGL_UI_SPI 1
#endif
#endif

View file

@ -178,16 +178,35 @@
#define HAS_MOTOR_CURRENT_I2C 1
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#undef Z_STEPPER_ALIGN_AMP
#endif
#ifndef Z_STEPPER_ALIGN_AMP
#define Z_STEPPER_ALIGN_AMP 1.0
#endif
#endif
// Multiple Z steppers
#ifndef NUM_Z_STEPPER_DRIVERS
#define NUM_Z_STEPPER_DRIVERS 1
#endif
#if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS)
#undef Z_STEPPER_ALIGN_AMP
// Fallback Stepper Driver types that depend on Configuration_adv.h
#if NONE(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
#undef X2_DRIVER_TYPE
#endif
#ifndef Z_STEPPER_ALIGN_AMP
#define Z_STEPPER_ALIGN_AMP 1.0
#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
#undef Y2_DRIVER_TYPE
#endif
#if NUM_Z_STEPPER_DRIVERS < 2
#undef Z2_DRIVER_TYPE
#endif
#if NUM_Z_STEPPER_DRIVERS < 3
#undef Z3_DRIVER_TYPE
#endif
#if NUM_Z_STEPPER_DRIVERS < 4
#undef Z4_DRIVER_TYPE
#endif
//

View file

@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2020-10-20"
#define STRING_DISTRIBUTION_DATE "2020-10-21"
#endif
/**

View file

@ -23,15 +23,14 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -94,7 +93,7 @@ void lv_draw_about(void) {
// Create a label on the image button
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}

View file

@ -23,11 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -383,7 +383,7 @@ void lv_draw_acceleration_settings(void) {
//lv_obj_set_pos(buttonBack, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y);
//lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
lv_label_set_text(labelTurnPage, machine_menu.next);

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -302,7 +302,7 @@ void lv_draw_advance_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,12 +23,11 @@
#if BOTH(HAS_TFT_LVGL_UI, HAS_BED_PROBE)
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/probe.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -172,7 +171,7 @@ void lv_draw_auto_level_offset_settings(void) {
}
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%.1f"), TERN(HAS_PROBE_XY_OFFSET, probe.offset.x, 0));
lv_label_set_text(labelXValue, public_buf_l);

View file

@ -23,12 +23,12 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../gcode/queue.h"
#include "../../../../gcode/gcode.h"
#include "../../../../inc/MarlinConfig.h"
#if HAS_BED_PROBE
#include "../../../../module/probe.h"
@ -52,7 +52,7 @@ static float babystep_dist=0.01;
static uint8_t has_adjust_z = 0;
static void event_handler(lv_obj_t * obj, lv_event_t event) {
char baby_buf[30]={0};
char baby_buf[30] = { 0 };
switch (obj->mks_obj_id) {
case ID_BABY_STEP_X_P:
if (event == LV_EVENT_CLICKED) {
@ -259,7 +259,7 @@ void lv_draw_baby_stepping(void) {
labelV = lv_label_create(buttonV, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelXI, move_menu.x_add);
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -318,7 +318,7 @@ void disp_baby_step_dist() {
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_baby_move0_1.bin");
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_baby_move0_1.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if ((int)(100 * babystep_dist) == 1) {
lv_label_set_text(labelV, move_menu.step_001mm);
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,16 +23,15 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -239,7 +238,7 @@ void lv_draw_change_speed(void) {
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelAdd, speed_menu.add);
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -281,7 +280,7 @@ void disp_speed_step() {
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_REL, "F:/bmp_step10_percent.bin");
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_percent.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.stepPrintSpeed == 1) {
lv_label_set_text(labelStep, speed_menu.step_1percent);
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -337,7 +336,7 @@ void disp_speed_type() {
lv_obj_refresh_ext_draw_pad(buttonExt);
lv_obj_refresh_ext_draw_pad(buttonMov);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelMov, speed_menu.move);
lv_obj_align(labelMov, buttonMov, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -28,20 +28,20 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../sd/cardreader.h"
#include "../../../../gcode/queue.h"
#include "../../../../module/temperature.h"
#include "../../../../module/planner.h"
#include "../../../../gcode/gcode.h"
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
@ -50,7 +50,6 @@
#if ENABLED(PARK_HEAD_ON_PAUSE)
#include "../../../../feature/pause.h"
#endif
#include "../../../../gcode/gcode.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -58,8 +57,7 @@ static lv_obj_t * tempText1;
static lv_obj_t * filament_bar;
extern uint8_t sel_id;
extern uint8_t once_flag;
extern uint8_t gcode_preview_over;
extern bool once_flag, gcode_preview_over;
extern int upload_result ;
extern uint32_t upload_time;
extern uint32_t upload_size;
@ -82,7 +80,7 @@ static void btn_ok_event_cb(lv_obj_t * btn, lv_event_t event) {
lv_draw_printing();
#if ENABLED(SDSUPPORT)
if (gcode_preview_over != 1) {
if (!gcode_preview_over) {
char *cur_name;
cur_name = strrchr(list_file.file_name[sel_id], '/');
@ -109,7 +107,7 @@ static void btn_ok_event_cb(lv_obj_t * btn, lv_event_t event) {
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.prepare();
#endif
once_flag = 0;
once_flag = false;
}
}
#endif

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -191,7 +191,7 @@ void lv_draw_eeprom_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,15 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h"
#include "../../../../feature/tmc_util.h"
#include "../../../../gcode/gcode.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
#if BUTTONS_EXIST(EN1, EN2)
@ -59,20 +54,11 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
if (gCfgItems.encoder_enable) {
gCfgItems.encoder_enable = false;
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_disable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_disable.bin");
lv_label_set_text(labelEncoderState, machine_menu.disable);
update_spi_flash();
}
else {
gCfgItems.encoder_enable = true;
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_enable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_enable.bin");
lv_label_set_text(labelEncoderState, machine_menu.enable);
update_spi_flash();
}
gCfgItems.encoder_enable ^= true;
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
lv_label_set_text(labelEncoderState, machine_menu.enable);
update_spi_flash();
}
break;
}
@ -110,14 +96,8 @@ void lv_draw_encoder_settings(void) {
buttonEncoderState = lv_imgbtn_create(scr, NULL);
lv_obj_set_pos(buttonEncoderState, PARA_UI_STATE_POS_X, PARA_UI_POS_Y + PARA_UI_STATE_V);
if (gCfgItems.encoder_enable) {
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_enable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_enable.bin");
}
else {
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, "F:/bmp_disable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, "F:/bmp_disable.bin");
}
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_REL, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
lv_imgbtn_set_src(buttonEncoderState, LV_BTN_STATE_PR, gCfgItems.encoder_enable ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin");
lv_obj_set_event_cb_mks(buttonEncoderState, event_handler, ID_ENCODER_STATE, NULL, 0);
@ -140,14 +120,8 @@ void lv_draw_encoder_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.encoder_enable) {
lv_label_set_text(labelEncoderState, machine_menu.enable);
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
}
else {
lv_label_set_text(labelEncoderState, machine_menu.disable);
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
}
lv_label_set_text(labelEncoderState, gCfgItems.encoder_enable ? machine_menu.enable : machine_menu.disable);
lv_obj_align(labelEncoderState, buttonEncoderState, LV_ALIGN_CENTER, 0, 0);
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,18 +23,18 @@
#if HAS_TFT_LVGL_UI
#include "SPI_TFT.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "tft_lvgl_configuration.h"
#include "mks_hardware_test.h"
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "SPI_TFT.h"
#include "mks_hardware_test.h"
#include "../../../../inc/MarlinConfig.h"
static lv_obj_t * scr;

View file

@ -23,16 +23,16 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
static lv_obj_t * scr;
extern lv_group_t* g;
@ -235,7 +235,7 @@ void lv_draw_extrusion(void) {
labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelAdd, extrude_menu.in);
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -274,7 +274,7 @@ void disp_ext_type() {
if (uiCfg.curSprayerChoose == 1) {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, extrude_menu.ext2);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -282,7 +282,7 @@ void disp_ext_type() {
else {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, extrude_menu.ext1);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -303,7 +303,7 @@ void disp_ext_speed() {
lv_imgbtn_set_src(buttonSpeed, LV_BTN_STATE_PR, "F:/bmp_speed_normal.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.extruSpeed == 20) {
lv_label_set_text(labelSpeed, extrude_menu.high);
lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -377,7 +377,7 @@ void disp_ext_step() {
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_mm.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.extruStep == 1) {
lv_label_set_text(labelStep, extrude_menu.step_1mm);
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,17 +23,17 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../../Configuration.h"
#include "draw_ui.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h"
#include "../../../../gcode/gcode.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -209,7 +209,7 @@ void lv_draw_fan(void) {
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelAdd, fan_menu.add);
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,15 +23,14 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h"
#include "../../../../gcode/gcode.h"
#include "../../../../module/motion.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -197,7 +196,7 @@ void lv_draw_filament_change(void) {
labelType = lv_label_create(buttoType, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelIn, filament_menu.in);
lv_obj_align(labelIn, buttonIn, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -228,7 +227,7 @@ void disp_filament_type() {
if (uiCfg.curSprayerChoose == 1) {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, preheat_menu.ext2);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -236,7 +235,7 @@ void disp_filament_type() {
else {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, preheat_menu.ext1);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}

View file

@ -23,11 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -279,7 +278,7 @@ void lv_draw_filament_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_load_length);

View file

@ -23,16 +23,17 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "draw_ready_print.h"
#include "draw_set.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "draw_ui.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -206,7 +207,7 @@ void lv_draw_home(void) {
lv_obj_t *labelOffXY = lv_label_create(buttonOffXY, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelHomeAll, home_menu.home_all);
lv_obj_align(labelHomeAll, buttonHomeAll, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -19,18 +19,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../../../inc/MarlinConfigPre.h"
#include "../../../../inc/MarlinConfig.h"
#if HAS_TFT_LVGL_UI
#if HAS_TFT_LVGL_UI && USE_SENSORLESS
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/probe.h"
#if USE_SENSORLESS
#include "../../../../module/stepper/indirection.h"
#include "../../../../feature/tmc_util.h"
@ -222,7 +219,7 @@ void lv_draw_homing_sensitivity_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%d"), TERN(X_SENSORLESS, stepperX.homing_threshold(), 0));
lv_label_set_text(labelXValue, public_buf_l);
@ -257,6 +254,4 @@ void lv_clear_homing_sensitivity_settings() {
lv_obj_del(scr);
}
#endif // USE_SENSORLESS
#endif // HAS_TFT_LVGL_UI && USE_SENSORLESS

View file

@ -23,11 +23,11 @@
#if BOTH(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK)
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -201,7 +201,7 @@ void lv_draw_jerk_settings(void) {
}
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[X_AXIS]);
lv_label_set_text(labelXValue, public_buf_l);

View file

@ -23,11 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../../Configuration.h"
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;

View file

@ -23,14 +23,14 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
#include <string.h>
//static lv_obj_t *buttonMoveZ,*buttonTest,*buttonZ0,*buttonStop,*buttonReturn;
@ -352,7 +352,7 @@ void lv_draw_language(void) {
disp_language(gCfgItems.language, SELECTED);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_CN, language_menu.chinese_s);
lv_obj_align(label_CN, buttonCN, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -234,7 +234,7 @@ void lv_draw_level_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -252,7 +252,7 @@ void lv_draw_machine_para(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, -2);

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -218,7 +218,7 @@ void lv_draw_machine_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,14 +23,15 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "draw_ui.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -253,7 +254,7 @@ void lv_draw_manualLevel(void) {
lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Point1, leveling_menu.position1);
lv_obj_align(label_Point1, buttonPoint1, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,11 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -384,7 +384,7 @@ void lv_draw_manual_level_pos_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[0][0]);

View file

@ -23,11 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -284,7 +284,7 @@ void lv_draw_max_feedrate_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
lv_label_set_text(labelTurnPage, machine_menu.next);

View file

@ -23,10 +23,10 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -310,7 +310,7 @@ void lv_draw_motor_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,14 +23,15 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "draw_ui.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -268,7 +269,7 @@ void lv_draw_move_motor(void) {
labelV = lv_label_create(buttonV, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelXI, move_menu.x_add);
lv_obj_align(labelXI, buttonXI, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -321,7 +322,7 @@ void disp_move_dist() {
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_REL, "F:/bmp_step_move10.bin");
lv_imgbtn_set_src(buttonV, LV_BTN_STATE_PR, "F:/bmp_step_move10.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if ((int)(10 * uiCfg.move_dist) == 1) {
lv_label_set_text(labelV, move_menu.step_01mm);
lv_obj_align(labelV, buttonV, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,25 +23,23 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../../lvgl/src/lv_objx/lv_img.h"
//#include "../../lvgl/src/lv_core/lv_disp.h"
//#include "../../lvgl/src/lv_core/lv_refr.h"
//#include "../../MarlinCore.h"
#include "draw_ui.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/gcode.h"
#include "../../../../gcode/queue.h"
#include "../../../../module/planner.h"
#include "../../../../module/temperature.h"
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
#endif
#include "../../../../gcode/gcode.h"
#include "../../../../module/planner.h"
#if HAS_TRINAMIC_CONFIG
#include "../../../../module/stepper/indirection.h"
#include "../../../../feature/tmc_util.h"

View file

@ -23,17 +23,17 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../sd/cardreader.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -135,24 +135,21 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
// nothing to do
}
else if (event == LV_EVENT_RELEASED) {
if (gCfgItems.finish_power_off == 1) {
gCfgItems.finish_power_off = 0;
if (gCfgItems.finish_power_off) {
gCfgItems.finish_power_off = false;
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_manual_off.bin");
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_manual_off.bin");
lv_label_set_text(label_PowerOff, printing_more_menu.manual);
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
lv_obj_refresh_ext_draw_pad(label_PowerOff);
update_spi_flash();
}
else {
gCfgItems.finish_power_off = 1;
gCfgItems.finish_power_off = true;
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
lv_obj_refresh_ext_draw_pad(label_PowerOff);
update_spi_flash();
}
lv_obj_align(label_PowerOff, buttonPowerOff, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
lv_obj_refresh_ext_draw_pad(label_PowerOff);
update_spi_flash();
}
break;
case ID_O_BABY_STEP:
@ -229,7 +226,7 @@ void lv_draw_operation(void) {
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonFan, LV_BTN_STATE_REL, &tft_style_label_rel);
if (gCfgItems.finish_power_off == 1) {
if (gCfgItems.finish_power_off) {
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_REL, "F:/bmp_auto_off.bin");
lv_imgbtn_set_src(buttonPowerOff, LV_BTN_STATE_PR, "F:/bmp_auto_off.bin");
}
@ -362,7 +359,7 @@ void lv_draw_operation(void) {
}
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelPreHeat, operation_menu.temp);
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -372,7 +369,7 @@ void lv_draw_operation(void) {
lv_label_set_text(label_Fan, operation_menu.fan);
lv_obj_align(label_Fan, buttonFan, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
if (gCfgItems.finish_power_off == 1)
if (gCfgItems.finish_power_off)
lv_label_set_text(label_PowerOff, printing_more_menu.auto_close);
else
lv_label_set_text(label_PowerOff, printing_more_menu.manual);

View file

@ -24,14 +24,14 @@
#if BOTH(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE)
#include "draw_ui.h"
#include "lv_conf.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../feature/pause.h"
#include "../../../../inc/MarlinConfig.h"
void lv_draw_pause_message(const PauseMessage msg) {
switch (msg) {

View file

@ -23,11 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -163,7 +163,7 @@ void lv_draw_pause_position(void) {
lv_btn_set_style(buttonBack, LV_BTN_STYLE_PR, &style_para_back);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosX);
lv_label_set_text(labelXValue, public_buf_l);

View file

@ -23,15 +23,15 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../inc/MarlinConfig.h"
static lv_obj_t * scr;
extern lv_group_t* g;
@ -275,7 +275,7 @@ void lv_draw_preHeat(void) {
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelAdd, preheat_menu.add);
lv_obj_align(labelAdd, buttonAdd, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
@ -312,7 +312,7 @@ void disp_temp_type() {
if (uiCfg.curSprayerChoose == 1) {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru2.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru2.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, preheat_menu.ext2);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -320,7 +320,7 @@ void disp_temp_type() {
else {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_extru1.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_extru1.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, preheat_menu.ext1);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -330,7 +330,7 @@ void disp_temp_type() {
else {
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_REL, "F:/bmp_bed.bin");
lv_imgbtn_set_src(buttoType, LV_BTN_STATE_PR, "F:/bmp_bed.bin");
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelType, preheat_menu.hotbed);
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
@ -375,7 +375,7 @@ void disp_step_heat() {
lv_imgbtn_set_src(buttonStep, LV_BTN_STATE_PR, "F:/bmp_step10_degree.bin");
}
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.stepHeat == 1) {
lv_label_set_text(labelStep, preheat_menu.step_1c);
lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,14 +23,15 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "draw_ui.h"
#include "../../../../sd/cardreader.h"
#include "../../../../inc/MarlinConfig.h"
static lv_obj_t * scr;
extern lv_group_t* g;
@ -270,7 +271,7 @@ void lv_draw_print_file(void) {
//lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
/*
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelPageUp, tool_menu.preheat);
lv_obj_align(labelPageUp, buttonPageUp, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,23 +23,25 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../MarlinCore.h" // for marlin_state
#include "../../../../module/temperature.h"
#include "../../../../module/motion.h"
#include "../../../../sd/cardreader.h"
#include "../../../../gcode/queue.h"
#include "../../../../gcode/gcode.h"
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
#endif
#if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME)
#include "../../../marlinui.h"
#endif
@ -60,11 +62,9 @@ static lv_obj_t * buttonPause, *buttonOperat, *buttonStop;
#define ID_STOP 2
#define ID_OPTION 3
uint8_t once_flag = 0;
bool once_flag; // = false
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
extern uint32_t To_pre_view;
extern uint8_t flash_preview_begin;
extern uint8_t default_preview_flg;
extern uint8_t gcode_preview_over;
static void event_handler(lv_obj_t * obj, lv_event_t event) {
switch (obj->mks_obj_id) {
@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
// nothing to do
}
else if (event == LV_EVENT_RELEASED) {
if (gcode_preview_over != 1) {
if (!gcode_preview_over) {
if (uiCfg.print_state == WORKING) {
// #if ENABLED(PARK_HEAD_ON_PAUSE)
// queue.inject_P(PSTR("M25 P\nM24"));
@ -117,7 +117,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
// nothing to do
}
else if (event == LV_EVENT_RELEASED) {
if (gcode_preview_over != 1) {
if (!gcode_preview_over) {
lv_clear_printing();
lv_draw_dialog(DIALOG_TYPE_STOP);
}
@ -128,7 +128,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
// nothing to do
}
else if (event == LV_EVENT_RELEASED) {
if (gcode_preview_over != 1) {
if (!gcode_preview_over) {
lv_clear_printing();
lv_draw_operation();
}
@ -290,7 +290,7 @@ void lv_draw_printing(void) {
labelStop = lv_label_create(buttonStop, NULL);
labelOperat = lv_label_create(buttonOperat, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelPause, uiCfg.print_state == WORKING ? printing_menu.pause : printing_menu.resume);
lv_obj_align(labelPause, buttonPause, LV_ALIGN_CENTER, 20, 0);
@ -378,7 +378,7 @@ void setProBarRate() {
int rate;
volatile long long rate_tmp_r;
if (gCfgItems.from_flash_pic != 1) {
if (!gCfgItems.from_flash_pic) {
#if ENABLED(SDSUPPORT)
rate_tmp_r = (long long)card.getIndex() * 100;
#endif
@ -405,15 +405,15 @@ void setProBarRate() {
if (once_flag == 0) {
stop_print_time();
flash_preview_begin = 0;
default_preview_flg = 0;
flash_preview_begin = false;
default_preview_flg = false;
lv_clear_printing();
lv_draw_dialog(DIALOG_TYPE_FINISH_PRINT);
once_flag = 1;
once_flag = true;
#if HAS_SUICIDE
if (gCfgItems.finish_power_off == 1) {
if (gCfgItems.finish_power_off) {
gcode.process_subcommands_now_P(PSTR("M1001"));
queue.inject_P(PSTR("M81"));
marlin_state = MF_RUNNING;

View file

@ -25,7 +25,7 @@
#include "draw_ready_print.h"
#include "draw_tool.h"
#include "lv_conf.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
@ -36,8 +36,8 @@
#include <lvgl.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../inc/MarlinConfig.h"
#include <stdio.h>
@ -186,7 +186,7 @@ void lv_draw_ready_print(void) {
//lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
//lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
//lv_label_set_text(label_print, main_menu.print);
//lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);
@ -279,7 +279,7 @@ void lv_draw_ready_print(void) {
lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_print, main_menu.print);
lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,18 +23,20 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "draw_ready_print.h"
#include "draw_set.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "draw_ui.h"
#include "../../../../gcode/queue.h"
#include "pic_manager.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
static lv_obj_t * scr;
extern lv_group_t* g;
@ -331,7 +333,7 @@ void lv_draw_set(void) {
#endif
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_EepromSet, set_menu.eepromSet);
lv_obj_align(label_EepromSet, buttonEepromSet, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,11 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -278,7 +278,7 @@ void lv_draw_step_settings(void) {
if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonBack);
#endif
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
lv_label_set_text(labelTurnPage, machine_menu.next);
lv_obj_align(labelTurnPage, buttonTurnPage, LV_ALIGN_CENTER, 0, 0);

View file

@ -23,13 +23,12 @@
#if BOTH(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG)
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h"
#include "../../../../feature/tmc_util.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -310,7 +309,7 @@ void lv_draw_tmc_current_settings(void) {
lv_obj_set_size(buttonBack, PARA_UI_BACK_BTN_X_SIZE, PARA_UI_BACK_BTN_Y_SIZE);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
//#if AXIS_IS_TMC(E1)
lv_label_set_text(labelTurnPage, machine_menu.next);

View file

@ -23,15 +23,13 @@
#if BOTH(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP)
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h"
#include "../../../../feature/tmc_util.h"
#include "../../../../gcode/gcode.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -232,7 +230,6 @@ void lv_draw_tmc_step_mode_settings(void) {
lv_obj_t *buttonE1Text = NULL, *labelE1Text = NULL;
//#endif
labelXState = NULL;
buttonXState = NULL;
labelYState = NULL;
@ -493,7 +490,7 @@ void lv_draw_tmc_step_mode_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
if (uiCfg.para_ui_page != 1) {
lv_label_set_text(labelXText, machine_menu.X_StepMode);
lv_obj_align(labelXText, buttonXText, LV_ALIGN_IN_LEFT_MID, 0, 0);

View file

@ -23,16 +23,16 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
//#include "../lvgl/src/lv_objx/lv_imgbtn.h"
//#include "../lvgl/src/lv_objx/lv_img.h"
//#include "../lvgl/src/lv_core/lv_disp.h"
//#include "../lvgl/src/lv_core/lv_refr.h"
#include "../../../../MarlinCore.h"
#include "../../../../gcode/queue.h"
#include "../../../../module/temperature.h"
#include "../../../../inc/MarlinConfig.h"
extern lv_group_t * g;
static lv_obj_t * scr;
@ -236,7 +236,7 @@ void lv_draw_tool(void) {
//lv_obj_t *label_More = lv_label_create(buttonMore, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(labelPreHeat, tool_menu.preheat);
lv_obj_align(labelPreHeat, buttonPreHeat, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);

View file

@ -34,10 +34,11 @@
#include <SPI.h>
#include "../../../../MarlinCore.h"
#include "../../../../MarlinCore.h" // for marlin_state
#include "../../../../sd/cardreader.h"
#include "../../../../module/motion.h"
#include "../../../../module/planner.h"
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
@ -57,15 +58,13 @@ num_key_value_state value;
keyboard_value_state keyboard_value;
uint32_t To_pre_view;
uint8_t gcode_preview_over;
uint8_t flash_preview_begin;
uint8_t default_preview_flg;
bool gcode_preview_over, flash_preview_begin, default_preview_flg;
uint32_t size = 809;
uint16_t row;
uint8_t temperature_change_frequency;
uint8_t printing_rate_update_flag;
extern uint8_t once_flag;
extern bool once_flag;
extern uint8_t sel_id;
extern uint8_t public_buf[512];
extern uint8_t bmp_public_buf[17 * 1024];
@ -116,10 +115,10 @@ void gCfgItems_init() {
gCfgItems.language = LANG_PORTUGUESE;
#endif
gCfgItems.leveling_mode = 0;
gCfgItems.from_flash_pic = 0;
gCfgItems.from_flash_pic = false;
gCfgItems.curFilesize = 0;
gCfgItems.finish_power_off = 0;
gCfgItems.pause_reprint = 0;
gCfgItems.finish_power_off = false;
gCfgItems.pause_reprint = false;
gCfgItems.pausePosX = -1;
gCfgItems.pausePosY = -1;
gCfgItems.pausePosZ = 5;
@ -407,7 +406,6 @@ void tft_style_init() {
lv_bar_style_indic.body.main_color = lv_color_hex3(0xADF);
lv_bar_style_indic.body.grad_color = lv_color_hex3(0xADF);
lv_bar_style_indic.body.border.color = lv_color_hex3(0xADF);
}
#define MAX_TITLE_LEN 28
@ -609,14 +607,14 @@ char *creat_title_text() {
pre_read_cnt = (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0]));
To_pre_view = pre_read_cnt;
gcode_preview_over = 1;
gCfgItems.from_flash_pic = 1;
gcode_preview_over = true;
gCfgItems.from_flash_pic = true;
update_spi_flash();
}
else {
gcode_preview_over = 0;
default_preview_flg = 1;
gCfgItems.from_flash_pic = 0;
gcode_preview_over = false;
default_preview_flg = true;
gCfgItems.from_flash_pic = false;
update_spi_flash();
}
card.closefile();
@ -681,8 +679,8 @@ char *creat_title_text() {
size = 809;
row = 0;
gcode_preview_over = 0;
//flash_preview_begin = 1;
gcode_preview_over = false;
//flash_preview_begin = true;
card.closefile();
@ -696,7 +694,7 @@ char *creat_title_text() {
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
srcfp = file;
mksReprint.mks_printer_state = MKS_WORKING;
once_flag = 0;
once_flag = false;
}
}
*/
@ -727,7 +725,7 @@ char *creat_title_text() {
#endif
card.startFileprint();
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
once_flag = 0;
once_flag = false;
}
return;
}
@ -813,8 +811,8 @@ char *creat_title_text() {
size = 809;
row = 0;
gcode_preview_over = 0;
//flash_preview_begin = 1;
gcode_preview_over = false;
//flash_preview_begin = true;
card.closefile();
@ -828,7 +826,7 @@ char *creat_title_text() {
//bakup_file_path((uint8_t *)curFileName, strlen(curFileName));
srcfp = file;
mksReprint.mks_printer_state = MKS_WORKING;
once_flag = 0;
once_flag = false;
}
}
*/
@ -859,7 +857,7 @@ char *creat_title_text() {
#endif
card.startFileprint();
TERN_(POWER_LOSS_RECOVERY, recovery.prepare());
once_flag = 0;
once_flag = false;
}
return;
}
@ -894,17 +892,17 @@ char *creat_title_text() {
}
void disp_pre_gcode(int xpos_pixel, int ypos_pixel) {
if (gcode_preview_over == 1) gcode_preview(list_file.file_name[sel_id], xpos_pixel, ypos_pixel);
if (gcode_preview_over) gcode_preview(list_file.file_name[sel_id], xpos_pixel, ypos_pixel);
#if HAS_BAK_VIEW_IN_FLASH
if (flash_preview_begin == 1) {
flash_preview_begin = 0;
if (flash_preview_begin) {
flash_preview_begin = false;
Draw_default_preview(xpos_pixel, ypos_pixel, 1);
}
#endif
#if HAS_GCODE_DEFAULT_VIEW_IN_FLASH
if (default_preview_flg == 1) {
if (default_preview_flg) {
Draw_default_preview(xpos_pixel, ypos_pixel, 0);
default_preview_flg = 0;
default_preview_flg = false;
}
#endif
}
@ -971,7 +969,7 @@ void GUI_RefreshPage() {
}
if (printing_rate_update_flag || marlin_state == MF_SD_COMPLETE) {
printing_rate_update_flag = 0;
if (gcode_preview_over == 0) setProBarRate();
if (!gcode_preview_over) setProBarRate();
}
break;
@ -1359,8 +1357,8 @@ void draw_return_ui() {
lv_draw_print_file();
break;
case PRINTING_UI:
if (gCfgItems.from_flash_pic == 1) flash_preview_begin = 1;
else default_preview_flg = 1;
if (gCfgItems.from_flash_pic) flash_preview_begin = true;
else default_preview_flg = true;
lv_draw_printing();
break;
case MOVE_MOTOR_UI:

View file

@ -174,12 +174,12 @@ extern char public_buf_l[30];
typedef struct {
uint32_t spi_flash_flag;
uint8_t disp_rotation_180;
uint8_t multiple_language;
bool multiple_language;
uint8_t language;
uint8_t leveling_mode;
uint8_t from_flash_pic;
uint8_t finish_power_off;
uint8_t pause_reprint;
bool from_flash_pic;
bool finish_power_off;
bool pause_reprint;
uint8_t wifi_mode_sel;
uint8_t fileSysType;
uint8_t wifi_type;

View file

@ -23,13 +23,12 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "../../../../../Configuration.h"
#include "../../../../module/temperature.h"
#include "draw_ui.h"
extern lv_group_t * g;
static lv_obj_t *scr, *wifi_name_text, *wifi_key_text, *wifi_state_text, *wifi_ip_text;
@ -135,7 +134,7 @@ void lv_draw_wifi(void) {
label_Reconnect = lv_label_create(buttonReconnect, NULL);
}
if (gCfgItems.multiple_language !=0) {
if (gCfgItems.multiple_language) {
lv_label_set_text(label_Back, common_menu.text_back);
lv_obj_align(label_Back, buttonBack, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);

View file

@ -23,13 +23,12 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "../../../../../Configuration.h"
#include "../../../../module/temperature.h"
#include "draw_ui.h"
#define NAME_BTN_X 330
#define NAME_BTN_Y 48

View file

@ -23,13 +23,12 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "../../../../../Configuration.h"
#include "../../../../module/planner.h"
#include "draw_ui.h"
extern lv_group_t * g;
static lv_obj_t *scr, *labelModelValue = NULL, *buttonModelValue = NULL, *labelCloudValue = NULL;
@ -48,8 +47,8 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
lv_clear_wifi_settings();
draw_return_ui();
lv_clear_wifi_settings();
draw_return_ui();
}
break;
case ID_WIFI_MODEL:
@ -57,18 +56,18 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
if (gCfgItems.wifi_mode_sel == AP_MODEL) {
gCfgItems.wifi_mode_sel = STA_MODEL;
lv_label_set_text(labelModelValue, WIFI_STA_TEXT);
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
update_spi_flash();
}
else{
gCfgItems.wifi_mode_sel = AP_MODEL;
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
update_spi_flash();
}
if (gCfgItems.wifi_mode_sel == AP_MODEL) {
gCfgItems.wifi_mode_sel = STA_MODEL;
lv_label_set_text(labelModelValue, WIFI_STA_TEXT);
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
update_spi_flash();
}
else {
gCfgItems.wifi_mode_sel = AP_MODEL;
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
update_spi_flash();
}
}
break;
case ID_WIFI_NAME:
@ -76,9 +75,9 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
keyboard_value=wifiName;
lv_clear_wifi_settings();
lv_draw_keyboard();
keyboard_value = wifiName;
lv_clear_wifi_settings();
lv_draw_keyboard();
}
break;
case ID_WIFI_PASSWORD:
@ -87,8 +86,8 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
keyboard_value=wifiPassWord;
lv_clear_wifi_settings();
lv_draw_keyboard();
lv_clear_wifi_settings();
lv_draw_keyboard();
}
break;
case ID_WIFI_CLOUD:
@ -115,8 +114,8 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
else if (event == LV_EVENT_RELEASED) {
lv_clear_wifi_settings();
lv_draw_dialog(DIALOG_WIFI_CONFIG_TIPS);
lv_clear_wifi_settings();
lv_draw_dialog(DIALOG_WIFI_CONFIG_TIPS);
}
break;
}
@ -211,7 +210,7 @@ void lv_draw_wifi_settings(void) {
lv_imgbtn_set_src(buttonCloudValue, LV_BTN_STATE_REL, "F:/bmp_disable.bin");
lv_imgbtn_set_src(buttonCloudValue, LV_BTN_STATE_PR, "F:/bmp_disable.bin");
}
lv_obj_set_event_cb_mks(buttonCloudValue, event_handler,ID_WIFI_CLOUD, NULL,0);
lv_obj_set_event_cb_mks(buttonCloudValue, event_handler,ID_WIFI_CLOUD, NULL,0);
lv_imgbtn_set_style(buttonCloudValue, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonCloudValue, LV_BTN_STATE_REL, &tft_style_label_rel);
lv_btn_set_layout(buttonCloudValue, LV_LAYOUT_OFF);
@ -240,7 +239,7 @@ void lv_draw_wifi_settings(void) {
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language !=0) {
if (gCfgItems.multiple_language) {
if (gCfgItems.wifi_mode_sel == AP_MODEL) {
lv_label_set_text(labelModelValue, WIFI_AP_TEXT);
lv_obj_align(labelModelValue, buttonModelValue, LV_ALIGN_CENTER,0, 0);
@ -295,5 +294,4 @@ void lv_clear_wifi_settings() {
}
#endif // USE_WIFI_FUNCTION
#endif // HAS_TFT_LVGL_UI

View file

@ -23,13 +23,12 @@
#if HAS_TFT_LVGL_UI
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "../../../../../Configuration.h"
#include "../../../../module/temperature.h"
#include "draw_ui.h"
static lv_obj_t * scr;

View file

@ -23,10 +23,11 @@
#if HAS_TFT_LVGL_UI
#include "draw_ui.h"
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "draw_ui.h"
#include "wifiSerial.h"
#include <libmaple/libmaple.h>

View file

@ -206,11 +206,11 @@ static const char assets[][LONG_FILENAME_LENGTH] = {
"bmp_return.bin",
#if ENABLED(USE_WIFI_FUNCTION)
//wifi screen
// wifi screen
"bmp_wifi.bin",
#endif
//babystep screen
// babystep screen
"bmp_baby_move0_01.bin",
"bmp_baby_move0_05.bin",
"bmp_baby_move0_1.bin"

View file

@ -23,24 +23,22 @@
#if HAS_TFT_LVGL_UI
#include "../../../../MarlinCore.h"
#include "lv_conf.h"
#include "draw_ui.h"
#include <lv_conf.h>
#include "../../../../gcode/gcode.h"
#include "../../../../module/temperature.h"
#include "../../../../module/planner.h"
#include "../../../../module/motion.h"
#include "../../../../sd/cardreader.h"
#include "../../../../gcode/queue.h"
#include "../../../../inc/MarlinConfig.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../feature/powerloss.h"
#endif
#include "../../../../gcode/gcode.h"
#include "../../../../module/planner.h"
extern uint32_t To_pre_view;
extern uint8_t flash_preview_begin, default_preview_flg, gcode_preview_over;
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
void printer_state_polling() {
if (uiCfg.print_state == PAUSING) {
@ -76,7 +74,7 @@ void printer_state_polling() {
// #if ENABLED(POWER_LOSS_RECOVERY)
// if (recovery.enabled) recovery.save(true);
// #endif
gCfgItems.pause_reprint = 1;
gCfgItems.pause_reprint = true;
update_spi_flash();
}
#endif
@ -105,7 +103,7 @@ void printer_state_polling() {
uiCfg.print_state = WORKING;
start_print_time();
gCfgItems.pause_reprint = 0;
gCfgItems.pause_reprint = false;
update_spi_flash();
}
}
@ -137,7 +135,7 @@ void printer_state_polling() {
);
gcode.process_subcommands_now(public_buf_m);
if ((gCfgItems.pause_reprint) == 1 && (gCfgItems.pausePosZ != (float)-1)) {
if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) {
gcode.process_subcommands_now_P(PSTR("G91"));
ZERO(public_buf_l);
sprintf_P(public_buf_l, PSTR("G1 Z-%.1f"), gCfgItems.pausePosZ);
@ -148,7 +146,7 @@ void printer_state_polling() {
uiCfg.print_state = WORKING;
start_print_time();
gCfgItems.pause_reprint = 0;
gCfgItems.pause_reprint = false;
update_spi_flash();
}
#endif
@ -240,10 +238,10 @@ void filament_check() {
stop_print_time();
uiCfg.print_state = PAUSING;
if (gCfgItems.from_flash_pic == 1)
flash_preview_begin = 1;
if (gCfgItems.from_flash_pic)
flash_preview_begin = true;
else
default_preview_flg = 1;
default_preview_flg = true;
lv_draw_printing();
}

View file

@ -72,7 +72,7 @@ lv_group_t* g;
uint16_t DeviceCode = 0x9488;
extern uint8_t sel_id;
extern uint8_t gcode_preview_over, flash_preview_begin, default_preview_flg;
extern bool flash_preview_begin, default_preview_flg, gcode_preview_over;
uint8_t bmp_public_buf[17 * 1024];
@ -80,9 +80,8 @@ void SysTick_Callback() {
lv_tick_inc(1);
print_time_count();
#if ENABLED(USE_WIFI_FUNCTION)
if (tips_disp.timer == TIPS_TIMER_START) {
if (tips_disp.timer == TIPS_TIMER_START)
tips_disp.timer_count++;
}
#endif
if (uiCfg.filament_loading_time_flg == 1) {
uiCfg.filament_loading_time_cnt++;
@ -193,10 +192,10 @@ void tft_lvgl_init() {
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.load();
if (recovery.valid()) {
if (gCfgItems.from_flash_pic == 1)
flash_preview_begin = 1;
if (gCfgItems.from_flash_pic)
flash_preview_begin = true;
else
default_preview_flg = 1;
default_preview_flg = true;
uiCfg.print_state = REPRINTING;
@ -408,36 +407,32 @@ lv_fs_res_t sd_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p) {
}
void lv_encoder_pin_init() {
#if 1 // HAS_DIGITAL_BUTTONS
#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 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 BUTTON_EXISTS(BACK)
SET_INPUT_PULLUP(BTN_BACK);
#endif
#if BUTTON_EXISTS(BACK)
SET_INPUT_PULLUP(BTN_BACK);
#endif
#if BUTTON_EXISTS(UP)
SET_INPUT(BTN_UP);
#endif
#if BUTTON_EXISTS(DWN)
SET_INPUT(BTN_DWN);
#endif
#if BUTTON_EXISTS(LFT)
SET_INPUT(BTN_LFT);
#endif
#if BUTTON_EXISTS(RT)
SET_INPUT(BTN_RT);
#endif
#endif // HAS_DIGITAL_BUTTONS
#if BUTTON_EXISTS(UP)
SET_INPUT(BTN_UP);
#endif
#if BUTTON_EXISTS(DWN)
SET_INPUT(BTN_DWN);
#endif
#if BUTTON_EXISTS(LFT)
SET_INPUT(BTN_LFT);
#endif
#if BUTTON_EXISTS(RT)
SET_INPUT(BTN_RT);
#endif
}
#if 1 // HAS_ENCODER_ACTION

View file

@ -23,11 +23,13 @@
#if HAS_TFT_LVGL_UI
#include "draw_ui.h"
#include "wifiSerial.h"
#include "tft_lvgl_configuration.h"
#if ENABLED(USE_WIFI_FUNCTION)
#include "draw_ui.h"
#include "wifiSerial.h"
#include <libmaple/libmaple.h>
#include <libmaple/gpio.h>
#include <libmaple/timer.h>

File diff suppressed because it is too large Load diff

View file

@ -150,8 +150,20 @@
#include "../lcd/tft/touch.h"
#endif
#if HAS_ETHERNET
#include "../feature/ethernet.h"
#endif
#pragma pack(push, 1) // No padding between variables
#if HAS_ETHERNET
void ETH0_report();
void MAC_report();
void M552_report();
void M553_report();
void M554_report();
#endif
typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7; } tmc_stepper_current_t;
typedef struct { uint32_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7; } tmc_hybrid_threshold_t;
typedef struct { int16_t X, Y, Z, X2, Y2, Z2, Z3, Z4; } tmc_sgt_t;
@ -431,6 +443,15 @@ typedef struct SettingsDataStruct {
touch_calibration_t touch_calibration;
#endif
// Ethernet settings
#if HAS_ETHERNET
bool ethernet_hardware_enabled; // M552 S
uint32_t ethernet_ip, // M552 P
ethernet_dns,
ethernet_gateway, // M553 P
ethernet_subnet; // M554 P
#endif
} SettingsData;
//static_assert(sizeof(SettingsData) <= MARLIN_EEPROM_SIZE, "EEPROM too small to contain SettingsData!");
@ -1384,7 +1405,26 @@ void MarlinSettings::postprocess() {
#endif
//
// Validate CRC and Data Size
// Ethernet network info
//
#if HAS_ETHERNET
{
_FIELD_TEST(ethernet_hardware_enabled);
const bool ethernet_hardware_enabled = ethernet.hardware_enabled;
const uint32_t ethernet_ip = ethernet.ip,
ethernet_dns = ethernet.myDns,
ethernet_gateway = ethernet.gateway,
ethernet_subnet = ethernet.subnet;
EEPROM_WRITE(ethernet_hardware_enabled);
EEPROM_WRITE(ethernet_ip);
EEPROM_WRITE(ethernet_dns);
EEPROM_WRITE(ethernet_gateway);
EEPROM_WRITE(ethernet_subnet);
}
#endif
//
// Report final CRC and Data Size
//
if (!eeprom_error) {
const uint16_t eeprom_size = eeprom_index - (EEPROM_OFFSET),
@ -2241,6 +2281,22 @@ void MarlinSettings::postprocess() {
EEPROM_READ(touch.calibration);
#endif
//
// Ethernet network info
//
#if HAS_ETHERNET
_FIELD_TEST(ethernet_hardware_enabled);
uint32_t ethernet_ip, ethernet_dns, ethernet_gateway, ethernet_subnet;
EEPROM_READ(ethernet.hardware_enabled);
EEPROM_READ(ethernet_ip); ethernet.ip = ethernet_ip;
EEPROM_READ(ethernet_dns); ethernet.myDns = ethernet_dns;
EEPROM_READ(ethernet_gateway); ethernet.gateway = ethernet_gateway;
EEPROM_READ(ethernet_subnet); ethernet.subnet = ethernet_subnet;
#endif
//
// Validate Final Size and CRC
//
eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET));
if (eeprom_error) {
DEBUG_ECHO_START();
@ -3784,6 +3840,15 @@ void MarlinSettings::reset() {
#endif
);
#endif
#if HAS_ETHERNET
CONFIG_ECHO_HEADING("Ethernet:");
if (!forReplay) { CONFIG_ECHO_START(); ETH0_report(); }
CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); MAC_report();
CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M552_report();
CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M553_report();
CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M554_report();
#endif
}
#endif // !DISABLE_M503

View file

@ -42,30 +42,30 @@
//
// Limit Switches
//
#define X_MIN_PIN 34
#define Y_MIN_PIN 35
#define Z_MIN_PIN 16 // 15
#define X_STOP_PIN 34
#define Y_STOP_PIN 35
#define Z_STOP_PIN 16
//
// Steppers
//
#define X_STEP_PIN 12 // 34//27
#define X_DIR_PIN 13 // 35//26
#define X_ENABLE_PIN 17 // 0//17//25 // used free pin
#define X_STEP_PIN 12
#define X_DIR_PIN 13
#define X_ENABLE_PIN 17
//#define X_CS_PIN 0
#define Y_STEP_PIN 32 // 33
#define Y_DIR_PIN 33 // 32
#define Y_STEP_PIN 32
#define Y_DIR_PIN 33
#define Y_ENABLE_PIN X_ENABLE_PIN
//#define Y_CS_PIN 13
#define Z_STEP_PIN 25 // 14
#define Z_DIR_PIN 26 // 12
#define Z_STEP_PIN 25
#define Z_DIR_PIN 26
#define Z_ENABLE_PIN X_ENABLE_PIN
//#define Z_CS_PIN 5 // SS_PIN
#define E0_STEP_PIN 27 // 16
#define E0_DIR_PIN 14 // 17
#define E0_STEP_PIN 27
#define E0_DIR_PIN 14
#define E0_ENABLE_PIN X_ENABLE_PIN
//#define E0_CS_PIN 21
@ -78,9 +78,9 @@
//
// Heaters / Fans
//
#define HEATER_0_PIN 2 // 4//2//(D8)
#define FAN_PIN 0 // 2//15//13 (D9)
#define HEATER_BED_PIN 15 // 15//0 //(D10)
#define HEATER_0_PIN 2
#define FAN_PIN 0
#define HEATER_BED_PIN 15
// SPI
#define SDSS 5

View file

@ -42,12 +42,10 @@
//
// Disable I2S stepper stream
//
#ifdef I2S_STEPPER_STREAM
#undef I2S_STEPPER_STREAM
#endif
#define I2S_WS -1
#define I2S_BCK -1
#define I2S_DATA -1
#undef I2S_STEPPER_STREAM
#undef I2S_WS
#undef I2S_BCK
#undef I2S_DATA
//
// Limit Switches

View file

@ -52,12 +52,10 @@
//
#undef I2S_STEPPER_STREAM
#define I2S_STEPPER_STREAM
#undef LIN_ADVANCE // Currently, I2S stream does not work with linear advance
#define I2S_WS 26
#define I2S_BCK 25
#define I2S_DATA 27
#undef LIN_ADVANCE // Currently, I2S stream does not work with linear advance
//
// Steppers

View file

@ -207,6 +207,12 @@
#include "ramps/pins_TENLOG_D3_HERO.h" // ATmega2560 env:mega2560
#elif MB(MKS_GEN_L_V21)
#include "ramps/pins_MKS_GEN_L_V21.h" // ATmega2560 env:mega2560
#elif MB(RAMPS_S_12_EEFB)
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
#elif MB(RAMPS_S_12_EEEB)
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
#elif MB(RAMPS_S_12_EFFB)
#include "ramps/pins_RAMPS_S_12.h" // ATmega2560 env:mega2560
//
// RAMBo and derivatives
@ -547,6 +553,8 @@
#include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_E3_V2_0)
#include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_MZ_V1_0)
#include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_E3_DIP)
#include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(JGAURORA_A5S_A1)
@ -668,6 +676,7 @@
//
// Custom board (with custom PIO env)
//
#elif MB(CUSTOM)
#include "pins_custom.h" // env:custom

View file

@ -52,7 +52,7 @@
#endif
#if NOT_TARGET(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768, __AVR_ATmega1280__, __AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' (or other appropriate target) in 'Tools > Board.'"
#endif
// Custom flags and defines for the build

View file

@ -0,0 +1,275 @@
/**
* 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
/**
* Arduino Mega with RAMPS-S v1.2 by Sakul.cz pin assignments
* Written by Michal Rábek <rabek33@gmail.com>
*
* Applies to the following boards:
*
* BOARD_RAMPS_S_12_EEFB Ramps S 1.2 (Hotend0, Hotend1, Fan, Bed)
* BOARD_RAMPS_S_12_EEEB Ramps S 1.2 (Hotend0, Hotend1, Hotend2, Bed)
* BOARD_RAMPS_S_12_EFFB Ramps S 1.2 (Hotend, Fan0, Fan1, Bed)
*
* Other pins_MYBOARD.h files may override these defaults
*/
#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
#endif
// Custom flags and defines for the build
//#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "RAMPS S 1.2"
#endif
//
// Servos
//
#ifndef SERVO0_PIN
#define SERVO0_PIN 10
#endif
#ifndef SERVO1_PIN
#define SERVO1_PIN 11
#endif
#ifndef SERVO2_PIN
#define SERVO2_PIN 12
#endif
#ifndef SERVO3_PIN
#define SERVO3_PIN 44
#endif
//
// Limit Switches
//
#ifndef X_STOP_PIN
#ifndef X_MIN_PIN
#define X_MIN_PIN 37
#endif
#ifndef X_MAX_PIN
#define X_MAX_PIN 36
#endif
#endif
#ifndef Y_STOP_PIN
#ifndef Y_MIN_PIN
#define Y_MIN_PIN 35
#endif
#ifndef Y_MAX_PIN
#define Y_MAX_PIN 34
#endif
#endif
#ifndef Z_STOP_PIN
#ifndef Z_MIN_PIN
#define Z_MIN_PIN 33
#endif
#ifndef Z_MAX_PIN
#define Z_MAX_PIN 32
#endif
#endif
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN 5
#endif
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN 44 // RAMPS_S S3 on the servos connector
#endif
//
// Steppers
//
#define X_STEP_PIN 17
#define X_DIR_PIN 16
#define X_ENABLE_PIN 48
#define Y_STEP_PIN 54
#define Y_DIR_PIN 47
#define Y_ENABLE_PIN 55
#ifndef Z_STEP_PIN
#define Z_STEP_PIN 57
#endif
#define Z_DIR_PIN 56
#define Z_ENABLE_PIN 62
#define E0_STEP_PIN 23
#define E0_DIR_PIN 22
#define E0_ENABLE_PIN 24
#define E1_STEP_PIN 26
#define E1_DIR_PIN 25
#define E1_ENABLE_PIN 27
#define E2_STEP_PIN 29
#define E2_DIR_PIN 28
#define E2_ENABLE_PIN 39
//
// Temperature Sensors
//
#ifndef TEMP_0_PIN
#define TEMP_0_PIN 15 // Analog Input
#endif
#ifndef TEMP_1_PIN
#define TEMP_1_PIN 14 // Analog Input
#endif
#ifndef TEMP_2_PIN
#define TEMP_2_PIN 13 // Analog Input
#endif
#ifndef TEMP_3_PIN
#define TEMP_3_PIN 12 // Analog Input
#endif
#ifndef TEMP_BED_PIN
#define TEMP_BED_PIN 11 // Analog Input
#endif
//
// Heaters / Fans
//
#ifndef MOSFET_D_PIN
#define MOSFET_D_PIN -1
#endif
#ifndef RAMPS_S_HE_0
#define RAMPS_S_HE_0 2
#endif
#ifndef RAMPS_S_HE_1
#define RAMPS_S_HE_1 3
#endif
#ifndef RAMPS_S_HE_2
#define RAMPS_S_HE_2 6
#endif
#define HEATER_BED_PIN 9
#define HEATER_0_PIN RAMPS_S_HE_0
#if MB(RAMPS_S_12_EEFB) // Hotend0, Hotend1, Fan, Bed
#define HEATER_1_PIN RAMPS_S_HE_1
#define FAN_PIN RAMPS_S_HE_2
#elif MB(RAMPS_S_12_EEEB) // Hotend0, Hotend1, Hotend2, Bed
#define HEATER_1_PIN RAMPS_S_HE_1
#define HEATER_2_PIN RAMPS_S_HE_2
#elif MB(RAMPS_S_12_EFFB) // Hotend, Fan0, Fan1, Bed
#define FAN_PIN RAMPS_S_HE_1
#define FAN1_PIN RAMPS_S_HE_2
#endif
//
// Misc. Functions
//
#define SDSS 53
#define LED_PIN 13
#ifndef KILL_PIN
#define KILL_PIN 46
#endif
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 60 // Analog Input on EXTEND
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN 12 // RAMPS_S S2 on the servos connector
#endif
#if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN) && !defined(SPINDLE_LASER_ENA_PIN)
#if NUM_SERVOS <= 1 // Prefer the servo connector
#define CASE_LIGHT_PIN 12 // Hardware PWM (RAMPS_S S1 on the servos connector)
#elif HAS_FREE_AUX2_PINS
#define CASE_LIGHT_PIN 44 // Hardware PWM
#endif
#endif
//
// M3/M4/M5 - Spindle/Laser Control
//
#if HAS_CUTTER && !defined(SPINDLE_LASER_ENA_PIN)
#define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown!
#define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM
#define SPINDLE_DIR_PIN 5
#endif
//
// TMC software SPI
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI 51
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO 50
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK 53
#endif
#endif
//
// Průša i3 MK2 Multiplexer Support
//
#ifndef E_MUX0_PIN
#define E_MUX0_PIN 29 // E2_STEP_PIN
#endif
#ifndef E_MUX1_PIN
#define E_MUX1_PIN 28 // E2_DIR_PIN
#endif
#ifndef E_MUX2_PIN
#define E_MUX2_PIN 39 // E2_ENABLE_PIN
#endif
//////////////////////////
// LCDs and Controllers //
//////////////////////////
//
// LCD Display output pins
//
#if HAS_WIRED_LCD
#define BEEPER_PIN 45
#define LCD_PINS_RS 19
#define LCD_PINS_ENABLE 49
#define LCD_PINS_D4 18
#define LCD_PINS_D5 30
#define LCD_PINS_D6 41
#define LCD_PINS_D7 31
#ifndef SD_DETECT_PIN
#define SD_DETECT_PIN 38
#endif
#endif
//
// LCD Display input pins
//
#if IS_NEWPANEL
#define BTN_EN1 40
#define BTN_EN2 42
#define BTN_ENC 43
#endif

View file

@ -32,7 +32,9 @@
#include "pins_BTT_SKR_MINI_E3_common.h"
#define BOARD_INFO_NAME "BTT SKR Mini E3 V2.0"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "BTT SKR Mini E3 V2.0"
#endif
// Release PA13/PA14 (led, usb control) from SWD pins
#define DISABLE_DEBUG

View file

@ -0,0 +1,26 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#define BOARD_INFO_NAME "BTT SKR Mini MZ V1.0"
#include "pins_BTT_SKR_MINI_E3_V2_0.h"

View file

@ -106,18 +106,6 @@
//#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5)
#endif
/**
* Note: Alfawise screens use various TFT controllers. Supported screens
* are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
* other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
* init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_RESET_PIN PC4 // pin 33
#define TFT_BACKLIGHT_PIN PD12 // pin 59
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
@ -130,9 +118,6 @@
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
// Longer/Alfawise TFT
#define LONGER_LK_TFT28
// Buffer for Color UI
#define TFT_BUFFER_SIZE 3200

View file

@ -63,8 +63,9 @@ restore_configs
opt_set MOTHERBOARD BOARD_TEENSY41
opt_set EXTRUDERS 2
opt_set TEMP_SENSOR_1 1
opt_enable MAGNETIC_PARKING_EXTRUDER
exec_test $1 $2 "MAGNETIC_PARKING_EXTRUDER with LCD"
opt_set SERIAL_PORT_2 -2
opt_enable EEPROM_SETTINGS MAGNETIC_PARKING_EXTRUDER
exec_test $1 $2 "Ethernet, EEPROM, Magnetic Parking Extruder, No LCD"
#
# Mixing Extruder

6
data/www/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

6
data/www/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

10
data/www/bootstrap4-toggle.min.js vendored Normal file
View file

@ -0,0 +1,10 @@
/*\
|*| ========================================================================
|*| Bootstrap Toggle: bootstrap4-toggle.js v3.6.1
|*| https://gitbrent.github.io/bootstrap4-toggle/
|*| ========================================================================
|*| Copyright 2018-2019 Brent Ely
|*| Licensed under MIT
|*| ========================================================================
\*/
!function(a){"use strict";function l(t,e){this.$element=a(t),this.options=a.extend({},this.defaults(),e),this.render()}l.VERSION="3.6.0",l.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"light",size:"normal",style:"",width:null,height:null},l.prototype.defaults=function(){return{on:this.$element.attr("data-on")||l.DEFAULTS.on,off:this.$element.attr("data-off")||l.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||l.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||l.DEFAULTS.offstyle,size:this.$element.attr("data-size")||l.DEFAULTS.size,style:this.$element.attr("data-style")||l.DEFAULTS.style,width:this.$element.attr("data-width")||l.DEFAULTS.width,height:this.$element.attr("data-height")||l.DEFAULTS.height}},l.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var t="large"===this.options.size||"lg"===this.options.size?"btn-lg":"small"===this.options.size||"sm"===this.options.size?"btn-sm":"mini"===this.options.size||"xs"===this.options.size?"btn-xs":"",e=a('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.on).addClass(this._onstyle+" "+t),s=a('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.off).addClass(this._offstyle+" "+t),o=a('<span class="toggle-handle btn btn-light">').addClass(t),i=a('<div class="toggle-group">').append(e,s,o),l=a('<div class="toggle btn" data-toggle="toggle" role="button">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(t).addClass(this.options.style);this.$element.wrap(l),a.extend(this,{$toggle:this.$element.parent(),$toggleOn:e,$toggleOff:s,$toggleGroup:i}),this.$toggle.append(i);var n=this.options.width||Math.max(e.outerWidth(),s.outerWidth())+o.outerWidth()/2,h=this.options.height||Math.max(e.outerHeight(),s.outerHeight());e.addClass("toggle-on"),s.addClass("toggle-off"),this.$toggle.css({width:n,height:h}),this.options.height&&(e.css("line-height",e.height()+"px"),s.css("line-height",s.height()+"px")),this.update(!0),this.trigger(!0)},l.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},l.prototype.on=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),t||this.trigger()},l.prototype.off=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),t||this.trigger()},l.prototype.enable=function(){this.$toggle.removeClass("disabled"),this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},l.prototype.disable=function(){this.$toggle.addClass("disabled"),this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},l.prototype.update=function(t){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(t):this.off(t)},l.prototype.trigger=function(t){this.$element.off("change.bs.toggle"),t||this.$element.change(),this.$element.on("change.bs.toggle",a.proxy(function(){this.update()},this))},l.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var t=a.fn.bootstrapToggle;a.fn.bootstrapToggle=function(o){var i=Array.prototype.slice.call(arguments,1)[0];return this.each(function(){var t=a(this),e=t.data("bs.toggle"),s="object"==typeof o&&o;e||t.data("bs.toggle",e=new l(this,s)),"string"==typeof o&&e[o]&&"boolean"==typeof i?e[o](i):"string"==typeof o&&e[o]&&e[o]()})},a.fn.bootstrapToggle.Constructor=l,a.fn.toggle.noConflict=function(){return a.fn.bootstrapToggle=t,this},a(function(){a("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),a(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(t){a(this).find("input[type=checkbox]").bootstrapToggle("toggle"),t.preventDefault()})}(jQuery);

View file

@ -0,0 +1,234 @@
(function(Chart) {
var helpers = Chart.helpers;
var plugins = Chart.plugins;
Chart.defaults.global.animation.duration = 1000;
Chart.defaults._set('linearGauge', {
scale: {
type: 'linearGauge',
horizontal: false,
range: {
startValue: -100,
endValue: 500
},
responsive: true,
font: {
fontName: 'Arial',
fontSize: 12
},
axisWidth: 6,
ticks: {
majorTicks: {
interval: 100,
height: 1,
}
},
scaleLabel: {
display: true,
interval: 100,
units: '',
customValues: [],
offset: -10,
color: '#777b80'
}
},
padding: {
top: 0,
bottom: 0,
left: 0,
right: 0
},
tooltips: {
callbacks: {
label: function(tooltipItem, data) {
var label = data.datasets[tooltipItem.datasetIndex].label || '';
if (label) {
label += ': ';
}
label += Math.round(data.datasets[tooltipItem.datasetIndex].data[0] * 100) / 100;
return label;
}
}
},
legend: {
display: true,
labels: {
fontColor: 'rgb(0, 0, 0)'
},
position: 'bottom'
}
});
Chart.controllers.linearGauge = Chart.DatasetController.extend({
dataElementType: Chart.elements.Gaugerect,
initialize: function() {
var me = this;
var meta;
Chart.DatasetController.prototype.initialize.apply(me, arguments);
meta = me.getMeta();
},
linkScales: helpers.noop,
update: function(reset) {
var me = this;
var rects = me.getMeta().data;
var i, ilen;
me.datashifts = 0;
for (i = 0, ilen = rects.length; i < ilen; ++i) {
me.updateElement(rects[i], i, me.datashifts);
me.datashifts += 10;
}
},
updateElement: function(rectangle, index, reset) {
var me = this;
var chart = me.chart;
var meta = me.getMeta();
var dataset = me.getDataset();
var custom = rectangle.custom || {};
var rectangleOptions = chart.options.elements.rectangle;
var gaugeOptions = chart.options.elements.gaugerect;
rectangle._Scale = me.getScaleForId(chart.options.scale.id || 'gaugescale');
rectangle._datasetIndex = me.index;
rectangle._index = index;
rectangle.rangeColorImage = null;
// Init element model
rectangle._model = {
datasetLabel: dataset.label,
label: chart.data.labels[index],
borderSkipped: custom.borderSkipped ? custom.borderSkipped : rectangleOptions.borderSkipped,
backgroundColor: custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.backgroundColor, index, gaugeOptions.backgroundColor),
borderColor: custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.borderColor, index, rectangleOptions.borderColor),
borderWidth: custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.borderWidth, index, rectangleOptions.borderWidth)
};
// Set empty view as start point for animation
if(typeof rectangle._view === 'undefined') rectangle._view = {};
me.updateElementGeometry(rectangle, index, reset);
},
updateElementGeometry: function(rectangle, index, reset) {
var me = this;
var model = rectangle._model;
var start = rectangle._view;
var dataset = me.getDataset().data;
var dopt = me.getDataset();
var chart = me.chart;
var datasets = chart.data.datasets;
var gaugeOptions = chart.options.elements.gaugerect;
var vscale = me.getScaleForId(chart.options.scale.id || 'gaugescale');
//var base = vscale.getBasePixel();
var base = vscale.getBase();
var horizontal = rectangle._Scale.isHorizontal();
//var ruler = me._ruler || me.getRuler();
var vpixels = me.calculateBarValuePixels(me.index, index, horizontal);
model.horizontal = horizontal;
model.base = base;
model.head = vpixels.head;
model.x = horizontal ? vpixels.base : vpixels.offset;
model.y = horizontal ? (vpixels.offset - (dopt.width || gaugeOptions.width)) : vpixels.head;
model.height = horizontal ? (dopt.width || gaugeOptions.width) : (vpixels.base - vpixels.head);
model.width = horizontal ? (vpixels.head - vpixels.base) : (dopt.width || gaugeOptions.width);
model.value = vscale.getRightValue(datasets[me.index].data[index]);
model.scaleValue = 0;
if (horizontal) {
model.scaleValue = vscale.width / (vscale.options.range.endValue - vscale.options.range.startValue);
} else {
model.scaleValue = vscale.height / (vscale.options.range.endValue - vscale.options.range.startValue);
}
if(typeof start.x === 'undefined' && typeof start.y === 'undefined'){
if(horizontal){
start.x = vpixels.base;
start.width = 0;
} else {
start.y = vpixels.base;
start.height = 0;
}
}
},
calculateBarValuePixels: function(datasetIndex, index, horizontal) {
var me = this;
var chart = me.chart;
var scale = me.getScaleForId(chart.options.scale.id || 'gaugescale');
var datasets = chart.data.datasets;
var dopt = datasets[datasetIndex];
var value = scale.getRightValue(datasets[datasetIndex].data[index]);
var stacked = scale.options.stacked;
var start = 0;
var i, imeta, ivalue, base, head, size, offset;
base = scale.scalePoint(start);
head = scale.scalePoint(start + value);
size = (head - base) / 2;
offset = horizontal ? scale.yCenter - dopt.offset : scale.xCenter + dopt.offset;
return {
size: size,
base: base,
head: head,
center: head + size / 2,
offset: offset
};
},
draw: function() {
var me = this;
var chart = me.chart;
var rects = me.getMeta().data;
var dataset = me.getDataset();
var ilen = rects.length;
var i = 0;
helpers.canvas.clipArea(chart.ctx, chart.chartArea);
for (; i < ilen; ++i) {
if (!isNaN(dataset.data[i])) {
rects[i].draw();
}
}
helpers.canvas.unclipArea(chart.ctx);
},
setHoverStyle: function(rectangle) {
var dataset = this.chart.data.datasets[rectangle._datasetIndex];
var index = rectangle._index;
var custom = rectangle.custom || {};
var model = rectangle._model;
model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.valueAtIndexOrDefault(dataset.hoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.valueAtIndexOrDefault(dataset.hoverBorderColor, index, helpers.getHoverColor(model.borderColor));
model.borderWidth = custom.hoverBorderWidth ? custom.hoverBorderWidth : helpers.valueAtIndexOrDefault(dataset.hoverBorderWidth, index, model.borderWidth);
},
removeHoverStyle: function(rectangle) {
var dataset = this.chart.data.datasets[rectangle._datasetIndex];
var index = rectangle._index;
var custom = rectangle.custom || {};
var model = rectangle._model;
var rectangleElementOptions = this.chart.options.elements.gaugerect;
model.backgroundColor = custom.backgroundColor ? custom.backgroundColor : helpers.valueAtIndexOrDefault(dataset.backgroundColor, index, rectangleElementOptions.backgroundColor);
model.borderColor = custom.borderColor ? custom.borderColor : helpers.valueAtIndexOrDefault(dataset.borderColor, index, rectangleElementOptions.borderColor);
model.borderWidth = custom.borderWidth ? custom.borderWidth : helpers.valueAtIndexOrDefault(dataset.borderWidth, index, rectangleElementOptions.borderWidth);
}
});
}).call(this, Chart);

7
data/www/chart.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
data/www/filesaver.min.js vendored Normal file
View file

@ -0,0 +1 @@
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)});

22
data/www/index-ie.html Normal file
View file

@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="Title" content="Marlin WebUI" />
<meta name="Description" content="Marlin WebUI based on E4d@box WebUI" />
<meta name="Generator" content="E4d@box" />
<meta name="Owner" content="E4d@box" />
<meta name="Author" content="MandrakeDesign" />
<meta name="google" content="notranslate" />
<meta http-equiv="Content-Language" content="en_GB" />
<title>Marlin WebUI</title>
<link rel="shortcut icon" href="#" />
</head>
<body>
<div style="padding-top:100px; text-align:center">
<h1>Sorry, but MS Internet Explorer browser is not supported by this web application.<br>Please upgrade to Edge or use another browser</h1>
<br><br><br>
<h1>Marlin WebUI</h1>
</div>
</body>
</html>

View file

@ -1,37 +1,749 @@
<!doctype html>
<html lang=en>
<!doctype html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Marlin</title>
<link rel="stylesheet" type="text/css" href="marlin.css" />
<script type="text/javascript" src="marlin.js"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimal-ui,shrink-to-fit=no" />
<meta name="Title" content="Marlin WebUI" />
<meta name="Description" content="Marlin WebUI based on E4d@box WebUI" />
<meta name="Generator" content="E4d@box" />
<meta name="Owner" content="E4d@box" />
<meta name="Author" content="MandrakeDesign" />
<meta name="google" content="notranslate" />
<meta http-equiv="Content-Language" content="en_GB" />
<title>Marlin WebUI</title>
<link rel="shortcut icon" href="#" />
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="webmarlin-font.css">
<link rel="stylesheet" type="text/css" href="webmarlin.css" />
<script>
var ua = window.navigator.userAgent;
var msie = ua.indexOf("MSIE ");
if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)){ top.location.replace('index-ie.html'); }
function hideAddressBar() { if(!window.location.hash) { if(document.height < window.outerHeight) { document.body.style.height = (window.outerHeight + 50) + 'px'; }
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
}}
window.addEventListener("load", function(){ if(!window.pageYOffset){ hideAddressBar(); } } );
window.addEventListener("orientationchange", hideAddressBar );
</script>
<script src="moment.min.js"></script>
<script src="webmarlin-class.js"></script>
</head>
<body>
<div class="tabs">
<div id="logo"></div>
<input class="input" name="tabs" type="radio" id="tab-1" checked="checked"/>
<label class="label" for="tab-1">console</label>
<div class="panel">
<div class="panel-content">
<ul id="serial-output"></ul>
<!-- Javascript sources ========================================================================================== -->
<script type="text/javascript" src="jquery-3.5.1.slim.min.js"></script>
<script type="text/javascript" src="jquery.browser.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
<script type="text/javascript" src="bootstrap4-toggle.min.js"></script>
<script async="" src="filesaver.min.js"></script>
<script type="text/javascript" src="chart.min.js"></script>
<script type="text/javascript" src="webmarlin.js"></script>
<form id="serial-command-form" autocomplete="off">
<div class="form-wrapper">
<input type="text" id="serial-command">
<input type="submit" value="Send">
<!-- Accordion =================================================================================================== -->
<div id="main-panel" class="h-100 bg-secondary m-0 p-0">
<div class="container-fluid h-100 p-0">
<div class="accordion accordion-always-open h-100 d-flex flex-column bg-light" id="accordion-panels">
<!-- PANEL: Fixed Title ==================================================================================== -->
<div class="bg-dark text-light text-left p-2">
<span class="h4">Marlin WebUI </span> by atbox.tech
<button type="button" class="btn btn-sm btn-success float-right ml-1" data-toggle="modal" data-target="#modal-info" style="width:35px; height:33px"><i class="icon icon-info"></i></button>
<a href="http://marlinfw.org/" target="_blank" class="float-right"><img src="marlin-logo-dark.png" alt="MarlinLogo" width="100" height="33" /></a>
</div>
<!-- PANEL: Fixed connection status bar ==================================================================== -->
<div id="div-conn-statusbar" class="bg-danger text-light text-left p-1">
<div class="float-left font-italic h5 my-0 pl-1">
<span id="div-conn-statusico" class="badge badge-light mr-2" style="width:30px;"><i class="icon icon-plug"></i></span><span id="div-conn-statusmsg">Disconnected</span>
</div>
</form>
</div>
</div>
<input class="input" name="tabs" type="radio" id="tab-2"/>
<label class="label" for="tab-2">controls</label>
<div class="panel">
<div class="panel-content">
#controls
<div class="btn-toolbar float-right mr-1" role="toolbar">
<div class="btn-group mr-1" role="group">
<button type="button" id="btn-wsconnect" class="btn btn-sm btn-dark" style="width:35px; height:30px"><span id="btn-connect-status"><i class="icon icon-bolt"></i></span></button>
</div>
<div class="btn-group" role="group">
<button type="button" id="btn-settings" class="btn btn-sm btn-dark" style="width:35px; height:30px" data-toggle="modal" data-target="#modal-settings"><i class="icon icon-sliders"></i></button>
</div>
</div>
</div>
<!-- PANEL: Printer status ================================================================================= -->
<div class="card-header flex-shrink-1 p-0 bg-dark text-light" id="accordion-panel-status-head">
<button class="btn btn-sm btn-dark btn-block text-left" type="button" data-toggle="collapse" data-target="#accordion-panel-status-body" aria-expanded="true" aria-controls="accordion-panel-status-body">
<span class="h5"><span class="badge badge-success" style="width:30px;"><i class="icon icon-info-circled"></i></span><span class="ml-2">Status</span></span>
<div class="badge badge-secondary float-right"><span class="h5 icon icon-chevron-down"></span></div>
</button>
</div>
<div id="accordion-panel-status-body" class="collapse flex-grow-1 collapse-panel" aria-labelledby="accordion-panel-status-head" data-parent="#accordion-panels">
<div class="card-body h-100 border-bottom p-1 text-left">
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-info mr-1 ml-1"></i>Printer status</div>
<div class="card-body px-0 py-1 bg-light badge-description">
<div class="border-bottom pb-1">
Printing status <div id="div-pstatus-sdprint" class="badge badge-danger badge-description float-right pb-1">Idle</div>
</div>
<div id="div-pstatus-timer" class="border-bottom py-1 collapse">
Printing timer
<div class="float-right ml-1">Remain: <span id="div-pstatus-timer-remain" class="badge badge-info badge-description pb-1">0:45:12</span></div>
<div class="float-right ml-1">Estimated: <span id="div-pstatus-timer-estimated" class="badge badge-info badge-description pb-1">1:12:34</span></div>
<div class="float-right">Elapsed: <span id="div-pstatus-timer-elapsed" class="badge badge-info badge-description pb-1">0:00:00</span></div>
</div>
<div id="div-pstatus-progress" class="pt-1 collapse">
Printing progress:
<div id="div-pstatus-progress-percent" class="badge badge-info badge-description float-right pb-1">10%</div>
<div id="div-pstatus-progress-bytes" class="badge badge-info badge-description float-right pb-1 mr-1">1 of 123456</div>
<div class="progress mt-1" style="height: 10px;"><div class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div></div>
</div>
</div>
</div>
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-thermometer mr-1 ml-1"></i>Temperatures</div>
<div class="card-body px-0 py-1 bg-light">
<div>
Auto temperature detection
<div class="float-right form-inline">
<select id="auto-temp-interval" class="form-control form-control-sm mr-1" style="width:80px;" disabled>
<option value="1">1 sec</option>
<option value="5">5 sec</option>
<option value="10">10 sec</option>
<option value="30">30 sec</option>
<option value="60">60 sec</option>
</select>
<input type="checkbox" id="set-auto-temp" data-input-type="togglebtn" data-size="sm" data-width="80" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="ON" data-off="OFF" disabled>
</div>
</div>
<canvas id="chart-temps" height="150"></canvas>
<table class="w-100" cellpadding="0" cellspacing="0">
<tr>
<td width="40%">
<div class="card mr-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Sensor</div>
<div class="card-body py-0 px-1 card-header-description">
<table class="w-100">
<tr><td class="border-bottom" style="height:28px;">Hotend (extruder) sensor</td></tr>
<tr><td style="height:28px;">Bed sensor</td></tr>
</table>
</div>
</div>
</td>
<td width="15%">
<div class="card mr-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Detected</div>
<div class="card-body py-0 px-1 card-header-description text-right">
<table class="w-100">
<tr><td class="border-bottom" style="height:28px;"><div id="div-temp-extruder-detect">-</div></td></tr>
<tr><td style="height:28px;"><div id="div-temp-bed-detect">-</div></td></tr>
</table>
</div>
</div>
</td>
<td width="15%">
<div class="card mr-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Set</div>
<div class="card-body py-0 px-1 card-header-description text-right">
<table class="w-100">
<tr><td class="border-bottom" style="height:28px;"><div id="div-temp-extruder-set">-</div></td></tr>
<tr><td style="height:28px;"><div id="div-temp-bed-set">-</div></td></tr>
</table>
</div>
</div>
</td>
<td width="15%">
<div class="card mr-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Unit</div>
<div class="card-body py-0 px-1 card-header-description text-center">
<table class="w-100">
<tr><td class="border-bottom" style="height:28px;"><div id="div-temp-extruder-unit">-</div></td></tr>
<tr><td style="height:28px;"><div id="div-temp-bed-unit">-</div></td></tr>
</table>
</div>
</div>
</td>
<td width="20%">
<div class="card">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Chart display</div>
<div class="card-body py-0 px-1 card-header-description text-center">
<table class="w-100">
<tr>
<td class="border-bottom" style="height:28px;">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="chart-show-extruder" checked disabled>
<label id="chart-show-extruder-label" class="custom-control-label" for="chart-show-extruder">Show</label>
</div>
</td>
</tr>
<tr>
<td style="height:28px;">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="chart-show-bed" checked disabled>
<label id="chart-show-bed-label" class="custom-control-label" for="chart-show-bed">Show</label>
</div>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</div>
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-refresh mr-1 ml-1"></i>Hotend fan speed</div>
<div class="card-body px-0 py-1 bg-light">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="70%" valign="top" class="pr-2">
<table class="w-100" cellspacing="0" cellpadding="0" border="0">
<tr style="height:20px;">
<td class="border-bottom card-header-description">Current fan speed</td>
<td class="border-bottom card-header-description text-right"><div id="div-fan-speed-current">-</div></td>
</tr>
<tr style="height:20px;">
<td class="border-bottom card-header-description">Set fan speed</td>
<td class="border-bottom card-header-description text-right"><div id="div-fan-speed-set">-</div></td>
</tr>
<tr>
<td colspan="2" class="card-header-description">
<table class="w-100">
<tr>
<td width="9%" class="text-left">OFF</td>
<td width="9%" class="text-center">10%</td>
<td width="9%" class="text-center">20%</td>
<td width="9%" class="text-center">30%</td>
<td width="9%" class="text-center">40%</td>
<td width="10%" class="text-center">50%</td>
<td width="9%" class="text-center">60%</td>
<td width="9%" class="text-center">70%</td>
<td width="9%" class="text-center">80%</td>
<td width="9%" class="text-center">90%</td>
<td width="9%" class="text-right">FULL</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2"><input type="range" class="custom-range" min="0" max="100" step="1" value="0" id="fan-speed-range" disabled></td></tr>
</table>
</td>
<td width="30%"><canvas id="chart-fanspeed" height="70" width="100"></canvas></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- PANEL: Printer controls =============================================================================== -->
<div class="card-header flex-shrink-1 p-0 bg-dark text-light" id="accordion-panel-controls-head">
<button class="btn btn-sm btn-dark btn-block text-left" type="button" data-toggle="collapse" data-target="#accordion-panel-controls-body" aria-expanded="true" aria-controls="accordion-panel-controls-body">
<span class="h5"><span class="badge badge-success" style="width:30px;"><i class="icon icon-tasks"></i></span><span class="ml-2">Controls</span></span>
<div class="badge badge-secondary float-right"><span class="h5 icon icon-chevron-down"></span></div>
</button>
</div>
<div id="accordion-panel-controls-body" class="collapse flex-grow-1 collapse-panel" aria-labelledby="accordion-panel-controls-head" data-parent="#accordion-panels">
<div class="card-body h-100 border-bottom p-1 text-left">
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-home mr-1 ml-1"></i>Home positioning</div>
<div class="card-body px-0 py-1 bg-light badge-description">
<table class="w-100" cellpadding="0" cellspacing="0">
<tr>
<td class="text-center text-light bg-info rounded-top">All axis</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">X axis</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">Y axis</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">Z axis</td>
</tr>
<tr>
<td class="text-center"><button id="btn-move-home-all" type="button" class="btn btn-block btn-dark" style="border-radius:0px 0px 5px 5px;" disabled><i class="icon icon-home mr-1"></i><i class="icon icon-arrows"></i></button></td>
<td style="width:2px"></td>
<td class="text-center"><button id="btn-move-home-x" type="button" class="btn btn-block btn-dark" style="border-radius:0px 0px 5px 5px;" disabled><i class="icon icon-home mr-1"></i><i class="icon icon-arrows-h"></i></button></td>
<td style="width:2px"></td>
<td class="text-center"><button id="btn-move-home-y" type="button" class="btn btn-block btn-dark" style="border-radius:0px 0px 5px 5px;" disabled><i class="icon icon-home mr-1"></i><i class="icon icon-arrows-v"></i></button></td>
<td style="width:2px"></td>
<td class="text-center"><button id="btn-move-home-z" type="button" class="btn btn-block btn-dark" style="border-radius:0px 0px 5px 5px;" disabled><i class="icon icon-home mr-1"></i><i class="icon icon-angle-double-down"></i></button></td>
</tr>
</table>
</div>
</div>
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-arrows-alt mr-1 ml-1"></i>Movements</div>
<div class="card-body px-0 py-1 bg-light badge-description">
<div class="list-group list-group-flush">
<div class="list-group-item bg-light px-0 py-1">
<label for="txt-move-steps" class="">Steps movements size (mm)</label>
<div class="form-group">
<input type="text" id="txt-move-steps" class="form-control form-control-sm float-right" value="10" style="width:80px"/>
<input type="range" class="form-control-range" min="0" max="50" step="1" id="customRange3" value="10">
</div>
</div>
<div class="list-group-item bg-light px-0 py-1">
Move on X axis
<button type="button" id="btn-move-xr" class="btn btn-sm btn-dark float-right" style="width:80px;"><i class="icon icon-long-arrow-right"></i></button>
<button type="button" id="btn-move-xl" class="btn btn-sm btn-dark float-right mr-1" style="width:80px;"><i class="icon icon-long-arrow-left"></i></button>
</div>
<div class="list-group-item bg-light px-0 py-1">
Move on Y axis
<button type="button" id="btn-move-yb" class="btn btn-sm btn-dark float-right" style="width:80px;"><i class="icon icon-long-arrow-down"></i></button>
<button type="button" id="btn-move-yf" class="btn btn-sm btn-dark float-right mr-1" style="width:80px;"><i class="icon icon-long-arrow-up"></i></button>
</div>
<div class="list-group-item bg-light px-0 py-1">
Move on Z axis
<button type="button" id="btn-move-zd" class="btn btn-sm btn-dark float-right" style="width:80px;"><i class="icon icon-angle-double-down"></i></button>
<button type="button" id="btn-move-zu" class="btn btn-sm btn-dark float-right mr-1" style="width:80px;"><i class="icon icon-angle-double-up"></i></button>
</div>
</div>
</div>
</div>
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-cog mr-1 ml-1"></i>Steppers locking</div>
<div class="card-body px-0 py-1 bg-light badge-description">
<table class="w-100" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" class="pb-1">
Lock/Unlock all steppers (X, Y, Z, E)
</td>
<td class="pb-1">
<input type="checkbox" class="float-right" id="set-stepper-all" data-input-type="togglebtn" data-size="sm" data-width="100%" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="Lock" data-off="Unlock" disabled>
</td>
</tr>
<tr>
<td class="text-center text-light bg-info rounded-top">X stepper</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">Y stepper</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">Z stepper</td>
<td style="width:2px"></td>
<td class="text-center text-light bg-info rounded-top">E stepper</td>
</tr>
<tr>
<td class="text-center pt-1"><input type="checkbox" id="set-stepper-x" data-input-type="togglebtn" data-size="sm" data-width="100%" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="Locked" data-off="Unlocked" disabled></td>
<td style="width:2px"></td>
<td class="text-center pt-1"><input type="checkbox" id="set-stepper-y" data-input-type="togglebtn" data-size="sm" data-width="100%" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="Locked" data-off="Unlocked" disabled></td>
<td style="width:2px"></td>
<td class="text-center pt-1"><input type="checkbox" id="set-stepper-z" data-input-type="togglebtn" data-size="sm" data-width="100%" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="Locked" data-off="Unlocked" disabled></td>
<td style="width:2px"></td>
<td class="text-center pt-1"><input type="checkbox" id="set-stepper-e" data-input-type="togglebtn" data-size="sm" data-width="100%" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="Locked" data-off="Unlocked" disabled></td>
</tr>
</table>
<div class="row mb-1">
<div class="col">
</div>
</div>
</div>
</div>
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-tencent-weibo mr-1 ml-1"></i>Filament</div>
<div class="card-body px-0 py-1 bg-light badge-description">
</div>
</div>
</div>
</div>
<!-- PANEL: File management ================================================================================ -->
<div class="card-header flex-shrink-1 p-0 bg-dark text-light" id="accordion-panel-file-head">
<button class="btn btn-sm btn-dark btn-block text-left" type="button" data-toggle="collapse" data-target="#accordion-panel-file-body" aria-expanded="true" aria-controls="accordion-panel-file-body">
<span class="h5"><span class="badge badge-success" style="width:30px;"><i class="icon icon-file"></i></span><span class="ml-2">File management</span></span>
<div class="badge badge-secondary float-right"><span class="h5 icon icon-chevron-down"></span></div>
</button>
</div>
<div id="accordion-panel-file-body" class="collapse flex-grow-1 collapse-panel" aria-labelledby="accordion-panel-file-head" data-parent="#accordion-panels">
<div class="card-body h-100 p-1 text-left">
<div class="card mb-1 border-0">
<div class="card-header card-header-title text-light bg-secondary m-0 p-1"><i class="icon icon-upload mr-1 ml-1"></i>Upload...</div>
<div class="card-body px-0 py-1 bg-light">
<div class="input-group input-group-sm mb-1">
<div class="custom-file">
<input type="file" class="custom-file-input" id="file-upload" accept=".g,.gco,.gcode" aria-describedby="btn-file-upload" disabled>
<label id="file-upload-label" class="custom-file-label" for="file-upload" data-browse='Pick'>Choose file</label>
</div>
<div class="input-group-append">
<button id="btn-file-upload" class="btn btn-sm btn-success" type="button" disabled>Upload<i class="icon icon-upload ml-1"></i></button>
</div>
</div>
<div id="upload-process-collapse" class="collapse mt-1">
<table class="w-100 mb-1" cellspacing="0" cellpadding="0">
<tr>
<td width="34%">
<div class="card mr-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">Filename (DOS8 Format)</div>
<div id="div-upload-fname" class="card-body py-0 px-1 card-header-description text-center">-</div>
</div>
</td>
<td width="33%">
<div class="card">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">File size</div>
<div id="div-upload-fsize" class="card-body py-0 px-1 card-header-description text-center">-</div>
</div>
</td>
<td width="33%">
<div class="card ml-1">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">GCode Lines</div>
<div id="div-upload-fproc" class="card-body py-0 px-1 card-header-description text-center">-</div>
</div>
</td>
</tr>
</table>
<div class="card">
<div class="card-header py-0 px-1 bg-info text-light card-header-description">File processing</div>
<table class="w-100" cellspacing="0" cellpadding="0">
<tr>
<td width="60%" class="p-1">
<div id="upload-progress-text" class="card-header-description">&nbsp;</div>
<div class="progress">
<div id="upload-progressbar" class="progress-bar progress-bar-striped progress-bar-animated bg-info" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
</div>
</td>
<td width="40%" class="p-1 text-right">
<button id="btn-file-proc-cancel" class="btn btn-sm btn-danger" type="button" disabled>Cancel<i class="icon icon-ban ml-1"></i></button>
<button id="btn-file-proc" class="btn btn-sm btn-info" type="button" disabled>Process<i class="icon icon-cog ml-1"></i></button>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="card mb-0 border-0">
<div class="card-header card-header-title text-white bg-secondary m-0 p-1"><i class="icon icon-file ml-1 mr-1"></i>SD Content management</div>
<div class="card-body px-0 py-1 bg-light">
<div>
<button id="btn-get-sdcontent" class="btn btn-sm btn-success" disabled><i class="icon icon-angle-double-down mr-1"></i>Get content</button>
<div class="btn-group float-right" role="group">
<button id="btn-set-sdinit" class="btn btn-sm btn-outline-success" style="width:120px" disabled><i class="icon icon-long-arrow-down mr-1"></i>SD Init</button>
<button id="btn-set-sdrelease" class="btn btn-sm btn-outline-success" style="width:120px" disabled><i class="icon icon-long-arrow-up mr-1"></i>SD Release</button>
</div>
</div>
<div id="div-sd-selected-file" class="collapse mt-1 show">
<div class="input-group input-group-sm">
<div class="input-group-prepend"><span class="input-group-text" id="lbl-sdfile-selected">Selected file:</span></div>
<input type="text" id="txt-sdfile-selected" class="form-control" aria-describedby="lbl-sdfile-selected" value="" readonly/>
<div class="input-group-append">
<button id="btn-set-sdprint" class="btn btn-sm btn-success" data-toggle="modal" data-target="#modal-sdfile-print" onclick="WmButtons.PrintSdConfirm();" disabled><i class="icon icon-print"></i></button>
<button id="btn-set-sddelete" class="btn btn-sm btn-danger" data-toggle="modal" data-target="#modal-sdfile-delete" onclick="WmButtons.DeleteSdConfirm();" disabled><i class="icon icon-trash"></i></button>
</div>
</div>
</div>
</div>
</div>
<div class="card mb-0 border-0">
<div class="card-header card-header-title text-white bg-secondary m-0 p-1">
<div class="float-right">Files: <div id="div-sdlist-file-count" class="badge badge-light">0</div></div>
<div class="float-right mr-1">Folders: <div id="div-sdlist-folder-count" class="badge badge-light">0</div></div>
<i class="icon icon-file ml-1 mr-1"></i>SD File list
</div>
<div class="card-body px-0 py-1 bg-light"><div id="list-sd-content" class="list-group list-group-flush"></div></div>
</div>
</div>
</div>
<!-- PANEL: Console ======================================================================================== -->
<div class="card-header flex-shrink-1 p-0 bg-dark text-light" id="accordion-panel-console-head">
<button class="btn btn-sm btn-dark btn-block text-left" type="button" data-toggle="collapse" data-target="#accordion-panel-console-body" aria-expanded="true" aria-controls="accordion-panel-console-body">
<span class="h5"><span class="badge badge-success" style="width:30px;"><i class="icon icon-terminal"></i></span><span class="ml-2">Console</span></span>
<div class="badge badge-secondary float-right"><span class="h5 icon icon-chevron-down"></span></div>
<div id="div-counter-badge" class="badge badge-secondary float-right mr-1"><span id="log-counter-badge" class="h5">0</span></div>
</button>
</div>
<div id="accordion-panel-console-body" class="collapse flex-grow-1 collapse-panel" aria-labelledby="accordion-panel-console-head" data-parent="#accordion-panels">
<div class="card-body h-100 p-1 text-left">
<label for="text-gcommand" class="mb-0 field-labels">G-Code command:</label>
<div class="input-group">
<div class="input-group-prepend">
<a class="btn btn-sm btn-dark" target="_blank" href="http://marlinfw.org/meta/gcode/"><i class="icon icon-info"></i></a>
<button class="btn btn-sm btn-outline-dark" type="button" id="btn-gcommand-preset" data-toggle="modal" data-target="#modal-presets"><i class="icon icon-tasks"></i></button>
</div>
<input type="text" id="text-gcommand" class="form-control form-control-sm border-dark text-uppercase" value="" required>
<div class="input-group-append">
<button class="btn btn-sm btn-outline-dark" type="button" id="btn-gcommand-checksum" data-toggle="button" aria-pressed="false" onclick="WmButtons.ToggleChecksumDiv();"><i class="icon icon-check-square"></i></button>
<button class="btn btn-sm btn-dark mr-1" type="button" id="btn-gcommand">Send <i class="icon icon-chevron-right"></i></button>
</div>
</div>
<div id="checksum-gcommand-div" class="collapse m-0 pr-1 text-right">
<span class="field-description mr-1">GCode checksum value:</span>
<span class="h5"><span class="badge badge-secondary" id="checksum-gcommand-value" style="width:100px;">&nbsp;</span></span>
</div>
<div id="checksum-gcommand-div" class="input-group input-group-sm collapse my-1">
<input type="text" class="form-control" aria-describedby="checksum-gcommand-value" placeholder="GCode checksum value" readonly/>
<div class="input-group-append text-center"><span class="input-group-text" id="checksum-gcommand-value" style="width:100px;"></span></div>
</div>
<label for="btn-gcommand" class="mb-0 field-labels">Console output:</label>
<div class="border rounded p-0 mb-1 console-listbox text-left">
<ul class="list-group list-group-flush" id="gcommand-console-list"></ul>
</div>
<div class="row">
<div class="col"><button class="btn btn-sm btn-secondary btn-block" type="button" id="btn-clear-console"><i class="icon icon-ban mr-1"></i> Clear list</button></div>
<div class="col"><button class="btn btn-sm btn-success btn-block" type="button" id="btn-export-console"><i class="icon icon-angle-double-down mr-1"></i>Save..</button></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: About window ========================================================================================= -->
<div class="modal fade" id="modal-info" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-popup" role="document">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-info mr-2"></i>Info...</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-2 text-left">
<span class="h3">Marlin WebUI</span>
<p>Release date: January, 1 2020</p>
<p>
<i class="icon icon-github"></i> Github project: <a href="https://github.com/exilaus/E4d-box-project" target="_blank">E4d-box-project</a><br />
<i class="icon icon-facebook-square"></i> Facebook: <a href="https://www.facebook.com/groups/372792116726814/about/" target="_blank">E4d@box</a>
</p>
<p>Open source dependencies:</p>
<ul>
<li><a href="https://marlinfw.org/" target="_blank">Marlin firmware</a></li>
<li><a href="https://jquery.com/" target="_blank">JQuery 3.5.1 (slim version)</a></li>
<li><a href="https://getbootstrap.com/" target="_blank">Bootstrap v4.5.0</a></li>
<li><a href="https://gitbrent.github.io/bootstrap4-toggle/" target="_blank">Bootstrap4 toggle switch v3.6.1</a></li>
<li><a href="http://fontastic.me/">Fontastic</a>
<li><a href="https://www.chartjs.org/" target="_blank">Chart.js</a></li>
<li><a href="https://github.com/eligrey/FileSaver.js" target="_blank">FileSaver.js</a></li>
</ul>
</div>
<div class="modal-footer bg-secondary m-0 p-1"><button type="button" class="btn btn-dark btn-block" data-dismiss="modal">Close</button></div>
</div>
</div>
</div>
<!-- MODAL: Settings ============================================================================================= -->
<div class="modal fade" id="modal-settings" data-backdrop="static" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-popup" role="document">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-sliders mr-2"></i>Settings..</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-1 text-left">
<ul class="list-group list-group-flush">
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Auto connect:</div>
<div class="col-7 m-0"><input type="checkbox" id="set-auto-connect" data-size="sm" data-width="100" data-toggle="toggle" data-onstyle="success" data-offstyle="outline-dark" data-on="ON" data-off="OFF"></div>
</div>
<small class="form-text text-muted font-italic mt-0">If ON the application will try to connect automatically on start</small>
</li>
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Temp interval:</div>
<div class="col-7 m-0">
<select class="form-control form-control-sm mb-1" id="set-default-autotemp">
<option value="1">1 sec</option>
<option value="5">5 sec</option>
<option value="10">10 sec</option>
<option value="30">30 sec</option>
<option value="60">60 sec</option>
</select>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the default temperature detection interval (secs)</small>
</li>
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Temp unit:</div>
<div class="col-7 m-0">
<select class="form-control form-control-sm mb-1" id="set-default-tempunit">
<option value="0">Celsius (default)</option>
<option value="1">Fahrenheit</option>
<option value="2">Kelvin</option>
</select>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the default temperature unit</small>
</li>
<li class="list-group-item p-1">
<div class="row mb-0">
<div class="col-5 m-0">Default panel:</div>
<div class="col-7 m-0">
<select class="form-control form-control-sm mb-1" id="set-default-panel">
<option value="4">Console</option>
<option value="1">Controls</option>
<option value="0">Status (default)</option>
<option value="2">Temperature</option>
<option value="3">Upload</option>
</select>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the default shown panel on start</small>
</li>
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Trace direction:</div>
<div class="col-7 m-0">
<div class="btn-group btn-group-toggle" data-toggle="buttons">
<label class="btn btn-sm btn-secondary"><input type="radio" name="set-trace-mode" id="set-trace-mode-append"><i class="icon icon-angle-double-down mr-1"></i>Append</label>
<label class="btn btn-sm btn-secondary"><input type="radio" name="set-trace-mode" id="set-trace-mode-prepend"><i class="icon icon-angle-double-up mr-1"></i>Prepend</label>
</div>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the console trace direction</small>
</li>
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Trace symbol</div>
<div class="col-7 m-0">
<select class="form-control form-control-sm mb-1" id="set-log-symbol">
<option value="icon">Icon</option>
<option value="letter">Letter</option>
</select>
<div id="div-log-symbol-icon" class="collapse form-check-inline mb-0 h4">
<select class="form-control form-control-sm mb-0 mr-1" id="set-log-symbol-icon">
<option value="0">Chevron: U/D</option>
<option value="2">Chevron: L/R</option>
<option value="1">Arrow: U/D</option>
<option value="3">Arrow: L/R</option>
</select>
<div id="div-log-symbol-icon-sample-s" class="badge badge-success mr-1"></div>
<div id="div-log-symbol-icon-sample-r" class="badge badge-danger"></div>
</div>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the console message direction symbol</small>
</li>
<li class="list-group-item p-1">
<div class="row">
<div class="col-5 m-0">Logging level</div>
<div class="col-7 m-0">
<select class="form-control form-control-sm mb-1" id="set-log-level">
<option value="0">Info (default)</option>
<option value="1">Warning</option>
<option value="2">Error</option>
<option value="3">Debug</option>
<option value="4">Verbose</option>
</select>
</div>
</div>
<small class="form-text text-muted font-italic mt-0">Set the JavaScript logging level</small>
</li>
</ul>
<div class="collapse mt-2" id="div-save-setting-rs"><div class="card card-body border-success p-1 text-success text-center">Settings saved successfully</div></div>
</div>
<div class="modal-footer bg-secondary m-0 p-1">
<div class="row w-100">
<div class="col"><button type="button" class="btn btn-dark btn-block" id="btn-close-settings" data-dismiss="modal">Close</button></div>
<div class="col"><button type="button" class="btn btn-success btn-block" id="btn-save-settings">Save</button></div>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: Presets command ====================================================================================== -->
<div class="modal fade" id="modal-presets" tabindex="-1" role="dialog" aria-labelledby="modal-presets-label" aria-hidden="true">
<div class="modal-dialog modal-popup" role="document">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-sliders mr-2"></i>GCommand presets</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-1 text-left">
<div id="list-presets" class="list-group list-group-flush">
<li class="list-group-item p-1 bg-light field-labels">Replace {N} chars with the specific parameter that you need if present (ie: G1 X{0} => G1 X10)</li>
</div>
</div>
<div class="modal-footer bg-secondary m-0 p-1"><button type="button" class="btn btn-dark btn-block" data-dismiss="modal">Close</button></div>
</div>
</div>
</div>
<!-- MODAL: Connect ============================================================================================== -->
<div class="modal fade" id="modal-connect" data-backdrop="static" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-popup" role="document">
<div class="modal-content">
<div class="modal-header bg-warning text-dark m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-exchange mr-2"></i>Connect...</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-2 text-center my-4">
<i class="icon icon-exclamation-triangle"></i><br>Ooopsss!<br />Marlin firmware Web Socket is not connected.<br />Would you like connect it now?
</div>
<div class="modal-footer bg-secondary m-0 p-1">
<div class="row w-100">
<div class="col"><button type="button" class="btn btn-sm btn-dark btn-block" data-dismiss="modal">Cancel</button></div>
<div class="col"><button id="btn-wsconnect-modal" type="button" class="btn btn-sm btn-warning btn-block" data-dismiss="modal"><i class="icon icon-bolt mr-1"></i>Connect now</button></div>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: SD file deletion confirmation ======================================================================= -->
<div class="modal fade" id="modal-sdfile-delete" data-backdrop="static" role="dialog" tabindex="-1" aria-labelledby="modal-sdfile-label" aria-hidden="true">
<div class="modal-dialog modal-popup">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-exclamation-triangle mr-2"></i>Deletion confirmation</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-1 text-center mt-4 mb-1">
<span class="h5"><i class="icon icon-exclamation-triangle"></i><br>Are you sure to delete<br><div id="div-sdfile-delete-badge" class="badge badge-danger"></div><br>SD card file?<br>
This operation cannot be undone.</span>
<div id="div-sdfile-delete-rs" class="collapse mt-2"><div class="card card-body border-success p-1 text-success text-center">File deleted successfully</div></div>
</div>
<div class="modal-footer bg-secondary m-0 p-1">
<div class="row w-100">
<div class="col"><button type="button" class="btn btn-sm btn-dark btn-block" data-dismiss="modal">No</button></div>
<div class="col"><button id="btn-sdfile-delete-modal" type="button" class="btn btn-sm btn-success btn-block"><i class="icon icon-trash mr-1"></i>Yes</button></div>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: SD file print confirmation ======================================================================= -->
<div class="modal fade" id="modal-sdfile-print" data-backdrop="static" role="dialog" tabindex="-1" aria-labelledby="modal-sdfile-print" aria-hidden="true">
<div class="modal-dialog modal-popup">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-print mr-2"></i>Print confirmation</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-1 text-center my-4">
<span class="h5"><i class="icon icon-print"></i><br>Are you sure to start printing of<br><div id="div-sdfile-print-badge" class="badge badge-success"></div></span>
</div>
<div id="div-sdfile-print-rs" class="collapse mt-2"><div class="card card-body border-success p-1 m-2 text-success text-center">Printing started successfully</div></div>
<div class="modal-footer bg-secondary m-0 p-1">
<div class="row w-100">
<div class="col"><button type="button" class="btn btn-sm btn-dark btn-block" data-dismiss="modal">No</button></div>
<div class="col"><button id="btn-sdfile-print-modal" type="button" class="btn btn-sm btn-success btn-block"><i class="icon icon-print mr-1"></i>Yes</button></div>
</div>
</div>
</div>
</div>
</div>
<!-- MODAL: Alert message ======================================================================= -->
<div class="modal fade" id="modal-alert" data-backdrop="static" role="dialog" tabindex="-1" aria-labelledby="modal-alert" aria-hidden="true">
<div class="modal-dialog modal-popup">
<div class="modal-content">
<div class="modal-header bg-secondary text-light m-0 px-2 py-1">
<span class="h5 font-italic mt-1"><i class="icon icon-info-circled mr-2"></i>Message</span>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body p-1 text-center my-4">
<span class="h5"><i class="icon icon-info-circled"></i><br><div id="div-alert-message"></div></span>
</div>
<div class="modal-footer bg-secondary m-0 p-1">
<div class="row w-100">
<div class="col"><button type="button" class="btn btn-sm btn-success btn-block" data-dismiss="modal">OK</button></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

2
data/www/jquery-3.5.1.slim.min.js vendored Normal file

File diff suppressed because one or more lines are too long

10
data/www/jquery.browser.min.js vendored Normal file
View file

@ -0,0 +1,10 @@
/*!
* jQuery Browser Plugin 0.1.0
* https://github.com/gabceb/jquery-browser-plugin
* Original jquery-browser code Copyright 2005, 2015 jQuery Foundation, Inc. and other contributors
* http://jquery.org/license
* Modifications Copyright 2015 Gabriel Cebrian
* https://github.com/gabceb
* Released under the MIT license
* Date: 23-11-2015
*/!function(a){"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=a(require("jquery")):a(window.jQuery)}(function(a){"use strict";function b(a){void 0===a&&(a=window.navigator.userAgent),a=a.toLowerCase();var b=/(edge)\/([\w.]+)/.exec(a)||/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(iemobile)[\/]([\w.]+)/.exec(a)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(ipod)/.exec(a)||/(windows phone)/.exec(a)||/(iphone)/.exec(a)||/(kindle)/.exec(a)||/(silk)/.exec(a)||/(android)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/.exec(a)||/(playbook)/.exec(a)||/(bb)/.exec(a)||/(blackberry)/.exec(a)||[],d={},e={browser:b[5]||b[3]||b[1]||"",version:b[2]||b[4]||"0",versionNumber:b[4]||b[2]||"0",platform:c[0]||""};if(e.browser&&(d[e.browser]=!0,d.version=e.version,d.versionNumber=parseInt(e.versionNumber,10)),e.platform&&(d[e.platform]=!0),(d.android||d.bb||d.blackberry||d.ipad||d.iphone||d.ipod||d.kindle||d.playbook||d.silk||d["windows phone"])&&(d.mobile=!0),(d.cros||d.mac||d.linux||d.win)&&(d.desktop=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv||d.iemobile){var f="msie";e.browser=f,d[f]=!0}if(d.edge){delete d.edge;var g="msedge";e.browser=g,d[g]=!0}if(d.safari&&d.blackberry){var h="blackberry";e.browser=h,d[h]=!0}if(d.safari&&d.playbook){var i="playbook";e.browser=i,d[i]=!0}if(d.bb){var j="blackberry";e.browser=j,d[j]=!0}if(d.opr){var k="opera";e.browser=k,d[k]=!0}if(d.safari&&d.android){var l="android";e.browser=l,d[l]=!0}if(d.safari&&d.kindle){var m="kindle";e.browser=m,d[m]=!0}if(d.safari&&d.silk){var n="silk";e.browser=n,d[n]=!0}return d.name=e.browser,d.platform=e.platform,d}return window.jQBrowser=b(window.navigator.userAgent),window.jQBrowser.uaMatch=b,a&&(a.browser=window.jQBrowser),window.jQBrowser});

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,166 +0,0 @@
/* CSS reset */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
font-family: Impact, Charcoal, sans-serif;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after { content: ''; content: none; }
table {
border-collapse: collapse;
border-spacing: 0;
}
/* Custom */
/* Tabs */
* { box-sizing: border-box; }
body {
display: flex;
justify-content: center;
padding: 0px;
background: #1e1e1e;
color: #efefef;
}
h1 {
margin: 0;
font-size: 2em;
}
.tabs {
display: flex;
width: 100%;
flex-wrap: wrap;
background: #e5e5e5;
}
.input {
position: absolute;
opacity: 0;
}
.label {
width: 100%;
padding: 18px 28px;
background: #e5e5e5;
cursor: pointer;
font-weight: bold;
font-size: 18px;
color: #7f7f7f;
transition: background 0.1s, color 0.1s;
border-style: solid;
border-width: 0 0 4px 0;
border-color: #acacac;
}
.label:hover {
background: #d8d8d8;
}
.label:active {
background: #ccc;
}
.input:focus + .label {
z-index: 1;
}
.input:checked + .label {
background: #1e1e1e;
color: #efefef;
border-width: 4px 0 0 0;
border-color: #65a57d;
}
.panel {
display: none;
width: 100%;
padding: 20px 30px 30px;
background: #1e1e1e;
color: #e5e5e5;
}
.panel .panel-content {
width: 100%;
max-width: 800px;
}
@media (min-width: 600px) {
.label { width: auto; }
.panel { order: 99; }
}
.input:checked + .label + .panel { display: block; }
#logo {
width: 130px;
height: 58px;
margin-right: 20px;
background: url(marlin-logo.png) no-repeat center center;
}
input[type="text"], textarea {
background-color: #2c2c2c;
border: solid 2px #314b3b;
color: #e5e5e5;
outline: none;
}
input[type="text"]:focus, textarea:focus {
border-color: #4d7a5e;
}
ul#serial-output {
width: 100%;
height: 300px;
overflow-y: scroll;
background-color: #2c2c2c;
border: solid 2px #314b3b;
}
ul#serial-output li {
padding: 4px;
font-family: "Lucida Console", Monaco, monospace;
font-size: 0.8em;
}
ul#serial-output li:nth-child(odd) {
background-color: #3c3c3c;
}
div.form-wrapper {
display: flex;
width: 100%;
margin: 6px 0;
}
div.form-wrapper input {
font-size: 1.2em;
padding: 4px 6px;
}
div.form-wrapper input[type="text"] {
flex: 1 1 auto;
}
div.form-wrapper input[type="submit"],
div.form-wrapper button {
border: solid 2px #314b3b;
background-color: #4d7a5e;
color: #e5e5e5;
}

View file

@ -1,24 +0,0 @@
document.addEventListener('DOMContentLoaded', () => {
const ws = new WebSocket(`ws://${location.host}/ws`);
ws.onmessage = (e) => {
if (typeof e.data === 'string') {
let node = document.createElement('li');
let text = document.createTextNode(e.data);
node.appendChild(text);
document.getElementById('serial-output').appendChild(node);
}
};
document.getElementById('serial-command-form').addEventListener('submit', (e) => {
e.preventDefault();
let value = document.getElementById('serial-command').value.trim();
if (!value) return;
ws.send(`${value}\n`);
document.getElementById('serial-command').value = '';
});
});

BIN
data/www/marlinui.eot Normal file

Binary file not shown.

56
data/www/marlinui.svg Normal file
View file

@ -0,0 +1,56 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by Fontastic.me</metadata>
<defs>
<font id="marlinui" horiz-adv-x="512">
<font-face font-family="marlinui" units-per-em="512" ascent="480" descent="-32"/>
<missing-glyph horiz-adv-x="512" />
<glyph glyph-name="home" unicode="&#97;" d="M421 229l0-138c0-5-2-9-6-12-3-4-8-6-13-6l-109 0 0 110-74 0 0-110-109 0c-5 0-10 2-13 6-4 3-6 7-6 12l0 138c0 0 0 0 0 0 0 1 0 1 0 1l164 136 165-136c0 0 0-1 0-1z m63 19l-17-21c-2-2-4-3-6-3l-1 0c-3 0-5 1-6 2l-198 165-198-165c-2-2-4-2-7-2-2 0-4 1-6 3l-17 21c-2 2-2 4-2 7 0 3 1 5 3 6l205 171c6 5 14 8 22 8 8 0 16-3 22-8l69-58 0 56c0 2 1 5 3 6 2 2 4 3 7 3l54 0c3 0 5-1 7-3 2-1 3-4 3-6l0-117 62-52c2-1 3-3 3-6 0-3 0-5-2-7z"/>
<glyph glyph-name="info" unicode="&#98;" d="M318 512c17 0 29-5 38-14 9-9 14-21 14-35 0-17-7-32-20-45-14-13-30-20-49-20-16 0-29 5-38 14-9 9-13 21-12 37 0 15 6 30 18 43 12 13 28 20 49 20m-105-512c-34 0-43 30-28 91 0 0 31 130 31 130 5 19 5 29 0 29-4 0-13-3-28-9-14-7-26-13-36-20 0 0-14 23-14 23 31 26 63 48 97 64 34 17 60 25 77 25 27 0 33-28 19-83 0 0-36-136-36-136-6-22-5-33 3-33 15 0 35 10 60 31 0 0 16-21 16-21-29-29-59-52-90-67-31-16-55-24-71-24"/>
<glyph glyph-name="cog" unicode="&#99;" d="M329 256c0 20-7 37-21 52-15 14-32 21-52 21-20 0-37-7-52-21-14-15-21-32-21-52 0-20 7-37 21-52 15-14 32-21 52-21 20 0 37 7 52 21 14 15 21 32 21 52z m146 31l0-63c0-3 0-5-2-7-1-2-3-3-6-4l-52-8c-4-10-8-19-12-26 7-9 17-22 31-39 2-2 3-5 3-7 0-3-1-5-3-7-5-7-14-17-28-31-14-13-23-20-27-20-2 0-5 1-7 3l-40 31c-8-5-17-8-26-11-3-26-6-44-8-53-1-6-5-8-10-8l-64 0c-2 0-5 0-7 2-2 2-3 4-3 6l-8 53c-9 3-18 6-26 10l-40-30c-2-2-4-3-7-3-3 0-5 1-7 3-24 22-40 38-47 48-2 2-2 4-2 7 0 2 0 4 2 6 3 4 8 11 14 19 7 9 12 16 16 21-5 9-9 19-12 28l-52 8c-3 0-5 1-6 3-2 2-2 4-2 7l0 63c0 3 0 5 2 7 1 2 3 3 5 4l53 8c3 8 7 17 12 26-8 11-18 24-31 39-2 3-3 5-3 7 0 2 1 4 3 7 5 7 14 17 28 30 14 14 23 21 27 21 2 0 5-1 7-3l40-31c8 5 17 8 26 11 3 26 6 44 8 53 1 6 5 8 10 8l64 0c2 0 5 0 7-2 2-2 3-4 3-6l8-53c9-3 18-6 26-10l40 30c2 2 4 3 7 3 3 0 5-1 7-3 25-23 41-39 47-49 2-1 2-3 2-6 0-2 0-4-2-6-3-4-8-11-14-19-7-9-12-16-16-21 5-9 9-18 12-28l52-8c3 0 5-1 6-3 2-2 2-4 2-7z"/>
<glyph glyph-name="tasks" unicode="&#100;" d="M293 110l182 0 0 36-182 0z m-110 146l292 0 0 37-292 0z m183 146l109 0 0 37-109 0z m146-237l0-74c0-5-2-9-5-12-4-4-8-6-13-6l-476 0c-5 0-9 2-13 6-3 3-5 7-5 12l0 74c0 5 2 9 5 12 4 4 8 6 13 6l476 0c5 0 9-2 13-6 3-3 5-7 5-12z m0 146l0-73c0-5-2-10-5-13-4-4-8-6-13-6l-476 0c-5 0-9 2-13 6-3 3-5 8-5 13l0 73c0 5 2 9 5 13 4 3 8 5 13 5l476 0c5 0 9-2 13-5 3-4 5-8 5-13z m0 146l0-73c0-5-2-9-5-13-4-3-8-5-13-5l-476 0c-5 0-9 2-13 5-3 4-5 8-5 13l0 73c0 5 2 9 5 13 4 4 8 5 13 5l476 0c5 0 9-1 13-5 3-4 5-8 5-13z"/>
<glyph glyph-name="chevron-down" unicode="&#102;" d="M481 281l-212-212c-4-3-8-5-13-5-5 0-9 2-13 5l-212 212c-3 4-5 8-5 13 0 5 2 10 5 13l48 47c3 4 7 6 12 6 5 0 10-2 13-6l152-151 152 151c3 4 8 6 13 6 5 0 9-2 12-6l48-47c3-3 5-8 5-13 0-5-2-9-5-13z"/>
<glyph glyph-name="chevron-left" unicode="&#103;" d="M408 426l-152-152 152-151c3-4 5-8 5-13 0-5-2-10-5-13l-48-48c-3-3-8-5-13-5-5 0-9 2-12 5l-212 212c-4 4-6 8-6 13 0 5 2 10 6 13l212 212c3 4 7 6 12 6 5 0 10-2 13-6l48-47c3-4 5-8 5-13 0-5-2-9-5-13z"/>
<glyph glyph-name="chevron-right" unicode="&#104;" d="M389 261l-212-212c-3-3-7-5-12-5-5 0-10 2-13 5l-48 48c-3 3-5 8-5 13 0 5 2 9 5 13l152 151-152 152c-3 4-5 8-5 13 0 5 2 9 5 13l48 47c3 4 8 6 13 6 5 0 9-2 12-6l212-212c4-3 6-8 6-13 0-5-2-9-6-13z"/>
<glyph glyph-name="chevron-up" unicode="&#105;" d="M481 132l-48-47c-3-4-7-6-12-6-5 0-10 2-13 6l-152 151-152-151c-3-4-8-6-13-6-5 0-9 2-12 6l-48 47c-3 3-5 8-5 13 0 5 2 9 5 13l212 211c4 4 8 6 13 6 5 0 9-2 13-6l212-211c3-4 5-8 5-13 0-5-2-10-5-13z"/>
<glyph glyph-name="arrows-alt" unicode="&#106;" d="M403 357l-101-101 101-101 41 41c6 6 12 7 20 4 8-4 11-9 11-17l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-8 0-13 3-17 11-3 7-2 14 4 20l41 41-101 101-101-101 41-41c6-6 7-13 4-20-4-8-9-11-17-11l-128 0c-5 0-9 1-13 5-4 4-5 8-5 13l0 128c0 8 3 13 11 17 7 3 14 2 20-4l41-41 101 101-101 101-41-41c-4-3-8-5-13-5-2 0-5 0-7 1-8 4-11 9-11 17l0 128c0 5 1 9 5 13 4 4 8 5 13 5l128 0c8 0 13-3 17-11 3-7 2-14-4-20l-41-41 101-101 101 101-41 41c-6 6-7 13-4 20 4 8 9 11 17 11l128 0c5 0 9-1 13-5 4-4 5-8 5-13l0-128c0-8-3-13-11-17-2-1-5-1-7-1-5 0-9 2-13 5z"/>
<glyph glyph-name="upload" unicode="&#107;" d="M384 91c0 5-2 10-5 13-4 4-8 6-13 6-5 0-10-2-13-6-4-3-6-8-6-13 0-5 2-9 6-12 3-4 8-6 13-6 5 0 9 2 13 6 3 3 5 7 5 12z m73 0c0 5-2 10-5 13-4 4-8 6-13 6-5 0-9-2-13-6-4-3-5-8-5-13 0-5 1-9 5-12 4-4 8-6 13-6 5 0 9 2 13 6 3 3 5 7 5 12z m37 64l0-91c0-8-3-14-8-19-6-6-12-8-20-8l-420 0c-8 0-14 2-20 8-5 5-8 11-8 19l0 91c0 8 3 15 8 20 6 5 12 8 20 8l122 0c4-11 10-20 20-26 9-7 20-11 31-11l74 0c11 0 22 4 31 11 10 6 16 15 20 26l122 0c8 0 14-3 20-8 5-5 8-12 8-20z m-93 186c-3-8-9-12-17-12l-73 0 0-128c0-5-2-9-6-13-3-3-7-5-12-5l-74 0c-5 0-9 2-12 5-4 4-6 8-6 13l0 128-73 0c-8 0-14 4-17 12-3 7-2 14 4 19l128 128c4 4 8 6 13 6 5 0 9-2 13-6l128-128c6-5 7-12 4-19z"/>
<glyph glyph-name="ban" unicode="&#109;" d="M411 257c0 31-8 59-24 84l-216-215c26-17 55-25 85-25 21 0 41 4 60 12 20 8 36 19 50 33 14 14 25 31 33 50 8 19 12 40 12 61z m-285-86l216 216c-26 17-55 26-86 26-28 0-54-7-78-21-24-14-43-33-57-57-13-24-20-50-20-78 0-31 8-59 25-86z m349 86c0-30-5-59-17-86-12-27-27-51-47-70-19-20-43-35-70-47-27-12-55-17-85-17-30 0-58 5-85 17-27 12-51 27-70 47-20 19-35 43-47 70-12 27-17 56-17 86 0 30 5 58 17 85 12 28 27 51 47 71 19 19 43 35 70 46 27 12 55 18 85 18 30 0 58-6 85-18 27-11 51-27 70-46 20-20 35-43 47-71 12-27 17-55 17-85z"/>
<glyph glyph-name="github" unicode="&#110;" d="M475 256c0-48-14-91-41-129-28-38-64-65-109-79-5-1-8-1-11 2-2 2-3 5-3 8l0 61c0 18-5 32-15 40 11 1 20 3 29 5 9 3 18 6 27 11 9 6 17 12 23 19 6 8 11 18 15 30 4 13 6 27 6 43 0 23-8 43-23 59 7 18 7 37-2 59-5 1-13 0-23-4-10-3-19-8-26-12l-11-7c-18 5-36 7-55 7-19 0-37-2-55-7-3 2-7 5-12 8-5 3-13 6-24 11-11 4-19 5-24 4-9-22-9-41-2-59-15-16-23-36-23-59 0-16 2-30 6-42 4-13 9-23 15-30 6-8 14-14 23-20 9-5 18-8 27-11 8-2 18-4 29-5-8-7-12-17-14-29-4-2-8-4-13-5-4-1-10-1-16-1-6 0-13 2-19 6-6 4-11 10-16 18-3 6-8 11-14 15-5 4-10 6-14 7l-5 1c-4 0-7-1-9-2-1-1-2-2-1-3 0-1 1-3 2-4 2-1 3-2 4-3l2-2c4-2 8-5 13-11 4-5 7-10 9-14l2-7c3-7 7-13 13-17 6-5 12-8 19-9 7-1 14-2 20-2 6 0 12 0 16 1l6 1c0-7 0-16 1-25 0-10 0-15 0-16 0-3-2-6-4-8-2-3-6-3-11-2-45 14-81 41-109 79-27 38-41 81-41 129 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
<glyph glyph-name="thermometer" unicode="&#111;" d="M323 259c21-12 39-29 52-50 13-21 19-45 19-71 0-38-13-71-40-98-27-27-60-40-98-40-38 0-71 13-98 40-27 27-40 60-40 98 0 26 6 50 19 71 13 21 31 38 52 50 0 0 0 227 0 227 0 17 7 26 21 26 0 0 87 0 87 0 7 0 13-3 18-8 5-5 8-11 8-18 0 0 0-227 0-227m-67-208c24 0 44 9 61 26 18 17 26 37 26 61 0 19-5 36-16 51-11 15-26 26-43 31 0 0 0 190 0 190 0 0-52 0-52 0 0 0 0-189 0-189-18-5-33-16-45-31-12-15-18-33-18-52 0-24 8-44 26-61 17-17 37-26 61-26"/>
<glyph glyph-name="bolt" unicode="&#101;" d="M381 350c3-4 4-8 2-12l-154-331c-3-5-7-7-12-7-1 0-3 0-4 1-4 1-6 2-8 5-1 3-2 6-1 9l56 230-116-28c0-1-2-1-3-1-4 0-7 1-9 3-3 3-5 7-4 12l58 235c0 3 2 5 4 7 3 2 5 2 8 2l94 0c4 0 7-1 9-3 3-3 4-5 4-9 0-1-1-3-2-5l-48-132 113 28c1 0 2 1 3 1 4 0 7-2 10-5z"/>
<glyph glyph-name="sort-asc" unicode="&#112;" d="M402 311c0-5-2-9-5-13-4-4-8-5-13-5l-256 0c-5 0-9 1-13 5-3 4-5 8-5 13 0 5 2 9 5 13l128 128c4 3 8 5 13 5 5 0 9-2 13-5l128-128c3-4 5-8 5-13z"/>
<glyph glyph-name="sort-desc" unicode="&#113;" d="M402 201c0-5-2-9-5-13l-128-128c-4-3-8-5-13-5-5 0-9 2-13 5l-128 128c-3 4-5 8-5 13 0 5 2 9 5 13 4 4 8 5 13 5l256 0c5 0 9-1 13-5 3-4 5-8 5-13z"/>
<glyph glyph-name="long-arrow-left" unicode="&#114;" d="M512 283l0-54c0-3-1-5-3-7-1-2-3-3-6-3l-357 0 0-64c0-4-2-6-5-8-4-1-7-1-10 2l-110 100c-2 1-3 4-3 6 0 3 1 5 3 7l110 101c3 3 6 3 10 2 3-2 5-5 5-8l0-64 357 0c3 0 5-1 6-3 2-2 3-4 3-7z"/>
<glyph glyph-name="long-arrow-down" unicode="&#115;" d="M365 141c1-4 1-7-2-10l-100-110c-1-2-4-3-6-3-3 0-5 1-7 3l-101 110c-3 3-3 6-2 10 2 3 5 5 8 5l64 0 0 357c0 3 1 5 3 6 2 2 4 3 7 3l54 0c3 0 5-1 7-3 2-1 3-3 3-6l0-357 64 0c4 0 6-2 8-5z"/>
<glyph glyph-name="long-arrow-right" unicode="&#116;" d="M494 257c0-3-1-5-3-7l-110-101c-3-3-6-3-10-2-3 2-5 5-5 8l0 64-357 0c-3 0-5 1-6 3-2 2-3 4-3 7l0 54c0 3 1 5 3 7 1 2 3 3 6 3l357 0 0 64c0 4 2 6 5 8 4 1 7 1 10-2l110-100c2-1 3-4 3-6z"/>
<glyph glyph-name="long-arrow-up" unicode="&#117;" d="M365 371c-2-3-5-5-8-5l-64 0 0-357c0-3-1-5-3-6-2-2-4-3-7-3l-54 0c-3 0-5 1-7 3-2 1-3 3-3 6l0 357-64 0c-4 0-6 2-8 5-1 4-1 7 2 10l100 110c1 2 4 3 6 3 3 0 5-1 7-3l101-110c3-3 3-6 2-10z"/>
<glyph glyph-name="arrows" unicode="&#118;" d="M512 256c0-5-2-9-5-13l-74-73c-3-4-7-5-12-5-5 0-10 1-13 5-4 4-6 8-6 13l0 36-109 0 0-109 36 0c5 0 9-2 13-6 4-3 5-8 5-13 0-5-1-9-5-12l-73-74c-4-3-8-5-13-5-5 0-9 2-13 5l-73 74c-4 3-5 7-5 12 0 5 1 10 5 13 4 4 8 6 13 6l36 0 0 109-109 0 0-36c0-5-2-9-6-13-3-4-8-5-13-5-5 0-9 1-12 5l-74 73c-3 4-5 8-5 13 0 5 2 9 5 13l74 73c3 4 7 5 12 5 5 0 10-1 13-5 4-4 6-8 6-13l0-36 109 0 0 109-36 0c-5 0-9 2-13 6-4 3-5 8-5 13 0 5 1 9 5 12l73 74c4 3 8 5 13 5 5 0 9-2 13-5l73-74c4-3 5-7 5-12 0-5-1-10-5-13-4-4-8-6-13-6l-36 0 0-109 109 0 0 36c0 5 2 9 6 13 3 4 8 5 13 5 5 0 9-1 12-5l74-73c3-4 5-8 5-13z"/>
<glyph glyph-name="arrows-v" unicode="&#119;" d="M347 421c0-5-1-10-5-13-4-4-8-6-13-6l-36 0 0-292 36 0c5 0 9-2 13-6 4-3 5-8 5-13 0-5-1-9-5-12l-73-74c-4-3-8-5-13-5-5 0-9 2-13 5l-73 74c-4 3-5 7-5 12 0 5 1 10 5 13 4 4 8 6 13 6l36 0 0 292-36 0c-5 0-9 2-13 6-4 3-5 8-5 13 0 5 1 9 5 12l73 74c4 3 8 5 13 5 5 0 9-2 13-5l73-74c4-3 5-7 5-12z"/>
<glyph glyph-name="arrows-h" unicode="&#120;" d="M512 256c0-5-2-9-5-13l-74-73c-3-4-7-5-12-5-5 0-10 1-13 5-4 4-6 8-6 13l0 36-292 0 0-36c0-5-2-9-6-13-3-4-8-5-13-5-5 0-9 1-12 5l-74 73c-3 4-5 8-5 13 0 5 2 9 5 13l74 73c3 4 7 5 12 5 5 0 10-1 13-5 4-4 6-8 6-13l0-36 292 0 0 36c0 5 2 9 6 13 3 4 8 5 13 5 5 0 9-1 12-5l74-73c3-4 5-8 5-13z"/>
<glyph glyph-name="angle-double-up" unicode="&#121;" d="M399 137c0-2-1-5-3-6l-15-15c-1-2-4-3-6-3-3 0-5 1-7 3l-112 113-112-113c-2-2-4-3-7-3-2 0-5 1-6 3l-15 15c-2 1-3 4-3 6 0 3 1 5 3 7l133 133c2 2 5 3 7 3 2 0 5-1 7-3l133-133c2-2 3-4 3-7z m0 110c0-3-1-5-3-7l-15-14c-1-2-4-3-6-3-3 0-5 1-7 3l-112 112-112-112c-2-2-4-3-7-3-2 0-5 1-6 3l-15 14c-2 2-3 4-3 7 0 2 1 5 3 6l133 134c2 1 5 2 7 2 2 0 5-1 7-2l133-134c2-1 3-4 3-6z"/>
<glyph glyph-name="angle-double-down" unicode="&#122;" d="M399 265c0-2-1-5-3-6l-133-134c-2-1-5-2-7-2-2 0-5 1-7 2l-133 134c-2 1-3 4-3 6 0 3 1 5 3 7l15 14c1 2 4 3 6 3 3 0 5-1 7-3l112-112 112 112c2 2 4 3 7 3 2 0 5-1 6-3l15-14c2-2 3-4 3-7z m0 110c0-3-1-5-3-7l-133-133c-2-2-5-3-7-3-2 0-5 1-7 3l-133 133c-2 2-3 4-3 7 0 2 1 5 3 6l15 15c1 2 4 3 6 3 3 0 5-1 7-3l112-113 112 113c2 2 4 3 7 3 2 0 5-1 6-3l15-15c2-1 3-4 3-6z"/>
<glyph glyph-name="tencent-weibo" unicode="&#65;" d="M314 349c0-16-6-29-17-39-10-11-23-17-38-17-12 0-22 4-32 10-12-12-23-26-33-41-47-71-66-153-58-246 0-4-1-8-3-11-3-3-6-5-10-5l-2 0c-3 0-7 1-10 4-2 2-4 6-4 9-3 24-3 48-1 71 2 23 4 44 8 62 4 18 9 36 15 53 7 18 14 32 20 45 7 12 14 24 21 35 12 18 24 33 38 48-3 6-5 14-5 22 0 15 6 28 17 39 10 10 23 16 39 16 15 0 28-6 39-16 10-11 16-24 16-39z m109-4c0-30-8-57-23-83-15-26-35-46-60-61-26-14-54-22-84-22-12 0-25 1-37 4-4 1-8 3-10 7-2 3-3 7-2 11 1 4 4 7 7 9 3 2 7 3 11 2 10-2 20-3 31-3 18 0 36 3 53 10 17 8 32 17 44 30 12 12 22 26 29 43 7 17 11 35 11 53 0 19-4 37-11 54-7 17-17 31-29 43-12 12-27 22-44 29-17 8-35 11-53 11-18 0-36-3-53-11-17-7-32-17-44-29-12-12-22-26-29-43-7-17-11-35-11-54 0-21 5-42 15-62 2-4 2-7 1-11-1-4-4-7-7-9-4-2-8-2-12-1-3 2-6 4-8 8-12 23-19 48-19 75 0 23 5 45 14 65 9 21 20 39 35 53 15 15 33 27 53 36 21 9 43 13 65 13 30 0 58-7 84-22 25-15 45-35 60-61 15-26 23-53 23-84z"/>
<glyph glyph-name="playback-fast-forward" unicode="&#66;" d="M64 128l192 128-192 128z m384 128l-192 128 0-256z"/>
<glyph glyph-name="fire" unicode="&#67;" d="M457 27l0-18c0-2-1-4-3-6-1-2-4-3-6-3l-384 0c-2 0-5 1-6 3-2 2-3 4-3 6l0 18c0 3 1 5 3 7 1 2 4 3 6 3l384 0c2 0 5-1 6-3 2-2 3-4 3-7z m-73 302c0-15-2-28-7-41-5-13-11-23-18-32-8-9-16-17-25-25-9-8-19-16-28-22-9-7-17-14-25-21-7-7-13-15-18-23-5-9-7-18-7-28 0-18 6-39 19-64l-1 0 0 0c-17 8-32 16-45 24-14 8-27 17-40 28-13 11-24 23-32 35-9 13-16 27-21 43-5 17-8 34-8 53 0 15 2 29 7 41 5 13 11 23 18 32 8 9 16 18 25 25 9 8 19 16 28 23 9 6 17 13 25 20 7 7 13 15 18 23 5 9 7 18 7 28 0 18-6 39-19 64l1 0 0 0c17-8 32-16 45-24 14-8 27-17 40-28 13-11 24-23 32-35 9-13 16-27 21-43 5-17 8-34 8-53z"/>
<glyph glyph-name="forward" unicode="&#68;" d="M31 40c-3-3-7-5-9-3-2 1-4 4-4 9l0 420c0 5 2 8 4 9 2 2 6 0 9-3l203-203c2-2 3-3 4-6l0 203c0 5 1 8 3 9 3 2 6 0 10-3l202-203c4-4 6-8 6-13 0-5-2-9-6-13l-202-203c-4-3-7-5-10-3-2 1-3 4-3 9l0 203c-1-2-2-4-4-6z"/>
<glyph glyph-name="terminal" unicode="&#69;" d="M448 448l-384 0c-18 0-32-14-32-32l0-320c0-17 14-32 32-32l384 0c17 0 32 15 32 32l0 320c0 18-15 32-32 32z m-352-224l64 64-64 64 32 32 96-96-96-96z m256-32l-128 0 0 32 128 0z"/>
<glyph glyph-name="info-circled" unicode="&#108;" d="M253 492c65 0 120-22 167-67 46-45 70-100 72-165 0-65-22-121-68-167-45-47-100-71-165-73-65 0-121 22-167 68-47 45-71 100-72 165-1 65 21 121 67 167 46 47 101 71 166 72m27-78c-15 0-26-4-34-13-8-8-12-16-12-25 0-10 2-17 8-23 6-5 14-8 25-8 13 0 24 4 31 11 8 8 12 17 12 28 0 20-10 30-30 30m-62-304c10 0 25 4 43 13 19 9 37 22 54 40 0 0-9 12-9 12-16-12-28-18-37-18-4 0-5 6-2 19 0 0 22 82 22 82 9 33 5 49-11 49-11 0-26-5-46-15-20-10-40-22-59-38 0 0 8-13 8-13 18 11 31 17 38 17 4 0 4-6 0-17 0 0-18-78-18-78-9-36-3-53 17-53"/>
<glyph glyph-name="exclamation-triangle" unicode="&#70;" d="M293 119l0 54c0 3-1 5-3 7-2 2-4 3-7 3l-54 0c-3 0-5-1-7-3-2-2-3-4-3-7l0-54c0-3 1-5 3-7 2-1 4-2 7-2l54 0c3 0 5 1 7 2 2 2 3 4 3 7z m-1 107l5 131c0 2-1 4-3 6-2 2-4 3-7 3l-62 0c-3 0-5-1-7-3-2-2-3-4-3-6l5-131c0-2 1-3 3-5 1-1 4-2 6-2l53 0c3 0 5 1 7 2 2 2 3 3 3 5z m-4 267l219-402c7-12 7-24 0-36-3-6-8-10-13-14-6-3-12-4-19-4l-438 0c-7 0-13 1-19 4-5 4-10 8-13 14-7 12-7 24 0 36l219 402c3 6 8 10 13 14 6 3 12 5 19 5 7 0 13-2 19-5 5-4 10-8 13-14z"/>
<glyph glyph-name="exchange" unicode="&#71;" d="M512 174l0-55c0-3-1-5-3-7-2-1-4-2-6-2l-393 0 0-55c0-3-1-5-3-7-2-1-4-2-6-2-3 0-5 1-7 3l-91 91c-2 2-3 4-3 6 0 3 1 5 3 7l91 91c2 2 4 3 7 3 2 0 4-1 6-3 2-2 3-4 3-6l0-55 393 0c2 0 4-1 6-3 2-2 3-4 3-6z m0 155c0-3-1-5-3-6l-91-92c-2-2-4-2-7-2-2 0-4 0-6 2-2 2-3 4-3 7l0 55-393 0c-2 0-4 0-6 2-2 2-3 4-3 7l0 55c0 2 1 4 3 6 2 2 4 3 6 3l393 0 0 55c0 2 1 4 3 6 2 2 4 3 6 3 3 0 5-1 7-3l91-91c2-2 3-4 3-7z"/>
<glyph glyph-name="plus" unicode="&#72;" d="M457 302l0-55c0-8-3-14-8-20-5-5-12-8-19-8l-119 0 0-118c0-8-3-15-8-20-5-5-12-8-20-8l-54 0c-8 0-15 3-20 8-5 5-8 12-8 20l0 118-119 0c-7 0-14 3-19 8-5 6-8 12-8 20l0 55c0 7 3 14 8 19 5 5 12 8 19 8l119 0 0 119c0 8 3 14 8 19 5 6 12 8 20 8l54 0c8 0 15-2 20-8 5-5 8-11 8-19l0-119 119 0c7 0 14-3 19-8 5-5 8-12 8-19z"/>
<glyph glyph-name="minus" unicode="&#73;" d="M457 302l0-55c0-8-3-14-8-20-5-5-12-8-19-8l-348 0c-7 0-14 3-19 8-5 6-8 12-8 20l0 55c0 7 3 14 8 19 5 5 12 8 19 8l348 0c7 0 14-3 19-8 5-5 8-12 8-19z"/>
<glyph glyph-name="check-square" unicode="&#74;" d="M232 141l176 175c3 4 5 8 5 13 0 5-2 9-5 13l-29 29c-4 4-8 6-13 6-5 0-10-2-13-6l-134-133-60 60c-3 4-8 5-13 5-5 0-9-1-13-5l-29-29c-3-4-5-8-5-13 0-5 2-9 5-13l103-102c3-4 7-6 12-6 5 0 10 2 13 6z m243 252l0-274c0-23-8-42-24-58-16-16-35-24-58-24l-274 0c-23 0-42 8-58 24-16 16-24 35-24 58l0 274c0 23 8 42 24 58 16 16 35 24 58 24l274 0c23 0 42-8 58-24 16-16 24-35 24-58z"/>
<glyph glyph-name="facebook-square" unicode="&#75;" d="M393 475c23 0 42-8 58-24 16-16 24-35 24-58l0-274c0-23-8-42-24-58-16-16-35-24-58-24l-54 0 0 170 57 0 9 66-66 0 0 42c0 11 3 19 7 24 5 5 13 8 26 8l35 0 0 60c-12 1-29 2-51 2-26 0-46-7-62-23-15-15-23-36-23-64l0-49-57 0 0-66 57 0 0-170-152 0c-23 0-42 8-58 24-16 16-24 35-24 58l0 274c0 23 8 42 24 58 16 16 35 24 58 24z"/>
<glyph glyph-name="file" unicode="&#76;" d="M329 366l0 135c4-3 8-6 10-8l117-117c3-3 5-6 8-10z m-36-9c0-8 2-15 8-20 5-5 11-8 19-8l155 0 0-302c0-7-2-14-8-19-5-5-11-8-19-8l-384 0c-8 0-14 3-19 8-6 5-8 12-8 19l0 458c0 7 2 14 8 19 5 5 11 8 19 8l229 0z"/>
<glyph glyph-name="trash" unicode="&#77;" d="M201 119l0 201c0 3-1 5-2 7-2 1-4 2-7 2l-18 0c-3 0-5-1-7-2-2-2-2-4-2-7l0-201c0-3 0-5 2-7 2-1 4-2 7-2l18 0c3 0 5 1 7 2 1 2 2 4 2 7z m73 0l0 201c0 3-1 5-2 7-2 1-4 2-7 2l-18 0c-3 0-5-1-7-2-1-2-2-4-2-7l0-201c0-3 1-5 2-7 2-1 4-2 7-2l18 0c3 0 5 1 7 2 1 2 2 4 2 7z m73 0l0 201c0 3 0 5-2 7-2 1-4 2-7 2l-18 0c-3 0-5-1-7-2-1-2-2-4-2-7l0-201c0-3 1-5 2-7 2-1 4-2 7-2l18 0c3 0 5 1 7 2 2 2 2 4 2 7z m-155 283l128 0-14 34c-1 1-3 2-5 3l-90 0c-2-1-4-2-5-3z m265-9l0-18c0-3-1-5-2-7-2-1-4-2-7-2l-27 0 0-271c0-16-5-30-14-41-9-12-20-17-32-17l-238 0c-12 0-23 5-32 16-9 11-14 25-14 41l0 272-27 0c-3 0-5 1-7 2-1 2-2 4-2 7l0 18c0 3 1 5 2 7 2 1 4 2 7 2l88 0 20 48c3 7 8 13 16 18 7 5 15 7 22 7l92 0c7 0 15-2 22-7 8-5 13-11 16-18l20-48 88 0c3 0 5-1 7-2 1-2 2-4 2-7z"/>
<glyph glyph-name="print" unicode="&#78;" d="M128 73l256 0 0 73-256 0z m0 183l256 0 0 110-46 0c-7 0-14 2-19 8-5 5-8 12-8 19l0 46-183 0z m329-18c0 5-2 9-5 13-4 3-8 5-13 5-5 0-9-2-13-5-4-4-5-8-5-13 0-5 1-10 5-13 4-4 8-6 13-6 5 0 9 2 13 6 3 3 5 8 5 13z m37 0l0-119c0-3-1-5-3-7-2-1-4-2-6-2l-64 0 0-46c0-8-3-14-8-19-6-6-12-8-20-8l-274 0c-8 0-14 2-20 8-5 5-8 11-8 19l0 46-64 0c-2 0-4 1-6 2-2 2-3 4-3 7l0 119c0 15 6 28 16 38 11 11 24 17 39 17l18 0 0 155c0 8 3 14 8 19 6 6 12 8 20 8l192 0c7 0 16-1 25-5 9-4 16-9 22-14l43-43c5-6 10-13 14-22 4-9 6-18 6-25l0-73 18 0c15 0 28-6 39-17 10-10 16-23 16-38z"/>
<glyph glyph-name="refresh" unicode="&#79;" d="M468 210c0-1 0-1 0-2-12-51-38-92-77-124-38-32-84-47-136-47-28 0-55 5-81 15-26 11-49 26-69 45l-37-37c-4-3-8-5-13-5-5 0-9 2-13 5-4 4-5 8-5 13l0 128c0 5 1 9 5 13 4 4 8 5 13 5l128 0c5 0 9-1 13-5 3-4 5-8 5-13 0-5-2-9-5-13l-39-39c13-12 28-22 46-29 17-7 35-10 53-10 26 0 49 6 71 18 23 13 40 30 54 51 2 4 7 15 15 34 1 4 4 6 8 6l55 0c3 0 5 0 7-2 1-2 2-4 2-7z m7 229l0-128c0-5-1-9-5-13-4-4-8-5-13-5l-128 0c-5 0-9 1-13 5-3 4-5 8-5 13 0 5 2 9 5 13l40 39c-28 26-62 39-100 39-26 0-49-6-71-18-23-13-40-30-54-51-2-4-7-15-15-34-1-4-4-6-8-6l-57 0c-3 0-5 0-7 2-1 2-2 4-2 7l0 2c12 51 38 92 77 124 39 32 85 47 137 47 28 0 55-5 81-15 26-11 50-26 70-45l37 37c4 3 8 5 13 5 5 0 9-2 13-5 4-4 5-8 5-13z"/>
<glyph glyph-name="plug" unicode="&#81;" d="M502 410l-1 0c-12 12-32 12-45 0l-22-23-46 46 23 22c13 13 13 33 0 45l0 1c-13 12-33 12-45 0l-24-24c-31 20-73 17-101-11l-12-12c-55-54-61-139-20-200l-2-2c-31-32-31-82 0-113 6-7 6-17 0-23-6-7-16-6-22 0l-45 44c-31 32-82 32-114 1-31-31-31-82 0-113l5-5c12-12 32-12 44 0l1 1c12 12 12 32 0 45l-4 4c-6 6-7 16-1 22 6 7 17 7 23 1l45-45c31-31 83-32 114 0 31 31 31 81 0 113-7 6-7 16 0 22l2 2c61-41 146-35 200 20l13 12c27 28 30 70 10 101l24 24c12 12 12 32 0 45z m-57-147c-19-19-49-19-68 0l-113 113c-19 19-19 49 0 68 15 15 37 18 55 9l-21-21c-13-12-13-32 0-45l0 0c12-12 32-12 45 0l23 23 45-45-23-23c-12-13-12-33 0-45l1 0c12-13 32-13 44 0l21 20c9-17 6-39-9-54z"/>
<glyph glyph-name="wifi" unicode="&#82;" d="M256 416c-80 0-156-30-214-84l-10-10 10-9 32-32 10-10 9 9c45 41 102 64 163 64 60 0 118-23 163-64l9-9 10 10 32 32 10 9-10 10c-58 54-134 84-214 84z m141-160c-38 35-88 54-141 54l-9 0 0 0c-49-2-96-21-132-54l-11-10 10-10 33-32 9-9 10 8c25 22 57 35 90 35 33 0 65-13 91-35l9-8 9 9 33 32 10 10z m-141-160l10 9 53 53 10 10-11 10c-16 11-33 20-62 20-29 0-45-10-61-20l-12-10 11-10 53-53z"/>
<glyph glyph-name="sliders" unicode="&#80;" d="M137 110l0-37-100 0 0 37z m101 36c5 0 9-2 13-5 3-4 5-8 5-13l0-73c0-5-2-9-5-13-4-4-8-5-13-5l-73 0c-5 0-10 1-13 5-4 4-6 8-6 13l0 73c0 5 2 9 6 13 3 3 8 5 13 5z m45 110l0-37-246 0 0 37z m-182 146l0-36-64 0 0 36z m374-292l0-37-210 0 0 37z m-274 329c5 0 9-2 13-6 4-3 5-7 5-12l0-74c0-5-1-9-5-12-4-4-8-6-13-6l-73 0c-5 0-9 2-13 6-3 3-5 7-5 12l0 74c0 5 2 9 5 12 4 4 8 6 13 6z m183-146c5 0 9-2 13-6 3-3 5-8 5-13l0-73c0-5-2-9-5-13-4-3-8-5-13-5l-73 0c-5 0-9 2-13 5-4 4-5 8-5 13l0 73c0 5 1 10 5 13 4 4 8 6 13 6z m91-37l0-37-64 0 0 37z m0 146l0-36-246 0 0 36z"/>
<glyph glyph-name="folder-open" unicode="&#84;" d="M501 241c0-5-3-11-8-18l-90-105c-7-9-18-17-32-23-14-7-26-10-38-10l-290 0c-6 0-12 1-16 4-5 2-8 6-8 11 0 6 3 12 9 18l89 105c8 10 19 17 32 24 14 6 27 9 39 9l290 0c6 0 11-1 16-3 5-3 7-7 7-12z m-91 92l0-43-222 0c-17 0-34-4-53-13-18-8-33-19-44-31l-89-106-2-2c0 1 0 2 0 4 0 1 0 2 0 3l0 256c0 16 6 30 18 42 11 12 25 18 42 18l85 0c16 0 30-6 42-18 12-12 18-26 18-42l0-8 145 0c16 0 30-6 42-18 12-12 18-26 18-42z"/>
<glyph glyph-name="code-download" unicode="&#83;" d="M331 228c6 6 6 17 0 23-7 7-17 7-24 0l-35-34 0 118c0 10-7 17-16 17-9 0-16-7-16-17l0-118-35 34c-6 7-17 7-24 0-6-6-6-17 0-23l63-63c0 0 0 0 0 0 1-1 2-2 3-2 0 0 0 0 0 0 0-1 1-1 1-1 0 0 0 0 0 0 1 0 1-1 2-1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 1-1 3-1 4-1 2 0 3 0 4 1 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 1 0 1 1 2 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 1 0 2 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0z m-163-108c-6 0-12 2-17 7l-112 112c-9 9-9 25 0 34l112 112c9 9 25 9 34 0 9-9 9-25 0-34l-95-95 95-95c9-9 9-25 0-34-5-5-11-7-17-7z m176 0c6 0 12 2 17 7l112 112c9 9 9 25 0 34l-112 112c-9 9-25 9-34 0-9-9-9-25 0-34l95-95-95-95c-9-9-9-25 0-34 5-5 11-7 17-7z"/>
</font></defs></svg>

After

Width:  |  Height:  |  Size: 21 KiB

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