Skip to content

Commit

Permalink
🔧🚸 Tweaks for (MiniRambo) CNC (MarlinFirmware#26892)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
hm2dev and thinkyhead authored Mar 27, 2024
1 parent d0d229e commit cd357b0
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2636,9 +2636,9 @@
#define DISPLAY_CHARSET_HD44780 JAPANESE

/**
* Info Screen Style (0:Classic, 1:Průša)
* Info Screen Style (0:Classic, 1:Průša, 2:CNC)
*
* :[0:'Classic', 1:'Průša']
* :[0:'Classic', 1:'Průša', 2:'CNC']
*/
#define LCD_INFO_SCREEN_STYLE 0

Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/gcode/feature/digipot/M907-M910.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ void GcodeSuite::M907() {
SERIAL_ECHOLNPGM_P( // PWM-based has 3 values:
PSTR(" M907 X"), stepper.motor_current_setting[0] // X, Y, (I, J, K, U, V, W)
, SP_Z_STR, stepper.motor_current_setting[1] // Z
, SP_E_STR, stepper.motor_current_setting[2] // E
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
, SP_E_STR, stepper.motor_current_setting[2] // E
#endif
);
#elif HAS_MOTOR_CURRENT_SPI
SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values:
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
#if LCD_INFO_SCREEN_STYLE > 0
#if HAS_MARLINUI_U8GLIB || LCD_WIDTH < 20 || LCD_HEIGHT < 4
#error "Alternative LCD_INFO_SCREEN_STYLE requires 20x4 Character LCD."
#elif LCD_INFO_SCREEN_STYLE > 1
#error "LCD_INFO_SCREEN_STYLE only has options 0 and 1 at this time."
#elif LCD_INFO_SCREEN_STYLE > 2
#error "LCD_INFO_SCREEN_STYLE only has options 0 (Classic), 1 (Průša), and 2 (CNC)."
#endif
#endif

Expand Down
34 changes: 33 additions & 1 deletion Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,39 @@ void MarlinUI::draw_status_screen() {
TERN_(SHOW_PROGRESS_PERCENT, setPercentPos(LCD_WIDTH - 9, 2));
rotate_progress();
#endif
#endif // LCD_INFO_SCREEN_STYLE 1

#elif LCD_INFO_SCREEN_STYLE == 2

// ========== Line 1 ==========

//
// X Coordinate
//
lcd_moveto(0, 0);
_draw_axis_value(X_AXIS, ftostr52sp(LOGICAL_X_POSITION(current_position.x)), blink);

//
// Y Coordinate
//
lcd_moveto(LCD_WIDTH - 9, 0);
_draw_axis_value(Y_AXIS, ftostr52sp(LOGICAL_Y_POSITION(current_position.y)), blink);

// ========== Line 2 ==========
lcd_moveto(0, 1);
_draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink);

lcd_moveto(LCD_WIDTH - 9, 1);
_draw_axis_value(I_AXIS, ftostr52sp(LOGICAL_I_POSITION(current_position.i)), blink);

// ========== Line 3 ==========
lcd_moveto(0, 2);
lcd_put_lchar('F');

lcd_moveto(LCD_WIDTH - 9, 2);
lcd_put_lchar('S');


#endif // LCD_INFO_SCREEN_STYLE

// ========= Last Line ========

Expand Down
26 changes: 19 additions & 7 deletions Marlin/src/pins/rambo/pins_MINIRAMBO.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@

#include "env_validate.h"

#if MB(MINIRAMBO_10A)
#define BOARD_INFO_NAME "Mini RAMBo 1.0a"
#else
#define BOARD_INFO_NAME "Mini RAMBo"
#ifndef BOARD_INFO_NAME
#if MB(MINIRAMBO_10A)
#define BOARD_INFO_NAME "Mini RAMBo 1.0a"
#else
#define BOARD_INFO_NAME "Mini RAMBo"
#endif
#endif

//
Expand All @@ -47,6 +49,10 @@
#define Z_MIN_PIN 10
#define Z_MAX_PIN 23

#if HAS_I_AXIS
#define I_STOP_PIN 30 // X_MAX (for now)
#endif

//
// Z Probe (when not Z_MIN_PIN)
//
Expand Down Expand Up @@ -128,9 +134,15 @@
//
#if HAS_CUTTER
// Use P1 connector for spindle pins
#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
#define SPINDLE_LASER_ENA_PIN 18 // Pullup!
#define SPINDLE_DIR_PIN 19
#ifndef SPINDLE_LASER_PWM_PIN
#define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM
#endif
#ifndef SPINDLE_LASER_ENA_PIN
#define SPINDLE_LASER_ENA_PIN 18 // Pullup!
#endif
#ifndef SPINDLE_DIR_PIN
#define SPINDLE_DIR_PIN 19
#endif
#endif

//
Expand Down

0 comments on commit cd357b0

Please sign in to comment.