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
* 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"
......
......@@ -474,7 +474,7 @@ unsigned long printer_usage_seconds;
Servo servo[NUM_SERVOS];
#endif
#ifdef CHDK
#if HAS_CHDK
unsigned long chdkHigh = 0;
boolean chdkActive = false;
#endif
......@@ -3071,7 +3071,7 @@ inline void gcode_G28() {
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
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS); // Set destination away from bed
......@@ -5525,14 +5525,13 @@ inline void gcode_M226() {
} // code_seen('P')
}
#if defined(CHDK) || HAS_PHOTOGRAPH
#if HAS_CHDK || HAS_PHOTOGRAPH
/**
* M240: Trigger a camera by emulating a Canon RC-1
* See http://www.doc-diy.net/photo/rc-1_hacked/
* M240: Trigger a camera
*/
inline void gcode_M240() {
#ifdef CHDK
OUT_WRITE(CHDK, HIGH);
#if HAS_CHDK
OUT_WRITE(CHDK_PIN, HIGH);
chdkHigh = millis();
chdkActive = true;
#elif HAS_PHOTOGRAPH
......@@ -5551,9 +5550,9 @@ inline void gcode_M226() {
WRITE(PHOTOGRAPH_PIN, LOW);
_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
/**
......@@ -5613,7 +5612,7 @@ inline void gcode_M226() {
#endif // HAS_BUZZER
#ifdef PIDTEMP
#if ENABLED(PIDTEMP)
/**
* M301: Set PID parameters P I D
*/
......@@ -5653,7 +5652,7 @@ inline void gcode_M226() {
#endif // PREVENT_DANGEROUS_EXTRUDE
#if defined(PIDTEMP) || defined(PIDTEMPBED)
#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
/**
* M303: PID relay autotune
* S<temperature> sets the target temperature. (default target temperature = 150C)
......@@ -5668,7 +5667,7 @@ inline void gcode_M226() {
}
#endif
#ifdef PIDTEMPBED
#if ENABLED(PIDTEMPBED)
// M304: Set bed PID parameters P I and D
inline void gcode_M304() {
if (code_seen('P')) bedKp = code_value();
......@@ -6355,7 +6354,7 @@ inline void gcode_M907() {
}
#endif // HAS_DIGIPOTSS
#ifdef NPR2
#if ENABLED(NPR2)
/**
* M997: Cxx Move Carter xx gradi
*/
......@@ -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
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/
gcode_M240(); break;
#endif // CHDK || PHOTOGRAPH_PIN
#endif // HAS_CHDK || HAS_PHOTOGRAPH
#if defined(DOGLCD) && LCD_CONTRAST >= 0
case 250: // M250 Set LCD contrast value: C<value> (value 0..63)
......@@ -6950,7 +6949,7 @@ void process_next_command() {
gcode_M300(); break;
#endif // HAS_BUZZER
#ifdef PIDTEMP
#if ENABLED(PIDTEMP)
case 301: // M301
gcode_M301(); break;
#endif // PIDTEMP
......@@ -6960,12 +6959,12 @@ void process_next_command() {
gcode_M302(); break;
#endif // PREVENT_DANGEROUS_EXTRUDE
#if defined(PIDTEMP) || defined(PIDTEMPBED)
#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
case 303: // M303 PID autotune
gcode_M303(); break;
#endif
#ifdef PIDTEMPBED
#if ENABLED(PIDTEMPBED)
case 304: // M304
gcode_M304(); break;
#endif // PIDTEMPBED
......@@ -7645,10 +7644,10 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#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) {
chdkActive = false;
WRITE(CHDK, LOW);
WRITE(CHDK_PIN, LOW);
}
#endif
......@@ -7778,7 +7777,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
}
#endif
#if defined(SDSUPPORT) && defined(SD_SETTINGS)
#if ENABLED(SDSUPPORT) && ENABLED(SD_SETTINGS)
if(IS_SD_INSERTED && !IS_SD_PRINTING) {
if (!config_readed) {
ConfigSD_RetrieveSettings(true);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -747,7 +747,7 @@ void Config_ResetDefault() {
if (!forReplay) {
ECHO_LM(DB, "PID settings:");
}
#ifdef PIDTEMP
#if ENABLED(PIDTEMP)
for (int e = 0; e < HOTENDS; e++) {
ECHO_SMV(DB, " M301 E", e);
ECHO_MV(" P", PID_PARAM(Kp, e));
......@@ -755,7 +755,7 @@ void Config_ResetDefault() {
ECHO_EMV(" D", unscalePID_d(PID_PARAM(Kd, e)));
}
#endif
#ifdef PIDTEMPBED
#if ENABLED(PIDTEMPBED)
ECHO_SMV(DB, " M304 P", bedKp); // for compatibility with hosts, only echos values for E0
ECHO_MV(" I", unscalePID_i(bedKi));
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
#endif //EXTRUDERS
#endif //MKR4
#ifdef NPR2
#if ENABLED(NPR2)
#define E_MIN_PIN -1
#endif //NPR2
#endif
#ifdef LASERBEAM
#if ENABLED(LASERBEAM)
#define LASER_PWR_PIN 41
#define LASER_TTL_PIN 42
#endif
#ifdef FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FILRUNOUT_PIN -1
#endif
#ifdef FILAMENT_SENSOR
// FMM added for Filament Extruder
//define analog pin for the filament width sensor input
//Use the RAMPS 1.4 Analog input 5 on the AUX2 connector
#if ENABLED(FILAMENT_SENSOR)
#define FILWIDTH_PIN -1 // ANALOG NUMBERING
#endif
#ifdef POWER_CONSUMPTION
#if ENABLED(POWER_CONSUMPTION)
#define POWER_CONSUMPTION_PIN -1 // ANALOG NUMBERING
#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;
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
if (labs(de) > axis_steps_per_unit[E_AXIS + extruder] * EXTRUDE_MAXLENGTH) {
#ifdef EASY_LOAD
#if ENABLED(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
......
......@@ -344,7 +344,7 @@ static void updateTemperaturesFromRawValues();
}
if (cycles > ncycles) {
ECHO_LM(DB, MSG_PID_AUTOTUNE_FINISHED);
#ifdef PIDTEMP
#if ENABLED(PIDTEMP)
if (hotend >= 0) {
PID_PARAM(Kp, hotend) = Kp_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