Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
eb09f322
Commit
eb09f322
authored
Dec 29, 2014
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add progress bar & Bowden easy load
parent
678d4f90
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1099 additions
and
876 deletions
+1099
-876
Configuration.h
MarlinKimbra/Configuration.h
+71
-45
ConfigurationStore.cpp
MarlinKimbra/ConfigurationStore.cpp
+136
-124
Configuration_Cartesian.h
MarlinKimbra/Configuration_Cartesian.h
+34
-3
Configuration_Delta.h
MarlinKimbra/Configuration_Delta.h
+1
-1
Configuration_adv.h
MarlinKimbra/Configuration_adv.h
+1
-1
Marlin.h
MarlinKimbra/Marlin.h
+19
-18
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+303
-219
language.h
MarlinKimbra/language.h
+8
-5
language_en.h
MarlinKimbra/language_en.h
+4
-0
motion_control.h
MarlinKimbra/motion_control.h
+1
-2
pins.h
MarlinKimbra/pins.h
+29
-18
planner.cpp
MarlinKimbra/planner.cpp
+10
-3
planner.h
MarlinKimbra/planner.h
+2
-3
stepper.cpp
MarlinKimbra/stepper.cpp
+1
-2
temperature.cpp
MarlinKimbra/temperature.cpp
+82
-28
temperature.h
MarlinKimbra/temperature.h
+16
-13
ultralcd.cpp
MarlinKimbra/ultralcd.cpp
+228
-354
ultralcd.h
MarlinKimbra/ultralcd.h
+3
-4
ultralcd_implementation_hitachi_HD44780.h
MarlinKimbra/ultralcd_implementation_hitachi_HD44780.h
+150
-33
No files found.
MarlinKimbra/Configuration.h
View file @
eb09f322
...
@@ -3,10 +3,12 @@
...
@@ -3,10 +3,12 @@
#include "boards.h"
#include "boards.h"
// This configuration file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
// build by the user have been successfully uploaded into firmware.
#define STRING_VERSION_CONFIG_H __DATE__ "
21/12/2014
" __TIME__ // build date and time
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(MagoKimbra: magokimbra@hotmail.com, Version 4.0)" // Who made the changes.
#define STRING_CONFIG_H_AUTHOR "(MagoKimbra: magokimbra@hotmail.com, Version 4.0)" // Who made the changes.
// SERIAL_PORT selects which serial port should be used for communication with the host.
// SERIAL_PORT selects which serial port should be used for communication with the host.
...
@@ -188,21 +190,20 @@
...
@@ -188,21 +190,20 @@
// Comment the following line to disable PID and enable bang-bang.
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define PIDTEMP
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX
255
// limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#define PID_MAX
BANG_MAX
// limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#ifdef PIDTEMP
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX 255
//limit for the integral term
#define PID_INTEGRAL_DRIVE_MAX PID_MAX
//limit for the integral term
#define K1 0.95 //smoothing factor within the PID
#define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
#define PID_dT ((OVERSAMPLENR * 10.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// HotEnd{HE0,HE1,HE2,HE3}
// HotEnd{HE0,HE1,HE2,HE3}
#define DEFAULT_Kp {40,41,41,41} // Kp for E0, E1, E2, E3
#define DEFAULT_Kp {40,41,41,41} // Kp for E0, E1, E2, E3
#define DEFAULT_Ki {7,7,7,7} // Ki for E0, E1, E2, E3
#define DEFAULT_Ki {7,7,7,7} // Ki for E0, E1, E2, E3
#define DEFAULT_Kd {59,59,59,59} // Kd for E0, E1, E2, E3
#define DEFAULT_Kd {59,59,59,59} // Kd for E0, E1, E2, E3
#endif // PIDTEMP
#endif // PIDTEMP
...
@@ -229,9 +230,9 @@
...
@@ -229,9 +230,9 @@
#ifdef PIDTEMPBED
#ifdef PIDTEMPBED
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
#define DEFAULT_bedKd 305.4
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
//from pidautotune
...
@@ -427,10 +428,12 @@
...
@@ -427,10 +428,12 @@
// ---------------------
// ---------------------
// 2 wire Non-latching LCD SR from:
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
//#define SR_LCD
#ifdef SR_LCD
//#define SAV_3DLCD
#define SR_LCD_2W_NL // Non latching 2 wire shift register
#ifdef SAV_3DLCD
//#define NEWPANEL
#define SR_LCD_2W_NL // Non latching 2 wire shiftregister
#define NEWPANEL
#define ULTIPANEL
#endif
#endif
...
@@ -459,9 +462,9 @@
...
@@ -459,9 +462,9 @@
// default LCD contrast for dogm-like LCD displays
// default LCD contrast for dogm-like LCD displays
#ifdef DOGLCD
#ifdef DOGLCD
#
ifndef DEFAULT_LCD_CONTRAST
#
ifndef DEFAULT_LCD_CONTRAST
#
define DEFAULT_LCD_CONTRAST 32
#
define DEFAULT_LCD_CONTRAST 32
#
endif
#
endif
#endif
#endif
// option for invert rotary switch
// option for invert rotary switch
...
@@ -500,6 +503,32 @@
...
@@ -500,6 +503,32 @@
// please keep turned on if you can.
// please keep turned on if you can.
//#define EEPROM_CHITCHAT
//#define EEPROM_CHITCHAT
//Bowden Filament management
//#define EASY_LOAD
#ifdef EASY_LOAD
#define BOWDEN_LENGTH 560 // mm
#define LCD_PURGE_LENGTH 3 // mm
#define LCD_RETRACT_LENGTH 3 // mm
#define LCD_PURGE_FEEDRATE 3 // mm/s
#define LCD_RETRACT_FEEDRATE 10 // mm/s
#define LCD_LOAD_FEEDRATE 8 // mm/s
#define LCD_UNLOAD_FEEDRATE 8 // mm/s
#endif
// Show a progress bar on the LCD when printing from SD?
//#define LCD_PROGRESS_BAR
#ifdef LCD_PROGRESS_BAR
// Amount of time (ms) to show the bar
#define PROGRESS_BAR_BAR_TIME 2000
// Amount of time (ms) to show the status message
#define PROGRESS_BAR_MSG_TIME 3000
// Amount of time (ms) to retain the status message (0=forever)
#define PROGRESS_BAR_MSG_EXPIRE 0
// Enable this to show messages for MSG_TIME then hide them
//#define PROGRESS_BAR_MSG_ONCE
#endif
// Preheat Constants
// Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 190
#define PLA_PREHEAT_HOTEND_TEMP 190
#define PLA_PREHEAT_HPB_TEMP 60
#define PLA_PREHEAT_HPB_TEMP 60
...
@@ -607,9 +636,6 @@
...
@@ -607,9 +636,6 @@
#include "Configuration_adv.h"
#include "Configuration_adv.h"
#include "thermistortables.h"
#include "thermistortables.h"
...
...
MarlinKimbra/ConfigurationStore.cpp
View file @
eb09f322
...
@@ -36,14 +36,12 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
...
@@ -36,14 +36,12 @@ void _EEPROM_readData(int &pos, uint8_t* value, uint8_t size)
// wrong data being written to the variables.
// wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#if defined(CARTESIAN)
#define EEPROM_VERSION "V10"
#define EEPROM_VERSION "V10"
#elif defined(COREXY)
#ifdef DELTA
#define EEPROM_VERSION "V11"
#define EEPROM_VERSION "V11"
#elif defined(DELTA)
#endif
#define EEPROM_VERSION "V12"
#ifdef SCARA
#elif defined(SCARA)
#define EEPROM_VERSION "V12"
#define EEPROM_VERSION "V13"
#endif
#endif
#ifdef EEPROM_SETTINGS
#ifdef EEPROM_SETTINGS
...
@@ -126,9 +124,9 @@ void Config_PrintSettings()
...
@@ -126,9 +124,9 @@ void Config_PrintSettings()
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLNPGM
(
"Steps per unit:"
);
SERIAL_ECHOLNPGM
(
"Steps per unit:"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M92 X"
,
axis_steps_per_unit
[
0
]);
SERIAL_ECHOPAIR
(
" M92 X"
,
axis_steps_per_unit
[
X_AXIS
]);
SERIAL_ECHOPAIR
(
" Y"
,
axis_steps_per_unit
[
1
]);
SERIAL_ECHOPAIR
(
" Y"
,
axis_steps_per_unit
[
Y_AXIS
]);
SERIAL_ECHOPAIR
(
" Z"
,
axis_steps_per_unit
[
2
]);
SERIAL_ECHOPAIR
(
" Z"
,
axis_steps_per_unit
[
Z_AXIS
]);
SERIAL_ECHOPAIR
(
" E0 "
,
axis_steps_per_unit
[
3
]);
SERIAL_ECHOPAIR
(
" E0 "
,
axis_steps_per_unit
[
3
]);
SERIAL_ECHOPAIR
(
" E1 "
,
axis_steps_per_unit
[
4
]);
SERIAL_ECHOPAIR
(
" E1 "
,
axis_steps_per_unit
[
4
]);
SERIAL_ECHOPAIR
(
" E2 "
,
axis_steps_per_unit
[
5
]);
SERIAL_ECHOPAIR
(
" E2 "
,
axis_steps_per_unit
[
5
]);
...
@@ -139,17 +137,18 @@ void Config_PrintSettings()
...
@@ -139,17 +137,18 @@ void Config_PrintSettings()
#ifdef SCARA
#ifdef SCARA
SERIAL_ECHOLNPGM
(
"Scaling factors:"
);
SERIAL_ECHOLNPGM
(
"Scaling factors:"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M365 X"
,
axis_scaling
[
0
]);
SERIAL_ECHOPAIR
(
" M365 X"
,
axis_scaling
[
X_AXIS
]);
SERIAL_ECHOPAIR
(
" Y"
,
axis_scaling
[
1
]);
SERIAL_ECHOPAIR
(
" Y"
,
axis_scaling
[
Y_AXIS
]);
SERIAL_ECHOPAIR
(
" Z"
,
axis_scaling
[
2
]);
SERIAL_ECHOPAIR
(
" Z"
,
axis_scaling
[
Z_AXIS
]);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
#endif
#endif
SERIAL_ECHOLNPGM
(
"Maximum feedrates (mm/s):"
);
SERIAL_ECHOLNPGM
(
"Maximum feedrates (mm/s):"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M203 X "
,
max_feedrate
[
0
]);
SERIAL_ECHOPAIR
(
" M203 X "
,
max_feedrate
[
X_AXIS
]);
SERIAL_ECHOPAIR
(
" Y "
,
max_feedrate
[
1
]
);
SERIAL_ECHOPAIR
(
" Y "
,
max_feedrate
[
Y_AXIS
]
);
SERIAL_ECHOPAIR
(
" Z "
,
max_feedrate
[
2
]
);
SERIAL_ECHOPAIR
(
" Z "
,
max_feedrate
[
Z_AXIS
]
);
SERIAL_ECHOPAIR
(
" E0 "
,
max_feedrate
[
3
]);
SERIAL_ECHOPAIR
(
" E0 "
,
max_feedrate
[
3
]);
SERIAL_ECHOPAIR
(
" E1 "
,
max_feedrate
[
4
]);
SERIAL_ECHOPAIR
(
" E1 "
,
max_feedrate
[
4
]);
SERIAL_ECHOPAIR
(
" E2 "
,
max_feedrate
[
5
]);
SERIAL_ECHOPAIR
(
" E2 "
,
max_feedrate
[
5
]);
...
@@ -164,19 +163,17 @@ void Config_PrintSettings()
...
@@ -164,19 +163,17 @@ void Config_PrintSettings()
SERIAL_ECHOPAIR
(
" E2 "
,
max_retraction_feedrate
[
2
]);
SERIAL_ECHOPAIR
(
" E2 "
,
max_retraction_feedrate
[
2
]);
SERIAL_ECHOPAIR
(
" E3 "
,
max_retraction_feedrate
[
3
]);
SERIAL_ECHOPAIR
(
" E3 "
,
max_retraction_feedrate
[
3
]);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Maximum Acceleration (mm/s2):"
);
SERIAL_ECHOLNPGM
(
"Maximum Acceleration (mm/s2):"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M201 X "
,
max_acceleration_units_per_sq_second
[
0
]
);
SERIAL_ECHOPAIR
(
" M201 X "
,
max_acceleration_units_per_sq_second
[
X_AXIS
]
);
SERIAL_ECHOPAIR
(
" Y "
,
max_acceleration_units_per_sq_second
[
1
]
);
SERIAL_ECHOPAIR
(
" Y "
,
max_acceleration_units_per_sq_second
[
Y_AXIS
]
);
SERIAL_ECHOPAIR
(
" Z "
,
max_acceleration_units_per_sq_second
[
2
]
);
SERIAL_ECHOPAIR
(
" Z "
,
max_acceleration_units_per_sq_second
[
Z_AXIS
]
);
SERIAL_ECHOPAIR
(
" E0 "
,
max_acceleration_units_per_sq_second
[
3
]);
SERIAL_ECHOPAIR
(
" E0 "
,
max_acceleration_units_per_sq_second
[
3
]);
SERIAL_ECHOPAIR
(
" E1 "
,
max_acceleration_units_per_sq_second
[
4
]);
SERIAL_ECHOPAIR
(
" E1 "
,
max_acceleration_units_per_sq_second
[
4
]);
SERIAL_ECHOPAIR
(
" E2 "
,
max_acceleration_units_per_sq_second
[
5
]);
SERIAL_ECHOPAIR
(
" E2 "
,
max_acceleration_units_per_sq_second
[
5
]);
SERIAL_ECHOPAIR
(
" E3 "
,
max_acceleration_units_per_sq_second
[
6
]);
SERIAL_ECHOPAIR
(
" E3 "
,
max_acceleration_units_per_sq_second
[
6
]);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Acceleration: S=acceleration, T=retract acceleration"
);
SERIAL_ECHOLNPGM
(
"Acceleration: S=acceleration, T=retract acceleration"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
...
@@ -198,11 +195,10 @@ void Config_PrintSettings()
...
@@ -198,11 +195,10 @@ void Config_PrintSettings()
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Home offset (mm):"
);
SERIAL_ECHOLNPGM
(
"Home offset (mm):"
);
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M206 X"
,
add_homing
[
0
]
);
SERIAL_ECHOPAIR
(
" M206 X"
,
add_homing
[
X_AXIS
]
);
SERIAL_ECHOPAIR
(
" Y"
,
add_homing
[
1
]
);
SERIAL_ECHOPAIR
(
" Y"
,
add_homing
[
Y_AXIS
]
);
SERIAL_ECHOPAIR
(
" Z"
,
add_homing
[
2
]
);
SERIAL_ECHOPAIR
(
" Z"
,
add_homing
[
Z_AXIS
]
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
#ifdef DELTA
#ifdef DELTA
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Endstop adjustment (mm):"
);
SERIAL_ECHOLNPGM
(
"Endstop adjustment (mm):"
);
...
@@ -254,9 +250,25 @@ void Config_PrintSettings()
...
@@ -254,9 +250,25 @@ void Config_PrintSettings()
SERIAL_ECHOPAIR
(
" D"
,
unscalePID_d
(
Kd
[
active_extruder
]));
SERIAL_ECHOPAIR
(
" D"
,
unscalePID_d
(
Kd
[
active_extruder
]));
SERIAL_ECHOLN
(
""
);
SERIAL_ECHOLN
(
""
);
#endif
#endif
#ifdef FWRETRACT
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Retract: S=Length (mm) F:Speed (mm/m) Z: ZLift (mm)"
);
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M207 S"
,
retract_length
);
SERIAL_ECHOPAIR
(
" F"
,
retract_feedrate
*
60
);
SERIAL_ECHOPAIR
(
" Z"
,
retract_zlift
);
SERIAL_ECHOLN
(
""
);
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
"Recover: S=Extra length (mm) F:Speed (mm/m)"
);
SERIAL_ECHO_START
;
SERIAL_ECHOPAIR
(
" M208 S"
,
retract_recover_length
);
SERIAL_ECHOPAIR
(
" F"
,
retract_recover_feedrate
*
60
);
SERIAL_ECHOLN
(
""
);
#endif
}
}
#endif
#endif
#ifdef EEPROM_SETTINGS
#ifdef EEPROM_SETTINGS
void
Config_RetrieveSettings
()
void
Config_RetrieveSettings
()
{
{
...
...
MarlinKimbra/Configuration_Cartesian.h
View file @
eb09f322
// Define this to set a custom name for your generic Mendel,
// Define this to set a custom name for your generic Mendel,
#define CUSTOM_MENDEL_NAME "Prusa
I3
"
#define CUSTOM_MENDEL_NAME "Prusa"
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
...
@@ -172,10 +172,41 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
...
@@ -172,10 +172,41 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
// - Block Z homing only when the probe is outside bed area.
// - Block Z homing only when the probe is outside bed area.
#ifdef Z_SAFE_HOMING
#ifdef Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
#endif
#ifdef AUTO_BED_LEVELING_GRID // Check if Probe_Offset * Grid Points is greater than Probing Range
#if X_PROBE_OFFSET_FROM_EXTRUDER < 0
#if (-(X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#else
#if ((X_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION))
#error "The X axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#endif
#if Y_PROBE_OFFSET_FROM_EXTRUDER < 0
#if (-(Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#endif
#else
#if ((Y_PROBE_OFFSET_FROM_EXTRUDER * AUTO_BED_LEVELING_GRID_POINTS) >= (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION))
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2) // X point for Z homing when homing all axis (G28)
#error "The Y axis probing range is not enough to fit all the points defined in AUTO_BED_LEVELING_GRID_POINTS"
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y point for Z homing when homing all axis (G28)
#endif
#endif
#endif
#endif
#endif // ENABLE_AUTO_BED_LEVELING
#endif // ENABLE_AUTO_BED_LEVELING
...
...
MarlinKimbra/Configuration_Delta.h
View file @
eb09f322
...
@@ -134,7 +134,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
...
@@ -134,7 +134,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic o
// delta speeds must be the same on xyz
// delta speeds must be the same on xyz
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,625,625,625} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,80,451,625,625,625} // X, Y, Z, E0, E1, E2, E3
#define DEFAULT_MAX_FEEDRATE {300,300,300,45,100,100,100} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_FEEDRATE {300,300,300,45,100,100,100} // X, Y, Z, E0, E1, E2, E3 (mm/sec)
#define DEFAULT_RETRACTION_MAX_FEEDRATE {
8
0,150,150,150} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_RETRACTION_MAX_FEEDRATE {
15
0,150,150,150} // E0, E1, E2, E3 (mm/sec)
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_MAX_ACCELERATION {2000,2000,2000,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION 1000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
...
...
MarlinKimbra/Configuration_adv.h
View file @
eb09f322
...
@@ -348,7 +348,7 @@
...
@@ -348,7 +348,7 @@
// extruder advance constant (s2/mm3)
// extruder advance constant (s2/mm3)
//
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTUDER_ADVANCE_K * cubic mm per second ^ 2
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXT
R
UDER_ADVANCE_K * cubic mm per second ^ 2
//
//
// Hooke's law says: force = k * distance
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
...
...
MarlinKimbra/Marlin.h
View file @
eb09f322
...
@@ -66,8 +66,9 @@
...
@@ -66,8 +66,9 @@
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
const
char
errormagic
[]
PROGMEM
=
"Error:"
;
extern
const
char
errormagic
[]
PROGMEM
;
const
char
echomagic
[]
PROGMEM
=
"echo:"
;
extern
const
char
echomagic
[]
PROGMEM
;
#define SERIAL_ERROR_START (serialprintPGM(errormagic))
#define SERIAL_ERROR_START (serialprintPGM(errormagic))
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
...
@@ -151,31 +152,29 @@ void manage_inactivity();
...
@@ -151,31 +152,29 @@ void manage_inactivity();
#endif
#endif
#if (DRIVER_EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
#if (DRIVER_EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
#define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
#define disable_e1() WRITE(E1_ENABLE_PIN,!E_ENABLE_ON)
#else
#else
#define enable_e1()
/* nothing */
#define enable_e1()
/* nothing */
#define disable_e1()
/* nothing */
#define disable_e1()
/* nothing */
#endif
#endif
#if (DRIVER_EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
#if (DRIVER_EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
#define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
#define disable_e2() WRITE(E2_ENABLE_PIN,!E_ENABLE_ON)
#else
#else
#define enable_e2()
/* nothing */
#define enable_e2()
/* nothing */
#define disable_e2()
/* nothing */
#define disable_e2()
/* nothing */
#endif
#endif
#if (DRIVER_EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
#if (DRIVER_EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
#define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON)
#define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON)
#define disable_e3() WRITE(E3_ENABLE_PIN,!E_ENABLE_ON)
#define disable_e3() WRITE(E3_ENABLE_PIN,!E_ENABLE_ON)
#else
#else
#define enable_e3()
/* nothing */
#define enable_e3()
/* nothing */
#define disable_e3()
/* nothing */
#define disable_e3()
/* nothing */
#endif
#endif
enum
AxisEnum
{
X_AXIS
=
0
,
Y_AXIS
=
1
,
Z_AXIS
=
2
,
E_AXIS
=
3
};
enum
AxisEnum
{
X_AXIS
=
0
,
Y_AXIS
=
1
,
Z_AXIS
=
2
,
E_AXIS
=
3
};
...
@@ -183,7 +182,6 @@ void FlushSerialRequestResend();
...
@@ -183,7 +182,6 @@ void FlushSerialRequestResend();
void
ClearToSend
();
void
ClearToSend
();
void
get_coordinates
();
void
get_coordinates
();
#ifdef DELTA
#ifdef DELTA
float
probe_bed
(
float
x
,
float
y
);
float
probe_bed
(
float
x
,
float
y
);
void
set_delta_constants
();
void
set_delta_constants
();
...
@@ -202,7 +200,6 @@ extern float delta_tower1_x,delta_tower1_y;
...
@@ -202,7 +200,6 @@ extern float delta_tower1_x,delta_tower1_y;
extern
float
delta_tower2_x
,
delta_tower2_y
;
extern
float
delta_tower2_x
,
delta_tower2_y
;
extern
float
delta_tower3_x
,
delta_tower3_y
;
extern
float
delta_tower3_x
,
delta_tower3_y
;
#endif
#endif
#ifdef SCARA
#ifdef SCARA
void
calculate_delta
(
float
cartesian
[
3
]);
void
calculate_delta
(
float
cartesian
[
3
]);
void
calculate_SCARA_forward_Transform
(
float
f_scara
[
3
]);
void
calculate_SCARA_forward_Transform
(
float
f_scara
[
3
]);
...
@@ -290,6 +287,10 @@ extern float retract_length, retract_length_swap, retract_feedrate, retract_zlif
...
@@ -290,6 +287,10 @@ extern float retract_length, retract_length_swap, retract_feedrate, retract_zlif
extern
float
retract_recover_length
,
retract_recover_length_swap
,
retract_recover_feedrate
;
extern
float
retract_recover_length
,
retract_recover_length_swap
,
retract_recover_feedrate
;
#endif
#endif
#ifdef EASY_LOAD
extern
bool
allow_lengthy_extrude_once
;
// for load/unload
#endif
#ifdef LASERBEAM
#ifdef LASERBEAM
extern
int
laser_ttl_modulation
;
extern
int
laser_ttl_modulation
;
#endif
#endif
...
...
MarlinKimbra/Marlin_main.cpp
View file @
eb09f322
This diff is collapsed.
Click to expand it.
MarlinKimbra/language.h
View file @
eb09f322
...
@@ -32,21 +32,24 @@
...
@@ -32,21 +32,24 @@
#define FIRMWARE_URL "http://firmware.ultimaker.com"
#define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MB(RUMBA)
#elif MB(RUMBA)
#define MACHINE_NAME "Rumba"
#define MACHINE_NAME "Rumba"
#define FIRMWARE_URL "https://github.com/
ErikZalm/Marlin/
"
#define FIRMWARE_URL "https://github.com/
MagoKimbra/MarlinKimbra
"
#elif MB(3DRAG)
#elif MB(3DRAG)
#define MACHINE_NAME "3Drag"
#define MACHINE_NAME "3Drag"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#elif MB(5DPRINT)
#elif MB(5DPRINT)
#define MACHINE_NAME "Makibox"
#define MACHINE_NAME "Makibox"
#define FIRMWARE_URL "https://github.com/ErikZalm/Marlin/"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#elif MB(SAV_MKI)
#define MACHINE_NAME "SAV MkI"
#define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
#else
#else
#ifdef CUSTOM_MENDEL_NAME
#ifdef CUSTOM_MENDEL_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME
#else
#else
#define MACHINE_NAME "
Mendel
"
#define MACHINE_NAME "
Prusa
"
#endif
#endif
// Default firmware set to Mendel
// Default firmware set to
Prusa/
Mendel
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
#endif
...
...
MarlinKimbra/language_en.h
View file @
eb09f322
...
@@ -143,6 +143,10 @@
...
@@ -143,6 +143,10 @@
#define MSG_CONFIG "Configuration"
#define MSG_CONFIG "Configuration"
#define MSG_BAUDRATE "Baudrate"
#define MSG_BAUDRATE "Baudrate"
#define MSG_RECTRACT "Rectract"
#define MSG_RECTRACT "Rectract"
#define MSG_E_BOWDEN_LENGTH "Extrude " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_R_BOWDEN_LENGTH "Retract " STRINGIFY(BOWDEN_LENGTH) "mm"
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST
#ifdef FIRMWARE_TEST
#define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_YES "Put the Y command to go next"
...
...
MarlinKimbra/motion_control.h
View file @
eb09f322
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
// the direction of helical travel, radius == circle radius, isclockwise boolean. Used
// the direction of helical travel, radius == circle radius, isclockwise boolean. Used
// for vector transformation direction.
// for vector transformation direction.
void
mc_arc
(
float
*
position
,
float
*
target
,
float
*
offset
,
unsigned
char
axis_0
,
unsigned
char
axis_1
,
void
mc_arc
(
float
*
position
,
float
*
target
,
float
*
offset
,
unsigned
char
axis_0
,
unsigned
char
axis_1
,
unsigned
char
axis_linear
,
float
feed_rate
,
float
radius
,
unsigned
char
isclockwise
,
uint8_t
extruder
,
uint8_t
driver
);
unsigned
char
axis_linear
,
float
feed_rate
,
float
radius
,
unsigned
char
isclockwise
,
uint8_t
extruder
,
uint8_t
driver
);
#endif
#endif
MarlinKimbra/pins.h
View file @
eb09f322
...
@@ -1900,12 +1900,13 @@
...
@@ -1900,12 +1900,13 @@
#define ORIG_HEATER_BED_PIN 20 // Bed
#define ORIG_HEATER_BED_PIN 20 // Bed
#define ORIG_FAN_PIN 16 // Fan -- from Teensyduino environment.
#define ORIG_FAN_PIN 16 // Fan -- from Teensyduino environment.
// For the fan and Teensyduino uses a different pin mapping.
// For the fan and Teensyduino uses a different pin mapping.
#define X_STOP_PIN 13
#define Y_STOP_PIN 14
#define Z_STOP_PIN 15
//#define Z_STOP_PIN 36 // For inductive sensor.
#define X_STOP_PIN 13
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define Y_STOP_PIN 14
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#define Z_STOP_PIN 15
#define ORIG_TEMP_0_PIN 7 // Extruder / Analog pin numbering
#define ORIG_TEMP_BED_PIN 6 // Bed / Analog pin numbering
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_2_PIN -1
...
@@ -1914,7 +1915,6 @@
...
@@ -1914,7 +1915,6 @@
#define SDSS 20 // PB0 - 8 in marlin env.
#define SDSS 20 // PB0 - 8 in marlin env.
#define LED_PIN -1
#define LED_PIN -1
#define PS_ON_PIN -1
#define PS_ON_PIN -1
#define KILL_PIN -1
#define ALARM_PIN -1
#define ALARM_PIN -1
#define SDCARDDETECT -1
#define SDCARDDETECT -1
...
@@ -1933,13 +1933,24 @@
...
@@ -1933,13 +1933,24 @@
#define LCD_PINS_D5 -1
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#define LCD_PINS_D7 -1
#define BTN_EN1 -1
#define BTN_EN2 -1
#define BTN_ENC -1
#ifdef SAV_3DLCD
// For LCD SHIFT register LCD
// For LCD SHIFT register LCD
#define SR_DATA_PIN 0
#define SR_DATA_PIN 1
#define SR_CLK_PIN 1
#define SR_CLK_PIN 0
#define BTN_EN1 41
#define BTN_EN2 40
#define BTN_ENC 12
#define KILL_PIN 42 // A2 = 42 - teensy = 40
#define HOME_PIN -1 // A4 = marlin 44 - teensy = 42
#ifdef NUM_SERVOS
#define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in Servo.cpp)
#endif
#endif
#endif // SAV_MKI
#endif // SAV_MKI
...
...
MarlinKimbra/planner.cpp
View file @
eb09f322
...
@@ -601,9 +601,16 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
...
@@ -601,9 +601,16 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa
#ifdef PREVENT_LENGTHY_EXTRUDE
#ifdef PREVENT_LENGTHY_EXTRUDE
if
(
labs
(
target
[
E_AXIS
]
-
position
[
E_AXIS
])
>
axis_steps_per_unit
[
active_extruder
+
3
]
*
EXTRUDE_MAXLENGTH
)
if
(
labs
(
target
[
E_AXIS
]
-
position
[
E_AXIS
])
>
axis_steps_per_unit
[
active_extruder
+
3
]
*
EXTRUDE_MAXLENGTH
)
{
{
#ifdef EASY_LOAD
if
(
!
allow_lengthy_extrude_once
)
{
#endif
position
[
E_AXIS
]
=
target
[
E_AXIS
];
//behave as if the move really took place, but ignore E part
position
[
E_AXIS
]
=
target
[
E_AXIS
];
//behave as if the move really took place, but ignore E part
SERIAL_ECHO_START
;
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
MSG_ERR_LONG_EXTRUDE_STOP
);
SERIAL_ECHOLNPGM
(
MSG_ERR_LONG_EXTRUDE_STOP
);
#ifdef EASY_LOAD
}
allow_lengthy_extrude_once
=
false
;
#endif
}
}
#endif // PREVENT_LENGTHY_EXTRUDE
#endif // PREVENT_LENGTHY_EXTRUDE
}
}
...
...
MarlinKimbra/planner.h
View file @
eb09f322
...
@@ -72,8 +72,7 @@ typedef struct {
...
@@ -72,8 +72,7 @@ typedef struct {
unsigned
long
laser_ttlmodulation
;
unsigned
long
laser_ttlmodulation
;
#endif
#endif
volatile
char
busy
;
volatile
char
busy
;
}
}
block_t
;
block_t
;
#ifdef ENABLE_AUTO_BED_LEVELING
#ifdef ENABLE_AUTO_BED_LEVELING
// this holds the required transform to compensate for bed level
// this holds the required transform to compensate for bed level
...
...
MarlinKimbra/stepper.cpp
View file @
eb09f322
...
@@ -78,7 +78,6 @@ static volatile bool endstop_z_hit=false;
...
@@ -78,7 +78,6 @@ static volatile bool endstop_z_hit=false;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
bool
abort_on_endstop_hit
=
false
;
bool
abort_on_endstop_hit
=
false
;
#endif
#endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN
#ifdef MOTOR_CURRENT_PWM_XY_PIN
int
motor_current_setting
[
3
]
=
DEFAULT_PWM_MOTOR_CURRENT
;
int
motor_current_setting
[
3
]
=
DEFAULT_PWM_MOTOR_CURRENT
;
#endif
#endif
...
...
MarlinKimbra/temperature.cpp
View file @
eb09f322
This diff is collapsed.
Click to expand it.
MarlinKimbra/temperature.h
View file @
eb09f322
...
@@ -60,28 +60,27 @@ extern int current_temperature_bed_raw;
...
@@ -60,28 +60,27 @@ extern int current_temperature_bed_raw;
extern
int
target_temperature_bed
;
extern
int
target_temperature_bed
;
extern
float
current_temperature_bed
;
extern
float
current_temperature_bed
;
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
extern
float
redundant_temperature
;
extern
float
redundant_temperature
;
#endif
#endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
extern
unsigned
char
soft_pwm_bed
;
extern
unsigned
char
soft_pwm_bed
;
#endif
#endif
#ifdef PIDTEMP
#ifdef PIDTEMP
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
],
Kc
;
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
],
Kc
;
float
scalePID_i
(
float
i
);
float
scalePID_i
(
float
i
);
float
scalePID_d
(
float
d
);
float
scalePID_d
(
float
d
);
float
unscalePID_i
(
float
i
);
float
unscalePID_i
(
float
i
);
float
unscalePID_d
(
float
d
);
float
unscalePID_d
(
float
d
);
#endif
#endif
#ifdef PIDTEMPBED
#ifdef PIDTEMPBED
extern
float
bedKp
,
bedKi
,
bedKd
;
extern
float
bedKp
,
bedKi
,
bedKd
;
#endif
#endif
#ifdef BABYSTEPPING
#ifdef BABYSTEPPING
extern
volatile
int
babystepsTodo
[
3
];
extern
volatile
int
babystepsTodo
[
3
];
#endif
#endif
//high level conversion routines, for use outside of temperature.cpp
//high level conversion routines, for use outside of temperature.cpp
...
@@ -205,7 +204,7 @@ void disable_heater();
...
@@ -205,7 +204,7 @@ void disable_heater();
void
setWatch
();
void
setWatch
();
void
updatePID
();
void
updatePID
();
#if
def THERMAL_RUNAWAY_PROTECTION_PERIOD
&& THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
#if
defined (THERMAL_RUNAWAY_PROTECTION_PERIOD)
&& THERMAL_RUNAWAY_PROTECTION_PERIOD > 0
void
thermal_runaway_protection
(
int
*
state
,
unsigned
long
*
timer
,
float
temperature
,
float
target_temperature
,
int
heater_id
,
int
period_seconds
,
int
hysteresis_degc
);
void
thermal_runaway_protection
(
int
*
state
,
unsigned
long
*
timer
,
float
temperature
,
float
target_temperature
,
int
heater_id
,
int
period_seconds
,
int
hysteresis_degc
);
static
int
thermal_runaway_state_machine
[
4
];
// = {0,0,0,0};
static
int
thermal_runaway_state_machine
[
4
];
// = {0,0,0,0};
static
unsigned
long
thermal_runaway_timer
[
4
];
// = {0,0,0,0};
static
unsigned
long
thermal_runaway_timer
[
4
];
// = {0,0,0,0};
...
@@ -229,4 +228,8 @@ FORCE_INLINE void autotempShutdown(){
...
@@ -229,4 +228,8 @@ FORCE_INLINE void autotempShutdown(){
void
PID_autotune
(
float
temp
,
int
extruder
,
int
ncycles
);
void
PID_autotune
(
float
temp
,
int
extruder
,
int
ncycles
);
void
setExtruderAutoFanState
(
int
pin
,
bool
state
);
void
checkExtruderAutoFans
();
#endif
#endif
MarlinKimbra/ultralcd.cpp
View file @
eb09f322
This diff is collapsed.
Click to expand it.
MarlinKimbra/ultralcd.h
View file @
eb09f322
...
@@ -50,9 +50,9 @@
...
@@ -50,9 +50,9 @@
extern
bool
cancel_heatup
;
extern
bool
cancel_heatup
;
#ifdef FILAMENT_LCD_DISPLAY
#ifdef FILAMENT_LCD_DISPLAY
extern
unsigned
long
message_millis
;
extern
unsigned
long
message_millis
;
#endif
#endif
void
lcd_buzz
(
long
duration
,
uint16_t
freq
);
void
lcd_buzz
(
long
duration
,
uint16_t
freq
);
bool
lcd_clicked
();
bool
lcd_clicked
();
...
@@ -125,7 +125,6 @@ char *ftostr30(const float &x);
...
@@ -125,7 +125,6 @@ char *ftostr30(const float &x);
char
*
ftostr31ns
(
const
float
&
x
);
// float to string without sign character
char
*
ftostr31ns
(
const
float
&
x
);
// float to string without sign character
char
*
ftostr31
(
const
float
&
x
);
char
*
ftostr31
(
const
float
&
x
);
char
*
ftostr32
(
const
float
&
x
);
char
*
ftostr32
(
const
float
&
x
);
char
*
ftostr32np
(
const
float
&
x
);
// remove zero-padding from ftostr32
char
*
ftostr12ns
(
const
float
&
x
);
char
*
ftostr12ns
(
const
float
&
x
);
char
*
ftostr5
(
const
float
&
x
);
char
*
ftostr5
(
const
float
&
x
);
char
*
ftostr51
(
const
float
&
x
);
char
*
ftostr51
(
const
float
&
x
);
...
...
MarlinKimbra/ultralcd_implementation_hitachi_HD44780.h
View file @
eb09f322
...
@@ -191,6 +191,7 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
...
@@ -191,6 +191,7 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#elif defined(SR_LCD_2W_NL)
#elif defined(SR_LCD_2W_NL)
extern
"C"
void
__cxa_pure_virtual
()
{
while
(
1
);
}
#include <LCD.h>
#include <LCD.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR.h>
#define LCD_CLASS LiquidCrystal_SR
#define LCD_CLASS LiquidCrystal_SR
...
@@ -208,6 +209,14 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
...
@@ -208,6 +209,14 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
LCD_CLASS
lcd
(
LCD_PINS_RS
,
LCD_PINS_ENABLE
,
LCD_PINS_D4
,
LCD_PINS_D5
,
LCD_PINS_D6
,
LCD_PINS_D7
);
//RS,Enable,D4,D5,D6,D7
LCD_CLASS
lcd
(
LCD_PINS_RS
,
LCD_PINS_ENABLE
,
LCD_PINS_D4
,
LCD_PINS_D5
,
LCD_PINS_D6
,
LCD_PINS_D7
);
//RS,Enable,D4,D5,D6,D7
#endif
#endif
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
static
uint16_t
progressBarTick
=
0
;
#if PROGRESS_BAR_MSG_EXPIRE > 0
static
uint16_t
messageTick
=
0
;
#endif
#define LCD_STR_PROGRESS "\x03\x04\x05"
#endif
/* Custom characters defined in the first 8 characters of the LCD */
/* Custom characters defined in the first 8 characters of the LCD */
#define LCD_STR_BEDTEMP "\x00"
#define LCD_STR_BEDTEMP "\x00"
#define LCD_STR_DEGREE "\x01"
#define LCD_STR_DEGREE "\x01"
...
@@ -219,8 +228,11 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
...
@@ -219,8 +228,11 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
#define LCD_STR_CLOCK "\x07"
#define LCD_STR_CLOCK "\x07"
#define LCD_STR_ARROW_RIGHT "\x7E"
/* from the default character set */
#define LCD_STR_ARROW_RIGHT "\x7E"
/* from the default character set */
static
void
lcd_implementation_init
()
static
void
lcd_set_custom_characters
(
{
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
bool
progress_bar_set
=
true
#endif
)
{
#ifdef DELTA
#ifdef DELTA
byte
bedTemp
[
8
]
=
byte
bedTemp
[
8
]
=
{
{
...
@@ -319,6 +331,72 @@ static void lcd_implementation_init()
...
@@ -319,6 +331,72 @@ static void lcd_implementation_init()
B00000
B00000
};
//thanks Sonny Mounicou
};
//thanks Sonny Mounicou
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
static
bool
char_mode
=
false
;
byte
progress
[
3
][
8
]
=
{
{
B00000
,
B10000
,
B10000
,
B10000
,
B10000
,
B10000
,
B10000
,
B00000
},
{
B00000
,
B10100
,
B10100
,
B10100
,
B10100
,
B10100
,
B10100
,
B00000
},
{
B00000
,
B10101
,
B10101
,
B10101
,
B10101
,
B10101
,
B10101
,
B00000
}
};
if
(
progress_bar_set
!=
char_mode
)
{
char_mode
=
progress_bar_set
;
lcd
.
createChar
(
LCD_STR_BEDTEMP
[
0
],
bedTemp
);
lcd
.
createChar
(
LCD_STR_DEGREE
[
0
],
degree
);
lcd
.
createChar
(
LCD_STR_THERMOMETER
[
0
],
thermometer
);
lcd
.
createChar
(
LCD_STR_FEEDRATE
[
0
],
feedrate
);
lcd
.
createChar
(
LCD_STR_CLOCK
[
0
],
clock
);
if
(
progress_bar_set
)
{
// Progress bar characters for info screen
for
(
int
i
=
3
;
i
--
;)
lcd
.
createChar
(
LCD_STR_PROGRESS
[
i
],
progress
[
i
]);
}
else
{
// Custom characters for submenus
lcd
.
createChar
(
LCD_STR_UPLEVEL
[
0
],
uplevel
);
lcd
.
createChar
(
LCD_STR_REFRESH
[
0
],
refresh
);
lcd
.
createChar
(
LCD_STR_FOLDER
[
0
],
folder
);
}
}
#else
lcd
.
createChar
(
LCD_STR_BEDTEMP
[
0
],
bedTemp
);
lcd
.
createChar
(
LCD_STR_DEGREE
[
0
],
degree
);
lcd
.
createChar
(
LCD_STR_THERMOMETER
[
0
],
thermometer
);
lcd
.
createChar
(
LCD_STR_UPLEVEL
[
0
],
uplevel
);
lcd
.
createChar
(
LCD_STR_REFRESH
[
0
],
refresh
);
lcd
.
createChar
(
LCD_STR_FOLDER
[
0
],
folder
);
lcd
.
createChar
(
LCD_STR_FEEDRATE
[
0
],
feedrate
);
lcd
.
createChar
(
LCD_STR_CLOCK
[
0
],
clock
);
#endif
}
static
void
lcd_implementation_init
(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
bool
progress_bar_set
=
true
#endif
)
{
#if defined(LCD_I2C_TYPE_PCF8575)
#if defined(LCD_I2C_TYPE_PCF8575)
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
#ifdef LCD_I2C_PIN_BL
#ifdef LCD_I2C_PIN_BL
...
@@ -343,14 +421,12 @@ static void lcd_implementation_init()
...
@@ -343,14 +421,12 @@ static void lcd_implementation_init()
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
#endif
#endif
lcd
.
createChar
(
LCD_STR_BEDTEMP
[
0
],
bedTemp
);
lcd_set_custom_characters
(
lcd
.
createChar
(
LCD_STR_DEGREE
[
0
],
degree
);
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
lcd
.
createChar
(
LCD_STR_THERMOMETER
[
0
],
thermometer
);
progress_bar_set
lcd
.
createChar
(
LCD_STR_UPLEVEL
[
0
],
uplevel
);
#endif
lcd
.
createChar
(
LCD_STR_REFRESH
[
0
],
refresh
);
);
lcd
.
createChar
(
LCD_STR_FOLDER
[
0
],
folder
);
lcd
.
createChar
(
LCD_STR_FEEDRATE
[
0
],
feedrate
);
lcd
.
createChar
(
LCD_STR_CLOCK
[
0
],
clock
);
lcd
.
clear
();
lcd
.
clear
();
}
}
static
void
lcd_implementation_clear
()
static
void
lcd_implementation_clear
()
...
@@ -405,7 +481,7 @@ static void lcd_implementation_status_screen()
...
@@ -405,7 +481,7 @@ static void lcd_implementation_status_screen()
lcd
.
print
(
'/'
);
lcd
.
print
(
'/'
);
lcd
.
print
(
itostr3left
(
tTarget
));
lcd
.
print
(
itostr3left
(
tTarget
));
# if
EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 && !defined(SINGLENOZZLE)
# if
(EXTRUDERS > 1 && !defined(SINGLENOZZLE)) || TEMP_SENSOR_BED != 0
//If we have an 2nd extruder or heated bed, show that in the top right corner
//If we have an 2nd extruder or heated bed, show that in the top right corner
lcd
.
setCursor
(
8
,
0
);
lcd
.
setCursor
(
8
,
0
);
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
...
@@ -420,7 +496,7 @@ static void lcd_implementation_status_screen()
...
@@ -420,7 +496,7 @@ static void lcd_implementation_status_screen()
lcd
.
print
(
itostr3
(
tHotend
));
lcd
.
print
(
itostr3
(
tHotend
));
lcd
.
print
(
'/'
);
lcd
.
print
(
'/'
);
lcd
.
print
(
itostr3left
(
tTarget
));
lcd
.
print
(
itostr3left
(
tTarget
));
# endif
//EXTRUDERS > 1
|| TEMP_SENSOR_BED != 0
# endif
(EXTRUDERS > 1 && !defined(SINGLENOZZLE))
|| TEMP_SENSOR_BED != 0
#else//LCD_WIDTH > 19
#else//LCD_WIDTH > 19
lcd
.
setCursor
(
0
,
0
);
lcd
.
setCursor
(
0
,
0
);
...
@@ -432,7 +508,7 @@ static void lcd_implementation_status_screen()
...
@@ -432,7 +508,7 @@ static void lcd_implementation_status_screen()
if
(
tTarget
<
10
)
if
(
tTarget
<
10
)
lcd
.
print
(
' '
);
lcd
.
print
(
' '
);
# if
EXTRUDERS > 1 || TEMP_SENSOR_BED != 0 && !defined(SINGLENOZZLE)
# if
(EXTRUDERS > 1 && !defined(SINGLENOZZLE)) || TEMP_SENSOR_BED != 0
//If we have an 2nd extruder or heated bed, show that in the top right corner
//If we have an 2nd extruder or heated bed, show that in the top right corner
lcd
.
setCursor
(
10
,
0
);
lcd
.
setCursor
(
10
,
0
);
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
...
@@ -450,8 +526,8 @@ static void lcd_implementation_status_screen()
...
@@ -450,8 +526,8 @@ static void lcd_implementation_status_screen()
lcd_printPGM
(
PSTR
(
LCD_STR_DEGREE
" "
));
lcd_printPGM
(
PSTR
(
LCD_STR_DEGREE
" "
));
if
(
tTarget
<
10
)
if
(
tTarget
<
10
)
lcd
.
print
(
' '
);
lcd
.
print
(
' '
);
# endif
//EXTRUDERS > 1
|| TEMP_SENSOR_BED != 0
# endif
(EXTRUDERS > 1 && !defined(SINGLENOZZLE))
|| TEMP_SENSOR_BED != 0
#endif//LCD_WIDTH > 19
#endif
//LCD_WIDTH > 19
#if LCD_HEIGHT > 2
#if LCD_HEIGHT > 2
//Lines 2 for 4 line LCD
//Lines 2 for 4 line LCD
...
@@ -496,7 +572,7 @@ static void lcd_implementation_status_screen()
...
@@ -496,7 +572,7 @@ static void lcd_implementation_status_screen()
# endif//LCD_WIDTH > 19
# endif//LCD_WIDTH > 19
lcd
.
setCursor
(
LCD_WIDTH
-
8
,
1
);
lcd
.
setCursor
(
LCD_WIDTH
-
8
,
1
);
lcd
.
print
(
'Z'
);
lcd
.
print
(
'Z'
);
lcd
.
print
(
ftostr32
np
(
current_position
[
Z_AXIS
]
+
0
.
00001
));
lcd
.
print
(
ftostr32
(
current_position
[
Z_AXIS
]
+
0
.
00001
));
#endif//LCD_HEIGHT > 2
#endif//LCD_HEIGHT > 2
#if LCD_HEIGHT > 3
#if LCD_HEIGHT > 3
...
@@ -528,23 +604,46 @@ static void lcd_implementation_status_screen()
...
@@ -528,23 +604,46 @@ static void lcd_implementation_status_screen()
}
}
#endif
#endif
// Status message line at the bottom
lcd
.
setCursor
(
0
,
LCD_HEIGHT
-
1
);
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
if
(
card
.
isFileOpen
())
{
uint16_t
mil
=
millis
(),
diff
=
mil
-
progressBarTick
;
if
(
diff
>=
PROGRESS_BAR_MSG_TIME
||
!
lcd_status_message
[
0
])
{
// draw the progress bar
int
tix
=
(
int
)(
card
.
percentDone
()
*
LCD_WIDTH
*
3
)
/
100
,
cel
=
tix
/
3
,
rem
=
tix
%
3
,
i
=
LCD_WIDTH
;
char
msg
[
LCD_WIDTH
+
1
],
b
=
' '
;
msg
[
i
]
=
'\0'
;
while
(
i
--
)
{
if
(
i
==
cel
-
1
)
b
=
LCD_STR_PROGRESS
[
2
];
else
if
(
i
==
cel
&&
rem
!=
0
)
b
=
LCD_STR_PROGRESS
[
rem
-
1
];
msg
[
i
]
=
b
;
}
lcd
.
print
(
msg
);
return
;
}
}
//card.isFileOpen
#endif //LCD_PROGRESS_BAR
//Display both Status message line and Filament display on the last line
//Display both Status message line and Filament display on the last line
#ifdef FILAMENT_LCD_DISPLAY
#ifdef FILAMENT_LCD_DISPLAY
if
(
message_millis
+
5000
>
millis
()){
//display any status for the first 5 sec after screen is initiated
if
(
message_millis
+
5000
<=
millis
())
{
//display any status for the first 5 sec after screen is initiated
lcd
.
setCursor
(
0
,
LCD_HEIGHT
-
1
);
lcd
.
print
(
lcd_status_message
);
}
else
{
lcd
.
setCursor
(
0
,
LCD_HEIGHT
-
1
);
lcd_printPGM
(
PSTR
(
"Dia "
));
lcd_printPGM
(
PSTR
(
"Dia "
));
lcd
.
print
(
ftostr12ns
(
filament_width_meas
));
lcd
.
print
(
ftostr12ns
(
filament_width_meas
));
lcd_printPGM
(
PSTR
(
" V"
));
lcd_printPGM
(
PSTR
(
" V"
));
lcd
.
print
(
itostr3
(
100
.
0
*
volumetric_multiplier
[
FILAMENT_SENSOR_EXTRUDER_NUM
]));
lcd
.
print
(
itostr3
(
100
.
0
*
volumetric_multiplier
[
FILAMENT_SENSOR_EXTRUDER_NUM
]));
lcd
.
print
(
'%'
);
lcd
.
print
(
'%'
);
return
;
}
}
#else
#endif //FILAMENT_LCD_DISPLAY
lcd
.
setCursor
(
0
,
LCD_HEIGHT
-
1
);
lcd
.
print
(
lcd_status_message
);
lcd
.
print
(
lcd_status_message
);
#endif
}
}
static
void
lcd_implementation_drawmenu_generic
(
uint8_t
row
,
const
char
*
pstr
,
char
pre_char
,
char
post_char
)
static
void
lcd_implementation_drawmenu_generic
(
uint8_t
row
,
const
char
*
pstr
,
char
pre_char
,
char
post_char
)
{
{
...
@@ -824,4 +923,22 @@ static uint8_t lcd_implementation_read_slow_buttons()
...
@@ -824,4 +923,22 @@ static uint8_t lcd_implementation_read_slow_buttons()
}
}
#endif
#endif
static
void
lcd_message_init
()
{
static
String
message
[
4
];
message
[
0
]
=
"MARLINKIMBRA V4.0"
;
message
[
1
]
=
"By MagoKimbra"
;
message
[
2
]
=
"magokimbra@hotmail"
;
message
[
3
]
=
".com"
;
lcd
.
clear
();
for
(
int8_t
i
=
0
;
i
<
4
;
i
++
){
lcd
.
setCursor
(
0
,
i
);
lcd
.
print
(
message
[
i
]);
}
delay
(
5000
);
lcd
.
clear
();
}
#endif//ULTRA_LCD_IMPLEMENTATION_HITACHI_HD44780_H
#endif//ULTRA_LCD_IMPLEMENTATION_HITACHI_HD44780_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment