Commit a985527c authored by MagoKimbra's avatar MagoKimbra

Merge remote-tracking branch 'origin/master' into Development

parents 0b18e541 3c262e43
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#ifdef __SAM3X8E__ #ifdef __SAM3X8E__
#include "HAL.h" #include "HAL.h"
#include "Fastio_sam.h"
#else #else
#include <util/delay.h> #include <util/delay.h>
#include <avr/eeprom.h> #include <avr/eeprom.h>
......
...@@ -406,7 +406,7 @@ millis_t config_last_update = 0; ...@@ -406,7 +406,7 @@ millis_t config_last_update = 0;
int meas_delay_cm = MEASUREMENT_DELAY_CM; //distance delay setting int meas_delay_cm = MEASUREMENT_DELAY_CM; //distance delay setting
#endif #endif
#ifdef FILAMENT_RUNOUT_SENSOR #if HAS_FILRUNOUT
static bool filrunoutEnqueued = false; static bool filrunoutEnqueued = false;
bool printing = false; bool printing = false;
#endif #endif
...@@ -3532,13 +3532,13 @@ inline void gcode_G92() { ...@@ -3532,13 +3532,13 @@ inline void gcode_G92() {
} }
#endif //LASERBEAM #endif //LASERBEAM
#ifdef FILAMENT_END_SWITCH #if HAS_FILRUNOUT
/** /**
* M11: Start printing * M11: Start printing
*/ */
inline void gcode_M11() { inline void gcode_M11() {
printing = true; printing = true;
paused = false; filrunoutEnqueued = false;
ECHO_LM(DB, "Start Printing, pause pin active."); ECHO_LM(DB, "Start Printing, pause pin active.");
ECHO_S(RESUME); ECHO_S(RESUME);
ECHO_E; ECHO_E;
...@@ -6702,7 +6702,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -6702,7 +6702,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
if (!READ(HOME_PIN)) { if (!READ(HOME_PIN)) {
if (!homeDebounceCount) { if (!homeDebounceCount) {
enqueuecommands_P(PSTR("G28")); enqueuecommands_P(PSTR("G28"));
LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME); LCD_MESSAGEPGM(MSG_AUTO_HOME);
} }
if (homeDebounceCount < HOME_DEBOUNCE_DELAY) if (homeDebounceCount < HOME_DEBOUNCE_DELAY)
homeDebounceCount++; homeDebounceCount++;
......
...@@ -10,41 +10,12 @@ ...@@ -10,41 +10,12 @@
#define START_BMPBYTES 532 // START_BMPWIDTH * START_BMPHEIGHT / 8 #define START_BMPBYTES 532 // START_BMPWIDTH * START_BMPHEIGHT / 8
const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0, 0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x1e,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x38,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0x70,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0x60,0x0,0x0,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x6,0xe0,0x1f,0x7c,0x0,0x0,0x33,0x0,0x0,0x0,0x0,0x1,0x80,0x3,0x87,0xc0,0x3f,0xfe,0x0,0x0,0x33,0x0,0x0,0x0,0x0,0x1,0xc0,0x2,0x83,
0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8, 0xc0,0x73,0xce,0x0,0x0,0x30,0x0,0x0,0x0,0x0,0x3,0xc0,0x3,0x83,0xc0,0xf3,0xce,0x3c,0xf,0x33,0xf,0x0,0x0,0x0,0x3,0xc0,0x2,0x83,0xc0,0xe3,0x8e,0x7e,0x1f,0xb3,0x1f,0x80,0x0,0x0,0x1f,0xe0,0x0,0x3,0xc0,0xe3,0x8e,0xe7,0x39,0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,0xff,0xe0,0x0,0x7f,
0xd,0xff,0xfb,0xfb,0xfd,0xff,0x0,0xdf,0xfc,0x3,0xff,0xf0,0x0,0x7f,0x8d,
0xff,0xfb,0x3b,0xfd,0xff,0x0,0xef,0xf8,0x3,0xff,0xf8,0x0,0x7f,0xcd,0xc6,
0x3b,0x1b,0x9d,0xc7,0x0,0x6f,0xf0,0x3,0xff,0xfc,0x0,0x7f,0xcd,0xc6,0x3b,
0x1b,0x85,0xc7,0x0,0x37,0xc0,0x7,0xff,0xfe,0x0,0x7b,0xed,0xc6,0x3b,0x3b,
0x81,0xc7,0x0,0x1b,0x0,0x7,0xff,0xff,0x0,0x79,0xed,0xc6,0x3b,0xfb,0x81,
0xe7,0x0,0x8,0x0,0x7,0xff,0xff,0x80,0x78,0xed,0xc6,0x3b,0xf3,0x80,0xf7,
0xc0,0xc,0x0,0xf,0xff,0xff,0xc0,0x78,0x6d,0xc6,0x3b,0xe3,0x80,0x77,0xc0,
0x7,0x0,0x1f,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x3e,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0 };
#else #else
#define START_BMPWIDTH 56 #define START_BMPWIDTH 56
#define START_BMPHEIGHT 19 #define START_BMPHEIGHT 19
...@@ -52,34 +23,19 @@ ...@@ -52,34 +23,19 @@
#define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8 #define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8
const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { const unsigned char start_bmp[START_BMPBYTES] PROGMEM = {
0x1f,0xff,0xff,0xff,0xff,0xff,0xff 0x1f,0xff,0xff,0xff,0xff,0xff,0xfc,0x30,0x0,0x0,0x0,0x0,0x0,0x6,0x60,0x0,0x0,0x0,0x0,0x0,0x3,0xc3,0x60,0x5,0x0,0x0,0x8,0x1,0x84,0x90,0x4,0x0,0x0,0x18,0x1,0x84,0x97,0x75,0x70,0x0,0x3c,0x1,0x84,0x95,0x45,0x50,0x0,0x7f,0x1,0x84,0x95,0x45,0x50,0x0,0x1c,0x1,
,0x60,0x00,0x00,0x00,0x00,0x01,0xff 0x84,0x97,0xc5,0x50,0x1,0x8e,0x1,0x80,0x0,0x0,0x0,0x0,0xff,0x81,0xc0,0x0,0x0,0x10,0x0,0x5f,0xf9,0xe0,0x2,0xd0,0x10,0x0,0x27,0xf1,0xf0,0x3,0x80,0x10,0x0,0x17,0xf1,0xf8,0x3,0x17,0xde,0xee,0xb,0xe1,0xfc,0x3,0x15,0x52,0x8a,0x5,0x81,0xfe,0x3,0x95,0x52,0x8a,0x2,0x1,
,0x40,0x00,0x00,0x00,0x00,0x00,0xff 0xff,0x2,0xd5,0x5e,0x8f,0x1,0x1,0xff,0x80,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xfe
,0x80,0x00,0x00,0x00,0x00,0x00,0x7f };
,0x83,0xcf,0x00,0x00,0x0c,0x30,0x3f
,0x87,0xff,0x80,0x00,0x0c,0x30,0x1f
,0x86,0x79,0x80,0x00,0x0c,0x00,0x0f
,0x8c,0x30,0xc7,0x83,0x8c,0x30,0xe7
,0x8c,0x30,0xcf,0xc7,0xcc,0x31,0xf3
,0x8c,0x30,0xdc,0xec,0xec,0x33,0xb9
,0x8c,0x30,0xd8,0x6c,0x6c,0x33,0x19
,0x8c,0x30,0xd0,0x6c,0x0c,0x33,0x19
,0x8c,0x30,0xd8,0x6c,0x0c,0x33,0x19
,0x8c,0x30,0xdc,0x6c,0x0e,0x3b,0x19
,0x8c,0x30,0xcf,0x7c,0x07,0x9f,0x19
,0x8c,0x30,0xc7,0x7c,0x03,0x8f,0x19
,0x40,0x00,0x00,0x00,0x00,0x00,0x02
,0x60,0x00,0x00,0x00,0x00,0x00,0x06
,0x1f,0xff,0xff,0xff,0xff,0xff,0xf8 };
#endif #endif
// Here comes a compile-time operation to match the extruder symbols // Here comes a compile-time operation to match the extruder symbols
// on the info screen to the set number of extruders in configuration.h // on the info screen to the set number of hotends in configuration.h
// //
// When only one extruder is selected, the "1" on the symbol will not // When only one extruder is selected, the "1" on the symbol will not
// be displayed. // be displayed.
#if EXTRUDERS == 1 #if HOTENDS == 1
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
...@@ -129,7 +85,7 @@ ...@@ -129,7 +85,7 @@
0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0, 0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x7F,0xFF,0xE0,
0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00 0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
}; };
#elif EXTRUDERS == 2 #elif HOTENDS == 2
#define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENWIDTH 115 //Width in pixels
#define STATUS_SCREENHEIGHT 19 //Height in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels
#define STATUS_SCREENBYTEWIDTH 15 //Width in bytes #define STATUS_SCREENBYTEWIDTH 15 //Width in bytes
......
...@@ -310,11 +310,11 @@ static void lcd_implementation_status_screen() { ...@@ -310,11 +310,11 @@ static void lcd_implementation_status_screen() {
} }
#endif #endif
// Extruders // Hotends
for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i); for (int i = 0; i < HOTENDS; i++) _draw_heater_status(6 + i * 25, i);
// Heatbed // Heatbed
if (EXTRUDERS < 4) _draw_heater_status(81, -1); if (HOTENDS < 4) _draw_heater_status(81, -1);
// Fan // Fan
lcd_setFont(FONT_STATUSMENU); lcd_setFont(FONT_STATUSMENU);
......
...@@ -727,7 +727,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -727,7 +727,7 @@ ISR(TIMER1_COMPA_vect) {
#define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP #define _APPLY_STEP(AXIS) AXIS ##_APPLY_STEP
#define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN #define _INVERT_STEP_PIN(AXIS) INVERT_## AXIS ##_STEP_PIN
#ifdef CONFIG_STEPPERS_TOSHIBA #if defined(CONFIG_STEPPERS_TOSHIBA) || MB(ALLIGATOR)
/** /**
* The Toshiba stepper controller require much longer pulses. * The Toshiba stepper controller require much longer pulses.
* So we 'stage' decompose the pulses between high and low * So we 'stage' decompose the pulses between high and low
...@@ -744,6 +744,8 @@ ISR(TIMER1_COMPA_vect) { ...@@ -744,6 +744,8 @@ ISR(TIMER1_COMPA_vect) {
STEP_ADD(e,E); STEP_ADD(e,E);
#endif #endif
_delay_us(1U); // Add delay us
#define STEP_IF_COUNTER(axis, AXIS) \ #define STEP_IF_COUNTER(axis, AXIS) \
if (_COUNTER(axis) > 0) { \ if (_COUNTER(axis) > 0) { \
_COUNTER(axis) -= current_block->step_event_count; \ _COUNTER(axis) -= current_block->step_event_count; \
...@@ -758,7 +760,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -758,7 +760,7 @@ ISR(TIMER1_COMPA_vect) {
STEP_IF_COUNTER(e, E); STEP_IF_COUNTER(e, E);
#endif #endif
#else // !CONFIG_STEPPERS_TOSHIBA #else // !CONFIG_STEPPERS_TOSHIBA || MB(ALLIGATOR)
#define APPLY_MOVEMENT(axis, AXIS) \ #define APPLY_MOVEMENT(axis, AXIS) \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \ _COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
...@@ -777,6 +779,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -777,6 +779,7 @@ ISR(TIMER1_COMPA_vect) {
#endif #endif
#endif // CONFIG_STEPPERS_TOSHIBA #endif // CONFIG_STEPPERS_TOSHIBA
step_events_completed++; step_events_completed++;
if (step_events_completed >= current_block->step_event_count) break; if (step_events_completed >= current_block->step_event_count) break;
} }
...@@ -1032,63 +1035,63 @@ void st_init() { ...@@ -1032,63 +1035,63 @@ void st_init() {
#if HAS_X_MIN #if HAS_X_MIN
SET_INPUT(X_MIN_PIN); SET_INPUT(X_MIN_PIN);
#ifdef ENDSTOPPULLUP_XMIN #ifdef ENDSTOPPULLUP_XMIN
WRITE(X_MIN_PIN,HIGH); WRITE(X_MIN_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_Y_MIN #if HAS_Y_MIN
SET_INPUT(Y_MIN_PIN); SET_INPUT(Y_MIN_PIN);
#ifdef ENDSTOPPULLUP_YMIN #ifdef ENDSTOPPULLUP_YMIN
WRITE(Y_MIN_PIN,HIGH); WRITE(Y_MIN_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_Z_MIN #if HAS_Z_MIN
SET_INPUT(Z_MIN_PIN); SET_INPUT(Z_MIN_PIN);
#ifdef ENDSTOPPULLUP_ZMIN #ifdef ENDSTOPPULLUP_ZMIN
WRITE(Z_MIN_PIN,HIGH); WRITE(Z_MIN_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_E_MIN #if HAS_E_MIN
SET_INPUT(E_MIN_PIN); SET_INPUT(E_MIN_PIN);
#ifdef ENDSTOPPULLUP_EMIN #ifdef ENDSTOPPULLUP_EMIN
WRITE(E_MIN_PIN,HIGH); WRITE(E_MIN_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_X_MAX #if HAS_X_MAX
SET_INPUT(X_MAX_PIN); SET_INPUT(X_MAX_PIN);
#ifdef ENDSTOPPULLUP_XMAX #ifdef ENDSTOPPULLUP_XMAX
WRITE(X_MAX_PIN,HIGH); WRITE(X_MAX_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_Y_MAX #if HAS_Y_MAX
SET_INPUT(Y_MAX_PIN); SET_INPUT(Y_MAX_PIN);
#ifdef ENDSTOPPULLUP_YMAX #ifdef ENDSTOPPULLUP_YMAX
WRITE(Y_MAX_PIN,HIGH); WRITE(Y_MAX_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_Z_MAX #if HAS_Z_MAX
SET_INPUT(Z_MAX_PIN); SET_INPUT(Z_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z_MAX_PIN,HIGH); WRITE(Z_MAX_PIN, HIGH);
#endif #endif
#endif #endif
#if HAS_Z2_MAX #if HAS_Z2_MAX
SET_INPUT(Z2_MAX_PIN); SET_INPUT(Z2_MAX_PIN);
#ifdef ENDSTOPPULLUP_ZMAX #ifdef ENDSTOPPULLUP_ZMAX
WRITE(Z2_MAX_PIN,HIGH); WRITE(Z2_MAX_PIN, HIGH);
#endif #endif
#endif #endif
#if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used. #if (defined(Z_PROBE_PIN) && Z_PROBE_PIN >= 0) && defined(Z_PROBE_ENDSTOP) // Check for Z_PROBE_ENDSTOP so we don't pull a pin high unless it's to be used.
SET_INPUT(Z_PROBE_PIN); SET_INPUT(Z_PROBE_PIN);
#ifdef ENDSTOPPULLUP_ZPROBE #ifdef ENDSTOPPULLUP_ZPROBE
WRITE(Z_PROBE_PIN,HIGH); WRITE(Z_PROBE_PIN, HIGH);
#endif #endif
#endif #endif
......
...@@ -336,9 +336,11 @@ void PID_autotune(float temp, int hotend, int ncycles) ...@@ -336,9 +336,11 @@ void PID_autotune(float temp, int hotend, int ncycles)
if (cycles > ncycles) { if (cycles > ncycles) {
ECHO_LM(OK, MSG_PID_AUTOTUNE_FINISHED); ECHO_LM(OK, MSG_PID_AUTOTUNE_FINISHED);
#ifdef PIDTEMP #ifdef PIDTEMP
PID_PARAM(Kp, hotend) = Kp_temp; if (hotend >= 0) {
PID_PARAM(Ki, hotend) = scalePID_i(Ki_temp); PID_PARAM(Kp, hotend) = Kp_temp;
PID_PARAM(Kd, hotend) = scalePID_d(Kd_temp); PID_PARAM(Ki, hotend) = scalePID_i(Ki_temp);
PID_PARAM(Kd, hotend) = scalePID_d(Kd_temp);
}
#endif #endif
return; return;
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
static void ST7920_SWSPI_SND_8BIT(uint8_t val) static void ST7920_SWSPI_SND_8BIT(uint8_t val)
{ {
uint8_t i; uint8_t i;
for( i=0; i<8; i++ ) for( i = 0; i < 8; i++ )
{ {
WRITE(ST7920_CLK_PIN,0); WRITE(ST7920_CLK_PIN,0);
#if F_CPU == 20000000 #if F_CPU == 20000000
...@@ -53,9 +53,9 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo ...@@ -53,9 +53,9 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
{ {
case U8G_DEV_MSG_INIT: case U8G_DEV_MSG_INIT:
{ {
OUT_WRITE(ST7920_CS_PIN,LOW); OUT_WRITE(ST7920_CS_PIN, LOW);
OUT_WRITE(ST7920_DAT_PIN,LOW); OUT_WRITE(ST7920_DAT_PIN, LOW);
OUT_WRITE(ST7920_CLK_PIN,HIGH); OUT_WRITE(ST7920_CLK_PIN, HIGH);
ST7920_CS(); ST7920_CS();
u8g_Delay(120); //initial delay for boot up u8g_Delay(120); //initial delay for boot up
......
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