Commit ba005c3b authored by Simone Primarosa's avatar Simone Primarosa

Update 4.1.6 dev

Release testata del nuovo assetto delle configurazioni.
Le configurazioni e le feature sono catalogate e tutte  sufficientemente
documentate.
Il tutto è NON TESTATO e WORK IN PROGESS
parent 9a3533ea
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* /*
* This file is a placeholder for a file which could be distributed in an archive * This file is a placeholder for a file which could be distributed in an archive
* It takes the place of an automatically created "_Version.h" which is generated during the build process * It takes the place of an automatically created "_version.h" which is generated during the build process
*/ */
// #error "You must specify the following parameters related to your distribution" // #error "You must specify the following parameters related to your distribution"
......
...@@ -474,7 +474,7 @@ unsigned long printer_usage_seconds; ...@@ -474,7 +474,7 @@ unsigned long printer_usage_seconds;
Servo servo[NUM_SERVOS]; Servo servo[NUM_SERVOS];
#endif #endif
#ifdef CHDK #if HAS_CHDK
unsigned long chdkHigh = 0; unsigned long chdkHigh = 0;
boolean chdkActive = false; boolean chdkActive = false;
#endif #endif
...@@ -3071,7 +3071,7 @@ inline void gcode_G28() { ...@@ -3071,7 +3071,7 @@ inline void gcode_G28() {
print_xyz("> HOMEAXIS(Z) > current_position", current_position); print_xyz("> HOMEAXIS(Z) > current_position", current_position);
} }
#elif DISABLED(Z_SAFE_HOMING) && defined(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0 #elif DISABLED(Z_SAFE_HOMING) && ENABLED(Z_RAISE_BEFORE_HOMING) && Z_RAISE_BEFORE_HOMING > 0
// Raise Z before homing any other axes // Raise Z before homing any other axes
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
...@@ -5525,14 +5525,13 @@ inline void gcode_M226() { ...@@ -5525,14 +5525,13 @@ inline void gcode_M226() {
} // code_seen('P') } // code_seen('P')
} }
#if defined(CHDK) || HAS_PHOTOGRAPH #if HAS_CHDK || HAS_PHOTOGRAPH
/** /**
* M240: Trigger a camera by emulating a Canon RC-1 * M240: Trigger a camera
* See http://www.doc-diy.net/photo/rc-1_hacked/
*/ */
inline void gcode_M240() { inline void gcode_M240() {
#ifdef CHDK #if HAS_CHDK
OUT_WRITE(CHDK, HIGH); OUT_WRITE(CHDK_PIN, HIGH);
chdkHigh = millis(); chdkHigh = millis();
chdkActive = true; chdkActive = true;
#elif HAS_PHOTOGRAPH #elif HAS_PHOTOGRAPH
...@@ -5551,9 +5550,9 @@ inline void gcode_M226() { ...@@ -5551,9 +5550,9 @@ inline void gcode_M226() {
WRITE(PHOTOGRAPH_PIN, LOW); WRITE(PHOTOGRAPH_PIN, LOW);
_delay_ms(PULSE_LENGTH); _delay_ms(PULSE_LENGTH);
} }
#endif // !CHDK && HAS_PHOTOGRAPH #endif // !HAS_CHDK && HAS_PHOTOGRAPH
} }
#endif // CHDK || PHOTOGRAPH_PIN #endif // HAS_CHDK || PHOTOGRAPH_PIN
#ifdef HAS_LCD_CONTRAST #ifdef HAS_LCD_CONTRAST
/** /**
...@@ -5613,7 +5612,7 @@ inline void gcode_M226() { ...@@ -5613,7 +5612,7 @@ inline void gcode_M226() {
#endif // HAS_BUZZER #endif // HAS_BUZZER
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
/** /**
* M301: Set PID parameters P I D * M301: Set PID parameters P I D
*/ */
...@@ -5653,7 +5652,7 @@ inline void gcode_M226() { ...@@ -5653,7 +5652,7 @@ inline void gcode_M226() {
#endif // PREVENT_DANGEROUS_EXTRUDE #endif // PREVENT_DANGEROUS_EXTRUDE
#if defined(PIDTEMP) || defined(PIDTEMPBED) #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
/** /**
* M303: PID relay autotune * M303: PID relay autotune
* S<temperature> sets the target temperature. (default target temperature = 150C) * S<temperature> sets the target temperature. (default target temperature = 150C)
...@@ -5668,7 +5667,7 @@ inline void gcode_M226() { ...@@ -5668,7 +5667,7 @@ inline void gcode_M226() {
} }
#endif #endif
#ifdef PIDTEMPBED #if ENABLED(PIDTEMPBED)
// M304: Set bed PID parameters P I and D // M304: Set bed PID parameters P I and D
inline void gcode_M304() { inline void gcode_M304() {
if (code_seen('P')) bedKp = code_value(); if (code_seen('P')) bedKp = code_value();
...@@ -6355,7 +6354,7 @@ inline void gcode_M907() { ...@@ -6355,7 +6354,7 @@ inline void gcode_M907() {
} }
#endif // HAS_DIGIPOTSS #endif // HAS_DIGIPOTSS
#ifdef NPR2 #if ENABLED(NPR2)
/** /**
* M997: Cxx Move Carter xx gradi * M997: Cxx Move Carter xx gradi
*/ */
...@@ -6930,10 +6929,10 @@ void process_next_command() { ...@@ -6930,10 +6929,10 @@ void process_next_command() {
case 226: // M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required case 226: // M226 P<pin number> S<pin state>- Wait until the specified pin reaches the state required
gcode_M226(); break; gcode_M226(); break;
#if defined(CHDK) || (defined(PHOTOGRAPH_PIN) && PHOTOGRAPH_PIN > -1) #if HAS_CHDK || HAS_PHOTOGRAPH
case 240: // M240 Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/ case 240: // M240 Triggers a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
gcode_M240(); break; gcode_M240(); break;
#endif // CHDK || PHOTOGRAPH_PIN #endif // HAS_CHDK || HAS_PHOTOGRAPH
#if defined(DOGLCD) && LCD_CONTRAST >= 0 #if defined(DOGLCD) && LCD_CONTRAST >= 0
case 250: // M250 Set LCD contrast value: C<value> (value 0..63) case 250: // M250 Set LCD contrast value: C<value> (value 0..63)
...@@ -6950,7 +6949,7 @@ void process_next_command() { ...@@ -6950,7 +6949,7 @@ void process_next_command() {
gcode_M300(); break; gcode_M300(); break;
#endif // HAS_BUZZER #endif // HAS_BUZZER
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
case 301: // M301 case 301: // M301
gcode_M301(); break; gcode_M301(); break;
#endif // PIDTEMP #endif // PIDTEMP
...@@ -6960,12 +6959,12 @@ void process_next_command() { ...@@ -6960,12 +6959,12 @@ void process_next_command() {
gcode_M302(); break; gcode_M302(); break;
#endif // PREVENT_DANGEROUS_EXTRUDE #endif // PREVENT_DANGEROUS_EXTRUDE
#if defined(PIDTEMP) || defined(PIDTEMPBED) #if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
case 303: // M303 PID autotune case 303: // M303 PID autotune
gcode_M303(); break; gcode_M303(); break;
#endif #endif
#ifdef PIDTEMPBED #if ENABLED(PIDTEMPBED)
case 304: // M304 case 304: // M304
gcode_M304(); break; gcode_M304(); break;
#endif // PIDTEMPBED #endif // PIDTEMPBED
...@@ -7645,10 +7644,10 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7645,10 +7644,10 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#endif #endif
} }
#ifdef CHDK // Check if pin should be set to LOW after M240 set it to HIGH #if HAS_CHDK // Check if pin should be set to LOW after M240 set it to HIGH
if (chdkActive && ms > chdkHigh + CHDK_DELAY) { if (chdkActive && ms > chdkHigh + CHDK_DELAY) {
chdkActive = false; chdkActive = false;
WRITE(CHDK, LOW); WRITE(CHDK_PIN, LOW);
} }
#endif #endif
...@@ -7778,7 +7777,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7778,7 +7777,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
} }
#endif #endif
#if defined(SDSUPPORT) && defined(SD_SETTINGS) #if ENABLED(SDSUPPORT) && ENABLED(SD_SETTINGS)
if(IS_SD_INSERTED && !IS_SD_PRINTING) { if(IS_SD_INSERTED && !IS_SD_PRINTING) {
if (!config_readed) { if (!config_readed) {
ConfigSD_RetrieveSettings(true); ConfigSD_RetrieveSettings(true);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -747,7 +747,7 @@ void Config_ResetDefault() { ...@@ -747,7 +747,7 @@ void Config_ResetDefault() {
if (!forReplay) { if (!forReplay) {
ECHO_LM(DB, "PID settings:"); ECHO_LM(DB, "PID settings:");
} }
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
for (int e = 0; e < HOTENDS; e++) { for (int e = 0; e < HOTENDS; e++) {
ECHO_SMV(DB, " M301 E", e); ECHO_SMV(DB, " M301 E", e);
ECHO_MV(" P", PID_PARAM(Kp, e)); ECHO_MV(" P", PID_PARAM(Kp, e));
...@@ -755,7 +755,7 @@ void Config_ResetDefault() { ...@@ -755,7 +755,7 @@ void Config_ResetDefault() {
ECHO_EMV(" D", unscalePID_d(PID_PARAM(Kd, e))); ECHO_EMV(" D", unscalePID_d(PID_PARAM(Kd, e)));
} }
#endif #endif
#ifdef PIDTEMPBED #if ENABLED(PIDTEMPBED)
ECHO_SMV(DB, " M304 P", bedKp); // for compatibility with hosts, only echos values for E0 ECHO_SMV(DB, " M304 P", bedKp); // for compatibility with hosts, only echos values for E0
ECHO_MV(" I", unscalePID_i(bedKi)); ECHO_MV(" I", unscalePID_i(bedKi));
ECHO_EMV(" D", unscalePID_d(bedKd)); ECHO_EMV(" D", unscalePID_d(bedKd));
......
#ifndef MECHANISM_H
#define MECHANISM_H
#define MECH_UNKNOWN -1
#define MECH_CARTESIAN 0
#define MECH_COREXY 1
#define MECH_COREXZ 2
#define MECH_DELTA 3
#define MECH_SCARA 4
//Keept for legacy support
#define CARTESIAN MECH_CARTESIAN
#define COREXY MECH_COREXY
#define COREXZ MECH_COREXZ
#define DELTA MECH_DELTA
#define SCARA MECH_SCARA
#define MECHANISM MECH_UNKNOWN
#define MECH_TYPE(mechanism) (MEACHANISM == mechanism)
#endif //__MECHANISM_H
...@@ -5281,29 +5281,45 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5281,29 +5281,45 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif //EXTRUDERS #endif //EXTRUDERS
#endif //MKR4 #endif //MKR4
#ifdef NPR2 #if ENABLED(NPR2)
#define E_MIN_PIN -1 #define E_MIN_PIN -1
#endif //NPR2 #endif
#ifdef LASERBEAM #if ENABLED(LASERBEAM)
#define LASER_PWR_PIN 41 #define LASER_PWR_PIN 41
#define LASER_TTL_PIN 42 #define LASER_TTL_PIN 42
#endif #endif
#ifdef FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FILRUNOUT_PIN -1 #define FILRUNOUT_PIN -1
#endif #endif
#ifdef FILAMENT_SENSOR #if ENABLED(FILAMENT_SENSOR)
// FMM added for Filament Extruder #define FILWIDTH_PIN -1 // ANALOG NUMBERING
//define analog pin for the filament width sensor input
//Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
#define FILWIDTH_PIN -1 // ANALOG NUMBERING
#endif #endif
#ifdef POWER_CONSUMPTION #if ENABLED(POWER_CONSUMPTION)
#define POWER_CONSUMPTION_PIN -1 // ANALOG NUMBERING #define POWER_CONSUMPTION_PIN -1 // ANALOG NUMBERING
#endif #endif
#if ENABLED(PHOTOGRAPH)
#define PHOTOGRAPH_PIN -1
#endif
#if ENABLED(CHDK)
#define CHDK_PIN -1
#endif
#if ENABLED(CONTROLLERFAN)
#define CONTROLLERFAN_PIN -1
#endif
#if ENABLED(EXTRUDER_AUTO_FAN)
#define EXTRUDER_0_AUTO_FAN_PIN -1
#define EXTRUDER_1_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_3_AUTO_FAN_PIN -1
#endif
/****************************************************************************************/ /****************************************************************************************/
......
...@@ -544,7 +544,7 @@ float junction_deviation = 0.1; ...@@ -544,7 +544,7 @@ float junction_deviation = 0.1;
#if ENABLED(PREVENT_LENGTHY_EXTRUDE) #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
if (labs(de) > axis_steps_per_unit[E_AXIS + extruder] * EXTRUDE_MAXLENGTH) { if (labs(de) > axis_steps_per_unit[E_AXIS + extruder] * EXTRUDE_MAXLENGTH) {
#ifdef EASY_LOAD #if ENABLED(EASY_LOAD)
if (!allow_lengthy_extrude_once) { if (!allow_lengthy_extrude_once) {
#endif #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
......
...@@ -344,7 +344,7 @@ static void updateTemperaturesFromRawValues(); ...@@ -344,7 +344,7 @@ static void updateTemperaturesFromRawValues();
} }
if (cycles > ncycles) { if (cycles > ncycles) {
ECHO_LM(DB, MSG_PID_AUTOTUNE_FINISHED); ECHO_LM(DB, MSG_PID_AUTOTUNE_FINISHED);
#ifdef PIDTEMP #if ENABLED(PIDTEMP)
if (hotend >= 0) { if (hotend >= 0) {
PID_PARAM(Kp, hotend) = Kp_temp; PID_PARAM(Kp, hotend) = Kp_temp;
PID_PARAM(Ki, hotend) = scalePID_i(Ki_temp); PID_PARAM(Ki, hotend) = scalePID_i(Ki_temp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment