Commit 4b971e24 authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'refs/remotes/origin/master' into dev

parents 7dcff365 f9ea62ef
......@@ -556,7 +556,7 @@
* Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant *
* so: v ^ 2 is proportional to number of steps we advance the extruder *
* *
* This feature is obsolate needs update *
* This feature is obsolete needs update *
* Uncomment ADVANCE to enable this feature *
* *
*****************************************************************************************/
......@@ -564,6 +564,7 @@
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 1.75
#define STEPS_PER_CUBIC_MM_E 0.85
/*****************************************************************************************/
......
......@@ -6,6 +6,5 @@
#define BUILD_VERSION FIRMWARE_NAME "_" SHORT_BUILD_VERSION
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found
#define FIRMWARE_BIT_BOARDS 8
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
......@@ -96,7 +96,7 @@ const int sensitive_pins[] = SENSITIVE_PINS; ///< Sensitive pin list for M42
// Inactivity shutdown
millis_t previous_cmd_ms = 0;
static millis_t max_inactive_time = 0;
static millis_t stepper_inactive_time = DEFAULT_STEPPER_DEACTIVE_TIME * 1000UL;
static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
millis_t print_job_start_ms = 0; ///< Print job start time
millis_t print_job_stop_ms = 0; ///< Print job stop time
static uint8_t target_extruder;
......@@ -1338,11 +1338,11 @@ static void clean_up_after_endstop_move() {
do_blocking_move_to_z(z_before); // this also updates current_position
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(INFO, "> do_blocking_move_to_xy ", x - X_PROBE_OFFSET_FROM_EXTRUDER);
ECHO_SMV(INFO, "> do_blocking_move_to_xy ", x - (X_PROBE_OFFSET_FROM_EXTRUDER));
ECHO_EMV(", ", y - Y_PROBE_OFFSET_FROM_EXTRUDER);
}
do_blocking_move_to_xy(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - Y_PROBE_OFFSET_FROM_EXTRUDER); // this also updates current_position
do_blocking_move_to_xy(x - X_PROBE_OFFSET_FROM_EXTRUDER, y - (Y_PROBE_OFFSET_FROM_EXTRUDER)); // this also updates current_position
#if HASNT(Z_PROBE_SLED)
if (probe_action & ProbeDeploy) {
......@@ -2723,14 +2723,14 @@ static void clean_up_after_endstop_move() {
#if HAS(TEMP_BED)
ECHO_M(" " SERIAL_BAT);
#if ENABLED(BED_WATTS)
ECHO_VM((BED_WATTS * getHeaterPower(-1)) / 127, "W");
ECHO_VM(((BED_WATTS) * getHeaterPower(-1)) / 127, "W");
#else
ECHO_V(getHeaterPower(-1));
#endif
#endif
ECHO_M(" " SERIAL_AT ":");
#if ENABLED(HOTEND_WATTS)
ECHO_VM((HOTEND_WATTS * getHeaterPower(target_extruder)) / 127, "W");
ECHO_VM(((HOTEND_WATTS) * getHeaterPower(target_extruder)) / 127, "W");
#else
ECHO_V(getHeaterPower(target_extruder));
#endif
......@@ -2739,7 +2739,7 @@ static void clean_up_after_endstop_move() {
ECHO_MV(" " SERIAL_AT, h);
ECHO_C(':');
#if ENABLED(HOTEND_WATTS)
ECHO_VM((HOTEND_WATTS * getHeaterPower(h)) / 127, "W");
ECHO_VM(((HOTEND_WATTS) * getHeaterPower(h)) / 127, "W");
#else
ECHO_V(getHeaterPower(h));
#endif
......@@ -2766,7 +2766,7 @@ inline void wait_heater() {
#if ENABLED(TEMP_RESIDENCY_TIME)
long residency_start_ms = -1;
// Loop until the temperature has stabilized
#define TEMP_CONDITIONS (residency_start_ms < 0 || now < residency_start_ms + TEMP_RESIDENCY_TIME * 1000UL)
#define TEMP_CONDITIONS (residency_start_ms < 0 || now < residency_start_ms + (TEMP_RESIDENCY_TIME) * 1000UL)
#else
// Loop until the temperature is exactly on target
#define TEMP_CONDITIONS (degHotend(target_extruder) != degTargetHotend(target_extruder))
......@@ -3048,7 +3048,7 @@ inline void gcode_G28() {
sync_plan_position();
// Move all carriages up together until the first endstop is hit.
for (int i = X_AXIS; i <= Z_AXIS; i++) destination[i] = 3 * Z_MAX_LENGTH;
for (int i = X_AXIS; i <= Z_AXIS; i++) destination[i] = 3 * (Z_MAX_LENGTH);
feedrate = 1.732 * homing_feedrate[X_AXIS];
line_to_destination();
st_synchronize();
......@@ -3084,7 +3084,7 @@ inline void gcode_G28() {
#elif DISABLED(Z_SAFE_HOMING) && ENABLED(AUTO_BED_LEVELING_FEATURE) && 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
destination[Z_AXIS] = -(Z_RAISE_BEFORE_HOMING) * home_dir(Z_AXIS); // Set destination away from bed
if (debugLevel & DEBUG_INFO) {
ECHO_SMV(INFO, "Raise Z (before homing) by ", (float)Z_RAISE_BEFORE_HOMING);
print_xyz(" > (home_all_axis || homeZ) > destination", destination);
......@@ -3303,9 +3303,9 @@ inline void gcode_G28() {
//
// NOTE: If current_position[X_AXIS] or current_position[Y_AXIS] were set above
// then this may not work as expected.
destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - X_PROBE_OFFSET_FROM_EXTRUDER);
destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - Y_PROBE_OFFSET_FROM_EXTRUDER);
destination[Z_AXIS] = -Z_RAISE_BEFORE_HOMING * home_dir(Z_AXIS);
destination[X_AXIS] = round(Z_SAFE_HOMING_X_POINT - (X_PROBE_OFFSET_FROM_EXTRUDER));
destination[Y_AXIS] = round(Z_SAFE_HOMING_Y_POINT - (Y_PROBE_OFFSET_FROM_EXTRUDER));
destination[Z_AXIS] = -(Z_RAISE_BEFORE_HOMING) * home_dir(Z_AXIS); // Set destination away from bed
feedrate = xy_travel_speed;
if (debugLevel & DEBUG_INFO) {
......@@ -3332,16 +3332,16 @@ inline void gcode_G28() {
// Make sure the probe is within the physical limits
// NOTE: This doesn't necessarily ensure the probe is also within the bed!
float cpx = current_position[X_AXIS], cpy = current_position[Y_AXIS];
if ( cpx >= X_MIN_POS - X_PROBE_OFFSET_FROM_EXTRUDER
&& cpx <= X_MAX_POS - X_PROBE_OFFSET_FROM_EXTRUDER
&& cpy >= Y_MIN_POS - Y_PROBE_OFFSET_FROM_EXTRUDER
&& cpy <= Y_MAX_POS - Y_PROBE_OFFSET_FROM_EXTRUDER) {
if ( cpx >= X_MIN_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
&& cpx <= X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
&& cpy >= Y_MIN_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
&& cpy <= Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)) {
// Set the plan current position to X, Y, 0
current_position[Z_AXIS] = 0;
plan_set_position(cpx, cpy, 0, current_position[E_AXIS]);
// Set Z destination away from bed and raise the axis
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
feedrate = max_feedrate[Z_AXIS] * 60;
if (debugLevel & DEBUG_INFO) {
......@@ -3534,30 +3534,30 @@ inline void gcode_G28() {
back_probe_bed_position = code_seen('B') ? code_value_short() : BACK_PROBE_BED_POSITION;
bool left_out_l = left_probe_bed_position < MIN_PROBE_X,
left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - MIN_PROBE_EDGE,
left_out = left_out_l || left_probe_bed_position > right_probe_bed_position - (MIN_PROBE_EDGE),
right_out_r = right_probe_bed_position > MAX_PROBE_X,
right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + MIN_PROBE_EDGE,
right_out = right_out_r || right_probe_bed_position < left_probe_bed_position + (MIN_PROBE_EDGE),
front_out_f = front_probe_bed_position < MIN_PROBE_Y,
front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - MIN_PROBE_EDGE,
front_out = front_out_f || front_probe_bed_position > back_probe_bed_position - (MIN_PROBE_EDGE),
back_out_b = back_probe_bed_position > MAX_PROBE_Y,
back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + MIN_PROBE_EDGE;
back_out = back_out_b || back_probe_bed_position < front_probe_bed_position + (MIN_PROBE_EDGE);
if (left_out || right_out || front_out || back_out) {
if (left_out) {
out_of_range_error(PSTR("(L)eft"));
left_probe_bed_position = left_out_l ? MIN_PROBE_X : right_probe_bed_position - MIN_PROBE_EDGE;
left_probe_bed_position = left_out_l ? MIN_PROBE_X : right_probe_bed_position - (MIN_PROBE_EDGE);
}
if (right_out) {
out_of_range_error(PSTR("(R)ight"));
right_probe_bed_position = right_out_r ? MAX_PROBE_X : left_probe_bed_position + MIN_PROBE_EDGE;
right_probe_bed_position = right_out_r ? MAX_PROBE_X : left_probe_bed_position + (MIN_PROBE_EDGE);
}
if (front_out) {
out_of_range_error(PSTR("(F)ront"));
front_probe_bed_position = front_out_f ? MIN_PROBE_Y : back_probe_bed_position - MIN_PROBE_EDGE;
front_probe_bed_position = front_out_f ? MIN_PROBE_Y : back_probe_bed_position - (MIN_PROBE_EDGE);
}
if (back_out) {
out_of_range_error(PSTR("(B)ack"));
back_probe_bed_position = back_out_b ? MAX_PROBE_Y : front_probe_bed_position + MIN_PROBE_EDGE;
back_probe_bed_position = back_out_b ? MAX_PROBE_Y : front_probe_bed_position + (MIN_PROBE_EDGE);
}
return;
}
......@@ -4525,7 +4525,7 @@ inline void gcode_M42() {
bool deploy_probe_for_each_reading = code_seen('E') || code_seen('e');
if (code_seen('X') || code_seen('x')) {
X_probe_location = code_value() - X_PROBE_OFFSET_FROM_EXTRUDER;
X_probe_location = code_value() - (X_PROBE_OFFSET_FROM_EXTRUDER);
if (X_probe_location < X_MIN_POS || X_probe_location > X_MAX_POS) {
out_of_range_error(PSTR("X"));
return;
......@@ -4533,7 +4533,7 @@ inline void gcode_M42() {
}
if (code_seen('Y') || code_seen('y')) {
Y_probe_location = code_value() - Y_PROBE_OFFSET_FROM_EXTRUDER;
Y_probe_location = code_value() - (Y_PROBE_OFFSET_FROM_EXTRUDER);
if (Y_probe_location < Y_MIN_POS || Y_probe_location > Y_MAX_POS) {
out_of_range_error(PSTR("Y"));
return;
......@@ -4599,7 +4599,7 @@ inline void gcode_M42() {
if (n_legs) {
millis_t ms = millis();
double radius = ms % (X_MAX_LENGTH / 4), // limit how far out to go
double radius = ms % ((X_MAX_LENGTH) / 4), // limit how far out to go
theta = RADIANS(ms % 360L);
float dir = (ms & 0x0001) ? 1 : -1; // clockwise or counter clockwise
......@@ -6953,7 +6953,7 @@ inline void gcode_M907() {
// this one uses actual amps in floating point
for (uint8_t i = 0; i < NUM_AXIS; i++) if(code_seen(axis_codes[i])) digipot_i2c_set_current(i, code_value());
// for each additional extruder (named B,C,D,E..., channels 4,5,6,7...)
for (uint8_t i = NUM_AXIS; i < DIGIPOT_I2C_NUM_CHANNELS; i++) if(code_seen('B'+i-NUM_AXIS)) digipot_i2c_set_current(i, code_value());
for (uint8_t i = NUM_AXIS; i < DIGIPOT_I2C_NUM_CHANNELS; i++) if(code_seen('B' + i - (NUM_AXIS))) digipot_i2c_set_current(i, code_value());
#endif
}
......@@ -8068,7 +8068,7 @@ void plan_arc(
float mm_of_travel = hypot(angular_travel*radius, fabs(linear_travel));
if (mm_of_travel < 0.001) { return; }
uint16_t segments = floor(mm_of_travel / MM_PER_ARC_SEGMENT);
uint16_t segments = floor(mm_of_travel / (MM_PER_ARC_SEGMENT));
if (segments == 0) segments = 1;
float theta_per_segment = angular_travel/segments;
......@@ -8414,61 +8414,62 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#endif
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
if (ms > previous_cmd_ms + EXTRUDER_RUNOUT_SECONDS * 1000)
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
bool oldstatus;
switch(active_extruder) {
case 0:
oldstatus = E0_ENABLE_READ;
enable_e0();
break;
#if EXTRUDERS > 1
case 1:
oldstatus = E1_ENABLE_READ;
enable_e1();
if (ms > previous_cmd_ms + (EXTRUDER_RUNOUT_SECONDS) * 1000) {
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
bool oldstatus;
switch(active_extruder) {
case 0:
oldstatus = E0_ENABLE_READ;
enable_e0();
break;
#if EXTRUDERS > 2
case 2:
oldstatus = E2_ENABLE_READ;
enable_e2();
#if EXTRUDERS > 1
case 1:
oldstatus = E1_ENABLE_READ;
enable_e1();
break;
#if EXTRUDERS > 3
case 3:
oldstatus = E3_ENABLE_READ;
enable_e3();
#if EXTRUDERS > 2
case 2:
oldstatus = E2_ENABLE_READ;
enable_e2();
break;
#if EXTRUDERS > 3
case 3:
oldstatus = E3_ENABLE_READ;
enable_e3();
break;
#endif
#endif
#endif
#endif
}
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
destination[E_AXIS] + EXTRUDER_RUNOUT_EXTRUDE * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS],
EXTRUDER_RUNOUT_SPEED / 60. * EXTRUDER_RUNOUT_ESTEPS / axis_steps_per_unit[E_AXIS], active_extruder, active_driver);
current_position[E_AXIS] = oldepos;
destination[E_AXIS] = oldedes;
plan_set_e_position(oldepos);
previous_cmd_ms = ms; // refresh_cmd_timeout()
st_synchronize();
switch(active_extruder) {
case 0:
E0_ENABLE_WRITE(oldstatus);
break;
#if EXTRUDERS > 1
case 1:
E1_ENABLE_WRITE(oldstatus);
}
float oldepos = current_position[E_AXIS], oldedes = destination[E_AXIS];
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS],
destination[E_AXIS] + (EXTRUDER_RUNOUT_EXTRUDE) * (EXTRUDER_RUNOUT_ESTEPS) / axis_steps_per_unit[E_AXIS],
(EXTRUDER_RUNOUT_SPEED) / 60. * (EXTRUDER_RUNOUT_ESTEPS) / axis_steps_per_unit[E_AXIS], active_extruder, active_driver);
current_position[E_AXIS] = oldepos;
destination[E_AXIS] = oldedes;
plan_set_e_position(oldepos);
previous_cmd_ms = ms; // refresh_cmd_timeout()
st_synchronize();
switch(active_extruder) {
case 0:
E0_ENABLE_WRITE(oldstatus);
break;
#if EXTRUDERS > 2
case 2:
E2_ENABLE_WRITE(oldstatus);
#if EXTRUDERS > 1
case 1:
E1_ENABLE_WRITE(oldstatus);
break;
#if EXTRUDERS > 3
case 3:
E3_ENABLE_WRITE(oldstatus);
#if EXTRUDERS > 2
case 2:
E2_ENABLE_WRITE(oldstatus);
break;
#if EXTRUDERS > 3
case 3:
E3_ENABLE_WRITE(oldstatus);
break;
#endif
#endif
#endif
#endif
}
}
}
#endif
......
/****************************************************************************************
* 403 - 404
* Arduino pin assignment
* Ramps - FD v1 & v2
****************************************************************************************/
#define KNOWN_BOARD
#ifndef __SAM3X8E__
#error Oops! Make sure you have 'Arduino Due' selected from the 'Tools -> Boards' menu.
#endif
#if MB(RAMPS_FD_V1)
#define RAMPS_FD_V1
#define INVERTED_HEATER_PINS
#define INVERTED_BED_PINS
// No EEPROM
// Use 4k7 thermistor tables
#else
#define RAMPS_FD_V2
// EEPROM supported
// Use 1k thermistor tables
#endif
#define ORIG_X_STEP_PIN 63
#define ORIG_X_DIR_PIN 62
#define ORIG_X_ENABLE_PIN 48
#define ORIG_X_MIN_PIN 22
#define ORIG_X_MAX_PIN 30
#define ORIG_Y_STEP_PIN 65
#define ORIG_Y_DIR_PIN 64
#define ORIG_Y_ENABLE_PIN 46
#define ORIG_Y_MIN_PIN 24
#define ORIG_Y_MAX_PIN 38
#define ORIG_Z_STEP_PIN 67
#define ORIG_Z_DIR_PIN 66
#define ORIG_Z_ENABLE_PIN 44
#define ORIG_Z_MIN_PIN 26
#define ORIG_Z_MAX_PIN 34
#define ORIG_E0_STEP_PIN 36
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 42
#define ORIG_E1_STEP_PIN 43
#define ORIG_E1_DIR_PIN 41
#define ORIG_E1_ENABLE_PIN 39
#define ORIG_E2_STEP_PIN 32
#define ORIG_E2_DIR_PIN 47
#define ORIG_E2_ENABLE_PIN 45
#define SDPOWER -1
#define SDSS 4
#define LED_PIN 13
#define ORIG_BEEPER_PIN -1
#define ORIG_FAN_PIN -1
#define CONTROLLER_FAN_PIN -1
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_HEATER_0_PIN 9
#define ORIG_HEATER_1_PIN 10
#define ORIG_HEATER_2_PIN 11
#define ORIG_TEMP_BED_PIN 0 // ANALOG NUMBERING
#define ORIG_TEMP_0_PIN 1 // ANALOG NUMBERING
#define ORIG_TEMP_1_PIN 2 // ANALOG NUMBERING
#define ORIG_TEMP_2_PIN 3 // ANALOG NUMBERING
#define ORIG_TEMP_3_PIN 4 // ANALOG NUMBERING
#if NUM_SERVOS > 0
#define SERVO0_PIN 7
#if NUM_SERVOS > 1
#define SERVO1_PIN 6
#if NUM_SERVOS > 2
#define SERVO2_PIN 5
#if NUM_SERVOS > 3
#define SERVO3_PIN 3
#endif
#endif
#endif
#endif
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
// ramps-fd lcd adaptor
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define ORIG_BEEPER_PIN 37
#define BTN_EN1 33
#define BTN_EN2 31
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#endif
#endif
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#define MAX6675_SS 53
/****************************************************************************************
* 6 - 62 - 63 - 64 - 65
* 6 - Sanguinololu <1.2
* 62 - Sanguinololu 1.2 and above
* 63 - Melzi
* 64 - STB 1.1
* 65 - Azteeg X1
* 66 - MELZI 1284
****************************************************************************************/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define KNOWN_BOARD 1
#if !MB(SANGUINOLOLU_11)
#define SANGUINOLOLU_V_1_2
#endif
#if defined(__AVR_ATmega1284P__)
#define LARGE_FLASH true
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 21
#define X_STOP_PIN 18
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define Y_STOP_PIN 19
#define ORIG_Z_STEP_PIN 3
#define ORIG_Z_DIR_PIN 2
#define Z_STOP_PIN 20
#define ORIG_E0_STEP_PIN 1
#define ORIG_E0_DIR_PIN 0
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#if ORIG_FAN_PIN == 12 || ORIG_FAN_PIN ==13
#define FAN_SOFT_PWM
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#if MB(MELZI)
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_PIN_BL 17 // LCD backlight LED
#endif
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN -1
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13 // (extruder)
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14
#define ORIG_Y_ENABLE_PIN 14
#define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
#else
#define ORIG_HEATER_BED_PIN 14 // (bed)
#define ORIG_X_ENABLE_PIN -1
#define ORIG_Y_ENABLE_PIN -1
#define ORIG_Z_ENABLE_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#endif
#define ORIG_TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
*/
//#define SDSS 24
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// No buzzer installed
#define ORIG_BEEPER_PIN -1
//LCD Pins
#if ENABLED(DOGLCD)
#if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if MB(MELZI) // Melzi board
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
#define ORIG_BEEPER_PIN 27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for ORIG_BEEPER_PIN. You can use this pin with M42 instead of ORIG_BEEPER_PIN.
#else // Sanguinololu 1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
#else // DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#else // !DOGLCD - Standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif // !DOGLCD
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#if ENABLED(LCD_I2C_PANELOLU2)
#if MB(MELZI)
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
#define BTN_ENC 30
#endif
#else
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif //Panelolu2
#define SD_DETECT_PIN -1
#elif ENABLED(MAKRPANEL)
#define ORIG_BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 17
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 16
#define SD_DETECT_PIN -1
#endif // MAKRPANEL
/****************************************************************************************
* 6 - 62 - 63 - 64 - 65
* 6 - Sanguinololu <1.2
* 62 - Sanguinololu 1.2 and above
* 63 - Melzi
* 64 - STB 1.1
* 65 - Azteeg X1
* 66 - MELZI 1284
****************************************************************************************/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define KNOWN_BOARD 1
#if !MB(SANGUINOLOLU_11)
#define SANGUINOLOLU_V_1_2
#endif
#if defined(__AVR_ATmega1284P__)
#define LARGE_FLASH true
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 21
#define X_STOP_PIN 18
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define Y_STOP_PIN 19
#define ORIG_Z_STEP_PIN 3
#define ORIG_Z_DIR_PIN 2
#define Z_STOP_PIN 20
#define ORIG_E0_STEP_PIN 1
#define ORIG_E0_DIR_PIN 0
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#if ORIG_FAN_PIN == 12 || ORIG_FAN_PIN ==13
#define FAN_SOFT_PWM
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#if MB(MELZI)
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_PIN_BL 17 // LCD backlight LED
#endif
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN -1
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13 // (extruder)
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14
#define ORIG_Y_ENABLE_PIN 14
#define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
#else
#define ORIG_HEATER_BED_PIN 14 // (bed)
#define ORIG_X_ENABLE_PIN -1
#define ORIG_Y_ENABLE_PIN -1
#define ORIG_Z_ENABLE_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#endif
#define ORIG_TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
*/
//#define SDSS 24
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// No buzzer installed
#define ORIG_BEEPER_PIN -1
//LCD Pins
#if ENABLED(DOGLCD)
#if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if MB(MELZI) // Melzi board
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
#define ORIG_BEEPER_PIN 27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for ORIG_BEEPER_PIN. You can use this pin with M42 instead of ORIG_BEEPER_PIN.
#else // Sanguinololu 1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
#else // DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#else // !DOGLCD - Standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif // !DOGLCD
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#if ENABLED(LCD_I2C_PANELOLU2)
#if MB(MELZI)
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
#define BTN_ENC 30
#endif
#else
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif //Panelolu2
#define SD_DETECT_PIN -1
#elif ENABLED(MAKRPANEL)
#define ORIG_BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 17
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 16
#define SD_DETECT_PIN -1
#endif // MAKRPANEL
/****************************************************************************************
* 6 - 62 - 63 - 64 - 65
* 6 - Sanguinololu <1.2
* 62 - Sanguinololu 1.2 and above
* 63 - Melzi
* 64 - STB 1.1
* 65 - Azteeg X1
* 66 - MELZI 1284
****************************************************************************************/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define KNOWN_BOARD 1
#if !MB(SANGUINOLOLU_11)
#define SANGUINOLOLU_V_1_2
#endif
#if defined(__AVR_ATmega1284P__)
#define LARGE_FLASH true
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 21
#define X_STOP_PIN 18
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define Y_STOP_PIN 19
#define ORIG_Z_STEP_PIN 3
#define ORIG_Z_DIR_PIN 2
#define Z_STOP_PIN 20
#define ORIG_E0_STEP_PIN 1
#define ORIG_E0_DIR_PIN 0
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#if ORIG_FAN_PIN == 12 || ORIG_FAN_PIN ==13
#define FAN_SOFT_PWM
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#if MB(MELZI)
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_PIN_BL 17 // LCD backlight LED
#endif
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN -1
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13 // (extruder)
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14
#define ORIG_Y_ENABLE_PIN 14
#define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
#else
#define ORIG_HEATER_BED_PIN 14 // (bed)
#define ORIG_X_ENABLE_PIN -1
#define ORIG_Y_ENABLE_PIN -1
#define ORIG_Z_ENABLE_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#endif
#define ORIG_TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
*/
//#define SDSS 24
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// No buzzer installed
#define ORIG_BEEPER_PIN -1
//LCD Pins
#if ENABLED(DOGLCD)
#if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if MB(MELZI) // Melzi board
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
#define ORIG_BEEPER_PIN 27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for ORIG_BEEPER_PIN. You can use this pin with M42 instead of ORIG_BEEPER_PIN.
#else // Sanguinololu 1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
#else // DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#else // !DOGLCD - Standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif // !DOGLCD
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#if ENABLED(LCD_I2C_PANELOLU2)
#if MB(MELZI)
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
#define BTN_ENC 30
#endif
#else
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif //Panelolu2
#define SD_DETECT_PIN -1
#elif ENABLED(MAKRPANEL)
#define ORIG_BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 17
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 16
#define SD_DETECT_PIN -1
#endif // MAKRPANEL
/****************************************************************************************
* 6 - 62 - 63 - 64 - 65
* 6 - Sanguinololu <1.2
* 62 - Sanguinololu 1.2 and above
* 63 - Melzi
* 64 - STB 1.1
* 65 - Azteeg X1
* 66 - MELZI 1284
****************************************************************************************/
#if !defined(__AVR_ATmega644P__) && !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Sanguino' selected from the 'Tools -> Boards' menu.
#endif
#define KNOWN_BOARD 1
#if !MB(SANGUINOLOLU_11)
#define SANGUINOLOLU_V_1_2
#endif
#if defined(__AVR_ATmega1284P__)
#define LARGE_FLASH true
#endif
#define ORIG_X_STEP_PIN 15
#define ORIG_X_DIR_PIN 21
#define X_STOP_PIN 18
#define ORIG_Y_STEP_PIN 22
#define ORIG_Y_DIR_PIN 23
#define Y_STOP_PIN 19
#define ORIG_Z_STEP_PIN 3
#define ORIG_Z_DIR_PIN 2
#define Z_STOP_PIN 20
#define ORIG_E0_STEP_PIN 1
#define ORIG_E0_DIR_PIN 0
#define LED_PIN -1
#define ORIG_FAN_PIN -1
#if ORIG_FAN_PIN == 12 || ORIG_FAN_PIN ==13
#define FAN_SOFT_PWM
#endif
#if MB(AZTEEG_X1) || MB(STB_11) || MB(MELZI)
#define ORIG_FAN_PIN 4 // Works for Panelolu2 too
#if MB(MELZI)
#define LED_PIN 27
#elif MB(STB_11)
#define LCD_PIN_BL 17 // LCD backlight LED
#endif
#endif
#if NUM_SERVOS > 0
#define SERVO0_PIN -1
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
#if NUM_SERVOS > 2
#define SERVO2_PIN -1
#if NUM_SERVOS > 3
#define SERVO3_PIN -1
#endif
#endif
#endif
#endif
#define ORIG_PS_ON_PIN -1
#define KILL_PIN -1
#define ORIG_HEATER_0_PIN 13 // (extruder)
#define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1
#if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14
#define ORIG_Y_ENABLE_PIN 14
#define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14
#if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif
#else
#define ORIG_HEATER_BED_PIN 14 // (bed)
#define ORIG_X_ENABLE_PIN -1
#define ORIG_Y_ENABLE_PIN -1
#define ORIG_Z_ENABLE_PIN -1
#define ORIG_E0_ENABLE_PIN -1
#endif
#define ORIG_TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define ORIG_TEMP_1_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
#define SDPOWER -1
#define SDSS 31
/**
* On some broken versions of the Sanguino libraries the pin definitions are wrong,
* which then needs SDSS as pin 24. But you should upgrade your Sanguino libraries! See #368.
*/
//#define SDSS 24
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// No buzzer installed
#define ORIG_BEEPER_PIN -1
//LCD Pins
#if ENABLED(DOGLCD)
#if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if MB(MELZI) // Melzi board
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
#define ORIG_BEEPER_PIN 27 // Pin 27 is taken by LED_PIN, but Melzi LED does nothing with Marlin so this can be used for ORIG_BEEPER_PIN. You can use this pin with M42 instead of ORIG_BEEPER_PIN.
#else // Sanguinololu 1.3
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif
#else // DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 29
#define LCD_CONTRAST 1
#endif
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#else // !DOGLCD - Standard Hitachi LCD controller
#define LCD_PINS_RS 4
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 30
#define LCD_PINS_D5 29
#define LCD_PINS_D6 28
#define LCD_PINS_D7 27
#endif // !DOGLCD
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#if ENABLED(LCD_I2C_PANELOLU2)
#if MB(MELZI)
#define BTN_ENC 29
#define LCD_SDSS 30 // Panelolu2 SD card reader rather than the Melzi
#else
#define BTN_ENC 30
#endif
#else
#define BTN_ENC 16
#define LCD_SDSS 28 // Smart Controller SD card reader rather than the Melzi
#endif //Panelolu2
#define SD_DETECT_PIN -1
#elif ENABLED(MAKRPANEL)
#define ORIG_BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
#define DOGLCD_CS 17
#define LCD_PIN_BL 28 // backlight LED on PA3
// GLCD features
#define LCD_CONTRAST 1
// Uncomment screen orientation
#define LCD_SCREEN_ROT_0
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#define BTN_ENC 16
#define SD_DETECT_PIN -1
#endif // MAKRPANEL
......@@ -341,9 +341,9 @@
/**
* Axis lengths
*/
#define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
#define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
#define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
#define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS))
#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS))
#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS))
/**
* SCARA
......@@ -385,8 +385,8 @@
#define Z_HOME_POS MANUAL_Z_HOME_POS
#else //!MANUAL_HOME_POSITIONS – Use home switch positions based on homing direction and travel limits
#if ENABLED(BED_CENTER_AT_0_0)
#define X_HOME_POS X_MAX_LENGTH * X_HOME_DIR * 0.5
#define Y_HOME_POS Y_MAX_LENGTH * Y_HOME_DIR * 0.5
#define X_HOME_POS (X_MAX_LENGTH) * (X_HOME_DIR) * 0.5
#define Y_HOME_POS (Y_MAX_LENGTH) * (Y_HOME_DIR) * 0.5
#else
#define X_HOME_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS)
#define Y_HOME_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS)
......@@ -473,7 +473,7 @@
* Advance calculated values
*/
#if ENABLED(ADVANCE)
#define EXTRUSION_AREA (0.25 * D_FILAMENT * D_FILAMENT * M_PI)
#define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_unit[E_AXIS + active_extruder] / EXTRUSION_AREA)
#endif
......
......@@ -323,7 +323,7 @@ void planner_recalculate_trapezoids() {
// Last/newest block in buffer. Exit speed is set with MINIMUM_PLANNER_SPEED. Always recalculated.
if (next) {
float nom = next->nominal_speed;
calculate_trapezoid_for_block(next, next->entry_speed / nom, MINIMUM_PLANNER_SPEED / nom);
calculate_trapezoid_for_block(next, next->entry_speed / nom, (MINIMUM_PLANNER_SPEED) / nom);
next->recalculate_flag = false;
}
}
......@@ -380,8 +380,8 @@ void plan_init() {
float t = autotemp_min + high * autotemp_factor;
t = constrain(t, autotemp_min, autotemp_max);
if (oldt > t) {
t *= (1 - AUTOTEMP_OLDWEIGHT);
t += AUTOTEMP_OLDWEIGHT * oldt;
t *= (1 - (AUTOTEMP_OLDWEIGHT));
t += (AUTOTEMP_OLDWEIGHT) * oldt;
}
oldt = t;
setTargetHotend0(t);
......@@ -447,7 +447,7 @@ void check_axes_activity() {
}
#endif //FAN_KICKSTART_TIME
#if ENABLED(FAN_MIN_PWM)
#define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - FAN_MIN_PWM)) / 255 ) : 0)
#define CALC_FAN_SPEED (tail_fan_speed ? ( FAN_MIN_PWM + (tail_fan_speed * (255 - (FAN_MIN_PWM))) / 255 ) : 0)
#else
#define CALC_FAN_SPEED tail_fan_speed
#endif // FAN_MIN_PWM
......@@ -554,7 +554,7 @@ float junction_deviation = 0.1;
}
#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)) {
#if ENABLED(EASY_LOAD)
if (!allow_lengthy_extrude_once) {
#endif
......@@ -680,13 +680,19 @@ float junction_deviation = 0.1;
switch(extruder) {
case 0:
enable_e0();
g_uc_extruder_last_move[0] = BLOCK_BUFFER_SIZE * 2;
g_uc_extruder_last_move[0] = (BLOCK_BUFFER_SIZE) * 2;
#if EXTRUDERS > 1
if (g_uc_extruder_last_move[1] == 0) disable_e1();
#if EXTRUDERS > 2
if (g_uc_extruder_last_move[2] == 0) disable_e2();
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_e3();
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_e4();
#if EXTRUDERS > 5
if (g_uc_extruder_last_move[5] == 0) disable_e5();
#endif
#endif
#endif
#endif
#endif
......@@ -694,33 +700,75 @@ float junction_deviation = 0.1;
#if EXTRUDERS > 1
case 1:
enable_e1();
g_uc_extruder_last_move[1] = BLOCK_BUFFER_SIZE*2;
g_uc_extruder_last_move[1] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0();
#if EXTRUDERS > 2
if (g_uc_extruder_last_move[2] == 0) disable_e2();
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_e3();
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_e4();
#if EXTRUDERS > 5
if (g_uc_extruder_last_move[5] == 0) disable_e5();
#endif
#endif
#endif
#endif
break;
#if EXTRUDERS > 2
case 2:
enable_e2();
g_uc_extruder_last_move[2] = BLOCK_BUFFER_SIZE*2;
g_uc_extruder_last_move[2] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1();
#if EXTRUDERS > 3
if (g_uc_extruder_last_move[3] == 0) disable_e3();
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_e4();
#if EXTRUDERS > 5
if (g_uc_extruder_last_move[5] == 0) disable_e5();
#endif
#endif
#endif
break;
#if EXTRUDERS > 3
case 3:
enable_e3();
g_uc_extruder_last_move[3] = BLOCK_BUFFER_SIZE*2;
g_uc_extruder_last_move[3] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1();
if (g_uc_extruder_last_move[2] == 0) disable_e2();
#if EXTRUDERS > 4
if (g_uc_extruder_last_move[4] == 0) disable_e4();
#if EXTRUDERS > 5
if (g_uc_extruder_last_move[5] == 0) disable_e5();
#endif
#endif
break;
#if EXTRUDERS > 4
case 4:
enable_e4();
g_uc_extruder_last_move[4] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1();
if (g_uc_extruder_last_move[2] == 0) disable_e2();
if (g_uc_extruder_last_move[3] == 0) disable_e3();
#if EXTRUDERS > 5
if (g_uc_extruder_last_move[5] == 0) disable_e5();
#endif
break;
#if EXTRUDERS > 5
case 4:
enable_e5();
g_uc_extruder_last_move[5] = (BLOCK_BUFFER_SIZE) * 2;
if (g_uc_extruder_last_move[0] == 0) disable_e0();
if (g_uc_extruder_last_move[1] == 0) disable_e1();
if (g_uc_extruder_last_move[2] == 0) disable_e2();
if (g_uc_extruder_last_move[3] == 0) disable_e3();
if (g_uc_extruder_last_move[4] == 0) disable_e4();
break;
#endif // EXTRUDERS > 5
#endif // EXTRUDERS > 4
#endif // EXTRUDERS > 3
#endif // EXTRUDERS > 2
#endif // EXTRUDERS > 1
......@@ -732,6 +780,8 @@ float junction_deviation = 0.1;
enable_e1();
enable_e2();
enable_e3();
enable_e4();
enable_e5();
}
#else //MKR4 or NPr2
switch(extruder)
......@@ -810,13 +860,13 @@ float junction_deviation = 0.1;
// Slow down when the buffer starts to empty, rather than wait at the corner for a buffer refill
#if ENABLED(OLD_SLOWDOWN) || ENABLED(SLOWDOWN)
bool mq = moves_queued > 1 && moves_queued < BLOCK_BUFFER_SIZE / 2;
bool mq = moves_queued > 1 && moves_queued < (BLOCK_BUFFER_SIZE) / 2;
#if ENABLED(OLD_SLOWDOWN)
if (mq) feed_rate *= 2.0 * moves_queued / BLOCK_BUFFER_SIZE;
if (mq) feed_rate *= 2.0 * moves_queued / (BLOCK_BUFFER_SIZE);
#endif
#if ENABLED(SLOWDOWN)
// segment time im micro seconds
unsigned long segment_time = lround(1000000.0/inverse_second);
unsigned long segment_time = lround(1000000.0 / inverse_second);
if (mq) {
if (segment_time < minsegmenttime) {
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
......@@ -900,7 +950,7 @@ float junction_deviation = 0.1;
max_y_segment_time = max(ys0, max(ys1, ys2)),
min_xy_segment_time = min(max_x_segment_time, max_y_segment_time);
if (min_xy_segment_time < MAX_FREQ_TIME) {
float low_sf = speed_factor * min_xy_segment_time / MAX_FREQ_TIME;
float low_sf = speed_factor * min_xy_segment_time / (MAX_FREQ_TIME);
speed_factor = min(speed_factor, low_sf);
}
#endif // XY_FREQUENCY_LIMIT
......@@ -939,7 +989,7 @@ float junction_deviation = 0.1;
block->acceleration = acc_st / steps_per_mm;
#ifdef __SAM3X8E__
block->acceleration_rate = (long)(acc_st * ( 4294967296.0 / HAL_TIMER_RATE));
block->acceleration_rate = (long)(acc_st * (4294967296.0 / (HAL_TIMER_RATE)));
#else
block->acceleration_rate = (long)(acc_st * 16777216.0 / (F_CPU / 8.0));
#endif
......
......@@ -5,128 +5,9 @@
#ifndef PINS_H
#define PINS_H
// BOARDS 8-BIT
#if MB(GEN7_CUSTOM)
#include "boards/BOARD_GEN7_CUSTOM.h"
#elif MB(GEN7_12)
#include "boards/BOARD_GEN7_12.h"
#elif MB(GEN7_13)
#include "boards/BOARD_GEN7_13.h"
#elif MB(GEN7_14)
#include "boards/BOARD_GEN7_14.h"
#elif MB(CHEAPTRONIC)
#include "boards/BOARD_CHEAPTRONIC.h"
#elif MB(SETHI)
#include "boards/BOARD_SETHI.h"
#elif MB(ELEFU_3)
#include "boards/BOARD_ELEFU_3.h"
#elif MB(GEN3_MONOLITHIC)
#include "boards/BOARD_GEN3_MONOLITHIC.h"
#elif MB(RAMPS_OLD)
#include "boards/BOARD_RAMPS_OLD.h"
#elif MB(RAMPS_13_HFB)
#include "boards/BOARD_RAMPS_13_HFB.h"
#elif MB(RAMPS_13_HHB)
#include "boards/BOARD_RAMPS_13_HHB.h"
#elif MB(RAMPS_13_HFF)
#include "boards/BOARD_RAMPS_13_HFF.h"
#elif MB(RAMPS_13_HHF)
#include "boards/BOARD_RAMPS_13_HHF.h"
#elif MB(RAMPS_13_HHH)
#include "boards/BOARD_RAMPS_13_HHH.h"
#elif MB(RAMBO)
#include "boards/BOARD_RAMBO.h"
#elif MB(DUEMILANOVE_328P)
#include "boards/BOARD_DUEMILANOVE_328P.h"
#elif MB(MKS_BASE)
#include "boards/BOARD_MKS_BASE.h"
#elif MB(MKS_MINI)
#include "boards/BOARD_MKS_MINI.h"
#elif MB(GEN6)
#include "boards/BOARD_GEN6.h"
#elif MB(GEN6_DELUXE)
#include "boards/BOARD_GEN6.h"
#elif MB(SANGUINOLOLU_11)
#include "boards/BOARD_SANGUINO.h"
#elif MB(SANGUINOLOLU_12)
#include "boards/BOARD_SANGUINO.h"
#elif MB(MELZI)
#include "boards/BOARD_SANGUINO.h"
#elif MB(STB_11)
#include "boards/BOARD_SANGUINO.h"
#elif MB(AZTEEG_X1)
#include "boards/BOARD_SANGUINO.h"
#elif MB(MELZI_1284)
#include "boards/BOARD_SANGUINO.h"
#elif MB(AZTEEG_X3)
#include "boards/BOARD_AZTEEG_X3.h"
#elif MB(AZTEEG_X3_PRO)
#include "boards/BOARD_AZTEEG_X3_PRO.h"
#elif MB(ULTIMAKER)
#include "boards/BOARD_ULTIMAKER.h"
#elif MB(MEGATRONICS)
#include "boards/BOARD_MEGATRONICS.h"
#elif MB(MEGATRONICS_2)
#include "boards/BOARD_MEGATRONICS_2.h"
#elif MB(MINITRONICS)
#include "boards/BOARD_MINITRONICS.h"
#elif MB(MEGATRONICS_3)
#include "boards/BOARD_MEGATRONICS_3.h"
#elif MB(ULTRATRONICS)
#include "boards/BOARD_ULTRATRONICS.h"
#elif MB(ULTIMAKER_OLD)
#include "boards/BOARD_ULTIMAKER_OLD.h"
#elif MB(ULTIMAIN_2)
#include "boards/BOARD_ULTIMAIN_2.h"
#elif MB(3DRAG)
#include "boards/BOARD_3DRAG.h"
#elif MB(K8200)
#include "boards/BOARD_K8200.h"
#elif MB(TEENSYLU)
#include "boards/BOARD_TEENSYLU.h"
#elif MB(PRINTRBOARD)
#include "boards/BOARD_TEENSYLU.h"
#elif MB(RUMBA)
#include "boards/BOARD_RUMBA.h"
#elif MB(BRAINWAVE)
#include "boards/BOARD_BRAINWAVE.h"
#elif MB(SAV_MKI)
#include "boards/BOARD_SAV_MKI.h"
#elif MB(TEENSY2)
#include "boards/BOARD_TEENSY2.h"
#elif MB(5DPRINT)
#include "boards/BOARD_5DPRINT.h"
#elif MB(GEN3_PLUS)
#include "boards/BOARD_GEN3_PLUS.h"
#elif MB(OMCA_A)
#include "boards/BOARD_OMCA_A.h"
#elif MB(OMCA)
#include "boards/BOARD_OMCA.h"
#elif MB(LEAPFROG)
#include "boards/BOARD_LEAPFROG.h"
#elif MB(99)
#include "boards/BOARD_99.h"
#elif MB(PIBOT)
#include "boards/BOARD_PIBOT.h"
// BOARDS 32-BIT
#elif MB(ALLIGATOR)
#include "boards/BOARD_ALLIGATOR.h"
#elif MB(RADDS)
#include "boards/BOARD_RADDS.h"
#elif MB(RAMPS_FD_V1)
#include "boards/BOARD_RAMPS_FD.h"
#elif MB(RAMPS_FD_V2)
#include "boards/BOARD_RAMPS_FD.h"
#elif MB(SMART_RAMPS)
#include "boards/BOARD_SMART_RAMPS.h"
#elif MB(RAMPS4DUE)
#include "boards/BOARD_RAMPS4DUE.h"
// NO BOARD
#else
#error Unknown MOTHERBOARD value set in Configuration.h
#endif
#define AS_QUOTED_STRING(S) #S
#define INCLUDE_BY_MB(M) AS_QUOTED_STRING(boards/M.h)
#include INCLUDE_BY_MB(MOTHERBOARD)
/****************************************************************************************/
......
......@@ -7,13 +7,6 @@
#ifndef SANITYCHECK_H
#define SANITYCHECK_H
// Version & processor
#if defined(__SAM3X8E__) && (FIRMWARE_BIT_BOARDS == 8)
#error FIRMWARE ERROR: This firmware is only for 8-bit board
#elif !defined(__SAM3X8E__) && (FIRMWARE_BIT_BOARDS == 32)
#error FIRMWARE ERROR: This firmware is only for 32-bit board
#endif
// Start check
#if DISABLED(SERIAL_PORT)
#error DEPENDENCY ERROR: Missing setting SERIAL_PORT
......
......@@ -50,8 +50,8 @@ float current_temperature_bed = 0.0;
#if ENABLED(PIDTEMPBED)
float bedKp = DEFAULT_bedKp;
float bedKi = (DEFAULT_bedKi * PID_dT);
float bedKd = (DEFAULT_bedKd / PID_dT);
float bedKi = ((DEFAULT_bedKi) * (PID_dT));
float bedKd = ((DEFAULT_bedKd) / (PID_dT));
#endif //PIDTEMPBED
#if ENABLED(FAN_SOFT_PWM)
......
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