Browse Source

🎨 MULTI_MANUAL => MULTI_E_MANUAL

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
c977e82074
  1. 6
      Marlin/src/lcd/marlinui.cpp
  2. 6
      Marlin/src/lcd/marlinui.h
  3. 12
      Marlin/src/lcd/menu/menu_motion.cpp
  4. 2
      Marlin/src/lcd/tft/ui_1024x600.cpp
  5. 2
      Marlin/src/lcd/tft/ui_320x240.cpp
  6. 2
      Marlin/src/lcd/tft/ui_480x320.cpp

6
Marlin/src/lcd/marlinui.cpp

@ -681,7 +681,7 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
xyze_pos_t ManualMove::all_axes_destination = { 0 }; xyze_pos_t ManualMove::all_axes_destination = { 0 };
bool ManualMove::processing = false; bool ManualMove::processing = false;
#endif #endif
#if ENABLED(MULTI_MANUAL) #if ENABLED(MULTI_E_MANUAL)
int8_t ManualMove::e_index = 0; int8_t ManualMove::e_index = 0;
#endif #endif
AxisEnum ManualMove::axis = NO_AXIS_MASK; AxisEnum ManualMove::axis = NO_AXIS_MASK;
@ -758,11 +758,11 @@ void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) {
// Tell ui.update() to start a move to current_position after a short delay. // Tell ui.update() to start a move to current_position after a short delay.
// //
void ManualMove::soon(const AxisEnum move_axis void ManualMove::soon(const AxisEnum move_axis
#if MULTI_MANUAL #if MULTI_E_MANUAL
, const int8_t eindex/*=-1*/ , const int8_t eindex/*=-1*/
#endif #endif
) { ) {
#if MULTI_MANUAL #if MULTI_E_MANUAL
if (move_axis == E_AXIS) e_index = eindex >= 0 ? eindex : active_extruder; if (move_axis == E_AXIS) e_index = eindex >= 0 ? eindex : active_extruder;
#endif #endif
start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves

6
Marlin/src/lcd/marlinui.h

@ -48,7 +48,7 @@
#endif #endif
#if E_MANUAL > 1 #if E_MANUAL > 1
#define MULTI_MANUAL 1 #define MULTI_E_MANUAL 1
#endif #endif
#if HAS_DISPLAY #if HAS_DISPLAY
@ -129,7 +129,7 @@
class ManualMove { class ManualMove {
private: private:
static AxisEnum axis; static AxisEnum axis;
#if MULTI_MANUAL #if MULTI_E_MANUAL
static int8_t e_index; static int8_t e_index;
#else #else
static int8_t constexpr e_index = 0; static int8_t constexpr e_index = 0;
@ -183,7 +183,7 @@
#endif #endif
static void task(); static void task();
static void soon(const AxisEnum axis static void soon(const AxisEnum axis
#if MULTI_MANUAL #if MULTI_E_MANUAL
, const int8_t eindex=-1 , const int8_t eindex=-1
#endif #endif
); );

12
Marlin/src/lcd/menu/menu_motion.cpp

@ -94,14 +94,14 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
#if E_MANUAL #if E_MANUAL
static void lcd_move_e(TERN_(MULTI_MANUAL, const int8_t eindex=-1)) { static void lcd_move_e(TERN_(MULTI_E_MANUAL, const int8_t eindex=-1)) {
if (ui.use_click()) return ui.goto_previous_screen_no_defer(); if (ui.use_click()) return ui.goto_previous_screen_no_defer();
if (ui.encoderPosition) { if (ui.encoderPosition) {
if (!ui.manual_move.processing) { if (!ui.manual_move.processing) {
const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale;
TERN(IS_KINEMATIC, ui.manual_move.offset, current_position.e) += diff; TERN(IS_KINEMATIC, ui.manual_move.offset, current_position.e) += diff;
ui.manual_move.soon(E_AXIS ui.manual_move.soon(E_AXIS
#if MULTI_MANUAL #if MULTI_E_MANUAL
, eindex , eindex
#endif #endif
); );
@ -110,9 +110,9 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
ui.encoderPosition = 0; ui.encoderPosition = 0;
} }
if (ui.should_draw()) { if (ui.should_draw()) {
TERN_(MULTI_MANUAL, MenuItemBase::init(eindex)); TERN_(MULTI_E_MANUAL, MenuItemBase::init(eindex));
MenuEditItemBase::draw_edit_screen( MenuEditItemBase::draw_edit_screen(
GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)), GET_TEXT(TERN(MULTI_E_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)),
ftostr41sign(current_position.e ftostr41sign(current_position.e
PLUS_TERN0(IS_KINEMATIC, ui.manual_move.offset) PLUS_TERN0(IS_KINEMATIC, ui.manual_move.offset)
MINUS_TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin) MINUS_TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin)
@ -188,7 +188,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
#if E_MANUAL #if E_MANUAL
inline void _goto_menu_move_distance_e() { inline void _goto_menu_move_distance_e() {
ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_MANUAL, active_extruder)); }, -1); }); ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_E_MANUAL, active_extruder)); }, -1); });
} }
inline void _menu_move_distance_e_maybe() { inline void _menu_move_distance_e_maybe() {
@ -283,7 +283,7 @@ void menu_move() {
SUBMENU_MOVE_E(E_MANUAL - 1); SUBMENU_MOVE_E(E_MANUAL - 1);
#endif #endif
#elif MULTI_MANUAL #elif MULTI_E_MANUAL
// Independent extruders with one E-stepper per hotend // Independent extruders with one E-stepper per hotend
LOOP_L_N(n, E_MANUAL) SUBMENU_MOVE_E(n); LOOP_L_N(n, E_MANUAL) SUBMENU_MOVE_E(n);

2
Marlin/src/lcd/tft/ui_1024x600.cpp

@ -725,7 +725,7 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
#endif #endif
ui.manual_move.soon(axis ui.manual_move.soon(axis
#if MULTI_MANUAL #if MULTI_E_MANUAL
, motionAxisState.e_selection , motionAxisState.e_selection
#endif #endif
); );

2
Marlin/src/lcd/tft/ui_320x240.cpp

@ -710,7 +710,7 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
#endif #endif
ui.manual_move.soon(axis ui.manual_move.soon(axis
#if MULTI_MANUAL #if MULTI_E_MANUAL
, motionAxisState.e_selection , motionAxisState.e_selection
#endif #endif
); );

2
Marlin/src/lcd/tft/ui_480x320.cpp

@ -712,7 +712,7 @@ static void moveAxis(const AxisEnum axis, const int8_t direction) {
#endif #endif
ui.manual_move.soon(axis ui.manual_move.soon(axis
#if MULTI_MANUAL #if MULTI_E_MANUAL
, motionAxisState.e_selection , motionAxisState.e_selection
#endif #endif
); );

Loading…
Cancel
Save