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
Hide 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 @@
#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
// 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.
#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.
// SERIAL_PORT selects which serial port should be used for communication with the host.
...
...
@@ -187,22 +189,21 @@
// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#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 BANG_MAX 255
// limits current to nozzle while in bang-bang mode; 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
//#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_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.
#define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
#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
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
//#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_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.
#define PID_INTEGRAL_DRIVE_MAX PID_MAX //limit for the integral term
#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
// HotEnd{HE0,HE1,HE2,HE3}
#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_Kd {59,59,59,59} // Kd 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_Kd {59,59,59,59} // Kd for E0, E1, E2, E3
#endif // PIDTEMP
...
...
@@ -229,9 +230,9 @@
#ifdef PIDTEMPBED
//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)
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
...
...
@@ -338,33 +339,33 @@
//automatic expansion
#if defined (MAKRPANEL)
#define DOGLCD
#define SDSUPPORT
#define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 17
#define DOGLCD
#define SDSUPPORT
#define ULTIPANEL
#define NEWPANEL
#define DEFAULT_LCD_CONTRAST 17
#endif
#if defined (REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define DOGLCD
#define U8GLIB_ST7920
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define DOGLCD
#define U8GLIB_ST7920
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif
#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
#define ULTIPANEL
#define NEWPANEL
#define ULTIPANEL
#define NEWPANEL
#endif
#if defined(REPRAPWORLD_KEYPAD)
#define NEWPANEL
#define ULTIPANEL
#define NEWPANEL
#define ULTIPANEL
#endif
#if defined(RA_CONTROL_PANEL)
#define ULTIPANEL
#define NEWPANEL
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define ULTIPANEL
#define NEWPANEL
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#endif
//I2C PANELS
...
...
@@ -426,11 +427,13 @@
// Shift register panels
// ---------------------
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
//#define SR_LCD
#ifdef SR_LCD
#define SR_LCD_2W_NL // Non latching 2 wire shift register
//#define NEWPANEL
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
//#define SAV_3DLCD
#ifdef SAV_3DLCD
#define SR_LCD_2W_NL // Non latching 2 wire shiftregister
#define NEWPANEL
#define ULTIPANEL
#endif
...
...
@@ -459,9 +462,9 @@
// default LCD contrast for dogm-like LCD displays
#ifdef DOGLCD
#
ifndef DEFAULT_LCD_CONTRAST
#
define DEFAULT_LCD_CONTRAST 32
#
endif
#
ifndef DEFAULT_LCD_CONTRAST
#
define DEFAULT_LCD_CONTRAST 32
#
endif
#endif
// option for invert rotary switch
...
...
@@ -500,6 +503,32 @@
// please keep turned on if you can.
//#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
#define PLA_PREHEAT_HOTEND_TEMP 190
#define PLA_PREHEAT_HPB_TEMP 60
...
...
@@ -607,9 +636,6 @@
#include "Configuration_adv.h"
#include "thermistortables.h"
...
...
MarlinKimbra/ConfigurationStore.cpp
View file @
eb09f322
This diff is collapsed.
Click to expand it.
MarlinKimbra/Configuration_Cartesian.h
View file @
eb09f322
// 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)
// 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
// - Block Z homing only when the probe is outside bed area.
#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)
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2) // Y 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"
#endif
#endif
#endif
#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
// 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_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_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 @@
// 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
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
...
...
MarlinKimbra/Marlin.h
View file @
eb09f322
...
...
@@ -66,8 +66,9 @@
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
const
char
errormagic
[]
PROGMEM
=
"Error:"
;
const
char
echomagic
[]
PROGMEM
=
"echo:"
;
extern
const
char
errormagic
[]
PROGMEM
;
extern
const
char
echomagic
[]
PROGMEM
;
#define SERIAL_ERROR_START (serialprintPGM(errormagic))
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
...
...
@@ -151,31 +152,29 @@ void manage_inactivity();
#endif
#if (DRIVER_EXTRUDERS > 1) && defined(E1_ENABLE_PIN) && (E1_ENABLE_PIN > -1)
#define enable_e1() WRITE(E1_ENABLE_PIN, E_ENABLE_ON)
#define disable_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)
#else
#define enable_e1()
/* nothing */
#define disable_e1()
/* nothing */
#define enable_e1()
/* nothing */
#define disable_e1()
/* nothing */
#endif
#if (DRIVER_EXTRUDERS > 2) && defined(E2_ENABLE_PIN) && (E2_ENABLE_PIN > -1)
#define enable_e2() WRITE(E2_ENABLE_PIN, E_ENABLE_ON)
#define disable_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)
#else
#define enable_e2()
/* nothing */
#define disable_e2()
/* nothing */
#define enable_e2()
/* nothing */
#define disable_e2()
/* nothing */
#endif
#if (DRIVER_EXTRUDERS > 3) && defined(E3_ENABLE_PIN) && (E3_ENABLE_PIN > -1)
#define enable_e3() WRITE(E3_ENABLE_PIN, E_ENABLE_ON)
#define disable_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)
#else
#define enable_e3()
/* nothing */
#define disable_e3()
/* nothing */
#define enable_e3()
/* nothing */
#define disable_e3()
/* nothing */
#endif
enum
AxisEnum
{
X_AXIS
=
0
,
Y_AXIS
=
1
,
Z_AXIS
=
2
,
E_AXIS
=
3
};
...
...
@@ -183,7 +182,6 @@ void FlushSerialRequestResend();
void
ClearToSend
();
void
get_coordinates
();
#ifdef DELTA
float
probe_bed
(
float
x
,
float
y
);
void
set_delta_constants
();
...
...
@@ -202,7 +200,6 @@ extern float delta_tower1_x,delta_tower1_y;
extern
float
delta_tower2_x
,
delta_tower2_y
;
extern
float
delta_tower3_x
,
delta_tower3_y
;
#endif
#ifdef SCARA
void
calculate_delta
(
float
cartesian
[
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
extern
float
retract_recover_length
,
retract_recover_length_swap
,
retract_recover_feedrate
;
#endif
#ifdef EASY_LOAD
extern
bool
allow_lengthy_extrude_once
;
// for load/unload
#endif
#ifdef LASERBEAM
extern
int
laser_ttl_modulation
;
#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 @@
#define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MB(RUMBA)
#define MACHINE_NAME "Rumba"
#define FIRMWARE_URL "https://github.com/
ErikZalm/Marlin/
"
#define FIRMWARE_URL "https://github.com/
MagoKimbra/MarlinKimbra
"
#elif MB(3DRAG)
#define MACHINE_NAME "3Drag"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#elif MB(5DPRINT)
#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
#ifdef CUSTOM_MENDEL_NAME
#define MACHINE_NAME CUSTOM_MENDEL_NAME
#else
#define MACHINE_NAME "
Mendel
"
#define MACHINE_NAME "
Prusa
"
#endif
// Default firmware set to Mendel
// Default firmware set to
Prusa/
Mendel
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
...
...
@@ -118,7 +121,7 @@
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "open"
#define MSG_HOTEND_OFFSET "Hotend offsets:"
#define MSG_EMPTY_PLANE
"Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
#define MSG_EMPTY_PLANE
"Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
#define MSG_SD_INIT_FAIL "SD init fail"
...
...
MarlinKimbra/language_en.h
View file @
eb09f322
...
...
@@ -143,6 +143,10 @@
#define MSG_CONFIG "Configuration"
#define MSG_BAUDRATE "Baudrate"
#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
#define MSG_FWTEST_YES "Put the Y command to go next"
...
...
MarlinKimbra/motion_control.h
View file @
eb09f322
...
...
@@ -27,7 +27,6 @@
// the direction of helical travel, radius == circle radius, isclockwise boolean. Used
// for vector transformation direction.
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
MarlinKimbra/pins.h
View file @
eb09f322
...
...
@@ -1899,24 +1899,24 @@
#define ORIG_HEATER_2_PIN -1
#define ORIG_HEATER_BED_PIN 20 // Bed
#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 Y_STOP_PIN 14
#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_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_2_PIN -1
#define SDPOWER -1
#define SDSS 20 // PB0 - 8 in marlin env.
#define LED_PIN -1
#define PS_ON_PIN -1
#define KILL_PIN -1
#define ALARM_PIN -1
#define SDCARDDETECT -1
#define SDPOWER -1
#define SDSS 20 // PB0 - 8 in marlin env.
#define LED_PIN -1
#define PS_ON_PIN -1
#define ALARM_PIN -1
#define SDCARDDETECT -1
#ifndef SDSUPPORT
...
...
@@ -1933,13 +1933,24 @@
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -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
#define SR_DATA_PIN 0
#define SR_CLK_PIN 1
#define SR_DATA_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
...
...
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
#ifdef PREVENT_LENGTHY_EXTRUDE
if
(
labs
(
target
[
E_AXIS
]
-
position
[
E_AXIS
])
>
axis_steps_per_unit
[
active_extruder
+
3
]
*
EXTRUDE_MAXLENGTH
)
{
position
[
E_AXIS
]
=
target
[
E_AXIS
];
//behave as if the move really took place, but ignore E part
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
MSG_ERR_LONG_EXTRUDE_STOP
);
#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
SERIAL_ECHO_START
;
SERIAL_ECHOLNPGM
(
MSG_ERR_LONG_EXTRUDE_STOP
);
#ifdef EASY_LOAD
}
allow_lengthy_extrude_once
=
false
;
#endif
}
#endif // PREVENT_LENGTHY_EXTRUDE
}
...
...
MarlinKimbra/planner.h
View file @
eb09f322
...
...
@@ -49,7 +49,7 @@ typedef struct {
#endif
// Fields used by the motion planner to manage acceleration
// float speed_x, speed_y, speed_z, speed_e;
// Nominal mm/sec for each axis
// float speed_x, speed_y, speed_z, speed_e; // Nominal mm/sec for each axis
float
nominal_speed
;
// The nominal speed for this block in mm/sec
float
entry_speed
;
// Entry speed at previous-current junction in mm/sec
float
max_entry_speed
;
// Maximum allowable junction entry speed in mm/sec
...
...
@@ -72,8 +72,7 @@ typedef struct {
unsigned
long
laser_ttlmodulation
;
#endif
volatile
char
busy
;
}
block_t
;
}
block_t
;
#ifdef ENABLE_AUTO_BED_LEVELING
// this holds the required transform to compensate for bed level
...
...
MarlinKimbra/stepper.cpp
View file @
eb09f322
...
...
@@ -78,9 +78,8 @@ static volatile bool endstop_z_hit=false;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
bool
abort_on_endstop_hit
=
false
;
#endif
#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
static
bool
old_x_min_endstop
=
false
;
...
...
MarlinKimbra/temperature.cpp
View file @
eb09f322
This diff is collapsed.
Click to expand it.
MarlinKimbra/temperature.h
View file @
eb09f322
...
...
@@ -60,30 +60,29 @@ extern int current_temperature_bed_raw;
extern
int
target_temperature_bed
;
extern
float
current_temperature_bed
;
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
extern
float
redundant_temperature
;
extern
float
redundant_temperature
;
#endif
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
extern
unsigned
char
soft_pwm_bed
;
extern
unsigned
char
soft_pwm_bed
;
#endif
#ifdef PIDTEMP
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
],
Kc
;
float
scalePID_i
(
float
i
);
float
scalePID_d
(
float
d
);
float
unscalePID_i
(
float
i
);
float
unscalePID_d
(
float
d
);
extern
float
Kp
[
4
],
Ki
[
4
],
Kd
[
4
],
Kc
;
float
scalePID_i
(
float
i
);
float
scalePID_d
(
float
d
);
float
unscalePID_i
(
float
i
);
float
unscalePID_d
(
float
d
);
#endif
#ifdef PIDTEMPBED
extern
float
bedKp
,
bedKi
,
bedKd
;
extern
float
bedKp
,
bedKi
,
bedKd
;
#endif
#ifdef BABYSTEPPING
extern
volatile
int
babystepsTodo
[
3
];
extern
volatile
int
babystepsTodo
[
3
];
#endif
//high level conversion routines, for use outside of temperature.cpp
//inline so that there is no performance decrease.
//deg=degreeCelsius
...
...
@@ -205,7 +204,7 @@ void disable_heater();
void
setWatch
();
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
);
static
int
thermal_runaway_state_machine
[
4
];
// = {0,0,0,0};
static
unsigned
long
thermal_runaway_timer
[
4
];
// = {0,0,0,0};
...
...
@@ -229,4 +228,8 @@ FORCE_INLINE void autotempShutdown(){
void
PID_autotune
(
float
temp
,
int
extruder
,
int
ncycles
);
void
setExtruderAutoFanState
(
int
pin
,
bool
state
);
void
checkExtruderAutoFans
();
#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 @@
extern
bool
cancel_heatup
;
#ifdef FILAMENT_LCD_DISPLAY
#ifdef FILAMENT_LCD_DISPLAY
extern
unsigned
long
message_millis
;
#endif
#endif
void
lcd_buzz
(
long
duration
,
uint16_t
freq
);
bool
lcd_clicked
();
...
...
@@ -125,8 +125,7 @@ char *ftostr30(const float &x);
char
*
ftostr31ns
(
const
float
&
x
);
// float to string without sign character
char
*
ftostr31
(
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
*
ftostr51
(
const
float
&
x
);
char
*
ftostr52
(
const
float
&
x
);
...
...
MarlinKimbra/ultralcd_implementation_hitachi_HD44780.h
View file @
eb09f322
...
...
@@ -190,7 +190,8 @@ extern volatile uint16_t buttons; //an extended version of the last checked but
// 2 wire Non-latching LCD SR from:
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#elif defined(SR_LCD_2W_NL)
extern
"C"
void
__cxa_pure_virtual
()
{
while
(
1
);
}
#include <LCD.h>
#include <LiquidCrystal_SR.h>
#define LCD_CLASS LiquidCrystal_SR
...
...
@@ -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
#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 */
#define LCD_STR_BEDTEMP "\x00"
#define LCD_STR_DEGREE "\x01"
...
...
@@ -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_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
byte
bedTemp
[
8
]
=
{
...
...
@@ -319,6 +331,72 @@ static void lcd_implementation_init()
B00000
};
//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)
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
#ifdef LCD_I2C_PIN_BL
...
...
@@ -343,14 +421,12 @@ static void lcd_implementation_init()
lcd
.
begin
(
LCD_WIDTH
,
LCD_HEIGHT
);
#endif
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
);
lcd_set_custom_characters
(
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
progress_bar_set
#endif
);
lcd
.
clear
();
}
static
void
lcd_implementation_clear
()
...
...
@@ -405,7 +481,7 @@ static void lcd_implementation_status_screen()
lcd
.
print
(
'/'
);
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
lcd
.
setCursor
(
8
,
0
);
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
...
...
@@ -420,7 +496,7 @@ static void lcd_implementation_status_screen()
lcd
.
print
(
itostr3
(
tHotend
));
lcd
.
print
(
'/'
);
lcd
.
print
(
itostr3left
(
tTarget
));
# endif
//EXTRUDERS > 1
|| TEMP_SENSOR_BED != 0
# endif
(EXTRUDERS > 1 && !defined(SINGLENOZZLE))
|| TEMP_SENSOR_BED != 0
#else//LCD_WIDTH > 19
lcd
.
setCursor
(
0
,
0
);
...
...
@@ -432,7 +508,7 @@ static void lcd_implementation_status_screen()
if
(
tTarget
<
10
)
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
lcd
.
setCursor
(
10
,
0
);
# if EXTRUDERS > 1 && !defined(SINGLENOZZLE)
...
...
@@ -450,8 +526,8 @@ static void lcd_implementation_status_screen()
lcd_printPGM
(
PSTR
(
LCD_STR_DEGREE
" "
));
if
(
tTarget
<
10
)
lcd
.
print
(
' '
);
# endif
//EXTRUDERS > 1
|| TEMP_SENSOR_BED != 0
#endif//LCD_WIDTH > 19
# endif
(EXTRUDERS > 1 && !defined(SINGLENOZZLE))
|| TEMP_SENSOR_BED != 0
#endif
//LCD_WIDTH > 19
#if LCD_HEIGHT > 2
//Lines 2 for 4 line LCD
...
...
@@ -496,7 +572,7 @@ static void lcd_implementation_status_screen()
# endif//LCD_WIDTH > 19
lcd
.
setCursor
(
LCD_WIDTH
-
8
,
1
);
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
#if LCD_HEIGHT > 3
...
...
@@ -528,23 +604,46 @@ static void lcd_implementation_status_screen()
}
#endif
//Display both Status message line and Filament display on the last line
#ifdef FILAMENT_LCD_DISPLAY
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
.
print
(
ftostr12ns
(
filament_width_meas
));
lcd_printPGM
(
PSTR
(
" V"
));
lcd
.
print
(
itostr3
(
100
.
0
*
volumetric_multiplier
[
FILAMENT_SENSOR_EXTRUDER_NUM
]));
lcd
.
print
(
'%'
);
// 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
;
}
#else
lcd
.
setCursor
(
0
,
LCD_HEIGHT
-
1
);
lcd
.
print
(
lcd_status_message
);
#endif
lcd
.
print
(
msg
);
return
;
}
}
//card.isFileOpen
#endif //LCD_PROGRESS_BAR
//Display both Status message line and Filament display on the last line
#ifdef FILAMENT_LCD_DISPLAY
if
(
message_millis
+
5000
<=
millis
())
{
//display any status for the first 5 sec after screen is initiated
lcd_printPGM
(
PSTR
(
"Dia "
));
lcd
.
print
(
ftostr12ns
(
filament_width_meas
));
lcd_printPGM
(
PSTR
(
" V"
));
lcd
.
print
(
itostr3
(
100
.
0
*
volumetric_multiplier
[
FILAMENT_SENSOR_EXTRUDER_NUM
]));
lcd
.
print
(
'%'
);
return
;
}
#endif //FILAMENT_LCD_DISPLAY
lcd
.
print
(
lcd_status_message
);
}
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()
}
#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
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