|
|
@ -1,3 +1,25 @@
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Marlin 3D Printer Firmware
|
|
|
|
|
|
|
|
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "ultralcd.h"
|
|
|
|
#include "ultralcd.h"
|
|
|
|
#if ENABLED(ULTRA_LCD)
|
|
|
|
#if ENABLED(ULTRA_LCD)
|
|
|
|
#include "Marlin.h"
|
|
|
|
#include "Marlin.h"
|
|
|
@ -486,7 +508,7 @@ void lcd_set_home_offsets() {
|
|
|
|
#if ENABLED(BABYSTEPPING)
|
|
|
|
#if ENABLED(BABYSTEPPING)
|
|
|
|
|
|
|
|
|
|
|
|
static void _lcd_babystep(const int axis, const char* msg) {
|
|
|
|
static void _lcd_babystep(const int axis, const char* msg) {
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
if (encoderPosition != 0) {
|
|
|
|
if (encoderPosition != 0) {
|
|
|
|
encoderPosition = 0;
|
|
|
|
encoderPosition = 0;
|
|
|
|
lcdDrawUpdate = 1;
|
|
|
|
lcdDrawUpdate = 1;
|
|
|
@ -901,7 +923,7 @@ float move_menu_scale;
|
|
|
|
static void lcd_move_menu_axis();
|
|
|
|
static void lcd_move_menu_axis();
|
|
|
|
|
|
|
|
|
|
|
|
static void _lcd_move(const char* name, AxisEnum axis, int min, int max) {
|
|
|
|
static void _lcd_move(const char* name, AxisEnum axis, int min, int max) {
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
|
|
refresh_cmd_timeout();
|
|
|
|
refresh_cmd_timeout();
|
|
|
|
current_position[axis] += float((int)encoderPosition) * move_menu_scale;
|
|
|
|
current_position[axis] += float((int)encoderPosition) * move_menu_scale;
|
|
|
@ -929,7 +951,7 @@ static void lcd_move_e(
|
|
|
|
uint8_t e
|
|
|
|
uint8_t e
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
unsigned short original_active_extruder = active_extruder;
|
|
|
|
unsigned short original_active_extruder = active_extruder;
|
|
|
|
active_extruder = e;
|
|
|
|
active_extruder = e;
|
|
|
@ -1514,7 +1536,7 @@ static void lcd_control_volumetric_menu() {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Also: MENU_MULTIPLIER_ITEM_EDIT, MENU_ITEM_EDIT_CALLBACK, and MENU_MULTIPLIER_ITEM_EDIT_CALLBACK
|
|
|
|
* Also: MENU_MULTIPLIER_ITEM_EDIT, MENU_ITEM_EDIT_CALLBACK, and MENU_MULTIPLIER_ITEM_EDIT_CALLBACK
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_multiplier, 10, 999)
|
|
|
|
* menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_multiplier, 10, 999)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#define menu_edit_type(_type, _name, _strFunc, scale) \
|
|
|
|
#define menu_edit_type(_type, _name, _strFunc, scale) \
|
|
|
@ -2380,7 +2402,7 @@ char* ftostr52(const float& x) {
|
|
|
|
* - Click saves the Z and goes to the next mesh point
|
|
|
|
* - Click saves the Z and goes to the next mesh point
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void _lcd_level_bed() {
|
|
|
|
static void _lcd_level_bed() {
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
ENCODER_DIRECTION_NORMAL();
|
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
|
|
if ((encoderPosition != 0) && (movesplanned() <= 3)) {
|
|
|
|
refresh_cmd_timeout();
|
|
|
|
refresh_cmd_timeout();
|
|
|
|
current_position[Z_AXIS] += float((int)encoderPosition) * (MBL_Z_STEP);
|
|
|
|
current_position[Z_AXIS] += float((int)encoderPosition) * (MBL_Z_STEP);
|
|
|
|