Merge pull request #20 from 3d-gussner/MK2
FW 3.1.0-RC1 with warning cleanup
This commit is contained in:
commit
5f17028250
|
|
@ -5,7 +5,9 @@
|
||||||
#include "Configuration_prusa.h"
|
#include "Configuration_prusa.h"
|
||||||
|
|
||||||
// Firmware version
|
// Firmware version
|
||||||
#define FW_version "3.0.12-9"
|
|
||||||
|
#define FW_version "3.1.0-RC1"
|
||||||
|
|
||||||
|
|
||||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||||
#define FW_PRUSA3D_MAGIC_LEN 10
|
#define FW_PRUSA3D_MAGIC_LEN 10
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ FORCE_INLINE void Config_RetrieveSettings() { Config_ResetDefault(); Config_Prin
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline uint8_t calibration_status() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS); }
|
inline uint8_t calibration_status() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS); }
|
||||||
inline uint8_t calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
|
inline void calibration_status_store(uint8_t status) { eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS, status); }
|
||||||
inline bool calibration_status_pinda() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
|
inline bool calibration_status_pinda() { return eeprom_read_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA); }
|
||||||
|
|
||||||
#endif//CONFIG_STORE_H
|
#endif//CONFIG_STORE_H
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@ FORCE_INLINE void store_char(unsigned char c)
|
||||||
// Test for a framing error.
|
// Test for a framing error.
|
||||||
if (M_UCSRxA & (1<<M_FEx)) {
|
if (M_UCSRxA & (1<<M_FEx)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
// Dummy register read (discard)
|
||||||
volatile unsigned char c = M_UDRx;
|
(void)(*(char *)M_UDRx);
|
||||||
} else {
|
} else {
|
||||||
// Read the input register.
|
// Read the input register.
|
||||||
unsigned char c = M_UDRx;
|
unsigned char c = M_UDRx;
|
||||||
|
|
@ -71,8 +71,8 @@ FORCE_INLINE void store_char(unsigned char c)
|
||||||
// Test for a framing error.
|
// Test for a framing error.
|
||||||
if (UCSR2A & (1<<FE2)) {
|
if (UCSR2A & (1<<FE2)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
// Dummy register read (discard)
|
||||||
volatile unsigned char c = UDR2;
|
(void)(*(char *)UDR2);
|
||||||
} else {
|
} else {
|
||||||
// Read the input register.
|
// Read the input register.
|
||||||
unsigned char c = UDR2;
|
unsigned char c = UDR2;
|
||||||
|
|
|
||||||
|
|
@ -134,8 +134,7 @@ class MarlinSerial //: public Stream
|
||||||
// Test for a framing error.
|
// Test for a framing error.
|
||||||
if (M_UCSRxA & (1<<M_FEx)) {
|
if (M_UCSRxA & (1<<M_FEx)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
(void)(*(char *)M_UDRx);
|
||||||
volatile unsigned char c = M_UDRx;
|
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = M_UDRx;
|
unsigned char c = M_UDRx;
|
||||||
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
||||||
|
|
@ -156,8 +155,7 @@ class MarlinSerial //: public Stream
|
||||||
// Test for a framing error.
|
// Test for a framing error.
|
||||||
if (M_UCSRxA & (1<<M_FEx)) {
|
if (M_UCSRxA & (1<<M_FEx)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
(void)(*(char *)M_UDRx);
|
||||||
volatile unsigned char c = M_UDRx;
|
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = M_UDRx;
|
unsigned char c = M_UDRx;
|
||||||
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
||||||
|
|
@ -177,8 +175,7 @@ class MarlinSerial //: public Stream
|
||||||
// Test for a framing error.
|
// Test for a framing error.
|
||||||
if (UCSR2A & (1<<FE2)) {
|
if (UCSR2A & (1<<FE2)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
(void)(*(char *)UDR2);
|
||||||
volatile unsigned char c = UDR2;
|
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = UDR2;
|
unsigned char c = UDR2;
|
||||||
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,6 @@ bool mesh_bed_leveling_flag = false;
|
||||||
bool mesh_bed_run_from_menu = false;
|
bool mesh_bed_run_from_menu = false;
|
||||||
|
|
||||||
unsigned char lang_selected = 0;
|
unsigned char lang_selected = 0;
|
||||||
int8_t FarmMode = 0;
|
|
||||||
|
|
||||||
bool prusa_sd_card_upload = false;
|
bool prusa_sd_card_upload = false;
|
||||||
|
|
||||||
|
|
@ -408,8 +407,6 @@ uint8_t saved_filament_type;
|
||||||
const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
|
const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
|
||||||
float destination[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0};
|
float destination[NUM_AXIS] = { 0.0, 0.0, 0.0, 0.0};
|
||||||
|
|
||||||
static float delta[3] = {0.0, 0.0, 0.0};
|
|
||||||
|
|
||||||
// For tracing an arc
|
// For tracing an arc
|
||||||
static float offset[3] = {0.0, 0.0, 0.0};
|
static float offset[3] = {0.0, 0.0, 0.0};
|
||||||
static bool home_all_axis = true;
|
static bool home_all_axis = true;
|
||||||
|
|
@ -568,7 +565,7 @@ bool cmdqueue_pop_front()
|
||||||
// First skip the current command ID and iterate up to the end of the string.
|
// First skip the current command ID and iterate up to the end of the string.
|
||||||
for (++ bufindr; cmdbuffer[bufindr] != 0; ++ bufindr) ;
|
for (++ bufindr; cmdbuffer[bufindr] != 0; ++ bufindr) ;
|
||||||
// Second, skip the end of string null character and iterate until a nonzero command ID is found.
|
// Second, skip the end of string null character and iterate until a nonzero command ID is found.
|
||||||
for (++ bufindr; bufindr < sizeof(cmdbuffer) && cmdbuffer[bufindr] == 0; ++ bufindr) ;
|
for (++ bufindr; (bufindr < (int)sizeof(cmdbuffer)) && (cmdbuffer[bufindr] == 0); ++ bufindr) ;
|
||||||
// If the end of the buffer was empty,
|
// If the end of the buffer was empty,
|
||||||
if (bufindr == sizeof(cmdbuffer)) {
|
if (bufindr == sizeof(cmdbuffer)) {
|
||||||
// skip to the start and find the nonzero command.
|
// skip to the start and find the nonzero command.
|
||||||
|
|
@ -663,12 +660,12 @@ bool cmdqueue_could_enqueue_back(int len_asked)
|
||||||
int endw = bufindw + len_asked + 2;
|
int endw = bufindw + len_asked + 2;
|
||||||
if (bufindw < bufindr)
|
if (bufindw < bufindr)
|
||||||
// Simple case. There is a contiguous space between the write buffer and the read buffer.
|
// Simple case. There is a contiguous space between the write buffer and the read buffer.
|
||||||
return endw + CMDBUFFER_RESERVE_FRONT <= bufindr;
|
return ((endw + CMDBUFFER_RESERVE_FRONT) <= bufindr);
|
||||||
// Otherwise the free space is split between the start and end.
|
// Otherwise the free space is split between the start and end.
|
||||||
if (// Could one fit to the end, including the reserve?
|
if (// Could one fit to the end, including the reserve?
|
||||||
endw + CMDBUFFER_RESERVE_FRONT <= sizeof(cmdbuffer) ||
|
(endw + CMDBUFFER_RESERVE_FRONT <= (int)sizeof(cmdbuffer)) ||
|
||||||
// Could one fit to the end, and the reserve to the start?
|
// Could one fit to the end, and the reserve to the start?
|
||||||
(endw <= sizeof(cmdbuffer) && CMDBUFFER_RESERVE_FRONT <= bufindr))
|
((endw <= (int)sizeof(cmdbuffer)) && (CMDBUFFER_RESERVE_FRONT <= bufindr)))
|
||||||
return true;
|
return true;
|
||||||
// Could one fit both to the start?
|
// Could one fit both to the start?
|
||||||
if (len_asked + 2 + CMDBUFFER_RESERVE_FRONT <= bufindr) {
|
if (len_asked + 2 + CMDBUFFER_RESERVE_FRONT <= bufindr) {
|
||||||
|
|
@ -684,12 +681,12 @@ bool cmdqueue_could_enqueue_back(int len_asked)
|
||||||
int endw = bufindw + len_asked + 2;
|
int endw = bufindw + len_asked + 2;
|
||||||
if (bufindw < bufindr)
|
if (bufindw < bufindr)
|
||||||
// Simple case. There is a contiguous space between the write buffer and the read buffer.
|
// Simple case. There is a contiguous space between the write buffer and the read buffer.
|
||||||
return endw + CMDBUFFER_RESERVE_FRONT <= bufindr;
|
return ((endw + CMDBUFFER_RESERVE_FRONT) <= bufindr);
|
||||||
// Otherwise the free space is split between the start and end.
|
// Otherwise the free space is split between the start and end.
|
||||||
if (// Could one fit to the end, including the reserve?
|
if (// Could one fit to the end, including the reserve?
|
||||||
endw + CMDBUFFER_RESERVE_FRONT <= sizeof(cmdbuffer) ||
|
(endw + CMDBUFFER_RESERVE_FRONT <= (int)sizeof(cmdbuffer)) ||
|
||||||
// Could one fit to the end, and the reserve to the start?
|
// Could one fit to the end, and the reserve to the start?
|
||||||
(endw <= sizeof(cmdbuffer) && CMDBUFFER_RESERVE_FRONT <= bufindr))
|
((endw <= (int)sizeof(cmdbuffer)) && (CMDBUFFER_RESERVE_FRONT <= bufindr)))
|
||||||
return true;
|
return true;
|
||||||
// Could one fit both to the start?
|
// Could one fit both to the start?
|
||||||
if (len_asked + 2 + CMDBUFFER_RESERVE_FRONT <= bufindr) {
|
if (len_asked + 2 + CMDBUFFER_RESERVE_FRONT <= bufindr) {
|
||||||
|
|
@ -921,8 +918,6 @@ void servo_init()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_language_menu();
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef MESH_BED_LEVELING
|
#ifdef MESH_BED_LEVELING
|
||||||
enum MeshLevelingState { MeshReport, MeshStart, MeshNext, MeshSet };
|
enum MeshLevelingState { MeshReport, MeshStart, MeshNext, MeshSet };
|
||||||
|
|
@ -936,8 +931,7 @@ static void lcd_language_menu();
|
||||||
int er_progress = 0;
|
int er_progress = 0;
|
||||||
void factory_reset(char level, bool quiet)
|
void factory_reset(char level, bool quiet)
|
||||||
{
|
{
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
int cursor_pos = 0;
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
|
|
||||||
// Level 0: Language reset
|
// Level 0: Language reset
|
||||||
|
|
@ -970,8 +964,8 @@ void factory_reset(char level, bool quiet)
|
||||||
// Force the "Follow calibration flow" message at the next boot up.
|
// Force the "Follow calibration flow" message at the next boot up.
|
||||||
calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION);
|
calibration_status_store(CALIBRATION_STATUS_Z_CALIBRATION);
|
||||||
farm_no = 0;
|
farm_no = 0;
|
||||||
farm_mode = false;
|
farm_mode = 0;
|
||||||
eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
|
eeprom_update_byte((uint8_t*)EEPROM_FARM_MODE, farm_mode);
|
||||||
EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no);
|
EEPROM_save_B(EEPROM_FARM_NUMBER, &farm_no);
|
||||||
|
|
||||||
WRITE(BEEPER, HIGH);
|
WRITE(BEEPER, HIGH);
|
||||||
|
|
@ -1027,14 +1021,15 @@ void factory_reset(char level, bool quiet)
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
lcd_init();
|
lcd_init();
|
||||||
lcd_print_at_PGM(0, 1, PSTR(" Original Prusa "));
|
lcd_print_at_PGM(0, 1, PSTR(" Original Prusa "));
|
||||||
lcd_print_at_PGM(0, 2, PSTR(" 3D Printers "));
|
lcd_print_at_PGM(0, 2, PSTR(" 3D Printers "));
|
||||||
setup_killpin();
|
setup_killpin();
|
||||||
setup_powerhold();
|
setup_powerhold();
|
||||||
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
farm_mode = eeprom_read_byte((uint8_t*)EEPROM_FARM_MODE);
|
||||||
EEPROM_read_B(EEPROM_FARM_NUMBER, &farm_no);
|
EEPROM_read_B(EEPROM_FARM_NUMBER, &farm_no);
|
||||||
if ((farm_mode == 0xFF && farm_no == 0) || (farm_no == 0xFFFF)) farm_mode = false; //if farm_mode has not been stored to eeprom yet and farm number is set to zero or EEPROM is fresh, deactivate farm mode
|
if ((farm_mode == 0xFF && farm_no == 0) || ((uint16_t)farm_no == 0xFFFF))
|
||||||
if (farm_no == 0xFFFF) farm_no = 0;
|
farm_mode = false; //if farm_mode has not been stored to eeprom yet and farm number is set to zero or EEPROM is fresh, deactivate farm mode
|
||||||
|
if ((uint16_t)farm_no == 0xFFFF) farm_no = 0;
|
||||||
if (farm_mode)
|
if (farm_mode)
|
||||||
{
|
{
|
||||||
prusa_statistics(8);
|
prusa_statistics(8);
|
||||||
|
|
@ -1290,7 +1285,7 @@ void trace();
|
||||||
char chunk[CHUNK_SIZE+SAFETY_MARGIN];
|
char chunk[CHUNK_SIZE+SAFETY_MARGIN];
|
||||||
int chunkHead = 0;
|
int chunkHead = 0;
|
||||||
|
|
||||||
int serial_read_stream() {
|
void serial_read_stream() {
|
||||||
|
|
||||||
setTargetHotend(0, 0);
|
setTargetHotend(0, 0);
|
||||||
setTargetBed(0);
|
setTargetBed(0);
|
||||||
|
|
@ -1351,7 +1346,7 @@ int serial_read_stream() {
|
||||||
card.closefile();
|
card.closefile();
|
||||||
prusa_sd_card_upload = false;
|
prusa_sd_card_upload = false;
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_FILE_SAVED);
|
SERIAL_PROTOCOLLNRPGM(MSG_FILE_SAVED);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1366,8 +1361,8 @@ void host_keepalive() {
|
||||||
if (farm_mode) return;
|
if (farm_mode) return;
|
||||||
long ms = millis();
|
long ms = millis();
|
||||||
if (host_keepalive_interval && busy_state != NOT_BUSY) {
|
if (host_keepalive_interval && busy_state != NOT_BUSY) {
|
||||||
if (ms - prev_busy_signal_ms < 1000UL * host_keepalive_interval) return;
|
if ((ms - prev_busy_signal_ms) < (long)(1000L * host_keepalive_interval)) return;
|
||||||
switch (busy_state) {
|
switch (busy_state) {
|
||||||
case IN_HANDLER:
|
case IN_HANDLER:
|
||||||
case IN_PROCESS:
|
case IN_PROCESS:
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
|
|
@ -1381,6 +1376,8 @@ void host_keepalive() {
|
||||||
SERIAL_ECHO_START;
|
SERIAL_ECHO_START;
|
||||||
SERIAL_ECHOLNPGM("busy: paused for input");
|
SERIAL_ECHOLNPGM("busy: paused for input");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prev_busy_signal_ms = ms;
|
prev_busy_signal_ms = ms;
|
||||||
|
|
@ -1391,8 +1388,6 @@ void host_keepalive() {
|
||||||
// Before loop(), the setup() function is called by the main() routine.
|
// Before loop(), the setup() function is called by the main() routine.
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
bool stack_integrity = true;
|
|
||||||
|
|
||||||
if (usb_printing_counter > 0 && millis()-_usb_timer > 1000)
|
if (usb_printing_counter > 0 && millis()-_usb_timer > 1000)
|
||||||
{
|
{
|
||||||
is_usb_printing = true;
|
is_usb_printing = true;
|
||||||
|
|
@ -1413,43 +1408,43 @@ void loop()
|
||||||
|
|
||||||
get_command();
|
get_command();
|
||||||
|
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
card.checkautostart(false);
|
card.checkautostart(false);
|
||||||
#endif
|
#endif
|
||||||
if(buflen)
|
if(buflen)
|
||||||
{
|
{
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
if(card.saving)
|
if(card.saving)
|
||||||
{
|
{
|
||||||
// Saving a G-code file onto an SD-card is in progress.
|
// Saving a G-code file onto an SD-card is in progress.
|
||||||
// Saving starts with M28, saving until M29 is seen.
|
// Saving starts with M28, saving until M29 is seen.
|
||||||
if(strstr_P(CMDBUFFER_CURRENT_STRING, PSTR("M29")) == NULL) {
|
if(strstr_P(CMDBUFFER_CURRENT_STRING, PSTR("M29")) == NULL) {
|
||||||
card.write_command(CMDBUFFER_CURRENT_STRING);
|
card.write_command(CMDBUFFER_CURRENT_STRING);
|
||||||
if(card.logging)
|
if(card.logging)
|
||||||
process_commands();
|
process_commands();
|
||||||
else
|
else
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OK);
|
SERIAL_PROTOCOLLNRPGM(MSG_OK);
|
||||||
} else {
|
} else {
|
||||||
card.closefile();
|
card.closefile();
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_FILE_SAVED);
|
SERIAL_PROTOCOLLNRPGM(MSG_FILE_SAVED);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
process_commands();
|
process_commands();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
process_commands();
|
process_commands();
|
||||||
#endif //SDSUPPORT
|
#endif //SDSUPPORT
|
||||||
if (! cmdbuffer_front_already_processed)
|
if (! cmdbuffer_front_already_processed)
|
||||||
cmdqueue_pop_front();
|
cmdqueue_pop_front();
|
||||||
cmdbuffer_front_already_processed = false;
|
cmdbuffer_front_already_processed = false;
|
||||||
host_keepalive();
|
host_keepalive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//check heater every n milliseconds
|
//check heater every n milliseconds
|
||||||
manage_heater();
|
manage_heater();
|
||||||
isPrintPaused ? manage_inactivity(true) : manage_inactivity(false);
|
isPrintPaused ? manage_inactivity(true) : manage_inactivity(false);
|
||||||
checkHitEndstops();
|
checkHitEndstops();
|
||||||
lcd_update();
|
lcd_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void proc_commands() {
|
void proc_commands() {
|
||||||
|
|
@ -2646,10 +2641,10 @@ void process_commands()
|
||||||
if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
|
if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
|
||||||
float echange=destination[E_AXIS]-current_position[E_AXIS];
|
float echange=destination[E_AXIS]-current_position[E_AXIS];
|
||||||
|
|
||||||
if((echange<-MIN_RETRACT && !retracted) || (echange>MIN_RETRACT && retracted)) { //move appears to be an attempt to retract or recover
|
if((echange<-MIN_RETRACT && !retracted[active_extruder]) || (echange>MIN_RETRACT && retracted[active_extruder])) { //move appears to be an attempt to retract or recover
|
||||||
current_position[E_AXIS] = destination[E_AXIS]; //hide the slicer-generated retract/recover from calculations
|
current_position[E_AXIS] = destination[E_AXIS]; //hide the slicer-generated retract/recover from calculations
|
||||||
plan_set_e_position(current_position[E_AXIS]); //AND from the planner
|
plan_set_e_position(current_position[E_AXIS]); //AND from the planner
|
||||||
retract(!retracted);
|
retract(!retracted[active_extruder]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3383,7 +3378,6 @@ void process_commands()
|
||||||
int iy = 0;
|
int iy = 0;
|
||||||
|
|
||||||
int XY_AXIS_FEEDRATE = homing_feedrate[X_AXIS] / 20;
|
int XY_AXIS_FEEDRATE = homing_feedrate[X_AXIS] / 20;
|
||||||
int Z_PROBE_FEEDRATE = homing_feedrate[Z_AXIS] / 60;
|
|
||||||
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
|
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
|
||||||
bool has_z = is_bed_z_jitter_data_valid(); //checks if we have data from Z calibration (offsets of the Z heiths of the 8 calibration points from the first point)
|
bool has_z = is_bed_z_jitter_data_valid(); //checks if we have data from Z calibration (offsets of the Z heiths of the 8 calibration points from the first point)
|
||||||
if (verbosity_level >= 1) {
|
if (verbosity_level >= 1) {
|
||||||
|
|
@ -4858,7 +4852,6 @@ Sigma_Exit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float area = .0;
|
|
||||||
if(code_seen('D')) {
|
if(code_seen('D')) {
|
||||||
float diameter = (float)code_value();
|
float diameter = (float)code_value();
|
||||||
if (diameter == 0.0) {
|
if (diameter == 0.0) {
|
||||||
|
|
@ -5440,7 +5433,6 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
}
|
}
|
||||||
|
|
||||||
feedmultiplyBckp=feedmultiply;
|
feedmultiplyBckp=feedmultiply;
|
||||||
int8_t TooLowZ = 0;
|
|
||||||
|
|
||||||
target[X_AXIS]=current_position[X_AXIS];
|
target[X_AXIS]=current_position[X_AXIS];
|
||||||
target[Y_AXIS]=current_position[Y_AXIS];
|
target[Y_AXIS]=current_position[Y_AXIS];
|
||||||
|
|
@ -5473,11 +5465,9 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
{
|
{
|
||||||
#ifdef FILAMENTCHANGE_ZADD
|
#ifdef FILAMENTCHANGE_ZADD
|
||||||
target[Z_AXIS]+= FILAMENTCHANGE_ZADD ;
|
target[Z_AXIS]+= FILAMENTCHANGE_ZADD ;
|
||||||
|
// XXX: Removed unused var 'TooLowZ'
|
||||||
if(target[Z_AXIS] < 10){
|
if(target[Z_AXIS] < 10){
|
||||||
target[Z_AXIS]+= 10 ;
|
target[Z_AXIS]+= 10 ;
|
||||||
TooLowZ = 1;
|
|
||||||
}else{
|
|
||||||
TooLowZ = 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -5905,22 +5895,18 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
case 1:
|
case 1:
|
||||||
WRITE(E_MUX0_PIN, HIGH);
|
WRITE(E_MUX0_PIN, HIGH);
|
||||||
WRITE(E_MUX1_PIN, LOW);
|
WRITE(E_MUX1_PIN, LOW);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
WRITE(E_MUX0_PIN, LOW);
|
WRITE(E_MUX0_PIN, LOW);
|
||||||
WRITE(E_MUX1_PIN, HIGH);
|
WRITE(E_MUX1_PIN, HIGH);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
WRITE(E_MUX0_PIN, HIGH);
|
WRITE(E_MUX0_PIN, HIGH);
|
||||||
WRITE(E_MUX1_PIN, HIGH);
|
WRITE(E_MUX1_PIN, HIGH);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WRITE(E_MUX0_PIN, LOW);
|
WRITE(E_MUX0_PIN, LOW);
|
||||||
WRITE(E_MUX1_PIN, LOW);
|
WRITE(E_MUX1_PIN, LOW);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
@ -5933,6 +5919,14 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
SERIAL_ECHOLNRPGM(MSG_INVALID_EXTRUDER);
|
SERIAL_ECHOLNRPGM(MSG_INVALID_EXTRUDER);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#if EXTRUDERS == 1
|
||||||
|
if (code_seen('F')) {
|
||||||
|
next_feedrate = code_value();
|
||||||
|
if (next_feedrate > 0.0) {
|
||||||
|
feedrate = next_feedrate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
boolean make_move = false;
|
boolean make_move = false;
|
||||||
if (code_seen('F')) {
|
if (code_seen('F')) {
|
||||||
make_move = true;
|
make_move = true;
|
||||||
|
|
@ -5941,7 +5935,6 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
|
||||||
feedrate = next_feedrate;
|
feedrate = next_feedrate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if EXTRUDERS > 1
|
|
||||||
if (tmp_extruder != active_extruder) {
|
if (tmp_extruder != active_extruder) {
|
||||||
// Save current position to return to after applying extruder offset
|
// Save current position to return to after applying extruder offset
|
||||||
memcpy(destination, current_position, sizeof(destination));
|
memcpy(destination, current_position, sizeof(destination));
|
||||||
|
|
@ -6055,7 +6048,9 @@ void ClearToSend()
|
||||||
SERIAL_PROTOCOLLNRPGM(MSG_OK);
|
SERIAL_PROTOCOLLNRPGM(MSG_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
update_currents() {
|
|
||||||
|
void update_currents() {
|
||||||
|
|
||||||
float current_high[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
|
float current_high[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
|
||||||
float current_low[3] = DEFAULT_PWM_MOTOR_CURRENT;
|
float current_low[3] = DEFAULT_PWM_MOTOR_CURRENT;
|
||||||
float tmp_motor[3];
|
float tmp_motor[3];
|
||||||
|
|
@ -6094,12 +6089,15 @@ update_currents() {
|
||||||
|
|
||||||
void get_coordinates()
|
void get_coordinates()
|
||||||
{
|
{
|
||||||
bool seen[4]={false,false,false,false};
|
// XXX: Unused var (set but not ref)
|
||||||
|
// bool seen[4]={false,false,false,false};
|
||||||
for(int8_t i=0; i < NUM_AXIS; i++) {
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
||||||
if(code_seen(axis_codes[i]))
|
if(code_seen(axis_codes[i]))
|
||||||
{
|
{
|
||||||
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
|
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
|
||||||
seen[i]=true;
|
|
||||||
|
// seen[i]=true;
|
||||||
|
|
||||||
if (i == Z_AXIS && SilentModeMenu == 2) update_currents();
|
if (i == Z_AXIS && SilentModeMenu == 2) update_currents();
|
||||||
}
|
}
|
||||||
else destination[i] = current_position[i]; //Are these else lines really needed?
|
else destination[i] = current_position[i]; //Are these else lines really needed?
|
||||||
|
|
@ -6774,7 +6772,6 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 60, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 60, active_extruder);
|
||||||
|
|
||||||
int XY_AXIS_FEEDRATE = homing_feedrate[X_AXIS] / 20;
|
int XY_AXIS_FEEDRATE = homing_feedrate[X_AXIS] / 20;
|
||||||
int Z_PROBE_FEEDRATE = homing_feedrate[Z_AXIS] / 60;
|
|
||||||
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
|
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
|
||||||
|
|
||||||
setup_for_endstop_move(false);
|
setup_for_endstop_move(false);
|
||||||
|
|
@ -6941,7 +6938,6 @@ void temp_compensation_start() {
|
||||||
|
|
||||||
void temp_compensation_apply() {
|
void temp_compensation_apply() {
|
||||||
int i_add;
|
int i_add;
|
||||||
int compensation_value;
|
|
||||||
int z_shift = 0;
|
int z_shift = 0;
|
||||||
float z_shift_mm;
|
float z_shift_mm;
|
||||||
|
|
||||||
|
|
@ -6970,7 +6966,7 @@ float temp_comp_interpolation(float inp_temperature) {
|
||||||
|
|
||||||
//cubic spline interpolation
|
//cubic spline interpolation
|
||||||
|
|
||||||
int n, i, j, k;
|
int n, i, j;
|
||||||
float h[10], a, b, c, d, sum, s[10] = { 0 }, x[10], F[10], f[10], m[10][10] = { 0 }, temp;
|
float h[10], a, b, c, d, sum, s[10] = { 0 }, x[10], F[10], f[10], m[10][10] = { 0 }, temp;
|
||||||
int shift[10];
|
int shift[10];
|
||||||
int temp_C[10];
|
int temp_C[10];
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ int SdFatUtil::FreeRam() {
|
||||||
|
|
||||||
void SdFatUtil::set_stack_guard()
|
void SdFatUtil::set_stack_guard()
|
||||||
{
|
{
|
||||||
char i = 0;
|
//char i = 0;
|
||||||
uint32_t *stack_guard;
|
uint32_t *stack_guard;
|
||||||
|
|
||||||
stack_guard = (uint32_t*)&__bss_end;
|
stack_guard = (uint32_t*)&__bss_end;
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ char *createFilename(char *buffer,const dir_t &p) //buffer>12characters
|
||||||
|
|
||||||
void CardReader::lsDive_pointer(const char *prepend, SdFile parent, const char * const match) {
|
void CardReader::lsDive_pointer(const char *prepend, SdFile parent, const char * const match) {
|
||||||
dir_t p;
|
dir_t p;
|
||||||
uint8_t cnt = 0;
|
|
||||||
|
|
||||||
//parent.seekSet =
|
//parent.seekSet =
|
||||||
// Read the next entry from a directory
|
// Read the next entry from a directory
|
||||||
|
|
@ -73,17 +73,13 @@ void CardReader::lsDive_pointer(const char *prepend, SdFile parent, const char *
|
||||||
//pom = parent.curPosition();
|
//pom = parent.curPosition();
|
||||||
//MYSERIAL.println(pom, 10);
|
//MYSERIAL.println(pom, 10);
|
||||||
|
|
||||||
uint8_t pn0 = p.name[0];
|
|
||||||
|
|
||||||
filenameIsDir = DIR_IS_SUBDIR(&p);
|
filenameIsDir = DIR_IS_SUBDIR(&p);
|
||||||
|
|
||||||
|
createFilename(filename, p);
|
||||||
|
creationDate = p.creationDate;
|
||||||
|
creationTime = p.creationTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
createFilename(filename, p);
|
|
||||||
creationDate = p.creationDate;
|
|
||||||
creationTime = p.creationTime;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -363,12 +359,12 @@ void CardReader::openFile(char* name,bool read, bool replace_current/*=true*/)
|
||||||
if(name[0]=='/')
|
if(name[0]=='/')
|
||||||
{
|
{
|
||||||
dirname_start=strchr(name,'/')+1;
|
dirname_start=strchr(name,'/')+1;
|
||||||
while(dirname_start>0)
|
while(dirname_start)
|
||||||
{
|
{
|
||||||
dirname_end=strchr(dirname_start,'/');
|
dirname_end=strchr(dirname_start,'/');
|
||||||
//SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
|
//SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
|
||||||
//SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end-name));
|
//SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end-name));
|
||||||
if(dirname_end>0 && dirname_end>dirname_start)
|
if(dirname_end && dirname_end>dirname_start)
|
||||||
{
|
{
|
||||||
char subdirname[13];
|
char subdirname[13];
|
||||||
strncpy(subdirname, dirname_start, dirname_end-dirname_start);
|
strncpy(subdirname, dirname_start, dirname_end-dirname_start);
|
||||||
|
|
@ -461,12 +457,12 @@ void CardReader::removeFile(char* name)
|
||||||
if(name[0]=='/')
|
if(name[0]=='/')
|
||||||
{
|
{
|
||||||
dirname_start=strchr(name,'/')+1;
|
dirname_start=strchr(name,'/')+1;
|
||||||
while(dirname_start>0)
|
while(dirname_start)
|
||||||
{
|
{
|
||||||
dirname_end=strchr(dirname_start,'/');
|
dirname_end=strchr(dirname_start,'/');
|
||||||
//SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
|
//SERIAL_ECHO("start:");SERIAL_ECHOLN((int)(dirname_start-name));
|
||||||
//SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end-name));
|
//SERIAL_ECHO("end :");SERIAL_ECHOLN((int)(dirname_end-name));
|
||||||
if(dirname_end>0 && dirname_end>dirname_start)
|
if(dirname_end && dirname_end>dirname_start)
|
||||||
{
|
{
|
||||||
char subdirname[13];
|
char subdirname[13];
|
||||||
strncpy(subdirname, dirname_start, dirname_end-dirname_start);
|
strncpy(subdirname, dirname_start, dirname_end-dirname_start);
|
||||||
|
|
@ -710,8 +706,7 @@ void CardReader::updir()
|
||||||
{
|
{
|
||||||
--workDirDepth;
|
--workDirDepth;
|
||||||
workDir = workDirParents[0];
|
workDir = workDirParents[0];
|
||||||
int d;
|
for (uint8_t d = 0; d < workDirDepth; d++)
|
||||||
for (int d = 0; d < workDirDepth; d++)
|
|
||||||
workDirParents[d] = workDirParents[d+1];
|
workDirParents[d] = workDirParents[d+1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,7 @@ const char * const MSG_BED_LANG_TABLE[LANG_NUM] PROGMEM = {
|
||||||
MSG_BED_DE
|
MSG_BED_DE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const char MSG_BED_CORRECTION_FRONT_CENTR_EN[] PROGMEM = "FrontCentr[um]";
|
const char MSG_BED_CORRECTION_FRONT_CENTR_EN[] PROGMEM = "FrontCentr[um]";
|
||||||
const char MSG_BED_CORRECTION_FRONT_CENTR_CZ[] PROGMEM = "Vpredu [um]";
|
const char MSG_BED_CORRECTION_FRONT_CENTR_CZ[] PROGMEM = "Vpredu [um]";
|
||||||
const char MSG_BED_CORRECTION_FRONT_CENTR_IT[] PROGMEM = "Fronte [um]";
|
const char MSG_BED_CORRECTION_FRONT_CENTR_IT[] PROGMEM = "Fronte [um]";
|
||||||
|
|
@ -171,6 +172,7 @@ const char * const MSG_BED_CORRECTION_FRONT_LEFT_LANG_TABLE[1] PROGMEM = {
|
||||||
const char MSG_BED_CORRECTION_FRONT_RIGHT_EN[] PROGMEM = "FrontRight[um]";
|
const char MSG_BED_CORRECTION_FRONT_RIGHT_EN[] PROGMEM = "FrontRight[um]";
|
||||||
const char * const MSG_BED_CORRECTION_FRONT_RIGHT_LANG_TABLE[1] PROGMEM = {
|
const char * const MSG_BED_CORRECTION_FRONT_RIGHT_LANG_TABLE[1] PROGMEM = {
|
||||||
MSG_BED_CORRECTION_FRONT_RIGHT_EN
|
MSG_BED_CORRECTION_FRONT_RIGHT_EN
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const char MSG_BED_CORRECTION_MENU_EN[] PROGMEM = "Bed level correct";
|
const char MSG_BED_CORRECTION_MENU_EN[] PROGMEM = "Bed level correct";
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,7 @@
|
||||||
#define MSG_SET_TEMPERATURE "Temp. einsetzen"
|
#define MSG_SET_TEMPERATURE "Temp. einsetzen"
|
||||||
#define MSG_PID_FINISHED "PID Kalib. fertig"
|
#define MSG_PID_FINISHED "PID Kalib. fertig"
|
||||||
#define MSG_PID_RUNNING "PID Kalib."
|
#define MSG_PID_RUNNING "PID Kalib."
|
||||||
|
|
||||||
#define MSG_CONFIRM_NOZZLE_CLEAN "Bitte reinigen Sie die Duese vor Kalibrierung. Klicken wenn sauber."
|
#define MSG_CONFIRM_NOZZLE_CLEAN "Bitte reinigen Sie die Duese vor Kalibrierung. Klicken wenn sauber."
|
||||||
#define MSG_CONFIRM_CARRIAGE_AT_THE_TOP "Sind beide Z Schlitten ganz oben?"
|
#define MSG_CONFIRM_CARRIAGE_AT_THE_TOP "Sind beide Z Schlitten ganz oben?"
|
||||||
|
|
||||||
|
|
@ -275,10 +276,12 @@
|
||||||
|
|
||||||
#define MSG_BED_CORRECTION_MENU "Bett level korrekt"
|
#define MSG_BED_CORRECTION_MENU "Bett level korrekt"
|
||||||
|
|
||||||
|
|
||||||
#define MSG_BED_CORRECTION_MID_LEFT "Mi.Links [um]"
|
#define MSG_BED_CORRECTION_MID_LEFT "Mi.Links [um]"
|
||||||
#define MSG_BED_CORRECTION_MID_RIGHT "Mi.Rechts [um]"
|
#define MSG_BED_CORRECTION_MID_RIGHT "Mi.Rechts [um]"
|
||||||
#define MSG_BED_CORRECTION_FRONT_CENTR "Ztr.Vorne [um]"
|
#define MSG_BED_CORRECTION_FRONT_CENTR "Ztr.Vorne [um]"
|
||||||
#define MSG_BED_CORRECTION_REAR_CENTR "Ztr.Hinten[um]"
|
#define MSG_BED_CORRECTION_REAR_CENTR "Ztr.Hinten[um]"
|
||||||
|
|
||||||
#define MSG_BED_CORRECTION_RESET "Zuruecksetzen"
|
#define MSG_BED_CORRECTION_RESET "Zuruecksetzen"
|
||||||
|
|
||||||
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#define MSG_NOZZLE1 "Nozzle2"
|
#define MSG_NOZZLE1 "Nozzle2"
|
||||||
#define MSG_NOZZLE2 "Nozzle3"
|
#define MSG_NOZZLE2 "Nozzle3"
|
||||||
#define MSG_BED "Bed"
|
#define MSG_BED "Bed"
|
||||||
#define(length=14) MSG_FAN_SPEED "Fan speed"
|
#define(length=15) MSG_FAN_SPEED "Fan speed"
|
||||||
#define MSG_FLOW "Flow"
|
#define MSG_FLOW "Flow"
|
||||||
#define MSG_FLOW0 "Flow 0"
|
#define MSG_FLOW0 "Flow 0"
|
||||||
#define MSG_FLOW1 "Flow 1"
|
#define MSG_FLOW1 "Flow 1"
|
||||||
|
|
@ -52,11 +52,11 @@
|
||||||
#define MSG_CARD_MENU "Print from SD"
|
#define MSG_CARD_MENU "Print from SD"
|
||||||
#define MSG_NO_CARD "No SD card"
|
#define MSG_NO_CARD "No SD card"
|
||||||
#define MSG_DWELL "Sleep..."
|
#define MSG_DWELL "Sleep..."
|
||||||
#define MSG_USERWAIT "Wait for user..."
|
#define(length=19) MSG_USERWAIT "Wait for user..."
|
||||||
#define MSG_RESUMING "Resuming print"
|
#define(length=20) MSG_RESUMING "Resuming print"
|
||||||
#define(length=20) MSG_PRINT_ABORTED "Print aborted"
|
#define(length=20) MSG_PRINT_ABORTED "Print aborted"
|
||||||
#define MSG_NO_MOVE "No move."
|
#define MSG_NO_MOVE "No move."
|
||||||
#define MSG_KILLED "KILLED. "
|
#define(length=20) MSG_KILLED "KILLED. "
|
||||||
#define MSG_STOPPED "STOPPED. "
|
#define MSG_STOPPED "STOPPED. "
|
||||||
#define MSG_FILAMENTCHANGE "Change filament"
|
#define MSG_FILAMENTCHANGE "Change filament"
|
||||||
#define MSG_INIT_SDCARD "Init. SD card"
|
#define MSG_INIT_SDCARD "Init. SD card"
|
||||||
|
|
@ -64,12 +64,12 @@
|
||||||
#define MSG_BABYSTEP_X "Babystep X"
|
#define MSG_BABYSTEP_X "Babystep X"
|
||||||
#define MSG_BABYSTEP_Y "Babystep Y"
|
#define MSG_BABYSTEP_Y "Babystep Y"
|
||||||
#define MSG_BABYSTEP_Z "Live adjust Z"
|
#define MSG_BABYSTEP_Z "Live adjust Z"
|
||||||
#define MSG_ADJUSTZ "Auto adjust Z?"
|
#define(length=18) MSG_ADJUSTZ "Auto adjust Z?"
|
||||||
#define MSG_PICK_Z "Pick print"
|
#define(length=20) MSG_PICK_Z "Pick print"
|
||||||
|
|
||||||
#define MSG_SETTINGS "Settings"
|
#define MSG_SETTINGS "Settings"
|
||||||
#define MSG_PREHEAT "Preheat"
|
#define MSG_PREHEAT "Preheat"
|
||||||
#define(length=17) MSG_UNLOAD_FILAMENT "Unload filament"
|
#define(length=18) MSG_UNLOAD_FILAMENT "Unload filament"
|
||||||
#define(length=17) MSG_LOAD_FILAMENT "Load filament"
|
#define(length=17) MSG_LOAD_FILAMENT "Load filament"
|
||||||
#define(length=17) MSG_LOAD_FILAMENT_1 "Load filament 1"
|
#define(length=17) MSG_LOAD_FILAMENT_1 "Load filament 1"
|
||||||
#define(length=17) MSG_LOAD_FILAMENT_2 "Load filament 2"
|
#define(length=17) MSG_LOAD_FILAMENT_2 "Load filament 2"
|
||||||
|
|
@ -79,8 +79,8 @@
|
||||||
#define(length=17) MSG_UNLOAD_FILAMENT_2 "Unload filament 2"
|
#define(length=17) MSG_UNLOAD_FILAMENT_2 "Unload filament 2"
|
||||||
#define(length=17) MSG_UNLOAD_FILAMENT_3 "Unload filament 3"
|
#define(length=17) MSG_UNLOAD_FILAMENT_3 "Unload filament 3"
|
||||||
#define(length=17) MSG_UNLOAD_FILAMENT_4 "Unload filament 4"
|
#define(length=17) MSG_UNLOAD_FILAMENT_4 "Unload filament 4"
|
||||||
#define MSG_UNLOAD_ALL "Unload all"
|
#define(length=17) MSG_UNLOAD_ALL "Unload all"
|
||||||
#define MSG_LOAD_ALL "Load all"
|
#define(length=17) MSG_LOAD_ALL "Load all"
|
||||||
|
|
||||||
|
|
||||||
#define MSG_RECTRACT "Rectract"
|
#define MSG_RECTRACT "Rectract"
|
||||||
|
|
@ -91,11 +91,11 @@
|
||||||
#define MSG_YES "Yes"
|
#define MSG_YES "Yes"
|
||||||
#define MSG_NO "No"
|
#define MSG_NO "No"
|
||||||
#define(length=19) MSG_NOT_LOADED "Filament not loaded"
|
#define(length=19) MSG_NOT_LOADED "Filament not loaded"
|
||||||
#define MSG_NOT_COLOR "Color not clear"
|
#define(length=18) MSG_NOT_COLOR "Color not clear"
|
||||||
#define(length=20) MSG_LOADING_FILAMENT "Loading filament"
|
#define(length=20) MSG_LOADING_FILAMENT "Loading filament"
|
||||||
#define(length=20) MSG_PLEASE_WAIT "Please wait"
|
#define(length=20) MSG_PLEASE_WAIT "Please wait"
|
||||||
#define MSG_LOADING_COLOR "Loading color"
|
#define MSG_LOADING_COLOR "Loading color"
|
||||||
#define MSG_CHANGE_SUCCESS "Change success!"
|
#define(length=20) MSG_CHANGE_SUCCESS "Change success!"
|
||||||
#define(length=20) MSG_PRESS "and press the knob"
|
#define(length=20) MSG_PRESS "and press the knob"
|
||||||
#define(length=20) MSG_INSERT_FILAMENT "Insert filament"
|
#define(length=20) MSG_INSERT_FILAMENT "Insert filament"
|
||||||
#define(length=20) MSG_CHANGING_FILAMENT "Changing filament!"
|
#define(length=20) MSG_CHANGING_FILAMENT "Changing filament!"
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
#define MSG_SILENT_MODE_OFF "Mode [high power]"
|
#define MSG_SILENT_MODE_OFF "Mode [high power]"
|
||||||
#define MSG_AUTO_MODE_ON "Mode [auto power]"
|
#define MSG_AUTO_MODE_ON "Mode [auto power]"
|
||||||
#define(length=20) MSG_REBOOT "Reboot the printer"
|
#define(length=20) MSG_REBOOT "Reboot the printer"
|
||||||
#define(length=20) MSG_TAKE_EFFECT " for take effect"
|
#define(length=20, lines=2) MSG_TAKE_EFFECT " for take effect"
|
||||||
|
|
||||||
#define MSG_Enqueing "enqueing \""
|
#define MSG_Enqueing "enqueing \""
|
||||||
#define MSG_POWERUP "PowerUp"
|
#define MSG_POWERUP "PowerUp"
|
||||||
|
|
@ -165,12 +165,12 @@
|
||||||
#define MSG_PRUSA3D_FORUM "forum.prusa3d.com"
|
#define MSG_PRUSA3D_FORUM "forum.prusa3d.com"
|
||||||
#define MSG_PRUSA3D_HOWTO "howto.prusa3d.com"
|
#define MSG_PRUSA3D_HOWTO "howto.prusa3d.com"
|
||||||
|
|
||||||
#define MSG_SELFTEST_ERROR "Selftest error !"
|
#define(length=19) MSG_SELFTEST_ERROR "Selftest error !"
|
||||||
#define MSG_SELFTEST_PLEASECHECK "Please check :"
|
#define MSG_SELFTEST_PLEASECHECK "Please check :"
|
||||||
#define MSG_SELFTEST_NOTCONNECTED "Not connected"
|
#define(length=19) MSG_SELFTEST_NOTCONNECTED "Not connected"
|
||||||
#define MSG_SELFTEST_HEATERTHERMISTOR "Heater/Thermistor"
|
#define MSG_SELFTEST_HEATERTHERMISTOR "Heater/Thermistor"
|
||||||
#define MSG_SELFTEST_BEDHEATER "Bed / Heater"
|
#define MSG_SELFTEST_BEDHEATER "Bed / Heater"
|
||||||
#define MSG_SELFTEST_WIRINGERROR "Wiring error"
|
#define(length=18) MSG_SELFTEST_WIRINGERROR "Wiring error"
|
||||||
#define MSG_SELFTEST_ENDSTOPS "Endstops"
|
#define MSG_SELFTEST_ENDSTOPS "Endstops"
|
||||||
#define MSG_SELFTEST_MOTOR "Motor"
|
#define MSG_SELFTEST_MOTOR "Motor"
|
||||||
#define MSG_SELFTEST_ENDSTOP "Endstop"
|
#define MSG_SELFTEST_ENDSTOP "Endstop"
|
||||||
|
|
@ -182,7 +182,7 @@
|
||||||
#define(length=20) MSG_SELFTEST_COOLING_FAN "Front print fan?";
|
#define(length=20) MSG_SELFTEST_COOLING_FAN "Front print fan?";
|
||||||
#define(length=20) MSG_SELFTEST_EXTRUDER_FAN "Left hotend fan?";
|
#define(length=20) MSG_SELFTEST_EXTRUDER_FAN "Left hotend fan?";
|
||||||
#define MSG_SELFTEST_FAN_YES "Spinning";
|
#define MSG_SELFTEST_FAN_YES "Spinning";
|
||||||
#define MSG_SELFTEST_FAN_NO "Not spinning";
|
#define(length=18) MSG_SELFTEST_FAN_NO "Not spinning";
|
||||||
|
|
||||||
#define(length=20) MSG_STATS_TOTALFILAMENT "Total filament :"
|
#define(length=20) MSG_STATS_TOTALFILAMENT "Total filament :"
|
||||||
#define(length=20) MSG_STATS_TOTALPRINTTIME "Total print time :"
|
#define(length=20) MSG_STATS_TOTALPRINTTIME "Total print time :"
|
||||||
|
|
@ -204,7 +204,7 @@
|
||||||
#define MSG_HOMEYZ_PROGRESS "Calibrating Z"
|
#define MSG_HOMEYZ_PROGRESS "Calibrating Z"
|
||||||
#define MSG_HOMEYZ_DONE "Calibration done"
|
#define MSG_HOMEYZ_DONE "Calibration done"
|
||||||
|
|
||||||
#define(length=17,lines=1) MSG_SHOW_END_STOPS "Show end stops"
|
#define(length=19) MSG_SHOW_END_STOPS "Show end stops"
|
||||||
#define MSG_CALIBRATE_BED "Calibrate XYZ"
|
#define MSG_CALIBRATE_BED "Calibrate XYZ"
|
||||||
#define MSG_CALIBRATE_BED_RESET "Reset XYZ calibr."
|
#define MSG_CALIBRATE_BED_RESET "Reset XYZ calibr."
|
||||||
|
|
||||||
|
|
@ -234,9 +234,9 @@
|
||||||
#define(length=20,lines=8) MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR "XYZ calibration compromised. Right front calibration point not reachable."
|
#define(length=20,lines=8) MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR "XYZ calibration compromised. Right front calibration point not reachable."
|
||||||
#define(length=20,lines=8) MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR "XYZ calibration compromised. Front calibration points not reachable."
|
#define(length=20,lines=8) MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR "XYZ calibration compromised. Front calibration points not reachable."
|
||||||
|
|
||||||
#define(length=20,lines=4) MSG_BED_LEVELING_FAILED_POINT_LOW "Bed leveling failed. Sensor didnt trigger. Debris on nozzle? Waiting for reset."
|
#define(length=20,lines=6) MSG_BED_LEVELING_FAILED_POINT_LOW "Bed leveling failed. Sensor didnt trigger. Debris on nozzle? Waiting for reset."
|
||||||
#define(length=20,lines=4) MSG_BED_LEVELING_FAILED_POINT_HIGH "Bed leveling failed. Sensor triggered too high. Waiting for reset."
|
#define(length=20,lines=6) MSG_BED_LEVELING_FAILED_POINT_HIGH "Bed leveling failed. Sensor triggered too high. Waiting for reset."
|
||||||
#define(length=20,lines=4) MSG_BED_LEVELING_FAILED_PROBE_DISCONNECTED "Bed leveling failed. Sensor disconnected or cable broken. Waiting for reset."
|
#define(length=20,lines=6) MSG_BED_LEVELING_FAILED_PROBE_DISCONNECTED "Bed leveling failed. Sensor disconnected or cable broken. Waiting for reset."
|
||||||
|
|
||||||
#define(length=20,lines=2) MSG_NEW_FIRMWARE_AVAILABLE "New firmware version available:"
|
#define(length=20,lines=2) MSG_NEW_FIRMWARE_AVAILABLE "New firmware version available:"
|
||||||
#define(length=20) MSG_NEW_FIRMWARE_PLEASE_UPGRADE "Please upgrade."
|
#define(length=20) MSG_NEW_FIRMWARE_PLEASE_UPGRADE "Please upgrade."
|
||||||
|
|
@ -262,6 +262,7 @@
|
||||||
#define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done."
|
#define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done."
|
||||||
#define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for nozzle and bed cooling"
|
#define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for nozzle and bed cooling"
|
||||||
#define(length=20, lines=2) MSG_FILAMENT_CLEAN "Is color clear?"
|
#define(length=20, lines=2) MSG_FILAMENT_CLEAN "Is color clear?"
|
||||||
|
|
||||||
#define(lenght=20) MSG_UNLOADING_FILAMENT "Unloading filament"
|
#define(lenght=20) MSG_UNLOADING_FILAMENT "Unloading filament"
|
||||||
#define(length=20, lines=10) MSG_PAPER "Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."
|
#define(length=20, lines=10) MSG_PAPER "Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."
|
||||||
|
|
||||||
|
|
@ -275,6 +276,7 @@
|
||||||
#define(length=14,lines=1) MSG_BED_CORRECTION_REAR_LEFT "RearLeft [um]"
|
#define(length=14,lines=1) MSG_BED_CORRECTION_REAR_LEFT "RearLeft [um]"
|
||||||
#define(length=14,lines=1) MSG_BED_CORRECTION_MID_LEFT "MidLeft [um]"
|
#define(length=14,lines=1) MSG_BED_CORRECTION_MID_LEFT "MidLeft [um]"
|
||||||
|
|
||||||
|
|
||||||
#define MSG_BED_CORRECTION_RESET "Reset"
|
#define MSG_BED_CORRECTION_RESET "Reset"
|
||||||
|
|
||||||
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
#define MSG_MESH_BED_LEVELING "Mesh Bed Leveling"
|
||||||
|
|
@ -295,7 +297,7 @@
|
||||||
#define(length=20, lines=4) MSG_PINDA_NOT_CALIBRATED "Temperature calibration has not been run yet"
|
#define(length=20, lines=4) MSG_PINDA_NOT_CALIBRATED "Temperature calibration has not been run yet"
|
||||||
#define(length=20, lines=1) MSG_PINDA_PREHEAT "PINDA Heating"
|
#define(length=20, lines=1) MSG_PINDA_PREHEAT "PINDA Heating"
|
||||||
#define(length=20, lines=1) MSG_TEMP_CALIBRATION "Temp. cal. "
|
#define(length=20, lines=1) MSG_TEMP_CALIBRATION "Temp. cal. "
|
||||||
#define(length=20, lines=4) MSG_TEMP_CALIBRATION_DONE "Temperature calibration is finished. Click to continue."
|
#define(length=20, lines=5) MSG_TEMP_CALIBRATION_DONE "Temperature calibration is finished. Click to continue."
|
||||||
#define(length=20, lines=1) MSG_TEMP_CALIBRATION_ON "Temp. cal. [ON]"
|
#define(length=20, lines=1) MSG_TEMP_CALIBRATION_ON "Temp. cal. [ON]"
|
||||||
#define(length=20, lines=1) MSG_TEMP_CALIBRATION_OFF "Temp. cal. [OFF]"
|
#define(length=20, lines=1) MSG_TEMP_CALIBRATION_OFF "Temp. cal. [OFF]"
|
||||||
#define(length=20, lines=1) MSG_PREPARE_FILAMENT "Prepare new filament"
|
#define(length=20, lines=1) MSG_PREPARE_FILAMENT "Prepare new filament"
|
||||||
|
|
@ -322,28 +324,29 @@
|
||||||
#define(length=17, lines=1) MSG_SORT_ALPHA "Sort: [Alphabet]"
|
#define(length=17, lines=1) MSG_SORT_ALPHA "Sort: [Alphabet]"
|
||||||
#define(length=17, lines=1) MSG_SORT_NONE "Sort: [None]"
|
#define(length=17, lines=1) MSG_SORT_NONE "Sort: [None]"
|
||||||
#define(length=20, lines=1) MSG_SORTING "Sorting files"
|
#define(length=20, lines=1) MSG_SORTING "Sorting files"
|
||||||
#define MSG_FILE_INCOMPLETE "File incomplete. Continue anyway?"
|
#define(length=20, lines=3) MSG_FILE_INCOMPLETE "File incomplete. Continue anyway?"
|
||||||
#define(length=17, lines=1) MSG_WIZARD "Wizard"
|
#define(length=17, lines=1) MSG_WIZARD "Wizard"
|
||||||
#define MSG_WIZARD_LANGUAGE "Please choose your language"
|
#define(length=20, lines=2) MSG_WIZARD_LANGUAGE "Please choose your language"
|
||||||
#define MSG_WIZARD_WELCOME "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"
|
#define(length=20, lines=6) MSG_WIZARD_WELCOME "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"
|
||||||
#define MSG_WIZARD_QUIT "You can always resume the Wizard from Calibration -> Wizard."
|
#define(length=20, lines=5) MSG_WIZARD_QUIT "You can always resume the Wizard from Calibration -> Wizard."
|
||||||
#define MSG_WIZARD_SELFTEST "First, I will run the selftest to check most common assembly problems."
|
#define(length=20, lines=6) MSG_WIZARD_SELFTEST "First, I will run the selftest to check most common assembly problems."
|
||||||
#define MSG_WIZARD_CALIBRATION_FAILED "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."
|
#define(length=20, lines=7) MSG_WIZARD_CALIBRATION_FAILED "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."
|
||||||
#define MSG_WIZARD_XYZ_CAL "I will run xyz calibration now. It will take approx. 12 mins."
|
#define(length=20, lines=4) MSG_WIZARD_XYZ_CAL "I will run xyz calibration now. It will take approx. 12 mins."
|
||||||
#define MSG_WIZARD_FILAMENT_LOADED "Is filament loaded?"
|
#define(length=20) MSG_WIZARD_FILAMENT_LOADED "Is filament loaded?"
|
||||||
#define MSG_WIZARD_Z_CAL "I will run z calibration now."
|
#define(length=20, lines=2) MSG_WIZARD_Z_CAL "I will run z calibration now."
|
||||||
#define MSG_WIZARD_WILL_PREHEAT "Now I will preheat nozzle for PLA."
|
#define(length=20, lines=2) MSG_WIZARD_WILL_PREHEAT "Now I will preheat nozzle for PLA."
|
||||||
#define MSG_WIZARD_HEATING "Preheating nozzle. Please wait."
|
#define(length=20, lines=2) MSG_WIZARD_HEATING "Preheating nozzle. Please wait."
|
||||||
#define MSG_WIZARD_V2_CAL "Now I will calibrate distance between tip of the nozzle and heatbed surface."
|
#define(length=20, lines=4) MSG_WIZARD_V2_CAL "Now I will calibrate distance between tip of the nozzle and heatbed surface."
|
||||||
#define MSG_WIZARD_V2_CAL_2 "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."
|
#define(length=20, lines=10) MSG_WIZARD_V2_CAL_2 "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."
|
||||||
#define MSG_V2_CALIBRATION "First layer cal."
|
#define MSG_V2_CALIBRATION "First layer cal."
|
||||||
#define MSG_WIZARD_DONE "All is done. Happy printing!"
|
|
||||||
#define MSG_WIZARD_LOAD_FILAMENT "Please insert PLA filament to the extruder, then press knob to load it."
|
#define(length=20, lines=2) MSG_WIZARD_DONE "All is done. Happy printing!"
|
||||||
#define MSG_WIZARD_RERUN "Running Wizard will delete current calibration results and start from the beginning. Continue?"
|
#define(length=20, lines=8) MSG_WIZARD_LOAD_FILAMENT "Please insert PLA filament to the extruder, then press knob to load it."
|
||||||
#define MSG_WIZARD_REPEAT_V2_CAL "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
|
#define(length=20, lines=6) MSG_WIZARD_RERUN "Running Wizard will delete current calibration results and start from the beginning. Continue?"
|
||||||
#define MSG_WIZARD_CLEAN_HEATBED "Please clean heatbed and then press the knob."
|
#define(length=20, lines=6) MSG_WIZARD_REPEAT_V2_CAL "Do you want to repeat last step to readjust distance between nozzle and heatbed?"
|
||||||
#define MSG_WIZARD_PLA_FILAMENT "Is it PLA filament?"
|
#define(length=20, lines=3) MSG_WIZARD_CLEAN_HEATBED "Please clean heatbed and then press the knob."
|
||||||
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer."
|
#define(length=20) MSG_WIZARD_PLA_FILAMENT "Is it PLA filament?"
|
||||||
#define MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
|
#define(length=20, lines=5) MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer."
|
||||||
#define MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
|
#define(length=20, lines=2) MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
|
||||||
#define MSG_FILE_CNT "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
|
#define(length=20, lines=2) MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
|
||||||
|
#define(length=20, lines=5) MSG_FILE_CNT "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."
|
||||||
|
|
|
||||||
|
|
@ -1599,7 +1599,6 @@ inline void scan_bed_induction_sensor_point()
|
||||||
float x1 = center_old_x + IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
float x1 = center_old_x + IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
||||||
float y0 = center_old_y - IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
float y0 = center_old_y - IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
||||||
float y1 = center_old_y + IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
float y1 = center_old_y + IMPROVE_BED_INDUCTION_SENSOR_POINT3_SEARCH_RADIUS;
|
||||||
float y = y0;
|
|
||||||
|
|
||||||
if (x0 < X_MIN_POS)
|
if (x0 < X_MIN_POS)
|
||||||
x0 = X_MIN_POS;
|
x0 = X_MIN_POS;
|
||||||
|
|
@ -2271,11 +2270,11 @@ bool sample_mesh_and_store_reference()
|
||||||
{
|
{
|
||||||
// Verify the span of the Z values.
|
// Verify the span of the Z values.
|
||||||
float zmin = mbl.z_values[0][0];
|
float zmin = mbl.z_values[0][0];
|
||||||
float zmax = zmax;
|
float zmax = zmin;
|
||||||
for (int8_t j = 0; j < 3; ++ j)
|
for (int8_t j = 0; j < 3; ++ j)
|
||||||
for (int8_t i = 0; i < 3; ++ i) {
|
for (int8_t i = 0; i < 3; ++ i) {
|
||||||
zmin = min(zmin, mbl.z_values[j][i]);
|
zmin = min(zmin, mbl.z_values[j][i]);
|
||||||
zmax = min(zmax, mbl.z_values[j][i]);
|
zmax = max(zmax, mbl.z_values[j][i]);
|
||||||
}
|
}
|
||||||
if (zmax - zmin > 3.f) {
|
if (zmax - zmin > 3.f) {
|
||||||
// The span of the Z offsets is extreme. Give up.
|
// The span of the Z offsets is extreme. Give up.
|
||||||
|
|
@ -2446,7 +2445,7 @@ void babystep_reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
void count_xyz_details() {
|
void count_xyz_details() {
|
||||||
float a1, a2;
|
//float a1, a2;
|
||||||
float cntr[2] = {
|
float cntr[2] = {
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 0)),
|
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 0)),
|
||||||
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 4))
|
eeprom_read_float((float*)(EEPROM_BED_CALIBRATION_CENTER + 4))
|
||||||
|
|
@ -2474,14 +2473,15 @@ void count_xyz_details() {
|
||||||
SERIAL_ECHOPGM("Calibration status:");
|
SERIAL_ECHOPGM("Calibration status:");
|
||||||
MYSERIAL.println(int(calibration_status()));
|
MYSERIAL.println(int(calibration_status()));
|
||||||
|
|
||||||
a2 = -1 * asin(vec_y[0] / MACHINE_AXIS_SCALE_Y);
|
/* a2 = -1 * asin(vec_y[0] / MACHINE_AXIS_SCALE_Y);
|
||||||
/* SERIAL_ECHOLNPGM("par:");
|
SERIAL_ECHOLNPGM("par:");
|
||||||
MYSERIAL.println(vec_y[0]);
|
MYSERIAL.println(vec_y[0]);
|
||||||
MYSERIAL.println(a2);*/
|
MYSERIAL.println(a2);
|
||||||
a1 = asin(vec_x[1] / MACHINE_AXIS_SCALE_X);
|
a1 = asin(vec_x[1] / MACHINE_AXIS_SCALE_X);
|
||||||
/* MYSERIAL.println(vec_x[1]);
|
MYSERIAL.println(vec_x[1]);
|
||||||
MYSERIAL.println(a1);*/
|
MYSERIAL.println(a1);
|
||||||
//angleDiff = fabs(a2 - a1);
|
angleDiff = fabs(a2 - a1);
|
||||||
|
*/
|
||||||
for (uint8_t mesh_point = 0; mesh_point < 3; ++mesh_point) {
|
for (uint8_t mesh_point = 0; mesh_point < 3; ++mesh_point) {
|
||||||
float y = vec_x[1] * pgm_read_float(bed_ref_points + mesh_point * 2) + vec_y[1] * pgm_read_float(bed_ref_points + mesh_point * 2 + 1) + cntr[1];
|
float y = vec_x[1] * pgm_read_float(bed_ref_points + mesh_point * 2) + vec_y[1] * pgm_read_float(bed_ref_points + mesh_point * 2 + 1) + cntr[1];
|
||||||
distance_from_min[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
distance_from_min[mesh_point] = (y - Y_MIN_POS_CALIBRATION_POINT_OUT_OF_REACH);
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,6 @@
|
||||||
|
|
||||||
#include "boards.h"
|
#include "boards.h"
|
||||||
|
|
||||||
#if !MB(5DPRINT)
|
|
||||||
#define X_MS1_PIN -1
|
|
||||||
#define X_MS2_PIN -1
|
|
||||||
#define Y_MS1_PIN -1
|
|
||||||
#define Y_MS2_PIN -1
|
|
||||||
#define Z_MS1_PIN -1
|
|
||||||
#define Z_MS2_PIN -1
|
|
||||||
#define E0_MS1_PIN -1
|
|
||||||
#define E0_MS2_PIN -1
|
|
||||||
#define E1_MS1_PIN -1
|
|
||||||
#define E1_MS2_PIN -1
|
|
||||||
#define DIGIPOTSS_PIN -1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LARGE_FLASH true
|
#define LARGE_FLASH true
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
|
|
@ -38,22 +24,16 @@
|
||||||
|
|
||||||
#define X_STEP_PIN 37
|
#define X_STEP_PIN 37
|
||||||
#define X_DIR_PIN 48
|
#define X_DIR_PIN 48
|
||||||
#define X_MIN_PIN 12
|
|
||||||
#define X_MAX_PIN 30
|
|
||||||
#define X_ENABLE_PIN 29
|
#define X_ENABLE_PIN 29
|
||||||
#define X_MS1_PIN 40
|
#define X_MS1_PIN 40
|
||||||
#define X_MS2_PIN 41
|
#define X_MS2_PIN 41
|
||||||
#define Y_STEP_PIN 36
|
#define Y_STEP_PIN 36
|
||||||
#define Y_DIR_PIN 49
|
#define Y_DIR_PIN 49
|
||||||
#define Y_MIN_PIN 11
|
|
||||||
#define Y_MAX_PIN 24
|
|
||||||
#define Y_ENABLE_PIN 28
|
#define Y_ENABLE_PIN 28
|
||||||
#define Y_MS1_PIN 69
|
#define Y_MS1_PIN 69
|
||||||
#define Y_MS2_PIN 39
|
#define Y_MS2_PIN 39
|
||||||
#define Z_STEP_PIN 35
|
#define Z_STEP_PIN 35
|
||||||
#define Z_DIR_PIN 47
|
#define Z_DIR_PIN 47
|
||||||
#define Z_MIN_PIN 10
|
|
||||||
#define Z_MAX_PIN 23
|
|
||||||
#define Z_ENABLE_PIN 27
|
#define Z_ENABLE_PIN 27
|
||||||
#define Z_MS1_PIN 68
|
#define Z_MS1_PIN 68
|
||||||
#define Z_MS2_PIN 67
|
#define Z_MS2_PIN 67
|
||||||
|
|
@ -63,6 +43,27 @@
|
||||||
#define TEMP_1_PIN 1
|
#define TEMP_1_PIN 1
|
||||||
#define TEMP_2_PIN -1
|
#define TEMP_2_PIN -1
|
||||||
|
|
||||||
|
#ifndef DISABLE_MAX_ENDSTOPS
|
||||||
|
#define X_MAX_PIN 30
|
||||||
|
#define Z_MAX_PIN 23
|
||||||
|
#define Y_MAX_PIN 24
|
||||||
|
#else
|
||||||
|
#define X_MAX_PIN -1
|
||||||
|
#define Y_MAX_PIN -1
|
||||||
|
#define Z_MAX_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_MIN_ENDSTOPS
|
||||||
|
#define X_MIN_PIN 12
|
||||||
|
#define Y_MIN_PIN 11
|
||||||
|
#define Z_MIN_PIN 10
|
||||||
|
#else
|
||||||
|
#define X_MIN_PIN -1
|
||||||
|
#define Y_MIN_PIN -1
|
||||||
|
#define Z_MIN_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef SNMM
|
#ifdef SNMM
|
||||||
|
|
||||||
#define E_MUX0_PIN 17
|
#define E_MUX0_PIN 17
|
||||||
|
|
@ -234,22 +235,16 @@
|
||||||
#define LARGE_FLASH true
|
#define LARGE_FLASH true
|
||||||
#define X_STEP_PIN 37
|
#define X_STEP_PIN 37
|
||||||
#define X_DIR_PIN 48
|
#define X_DIR_PIN 48
|
||||||
#define X_MIN_PIN 12
|
|
||||||
#define X_MAX_PIN 30
|
|
||||||
#define X_ENABLE_PIN 29
|
#define X_ENABLE_PIN 29
|
||||||
#define X_MS1_PIN 40
|
#define X_MS1_PIN 40
|
||||||
#define X_MS2_PIN 41
|
#define X_MS2_PIN 41
|
||||||
#define Y_STEP_PIN 36
|
#define Y_STEP_PIN 36
|
||||||
#define Y_DIR_PIN 49
|
#define Y_DIR_PIN 49
|
||||||
#define Y_MIN_PIN 11
|
|
||||||
#define Y_MAX_PIN 24
|
|
||||||
#define Y_ENABLE_PIN 28
|
#define Y_ENABLE_PIN 28
|
||||||
#define Y_MS1_PIN 69
|
#define Y_MS1_PIN 69
|
||||||
#define Y_MS2_PIN 39
|
#define Y_MS2_PIN 39
|
||||||
#define Z_STEP_PIN 35
|
#define Z_STEP_PIN 35
|
||||||
#define Z_DIR_PIN 47
|
#define Z_DIR_PIN 47
|
||||||
#define Z_MIN_PIN 10
|
|
||||||
#define Z_MAX_PIN 23
|
|
||||||
#define Z_ENABLE_PIN 27
|
#define Z_ENABLE_PIN 27
|
||||||
#define Z_MS1_PIN 68
|
#define Z_MS1_PIN 68
|
||||||
#define Z_MS2_PIN 67
|
#define Z_MS2_PIN 67
|
||||||
|
|
@ -259,6 +254,26 @@
|
||||||
#define TEMP_1_PIN 1
|
#define TEMP_1_PIN 1
|
||||||
#define TEMP_2_PIN -1
|
#define TEMP_2_PIN -1
|
||||||
|
|
||||||
|
#ifndef DISABLE_MAX_ENDSTOPS
|
||||||
|
#define X_MAX_PIN 30
|
||||||
|
#define Z_MAX_PIN 23
|
||||||
|
#define Y_MAX_PIN 24
|
||||||
|
#else
|
||||||
|
#define X_MAX_PIN -1
|
||||||
|
#define Y_MAX_PIN -1
|
||||||
|
#define Z_MAX_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_MIN_ENDSTOPS
|
||||||
|
#define X_MIN_PIN 12
|
||||||
|
#define Y_MIN_PIN 11
|
||||||
|
#define Z_MIN_PIN 10
|
||||||
|
#else
|
||||||
|
#define X_MIN_PIN -1
|
||||||
|
#define Y_MIN_PIN -1
|
||||||
|
#define Z_MIN_PIN -1
|
||||||
|
#endif
|
||||||
|
|
||||||
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
|
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
|
||||||
#define SDSS 53
|
#define SDSS 53
|
||||||
|
|
||||||
|
|
@ -364,17 +379,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DISABLE_MAX_ENDSTOPS
|
|
||||||
#define X_MAX_PIN -1
|
|
||||||
#define Y_MAX_PIN -1
|
|
||||||
#define Z_MAX_PIN -1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef DISABLE_MIN_ENDSTOPS
|
|
||||||
#define X_MIN_PIN -1
|
|
||||||
#define Y_MIN_PIN -1
|
|
||||||
#define Z_MIN_PIN -1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
|
#define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
|
||||||
HEATER_BED_PIN, FAN_PIN, \
|
HEATER_BED_PIN, FAN_PIN, \
|
||||||
|
|
|
||||||
|
|
@ -1029,16 +1029,20 @@ Having the real displacement of the head, we can calculate the total movement le
|
||||||
// Acceleration of the segment, in mm/sec^2
|
// Acceleration of the segment, in mm/sec^2
|
||||||
block->acceleration = block->acceleration_st / steps_per_mm;
|
block->acceleration = block->acceleration_st / steps_per_mm;
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
// Oversample diagonal movements by a power of 2 up to 8x
|
// Oversample diagonal movements by a power of 2 up to 8x
|
||||||
// to achieve more accurate diagonal movements.
|
// to achieve more accurate diagonal movements.
|
||||||
uint8_t bresenham_oversample = 1;
|
uint8_t bresenham_oversample = 1;
|
||||||
for (uint8_t i = 0; i < 3; ++ i) {
|
for (uint8_t i = 0; i < 3; ++ i) {
|
||||||
if (block->nominal_rate >= 5000) // 5kHz
|
if (block->nominal_rate >= 5000) // 5kHz
|
||||||
break;
|
break;
|
||||||
block->nominal_rate << 1;
|
// The following statements in their original form did nothing (missing =).
|
||||||
bresenham_oversample << 1;
|
// In effect, this entire block under the conditional was doing nothing.
|
||||||
block->step_event_count << 1;
|
// Adding the syntax correction did not produce good movement results therefore
|
||||||
|
// it has been disabled (above)
|
||||||
|
block->nominal_rate <<= 1;
|
||||||
|
bresenham_oversample <<= 1;
|
||||||
|
block->step_event_count <<= 1;
|
||||||
}
|
}
|
||||||
if (bresenham_oversample > 1)
|
if (bresenham_oversample > 1)
|
||||||
// Lower the acceleration steps/sec^2 to account for the oversampling.
|
// Lower the acceleration steps/sec^2 to account for the oversampling.
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,18 @@ bool abort_on_endstop_hit = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool old_x_min_endstop=false;
|
static bool old_x_min_endstop=false;
|
||||||
static bool old_x_max_endstop=false;
|
|
||||||
static bool old_y_min_endstop=false;
|
static bool old_y_min_endstop=false;
|
||||||
static bool old_y_max_endstop=false;
|
|
||||||
static bool old_z_min_endstop=false;
|
static bool old_z_min_endstop=false;
|
||||||
|
|
||||||
|
#if defined(X_MAX_PIN) && (X_MAX_PIN > -1)
|
||||||
|
static bool old_x_max_endstop=false;
|
||||||
|
#endif
|
||||||
|
#if defined(Y_MAX_PIN) && (Y_MAX_PIN > -1)
|
||||||
|
static bool old_y_max_endstop=false;
|
||||||
|
#endif
|
||||||
|
#if defined(Z_MAX_PIN) && (Z_MAX_PIN > -1)
|
||||||
static bool old_z_max_endstop=false;
|
static bool old_z_max_endstop=false;
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool check_endstops = true;
|
static bool check_endstops = true;
|
||||||
static bool check_z_endstop = false;
|
static bool check_z_endstop = false;
|
||||||
|
|
@ -1066,9 +1073,7 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
|
|
||||||
//perform step
|
//perform step
|
||||||
WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
|
WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN);
|
||||||
{
|
delayMicroseconds(3);
|
||||||
volatile float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
|
|
||||||
}
|
|
||||||
WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
|
WRITE(X_STEP_PIN, INVERT_X_STEP_PIN);
|
||||||
|
|
||||||
//get old pin state back.
|
//get old pin state back.
|
||||||
|
|
@ -1085,9 +1090,7 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
|
|
||||||
//perform step
|
//perform step
|
||||||
WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
|
WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN);
|
||||||
{
|
delayMicroseconds(3);
|
||||||
volatile float x=1./float(axis+1)/float(axis+2); //wait a tiny bit
|
|
||||||
}
|
|
||||||
WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
|
WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN);
|
||||||
|
|
||||||
//get old pin state back.
|
//get old pin state back.
|
||||||
|
|
@ -1109,11 +1112,11 @@ void babystep(const uint8_t axis,const bool direction)
|
||||||
WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN);
|
WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||||
WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
|
WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN);
|
||||||
|
delayMicroseconds(2);
|
||||||
|
#else
|
||||||
|
delayMicroseconds(3);
|
||||||
#endif
|
#endif
|
||||||
//wait a tiny bit
|
|
||||||
{
|
|
||||||
volatile float x=1./float(axis+1); //absolutely useless
|
|
||||||
}
|
|
||||||
WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
|
WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN);
|
||||||
#ifdef Z_DUAL_STEPPER_DRIVERS
|
#ifdef Z_DUAL_STEPPER_DRIVERS
|
||||||
WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
|
WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN);
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,14 @@ unsigned long watchmillis[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0,0,0);
|
||||||
#ifdef FILAMENT_SENSOR
|
#ifdef FILAMENT_SENSOR
|
||||||
static int meas_shift_index; //used to point to a delayed sample in buffer for filament width sensor
|
static int meas_shift_index; //used to point to a delayed sample in buffer for filament width sensor
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0)
|
||||||
|
static float temp_runaway_status[4];
|
||||||
|
static float temp_runaway_target[4];
|
||||||
|
static float temp_runaway_timer[4];
|
||||||
|
static int temp_runaway_error_counter[4];
|
||||||
|
#endif
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//============================= functions ============================
|
//============================= functions ============================
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
@ -1417,7 +1425,9 @@ ISR(TIMER0_COMPB_vect)
|
||||||
static unsigned char temp_count = 0;
|
static unsigned char temp_count = 0;
|
||||||
static unsigned long raw_temp_0_value = 0;
|
static unsigned long raw_temp_0_value = 0;
|
||||||
static unsigned long raw_temp_1_value = 0;
|
static unsigned long raw_temp_1_value = 0;
|
||||||
|
#if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
|
||||||
static unsigned long raw_temp_2_value = 0;
|
static unsigned long raw_temp_2_value = 0;
|
||||||
|
#endif
|
||||||
static unsigned long raw_temp_bed_value = 0;
|
static unsigned long raw_temp_bed_value = 0;
|
||||||
static unsigned char temp_state = 10;
|
static unsigned char temp_state = 10;
|
||||||
static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
|
static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
|
||||||
|
|
@ -1857,7 +1867,7 @@ ISR(TIMER0_COMPB_vect)
|
||||||
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
|
#ifdef TEMP_SENSOR_1_AS_REDUNDANT
|
||||||
redundant_temperature_raw = raw_temp_1_value;
|
redundant_temperature_raw = raw_temp_1_value;
|
||||||
#endif
|
#endif
|
||||||
#if EXTRUDERS > 2
|
#if (EXTRUDERS > 2) && defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
|
||||||
current_temperature_raw[2] = raw_temp_2_value;
|
current_temperature_raw[2] = raw_temp_2_value;
|
||||||
#endif
|
#endif
|
||||||
current_temperature_bed_raw = raw_temp_bed_value;
|
current_temperature_bed_raw = raw_temp_bed_value;
|
||||||
|
|
@ -1873,7 +1883,9 @@ ISR(TIMER0_COMPB_vect)
|
||||||
temp_count = 0;
|
temp_count = 0;
|
||||||
raw_temp_0_value = 0;
|
raw_temp_0_value = 0;
|
||||||
raw_temp_1_value = 0;
|
raw_temp_1_value = 0;
|
||||||
|
#if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
|
||||||
raw_temp_2_value = 0;
|
raw_temp_2_value = 0;
|
||||||
|
#endif
|
||||||
raw_temp_bed_value = 0;
|
raw_temp_bed_value = 0;
|
||||||
|
|
||||||
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
|
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
|
||||||
|
|
|
||||||
|
|
@ -176,11 +176,6 @@ FORCE_INLINE bool isCoolingBed() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0)
|
#if (defined (TEMP_RUNAWAY_BED_HYSTERESIS) && TEMP_RUNAWAY_BED_TIMEOUT > 0) || (defined (TEMP_RUNAWAY_EXTRUDER_HYSTERESIS) && TEMP_RUNAWAY_EXTRUDER_TIMEOUT > 0)
|
||||||
static float temp_runaway_status[4];
|
|
||||||
static float temp_runaway_target[4];
|
|
||||||
static float temp_runaway_timer[4];
|
|
||||||
static int temp_runaway_error_counter[4];
|
|
||||||
|
|
||||||
void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed);
|
void temp_runaway_check(int _heater_id, float _target_temperature, float _current_temperature, float _output, bool _isbed);
|
||||||
void temp_runaway_stop(bool isPreheat, bool isBed);
|
void temp_runaway_stop(bool isPreheat, bool isBed);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ union MenuData
|
||||||
|
|
||||||
// State of the currently active menu.
|
// State of the currently active menu.
|
||||||
// C Union manages sharing of the static memory by all the menus.
|
// C Union manages sharing of the static memory by all the menus.
|
||||||
union MenuData menuData = { 0 };
|
union MenuData menuData;
|
||||||
|
|
||||||
union Data
|
union Data
|
||||||
{
|
{
|
||||||
|
|
@ -120,7 +120,7 @@ uint8_t farm_mode = 0;
|
||||||
int farm_no = 0;
|
int farm_no = 0;
|
||||||
int farm_timer = 8;
|
int farm_timer = 8;
|
||||||
int farm_status = 0;
|
int farm_status = 0;
|
||||||
unsigned long allert_timer = millis();
|
unsigned long alert_timer = millis();
|
||||||
bool printer_connected = true;
|
bool printer_connected = true;
|
||||||
|
|
||||||
unsigned long display_time; //just timer for showing pid finished message on lcd;
|
unsigned long display_time; //just timer for showing pid finished message on lcd;
|
||||||
|
|
@ -128,7 +128,7 @@ float pid_temp = DEFAULT_PID_TEMP;
|
||||||
|
|
||||||
bool long_press_active = false;
|
bool long_press_active = false;
|
||||||
long long_press_timer = millis();
|
long long_press_timer = millis();
|
||||||
long button_blanking_time = millis();
|
unsigned long button_blanking_time = millis();
|
||||||
bool button_pressed = false;
|
bool button_pressed = false;
|
||||||
|
|
||||||
bool menuExiting = false;
|
bool menuExiting = false;
|
||||||
|
|
@ -148,6 +148,7 @@ char lcd_status_message[LCD_WIDTH + 1] = ""; //////WELCOME!
|
||||||
unsigned char firstrun = 1;
|
unsigned char firstrun = 1;
|
||||||
|
|
||||||
#ifdef DOGLCD
|
#ifdef DOGLCD
|
||||||
|
static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
|
||||||
#include "dogm_lcd_implementation.h"
|
#include "dogm_lcd_implementation.h"
|
||||||
#else
|
#else
|
||||||
#include "ultralcd_implementation_hitachi_HD44780.h"
|
#include "ultralcd_implementation_hitachi_HD44780.h"
|
||||||
|
|
@ -164,16 +165,39 @@ static void lcd_status_screen();
|
||||||
extern bool powersupply;
|
extern bool powersupply;
|
||||||
static void lcd_main_menu();
|
static void lcd_main_menu();
|
||||||
static void lcd_tune_menu();
|
static void lcd_tune_menu();
|
||||||
static void lcd_prepare_menu();
|
|
||||||
static void lcd_move_menu();
|
|
||||||
static void lcd_settings_menu();
|
static void lcd_settings_menu();
|
||||||
static void lcd_calibration_menu();
|
static void lcd_calibration_menu();
|
||||||
static void lcd_language_menu();
|
static void lcd_language_menu();
|
||||||
|
|
||||||
static void lcd_control_temperature_menu();
|
static void lcd_control_temperature_menu();
|
||||||
static void lcd_control_temperature_preheat_pla_settings_menu();
|
|
||||||
static void lcd_control_temperature_preheat_abs_settings_menu();
|
static void lcd_babystep_z();
|
||||||
static void lcd_control_motion_menu();
|
|
||||||
static void lcd_control_volumetric_menu();
|
static bool lcd_selftest();
|
||||||
|
static void lcd_selftest_v();
|
||||||
|
static bool lcd_selfcheck_pulleys(int axis);
|
||||||
|
static bool lcd_selfcheck_endstops();
|
||||||
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
||||||
|
static bool lcd_selfcheck_check_heater(bool _isbed);
|
||||||
|
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay);
|
||||||
|
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
|
||||||
|
static bool lcd_selftest_fan_dialog(int _fan);
|
||||||
|
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
||||||
|
|
||||||
|
static void lcd_colorprint_change();
|
||||||
|
#ifdef SNMM
|
||||||
|
static void extr_adj_0();
|
||||||
|
static void extr_adj_1();
|
||||||
|
static void extr_adj_2();
|
||||||
|
static void extr_adj_3();
|
||||||
|
static void fil_load_menu();
|
||||||
|
static void fil_unload_menu();
|
||||||
|
static void extr_unload_0();
|
||||||
|
static void extr_unload_1();
|
||||||
|
static void extr_unload_2();
|
||||||
|
static void extr_unload_3();
|
||||||
|
#endif
|
||||||
|
static void lcd_disable_farm_mode();
|
||||||
|
|
||||||
static void prusa_stat_printerstatus(int _status);
|
static void prusa_stat_printerstatus(int _status);
|
||||||
static void prusa_stat_farm_number();
|
static void prusa_stat_farm_number();
|
||||||
|
|
@ -181,10 +205,16 @@ static void prusa_stat_temperatures();
|
||||||
static void prusa_stat_printinfo();
|
static void prusa_stat_printinfo();
|
||||||
static void lcd_farm_no();
|
static void lcd_farm_no();
|
||||||
|
|
||||||
|
static void lcd_send_status();
|
||||||
|
static void lcd_connect_printer();
|
||||||
|
|
||||||
|
static char snmm_stop_print_menu();
|
||||||
|
|
||||||
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
||||||
|
|
||||||
#ifdef DOGLCD
|
#ifdef DOGLCD
|
||||||
static void lcd_set_contrast();
|
static void lcd_set_contrast();
|
||||||
#endif
|
#endif
|
||||||
static void lcd_control_retract_menu();
|
|
||||||
static void lcd_sdcard_menu();
|
static void lcd_sdcard_menu();
|
||||||
|
|
||||||
#ifdef DELTA_CALIBRATION_MENU
|
#ifdef DELTA_CALIBRATION_MENU
|
||||||
|
|
@ -202,8 +232,9 @@ static void menu_action_function(menuFunc_t data);
|
||||||
static void menu_action_setlang(unsigned char lang);
|
static void menu_action_setlang(unsigned char lang);
|
||||||
static void menu_action_sdfile(const char* filename, char* longFilename);
|
static void menu_action_sdfile(const char* filename, char* longFilename);
|
||||||
static void menu_action_sddirectory(const char* filename, char* longFilename);
|
static void menu_action_sddirectory(const char* filename, char* longFilename);
|
||||||
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr);
|
|
||||||
static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
|
static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
|
||||||
|
#if 0
|
||||||
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr);
|
||||||
static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue);
|
static void menu_action_setting_edit_float3(const char* pstr, float* ptr, float minValue, float maxValue);
|
||||||
static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue);
|
static void menu_action_setting_edit_float32(const char* pstr, float* ptr, float minValue, float maxValue);
|
||||||
static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue);
|
static void menu_action_setting_edit_float43(const char* pstr, float* ptr, float minValue, float maxValue);
|
||||||
|
|
@ -211,8 +242,9 @@ static void menu_action_setting_edit_float5(const char* pstr, float* ptr, float
|
||||||
static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue);
|
static void menu_action_setting_edit_float51(const char* pstr, float* ptr, float minValue, float maxValue);
|
||||||
static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue);
|
static void menu_action_setting_edit_float52(const char* pstr, float* ptr, float minValue, float maxValue);
|
||||||
static void menu_action_setting_edit_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue);
|
static void menu_action_setting_edit_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
#if 0
|
||||||
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callbackFunc);
|
||||||
static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callbackFunc);
|
||||||
static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_float3(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
||||||
|
|
@ -222,7 +254,7 @@ static void menu_action_setting_edit_callback_float5(const char* pstr, float* pt
|
||||||
static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_float51(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
||||||
static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_float52(const char* pstr, float* ptr, float minValue, float maxValue, menuFunc_t callbackFunc);
|
||||||
static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc);
|
static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned long* ptr, unsigned long minValue, unsigned long maxValue, menuFunc_t callbackFunc);
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
#define ENCODER_FEEDRATE_DEADZONE 10
|
#define ENCODER_FEEDRATE_DEADZONE 10
|
||||||
|
|
||||||
|
|
@ -530,7 +562,6 @@ static void lcd_status_screen()
|
||||||
|
|
||||||
void lcd_commands()
|
void lcd_commands()
|
||||||
{
|
{
|
||||||
char cmd1[25];
|
|
||||||
if (lcd_commands_type == LCD_COMMAND_LONG_PAUSE)
|
if (lcd_commands_type == LCD_COMMAND_LONG_PAUSE)
|
||||||
{
|
{
|
||||||
if(lcd_commands_step == 0) {
|
if(lcd_commands_step == 0) {
|
||||||
|
|
@ -611,12 +642,18 @@ void lcd_commands()
|
||||||
#ifdef SNMM
|
#ifdef SNMM
|
||||||
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
||||||
{
|
{
|
||||||
|
char cmd1[30];
|
||||||
|
float width = 0.4;
|
||||||
|
float length = 20 - width;
|
||||||
|
float extr = count_e(0.2, width, length);
|
||||||
|
float extr_short_segment = count_e(0.2, width, width);
|
||||||
|
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
if (lcd_commands_step == 0)
|
if (lcd_commands_step == 0)
|
||||||
{
|
{
|
||||||
lcd_commands_step = 6;
|
lcd_commands_step = 10;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 6 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 10 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
enquecommand_P(PSTR("M107"));
|
enquecommand_P(PSTR("M107"));
|
||||||
enquecommand_P(PSTR("M104 S210"));
|
enquecommand_P(PSTR("M104 S210"));
|
||||||
|
|
@ -633,9 +670,9 @@ void lcd_commands()
|
||||||
enquecommand_P(PSTR("G92 E0"));
|
enquecommand_P(PSTR("G92 E0"));
|
||||||
enquecommand_P(PSTR("M203 E100"));
|
enquecommand_P(PSTR("M203 E100"));
|
||||||
enquecommand_P(PSTR("M92 E140"));
|
enquecommand_P(PSTR("M92 E140"));
|
||||||
lcd_commands_step = 5;
|
lcd_commands_step = 9;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 9 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
enquecommand_P(PSTR("G1 Z0.250 F7200.000"));
|
enquecommand_P(PSTR("G1 Z0.250 F7200.000"));
|
||||||
|
|
@ -657,9 +694,9 @@ void lcd_commands()
|
||||||
lcd_goto_menu(lcd_babystep_z, 0, false);
|
lcd_goto_menu(lcd_babystep_z, 0, false);
|
||||||
|
|
||||||
|
|
||||||
lcd_commands_step = 4;
|
lcd_commands_step = 8;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
if (lcd_commands_step == 8 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
||||||
{
|
{
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
|
||||||
|
|
@ -680,14 +717,134 @@ void lcd_commands()
|
||||||
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
||||||
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
||||||
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
||||||
enquecommand_P(PSTR("G1 E - 0.07500 F2100.00000"));
|
|
||||||
|
lcd_commands_step = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 7 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
strcpy(cmd1, "G1 X50 Y35 E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 6 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 4; i < 8; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 8; i < 12; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 12; i < 16; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
lcd_commands_step = 3;
|
lcd_commands_step = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
enquecommand_P(PSTR("G1 E - 0.07500 F2100.00000"));
|
||||||
enquecommand_P(PSTR("G4 S0"));
|
enquecommand_P(PSTR("G4 S0"));
|
||||||
enquecommand_P(PSTR("G1 E-4 F2100.00000"));
|
enquecommand_P(PSTR("G1 E-4 F2100.00000"));
|
||||||
enquecommand_P(PSTR("G1 Z0.5 F7200.000"));
|
enquecommand_P(PSTR("G1 Z0.5 F7200.000"));
|
||||||
|
|
@ -748,15 +905,19 @@ void lcd_commands()
|
||||||
|
|
||||||
#else //if not SNMM
|
#else //if not SNMM
|
||||||
|
|
||||||
|
|
||||||
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
||||||
{
|
{
|
||||||
|
char cmd1[30];
|
||||||
|
float width = 0.4;
|
||||||
|
float length = 20 - width;
|
||||||
|
float extr = count_e(0.2, width, length);
|
||||||
|
float extr_short_segment = count_e(0.2, width, width);
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
if (lcd_commands_step == 0)
|
if (lcd_commands_step == 0)
|
||||||
{
|
{
|
||||||
lcd_commands_step = 5;
|
lcd_commands_step = 9;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 9 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
enquecommand_P(PSTR("M107"));
|
enquecommand_P(PSTR("M107"));
|
||||||
enquecommand_P(PSTR("M104 S210"));
|
enquecommand_P(PSTR("M104 S210"));
|
||||||
|
|
@ -767,9 +928,9 @@ void lcd_commands()
|
||||||
enquecommand_P(PSTR("G87")); //sets calibration status
|
enquecommand_P(PSTR("G87")); //sets calibration status
|
||||||
enquecommand_P(PSTR("G28"));
|
enquecommand_P(PSTR("G28"));
|
||||||
enquecommand_P(PSTR("G92 E0.0"));
|
enquecommand_P(PSTR("G92 E0.0"));
|
||||||
lcd_commands_step = 4;
|
lcd_commands_step = 8;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 8 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
|
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
|
|
@ -784,9 +945,9 @@ void lcd_commands()
|
||||||
enquecommand_P(PSTR("G1 Z0.150 F7200.000"));
|
enquecommand_P(PSTR("G1 Z0.150 F7200.000"));
|
||||||
enquecommand_P(PSTR("M204 S1000")); //set acceleration
|
enquecommand_P(PSTR("M204 S1000")); //set acceleration
|
||||||
enquecommand_P(PSTR("G1 F4000"));
|
enquecommand_P(PSTR("G1 F4000"));
|
||||||
lcd_commands_step = 3;
|
lcd_commands_step = 7;
|
||||||
}
|
}
|
||||||
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
if (lcd_commands_step == 7 && !blocks_queued() && cmd_buffer_empty()) //draw meander
|
||||||
{
|
{
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
|
||||||
|
|
@ -825,13 +986,135 @@ void lcd_commands()
|
||||||
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
enquecommand_P(PSTR("G1 X200 Y75 E3.62773"));
|
||||||
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
enquecommand_P(PSTR("G1 X200 Y55 E0.49386"));
|
||||||
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
enquecommand_P(PSTR("G1 X50 Y55 E3.62773"));
|
||||||
enquecommand_P(PSTR("G1 E - 0.07500 F2100.00000"));
|
|
||||||
|
lcd_commands_step = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 6 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
strcpy(cmd1, "G1 X50 Y35 E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 5 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 4; i < 8; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 4 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 8; i < 12; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
|
lcd_commands_step = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lcd_commands_step == 3 && !blocks_queued() && cmd_buffer_empty())
|
||||||
|
{
|
||||||
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
for (int i = 12; i < 16; i++) {
|
||||||
|
strcpy(cmd1, "G1 X70 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - i*width * 2));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 X50 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (2 * i + 1)*width));
|
||||||
|
strcat(cmd1, " E");
|
||||||
|
strcat(cmd1, ftostr43(extr));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
strcpy(cmd1, "G1 Y");
|
||||||
|
strcat(cmd1, ftostr32(35 - (i + 1)*width * 2));
|
||||||
|
strcat(cmd1, "E ");
|
||||||
|
strcat(cmd1, ftostr43(extr_short_segment));
|
||||||
|
enquecommand(cmd1);
|
||||||
|
}
|
||||||
|
|
||||||
lcd_commands_step = 2;
|
lcd_commands_step = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcd_commands_step == 2 && !blocks_queued() && cmd_buffer_empty())
|
if (lcd_commands_step == 2 && !blocks_queued() && cmd_buffer_empty())
|
||||||
{
|
{
|
||||||
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
|
||||||
|
enquecommand_P(PSTR("G1 E - 0.07500 F2100.00000"));
|
||||||
enquecommand_P(PSTR("M107")); //turn off printer fan
|
enquecommand_P(PSTR("M107")); //turn off printer fan
|
||||||
enquecommand_P(PSTR("M104 S0")); // turn off temperature
|
enquecommand_P(PSTR("M104 S0")); // turn off temperature
|
||||||
enquecommand_P(PSTR("M140 S0")); // turn off heatbed
|
enquecommand_P(PSTR("M140 S0")); // turn off heatbed
|
||||||
|
|
@ -856,8 +1139,6 @@ void lcd_commands()
|
||||||
|
|
||||||
if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) /// stop print
|
if (lcd_commands_type == LCD_COMMAND_STOP_PRINT) /// stop print
|
||||||
{
|
{
|
||||||
uint8_t stopped_extruder;
|
|
||||||
|
|
||||||
if (lcd_commands_step == 0)
|
if (lcd_commands_step == 0)
|
||||||
{
|
{
|
||||||
lcd_commands_step = 6;
|
lcd_commands_step = 6;
|
||||||
|
|
@ -1040,6 +1321,12 @@ void lcd_commands()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length) {
|
||||||
|
//returns filament length in mm which needs to be extrude to form line with extrusion_length * extrusion_width * layer heigth dimensions
|
||||||
|
float extr = extrusion_length * layer_heigth * extrusion_width / (M_PI * pow(1.75, 2) / 4);
|
||||||
|
return extr;
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_return_to_status() {
|
static void lcd_return_to_status() {
|
||||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
||||||
|
|
@ -1754,12 +2041,14 @@ static void _lcd_babystep(int axis, const char *msg)
|
||||||
if (LCD_CLICKED) lcd_goto_menu(lcd_main_menu);
|
if (LCD_CLICKED) lcd_goto_menu(lcd_main_menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void lcd_babystep_x() {
|
static void lcd_babystep_x() {
|
||||||
_lcd_babystep(X_AXIS, (MSG_BABYSTEPPING_X));
|
_lcd_babystep(X_AXIS, (MSG_BABYSTEPPING_X));
|
||||||
}
|
}
|
||||||
static void lcd_babystep_y() {
|
static void lcd_babystep_y() {
|
||||||
_lcd_babystep(Y_AXIS, (MSG_BABYSTEPPING_Y));
|
_lcd_babystep(Y_AXIS, (MSG_BABYSTEPPING_Y));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
static void lcd_babystep_z() {
|
static void lcd_babystep_z() {
|
||||||
_lcd_babystep(Z_AXIS, (MSG_BABYSTEPPING_Z));
|
_lcd_babystep(Z_AXIS, (MSG_BABYSTEPPING_Z));
|
||||||
}
|
}
|
||||||
|
|
@ -2017,7 +2306,6 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
|
||||||
|
|
||||||
// Until confirmed by the confirmation dialog.
|
// Until confirmed by the confirmation dialog.
|
||||||
for (;;) {
|
for (;;) {
|
||||||
unsigned long previous_millis_cmd = millis();
|
|
||||||
const char *msg = only_z ? MSG_MOVE_CARRIAGE_TO_THE_TOP_Z : MSG_MOVE_CARRIAGE_TO_THE_TOP;
|
const char *msg = only_z ? MSG_MOVE_CARRIAGE_TO_THE_TOP_Z : MSG_MOVE_CARRIAGE_TO_THE_TOP;
|
||||||
const char *msg_next = lcd_display_message_fullscreen_P(msg);
|
const char *msg_next = lcd_display_message_fullscreen_P(msg);
|
||||||
const bool multi_screen = msg_next != NULL;
|
const bool multi_screen = msg_next != NULL;
|
||||||
|
|
@ -2026,13 +2314,10 @@ bool lcd_calibrate_z_end_stop_manual(bool only_z)
|
||||||
encoderDiff = 0;
|
encoderDiff = 0;
|
||||||
encoderPosition = 0;
|
encoderPosition = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// if (millis() - previous_millis_cmd > LCD_TIMEOUT_TO_STATUS)
|
|
||||||
// goto canceled;
|
|
||||||
manage_heater();
|
manage_heater();
|
||||||
manage_inactivity(true);
|
manage_inactivity(true);
|
||||||
if (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP) {
|
if (abs(encoderDiff) >= ENCODER_PULSES_PER_STEP) {
|
||||||
delay(50);
|
delay(50);
|
||||||
previous_millis_cmd = millis();
|
|
||||||
encoderPosition += abs(encoderDiff / ENCODER_PULSES_PER_STEP);
|
encoderPosition += abs(encoderDiff / ENCODER_PULSES_PER_STEP);
|
||||||
encoderDiff = 0;
|
encoderDiff = 0;
|
||||||
if (! planner_queue_full()) {
|
if (! planner_queue_full()) {
|
||||||
|
|
@ -2358,7 +2643,7 @@ void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, ui
|
||||||
else if (point_too_far_mask == 2 || point_too_far_mask == 7)
|
else if (point_too_far_mask == 2 || point_too_far_mask == 7)
|
||||||
// Only the center point or all the three front points.
|
// Only the center point or all the three front points.
|
||||||
msg = MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR;
|
msg = MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_BOTH_FAR;
|
||||||
else if (point_too_far_mask & 1 == 0)
|
else if ((point_too_far_mask & 1) == 0)
|
||||||
// The right and maybe the center point out of reach.
|
// The right and maybe the center point out of reach.
|
||||||
msg = MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_RIGHT_FAR;
|
msg = MSG_BED_SKEW_OFFSET_DETECTION_FAILED_FRONT_RIGHT_FAR;
|
||||||
else
|
else
|
||||||
|
|
@ -2370,7 +2655,7 @@ void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, ui
|
||||||
if (point_too_far_mask == 2 || point_too_far_mask == 7)
|
if (point_too_far_mask == 2 || point_too_far_mask == 7)
|
||||||
// Only the center point or all the three front points.
|
// Only the center point or all the three front points.
|
||||||
msg = MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR;
|
msg = MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_BOTH_FAR;
|
||||||
else if (point_too_far_mask & 1 == 0)
|
else if ((point_too_far_mask & 1) == 0)
|
||||||
// The right and maybe the center point out of reach.
|
// The right and maybe the center point out of reach.
|
||||||
msg = MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR;
|
msg = MSG_BED_SKEW_OFFSET_DETECTION_WARNING_FRONT_RIGHT_FAR;
|
||||||
else
|
else
|
||||||
|
|
@ -2403,11 +2688,11 @@ static void lcd_show_end_stops() {
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
lcd_printPGM((PSTR("End stops diag")));
|
lcd_printPGM((PSTR("End stops diag")));
|
||||||
lcd.setCursor(0, 1);
|
lcd.setCursor(0, 1);
|
||||||
lcd_printPGM((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? (PSTR("X1")) : (PSTR("X0")));
|
lcd_printPGM(((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? (PSTR("X1")) : (PSTR("X0")));
|
||||||
lcd.setCursor(0, 2);
|
lcd.setCursor(0, 2);
|
||||||
lcd_printPGM((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? (PSTR("Y1")) : (PSTR("Y0")));
|
lcd_printPGM(((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ? (PSTR("Y1")) : (PSTR("Y0")));
|
||||||
lcd.setCursor(0, 3);
|
lcd.setCursor(0, 3);
|
||||||
lcd_printPGM((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) ? (PSTR("Z1")) : (PSTR("Z0")));
|
lcd_printPGM(((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) ? (PSTR("Z1")) : (PSTR("Z0")));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void menu_show_end_stops() {
|
static void menu_show_end_stops() {
|
||||||
|
|
@ -2420,7 +2705,6 @@ static void menu_show_end_stops() {
|
||||||
// Otherwise the Z calibration is not changed and false is returned.
|
// Otherwise the Z calibration is not changed and false is returned.
|
||||||
void lcd_diag_show_end_stops()
|
void lcd_diag_show_end_stops()
|
||||||
{
|
{
|
||||||
int enc_dif = encoderDiff;
|
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
for (;;) {
|
for (;;) {
|
||||||
manage_heater();
|
manage_heater();
|
||||||
|
|
@ -3266,7 +3550,7 @@ static void lcd_calibration_menu()
|
||||||
if (!isPrintPaused)
|
if (!isPrintPaused)
|
||||||
{
|
{
|
||||||
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 W"));
|
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 W"));
|
||||||
MENU_ITEM(function, MSG_SELFTEST, lcd_selftest);
|
MENU_ITEM(function, MSG_SELFTEST, lcd_selftest_v);
|
||||||
#ifdef MK1BP
|
#ifdef MK1BP
|
||||||
// MK1
|
// MK1
|
||||||
// "Calibrate Z"
|
// "Calibrate Z"
|
||||||
|
|
@ -3302,49 +3586,6 @@ static void lcd_calibration_menu()
|
||||||
|
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
void lcd_mylang_top(int hlaska) {
|
|
||||||
lcd.setCursor(0,0);
|
|
||||||
lcd.print(" ");
|
|
||||||
lcd.setCursor(0,0);
|
|
||||||
lcd_printPGM(MSG_ALL[hlaska-1][LANGUAGE_SELECT]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_mylang_drawmenu(int cursor) {
|
|
||||||
int first = 0;
|
|
||||||
if (cursor>2) first = cursor-2;
|
|
||||||
if (cursor==LANG_NUM) first = LANG_NUM-3;
|
|
||||||
lcd.setCursor(0, 1);
|
|
||||||
lcd.print(" ");
|
|
||||||
lcd.setCursor(1, 1);
|
|
||||||
lcd_printPGM(MSG_ALL[first][LANGUAGE_NAME]);
|
|
||||||
|
|
||||||
lcd.setCursor(0, 2);
|
|
||||||
lcd.print(" ");
|
|
||||||
lcd.setCursor(1, 2);
|
|
||||||
lcd_printPGM(MSG_ALL[first+1][LANGUAGE_NAME]);
|
|
||||||
|
|
||||||
lcd.setCursor(0, 3);
|
|
||||||
lcd.print(" ");
|
|
||||||
lcd.setCursor(1, 3);
|
|
||||||
lcd_printPGM(MSG_ALL[first+2][LANGUAGE_NAME]);
|
|
||||||
|
|
||||||
if (cursor==1) lcd.setCursor(0, 1);
|
|
||||||
if (cursor>1 && cursor<LANG_NUM) lcd.setCursor(0, 2);
|
|
||||||
if (cursor==LANG_NUM) lcd.setCursor(0, 3);
|
|
||||||
|
|
||||||
lcd.print(">");
|
|
||||||
|
|
||||||
if (cursor<LANG_NUM-1) {
|
|
||||||
lcd.setCursor(19,3);
|
|
||||||
lcd.print("\x01");
|
|
||||||
}
|
|
||||||
if (cursor>2) {
|
|
||||||
lcd.setCursor(19,1);
|
|
||||||
lcd.print("^");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void lcd_mylang_drawmenu(int cursor) {
|
void lcd_mylang_drawmenu(int cursor) {
|
||||||
int first = 0;
|
int first = 0;
|
||||||
|
|
@ -3409,13 +3650,10 @@ void lcd_mylang() {
|
||||||
int enc_dif = 0;
|
int enc_dif = 0;
|
||||||
int cursor_pos = 1;
|
int cursor_pos = 1;
|
||||||
lang_selected=255;
|
lang_selected=255;
|
||||||
int hlaska=1;
|
|
||||||
int counter=0;
|
|
||||||
lcd_set_custom_characters_arrows();
|
lcd_set_custom_characters_arrows();
|
||||||
|
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
|
|
||||||
//lcd_mylang_top(hlaska);
|
|
||||||
|
|
||||||
lcd_mylang_drawmenu(cursor_pos);
|
lcd_mylang_drawmenu(cursor_pos);
|
||||||
|
|
||||||
|
|
@ -3429,7 +3667,6 @@ void lcd_mylang() {
|
||||||
|
|
||||||
if ( abs((enc_dif - encoderDiff)) > 4 ) {
|
if ( abs((enc_dif - encoderDiff)) > 4 ) {
|
||||||
|
|
||||||
//if ( (abs(enc_dif - encoderDiff)) > 1 ) {
|
|
||||||
if (enc_dif > encoderDiff ) {
|
if (enc_dif > encoderDiff ) {
|
||||||
cursor_pos --;
|
cursor_pos --;
|
||||||
}
|
}
|
||||||
|
|
@ -3449,7 +3686,6 @@ void lcd_mylang() {
|
||||||
lcd_mylang_drawmenu(cursor_pos);
|
lcd_mylang_drawmenu(cursor_pos);
|
||||||
enc_dif = encoderDiff;
|
enc_dif = encoderDiff;
|
||||||
delay(100);
|
delay(100);
|
||||||
//}
|
|
||||||
|
|
||||||
} else delay(20);
|
} else delay(20);
|
||||||
|
|
||||||
|
|
@ -3460,16 +3696,7 @@ void lcd_mylang() {
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
}
|
||||||
if (++counter == 80) {
|
|
||||||
hlaska++;
|
|
||||||
if(hlaska>LANG_NUM) hlaska=1;
|
|
||||||
lcd_mylang_top(hlaska);
|
|
||||||
lcd_mylang_drawcursor(cursor_pos);
|
|
||||||
counter=0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
if(MYSERIAL.available() > 1){
|
if(MYSERIAL.available() > 1){
|
||||||
lang_selected = 0;
|
lang_selected = 0;
|
||||||
|
|
@ -3834,9 +4061,10 @@ static void lcd_disable_farm_mode() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_ping_allert() {
|
#if 0
|
||||||
if ((abs(millis() - allert_timer)*0.001) > PING_ALLERT_PERIOD) {
|
static void lcd_ping_alert() {
|
||||||
allert_timer = millis();
|
if ((abs(millis() - alert_timer)*0.001) > PING_ALERT_PERIOD) {
|
||||||
|
alert_timer = millis();
|
||||||
SET_OUTPUT(BEEPER);
|
SET_OUTPUT(BEEPER);
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
WRITE(BEEPER, HIGH);
|
WRITE(BEEPER, HIGH);
|
||||||
|
|
@ -3847,7 +4075,7 @@ static void lcd_ping_allert() {
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SNMM
|
#ifdef SNMM
|
||||||
|
|
||||||
|
|
@ -3867,9 +4095,7 @@ void change_extr(int extr) { //switches multiplexer for extruders
|
||||||
disable_e1();
|
disable_e1();
|
||||||
disable_e2();
|
disable_e2();
|
||||||
|
|
||||||
#ifdef SNMM
|
|
||||||
snmm_extruder = extr;
|
snmm_extruder = extr;
|
||||||
#endif
|
|
||||||
|
|
||||||
pinMode(E_MUX0_PIN, OUTPUT);
|
pinMode(E_MUX0_PIN, OUTPUT);
|
||||||
pinMode(E_MUX1_PIN, OUTPUT);
|
pinMode(E_MUX1_PIN, OUTPUT);
|
||||||
|
|
@ -3897,7 +4123,7 @@ void change_extr(int extr) { //switches multiplexer for extruders
|
||||||
delay(100);
|
delay(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_ext_nr() { //reads multiplexer input pins and return current extruder number (counted from 0)
|
int get_ext_nr() { //reads multiplexer input pins and return current extruder number (counted from 0)
|
||||||
return(2 * READ(E_MUX1_PIN) + READ(E_MUX0_PIN));
|
return(2 * READ(E_MUX1_PIN) + READ(E_MUX0_PIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3913,10 +4139,10 @@ void display_loading() {
|
||||||
|
|
||||||
void extr_adj(int extruder) //loading filament for SNMM
|
void extr_adj(int extruder) //loading filament for SNMM
|
||||||
{
|
{
|
||||||
bool correct;
|
//bool correct;
|
||||||
max_feedrate[E_AXIS] =80;
|
max_feedrate[E_AXIS] =80;
|
||||||
//max_feedrate[E_AXIS] = 50;
|
//max_feedrate[E_AXIS] = 50;
|
||||||
START:
|
//START:
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
switch (extruder) {
|
switch (extruder) {
|
||||||
|
|
@ -4416,8 +4642,6 @@ static void lcd_main_menu()
|
||||||
MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
|
MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
|
||||||
/* if (farm_mode && !IS_SD_PRINTING )
|
/* if (farm_mode && !IS_SD_PRINTING )
|
||||||
{
|
{
|
||||||
|
|
||||||
int tempScrool = 0;
|
|
||||||
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
||||||
//delay(100);
|
//delay(100);
|
||||||
return; // nothing to do (so don't thrash the SD card)
|
return; // nothing to do (so don't thrash the SD card)
|
||||||
|
|
@ -4463,7 +4687,7 @@ static void lcd_main_menu()
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if ( ( IS_SD_PRINTING || is_usb_printing ) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) && !homing_flag && !mesh_bed_leveling_flag)
|
if ( ( IS_SD_PRINTING || is_usb_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) ) && (current_position[Z_AXIS] < Z_HEIGHT_HIDE_LIVE_ADJUST_MENU) && !homing_flag && !mesh_bed_leveling_flag)
|
||||||
{
|
{
|
||||||
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);//8
|
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);//8
|
||||||
}
|
}
|
||||||
|
|
@ -4556,15 +4780,14 @@ void stack_error() {
|
||||||
while (1) delay_keep_alive(1000);
|
while (1) delay_keep_alive(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SDSUPPORT
|
#if 0
|
||||||
|
//#ifdef SDSUPPORT
|
||||||
static void lcd_autostart_sd()
|
static void lcd_autostart_sd()
|
||||||
{
|
{
|
||||||
card.lastnr = 0;
|
card.lastnr = 0;
|
||||||
card.setroot();
|
card.setroot();
|
||||||
card.checkautostart(true);
|
card.checkautostart(true);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void lcd_silent_mode_set_tune() {
|
static void lcd_silent_mode_set_tune() {
|
||||||
|
|
@ -4578,6 +4801,7 @@ static void lcd_silent_mode_set_tune() {
|
||||||
digipot_init();
|
digipot_init();
|
||||||
lcd_goto_menu(lcd_tune_menu, 9);
|
lcd_goto_menu(lcd_tune_menu, 9);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void lcd_colorprint_change() {
|
static void lcd_colorprint_change() {
|
||||||
|
|
||||||
|
|
@ -4621,13 +4845,13 @@ static void lcd_tune_menu()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
static void lcd_move_menu_01mm()
|
static void lcd_move_menu_01mm()
|
||||||
{
|
{
|
||||||
move_menu_scale = 0.1;
|
move_menu_scale = 0.1;
|
||||||
lcd_move_menu_axis();
|
lcd_move_menu_axis();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void lcd_control_temperature_menu()
|
static void lcd_control_temperature_menu()
|
||||||
{
|
{
|
||||||
|
|
@ -4773,7 +4997,6 @@ void lcd_sdcard_menu()
|
||||||
{
|
{
|
||||||
uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
|
uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
|
||||||
|
|
||||||
int tempScrool = 0;
|
|
||||||
if (presort_flag == true) {
|
if (presort_flag == true) {
|
||||||
presort_flag = false;
|
presort_flag = false;
|
||||||
card.presort();
|
card.presort();
|
||||||
|
|
@ -4828,7 +5051,6 @@ void lcd_sdcard_menu()
|
||||||
}
|
}
|
||||||
//int j;
|
//int j;
|
||||||
//char description[31];
|
//char description[31];
|
||||||
int tempScrool = 0;
|
|
||||||
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
|
||||||
//delay(100);
|
//delay(100);
|
||||||
return; // nothing to do (so don't thrash the SD card)
|
return; // nothing to do (so don't thrash the SD card)
|
||||||
|
|
@ -4923,13 +5145,22 @@ void lcd_sdcard_menu()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
menu_edit_type(int, int3, itostr3, 1)
|
menu_edit_type(int, int3, itostr3, 1)
|
||||||
|
#if defined(AUTOTEMP)
|
||||||
menu_edit_type(float, float3, ftostr3, 1)
|
menu_edit_type(float, float3, ftostr3, 1)
|
||||||
menu_edit_type(float, float32, ftostr32, 100)
|
menu_edit_type(float, float32, ftostr32, 100)
|
||||||
|
#endif
|
||||||
|
#if 0
|
||||||
menu_edit_type(float, float43, ftostr43, 1000)
|
menu_edit_type(float, float43, ftostr43, 1000)
|
||||||
menu_edit_type(float, float5, ftostr5, 0.01)
|
menu_edit_type(float, float5, ftostr5, 0.01)
|
||||||
menu_edit_type(float, float51, ftostr51, 10)
|
menu_edit_type(float, float51, ftostr51, 10)
|
||||||
menu_edit_type(float, float52, ftostr52, 100)
|
menu_edit_type(float, float52, ftostr52, 100)
|
||||||
menu_edit_type(unsigned long, long5, ftostr5, 0.01)
|
menu_edit_type(unsigned long, long5, ftostr5, 0.01)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void lcd_selftest_v()
|
||||||
|
{
|
||||||
|
(void)lcd_selftest();
|
||||||
|
}
|
||||||
|
|
||||||
static bool lcd_selftest()
|
static bool lcd_selftest()
|
||||||
{
|
{
|
||||||
|
|
@ -5045,24 +5276,26 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1 || READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1 || READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1)
|
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1))
|
||||||
{
|
{
|
||||||
if (_axis == 0)
|
if (_axis == 0)
|
||||||
{
|
{
|
||||||
_stepresult = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? true : false;
|
_stepresult = ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? true : false;
|
||||||
_err_endstop = (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? 1 : 2;
|
_err_endstop = ((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ? 1 : 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (_axis == 1)
|
if (_axis == 1)
|
||||||
{
|
{
|
||||||
_stepresult = (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? true : false;
|
_stepresult = ((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ? true : false;
|
||||||
_err_endstop = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? 0 : 2;
|
_err_endstop = ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? 0 : 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (_axis == 2)
|
if (_axis == 2)
|
||||||
{
|
{
|
||||||
_stepresult = (READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) ? true : false;
|
_stepresult = ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) ? true : false;
|
||||||
_err_endstop = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? 0 : 1;
|
_err_endstop = ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ? 0 : 1;
|
||||||
/*disable_x();
|
/*disable_x();
|
||||||
disable_y();
|
disable_y();
|
||||||
disable_z();*/
|
disable_z();*/
|
||||||
|
|
@ -5125,7 +5358,6 @@ static bool lcd_selfcheck_pulleys(int axis)
|
||||||
float current_position_init;
|
float current_position_init;
|
||||||
float move;
|
float move;
|
||||||
bool endstop_triggered = false;
|
bool endstop_triggered = false;
|
||||||
bool result = true;
|
|
||||||
int i;
|
int i;
|
||||||
unsigned long timeout_counter;
|
unsigned long timeout_counter;
|
||||||
refresh_cmd_timeout();
|
refresh_cmd_timeout();
|
||||||
|
|
@ -5149,7 +5381,8 @@ static bool lcd_selfcheck_pulleys(int axis)
|
||||||
current_position[axis] = current_position[axis] - move;
|
current_position[axis] = current_position[axis] - move;
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], 50, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], 50, active_extruder);
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
if ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) || (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1)) {
|
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1)) {
|
||||||
lcd_selftest_error(8, (axis == 0) ? "X" : "Y", "");
|
lcd_selftest_error(8, (axis == 0) ? "X" : "Y", "");
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
@ -5158,7 +5391,8 @@ static bool lcd_selfcheck_pulleys(int axis)
|
||||||
endstop_triggered = false;
|
endstop_triggered = false;
|
||||||
manage_inactivity(true);
|
manage_inactivity(true);
|
||||||
while (!endstop_triggered) {
|
while (!endstop_triggered) {
|
||||||
if ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) || (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1)) {
|
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1)) {
|
||||||
endstop_triggered = true;
|
endstop_triggered = true;
|
||||||
if (current_position_init - 1 <= current_position[axis] && current_position_init + 1 >= current_position[axis]) {
|
if (current_position_init - 1 <= current_position[axis] && current_position_init + 1 >= current_position[axis]) {
|
||||||
current_position[axis] += 15;
|
current_position[axis] += 15;
|
||||||
|
|
@ -5181,28 +5415,33 @@ static bool lcd_selfcheck_pulleys(int axis)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool lcd_selfcheck_endstops()
|
static bool lcd_selfcheck_endstops()
|
||||||
{
|
{
|
||||||
bool _result = true;
|
bool _result = true;
|
||||||
|
|
||||||
if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1 || READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1 || READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1)
|
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1))
|
||||||
{
|
{
|
||||||
current_position[0] = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? current_position[0] = current_position[0] + 10 : current_position[0];
|
if ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) current_position[0] += 10;
|
||||||
current_position[1] = (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? current_position[1] = current_position[1] + 10 : current_position[1];
|
if ((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) current_position[1] += 10;
|
||||||
current_position[2] = (READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) ? current_position[2] = current_position[2] + 10 : current_position[2];
|
if ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) current_position[2] += 10;
|
||||||
}
|
}
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[0] / 60, active_extruder);
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], manual_feedrate[0] / 60, active_extruder);
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|
||||||
if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1 || READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1 || READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1)
|
if (((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) ||
|
||||||
|
((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1))
|
||||||
{
|
{
|
||||||
_result = false;
|
_result = false;
|
||||||
char _error[4] = "";
|
char _error[4] = "";
|
||||||
if (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "X");
|
if ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING) == 1) strcat(_error, "X");
|
||||||
if (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "Y");
|
if ((READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING) == 1) strcat(_error, "Y");
|
||||||
if (READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) strcat(_error, "Z");
|
if ((READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING) == 1) strcat(_error, "Z");
|
||||||
lcd_selftest_error(3, _error, "");
|
lcd_selftest_error(3, _error, "");
|
||||||
}
|
}
|
||||||
manage_heater();
|
manage_heater();
|
||||||
|
|
@ -5457,8 +5696,7 @@ static bool lcd_selftest_fan_dialog(int _fan)
|
||||||
|
|
||||||
if (!_result)
|
if (!_result)
|
||||||
{
|
{
|
||||||
const char *_err;
|
lcd_selftest_error(_errno, "", "");
|
||||||
lcd_selftest_error(_errno, _err, _err);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _result;
|
return _result;
|
||||||
|
|
@ -5468,7 +5706,7 @@ static bool lcd_selftest_fan_dialog(int _fan)
|
||||||
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay)
|
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay)
|
||||||
{
|
{
|
||||||
|
|
||||||
lcd_next_update_millis = millis() + (LCD_UPDATE_INTERVAL * 10000);
|
lcd_next_update_millis = millis() + (LCD_UPDATE_INTERVAL * 10000L);
|
||||||
|
|
||||||
int _step_block = 0;
|
int _step_block = 0;
|
||||||
const char *_indicator = (_progress > _progress_scale) ? "-" : "|";
|
const char *_indicator = (_progress > _progress_scale) ? "-" : "|";
|
||||||
|
|
@ -5569,7 +5807,7 @@ static void menu_action_function(menuFunc_t data) {
|
||||||
static bool check_file(const char* filename) {
|
static bool check_file(const char* filename) {
|
||||||
bool result = false;
|
bool result = false;
|
||||||
uint32_t filesize;
|
uint32_t filesize;
|
||||||
card.openFile(filename, true);
|
card.openFile((char *)filename, true);
|
||||||
filesize = card.getFileSize();
|
filesize = card.getFileSize();
|
||||||
if (filesize > END_FILE_SECTION) {
|
if (filesize > END_FILE_SECTION) {
|
||||||
card.setIndex(filesize - END_FILE_SECTION);
|
card.setIndex(filesize - END_FILE_SECTION);
|
||||||
|
|
@ -5609,17 +5847,18 @@ static void menu_action_sddirectory(const char* filename, char* longFilename)
|
||||||
card.chdir(filename);
|
card.chdir(filename);
|
||||||
encoderPosition = 0;
|
encoderPosition = 0;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr)
|
static void menu_action_setting_edit_bool(const char* pstr, bool* ptr)
|
||||||
{
|
{
|
||||||
*ptr = !(*ptr);
|
*ptr = !(*ptr);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback)
|
static void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, menuFunc_t callback)
|
||||||
{
|
{
|
||||||
menu_action_setting_edit_bool(pstr, ptr);
|
menu_action_setting_edit_bool(pstr, ptr);
|
||||||
(*callback)();
|
(*callback)();
|
||||||
}
|
}
|
||||||
*/
|
#endif
|
||||||
#endif//ULTIPANEL
|
#endif//ULTIPANEL
|
||||||
|
|
||||||
/** LCD API **/
|
/** LCD API **/
|
||||||
|
|
@ -5857,7 +6096,6 @@ static void lcd_connect_printer() {
|
||||||
lcd_update_enable(false);
|
lcd_update_enable(false);
|
||||||
lcd_implementation_clear();
|
lcd_implementation_clear();
|
||||||
|
|
||||||
bool pressed = false;
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int t = 0;
|
int t = 0;
|
||||||
lcd_set_custom_characters_progress();
|
lcd_set_custom_characters_progress();
|
||||||
|
|
@ -5894,7 +6132,7 @@ void lcd_ping() { //chceck if printer is connected to monitoring when in farm mo
|
||||||
//if there are comamnds in buffer, some long gcodes can delay execution of ping command
|
//if there are comamnds in buffer, some long gcodes can delay execution of ping command
|
||||||
//therefore longer period is used
|
//therefore longer period is used
|
||||||
printer_connected = false;
|
printer_connected = false;
|
||||||
//lcd_ping_allert(); //acustic signals
|
//lcd_ping_alert(); //acustic signals
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lcd_printer_connected();
|
lcd_printer_connected();
|
||||||
|
|
@ -6423,4 +6661,4 @@ void copy_and_scalePID_d()
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif //ULTRA_LCD
|
#endif //ULTRA_LCD
|
||||||
|
|
|
||||||
|
|
@ -29,20 +29,11 @@
|
||||||
void prusa_statistics(int _message, uint8_t _col_nr = 0);
|
void prusa_statistics(int _message, uint8_t _col_nr = 0);
|
||||||
void lcd_confirm_print();
|
void lcd_confirm_print();
|
||||||
unsigned char lcd_choose_color();
|
unsigned char lcd_choose_color();
|
||||||
void lcd_mylang();
|
void lcd_mylang();
|
||||||
bool lcd_detected(void);
|
bool lcd_detected(void);
|
||||||
|
|
||||||
|
|
||||||
static bool lcd_selftest();
|
|
||||||
static bool lcd_selfcheck_endstops();
|
|
||||||
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
|
||||||
static bool lcd_selfcheck_check_heater(bool _isbed);
|
|
||||||
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay);
|
|
||||||
static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
|
|
||||||
static bool lcd_selftest_fan_dialog(int _fan);
|
|
||||||
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
|
||||||
void lcd_menu_statistics();
|
void lcd_menu_statistics();
|
||||||
static bool lcd_selfcheck_pulleys(int axis);
|
|
||||||
|
|
||||||
|
|
||||||
extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
|
extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
|
||||||
|
|
@ -67,8 +58,6 @@ void lcd_mylang();
|
||||||
void lcd_setcontrast(uint8_t value);
|
void lcd_setcontrast(uint8_t value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
|
|
||||||
|
|
||||||
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
|
#define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
|
||||||
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
|
#define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
|
||||||
#define LCD_MESSAGERPGM(x) lcd_setstatuspgm((x))
|
#define LCD_MESSAGERPGM(x) lcd_setstatuspgm((x))
|
||||||
|
|
@ -212,30 +201,12 @@ extern void lcd_implementation_print_at(uint8_t x, uint8_t y, const char *str);
|
||||||
|
|
||||||
|
|
||||||
void change_extr(int extr);
|
void change_extr(int extr);
|
||||||
static void lcd_colorprint_change();
|
int get_ext_nr();
|
||||||
static int get_ext_nr();
|
|
||||||
void extr_adj(int extruder);
|
void extr_adj(int extruder);
|
||||||
static void extr_adj_0();
|
|
||||||
static void extr_adj_1();
|
|
||||||
static void extr_adj_2();
|
|
||||||
static void extr_adj_3();
|
|
||||||
static void fil_load_menu();
|
|
||||||
static void fil_unload_menu();
|
|
||||||
static void extr_unload_0();
|
|
||||||
static void extr_unload_1();
|
|
||||||
static void extr_unload_2();
|
|
||||||
static void extr_unload_3();
|
|
||||||
static void lcd_disable_farm_mode();
|
|
||||||
void extr_unload_all();
|
void extr_unload_all();
|
||||||
void extr_unload_used();
|
void extr_unload_used();
|
||||||
void extr_unload();
|
void extr_unload();
|
||||||
static char snmm_stop_print_menu();
|
|
||||||
static void lcd_babystep_z();
|
|
||||||
#ifdef SDCARD_SORT_ALPHA
|
|
||||||
static void lcd_sort_type_set();
|
|
||||||
#endif
|
|
||||||
void stack_error();
|
void stack_error();
|
||||||
static void lcd_ping_allert();
|
|
||||||
void lcd_printer_connected();
|
void lcd_printer_connected();
|
||||||
void lcd_ping();
|
void lcd_ping();
|
||||||
|
|
||||||
|
|
@ -270,10 +241,7 @@ void lcd_set_degree();
|
||||||
void lcd_set_progress();
|
void lcd_set_progress();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void lcd_send_status();
|
|
||||||
static void lcd_connect_printer();
|
|
||||||
|
|
||||||
void lcd_wizard();
|
void lcd_wizard();
|
||||||
void lcd_wizard(int state);
|
void lcd_wizard(int state);
|
||||||
|
|
||||||
#endif //ULTRALCD_H
|
#endif //ULTRALCD_H
|
||||||
|
|
|
||||||
|
|
@ -360,6 +360,7 @@ static void lcd_set_custom_characters(
|
||||||
B00000
|
B00000
|
||||||
}; //thanks Sonny Mounicou
|
}; //thanks Sonny Mounicou
|
||||||
|
|
||||||
|
#if 0 // Unused
|
||||||
byte arrup[8] = {
|
byte arrup[8] = {
|
||||||
B00100,
|
B00100,
|
||||||
B01110,
|
B01110,
|
||||||
|
|
@ -381,6 +382,7 @@ static void lcd_set_custom_characters(
|
||||||
B01010,
|
B01010,
|
||||||
B00100
|
B00100
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
||||||
|
|
@ -603,16 +605,15 @@ static void lcd_implementation_init_noclear(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void lcd_implementation_nodisplay()
|
inline void lcd_implementation_nodisplay()
|
||||||
{
|
{
|
||||||
lcd.noDisplay();
|
lcd.noDisplay();
|
||||||
}
|
}
|
||||||
static void lcd_implementation_display()
|
inline void lcd_implementation_display()
|
||||||
{
|
{
|
||||||
lcd.display();
|
lcd.display();
|
||||||
}
|
}
|
||||||
|
inline void lcd_implementation_clear()
|
||||||
void lcd_implementation_clear()
|
|
||||||
{
|
{
|
||||||
lcd.clear();
|
lcd.clear();
|
||||||
}
|
}
|
||||||
|
|
@ -901,7 +902,7 @@ static void lcd_implementation_status_screen()
|
||||||
lcd.setCursor(7, 3);
|
lcd.setCursor(7, 3);
|
||||||
lcd_printPGM(PSTR(" "));
|
lcd_printPGM(PSTR(" "));
|
||||||
|
|
||||||
for (int dots = 0; dots < heating_status_counter; dots++)
|
for (uint16_t dots = 0; dots < heating_status_counter; dots++)
|
||||||
{
|
{
|
||||||
lcd.setCursor(7 + dots, 3);
|
lcd.setCursor(7 + dots, 3);
|
||||||
lcd.print('.');
|
lcd.print('.');
|
||||||
|
|
@ -1103,6 +1104,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
|
||||||
lcd.print(' ');
|
lcd.print(' ');
|
||||||
lcd.print(data);
|
lcd.print(data);
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, const char* pstr, char pre_char, const char* data)
|
static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, const char* pstr, char pre_char, const char* data)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
|
@ -1125,6 +1127,7 @@ static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, cons
|
||||||
lcd.print(' ');
|
lcd.print(' ');
|
||||||
lcd_printPGM(data);
|
lcd_printPGM(data);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#define lcd_implementation_drawmenu_setting_edit_int3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data)))
|
#define lcd_implementation_drawmenu_setting_edit_int3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', itostr3(*(data)))
|
||||||
#define lcd_implementation_drawmenu_setting_edit_int3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data)))
|
#define lcd_implementation_drawmenu_setting_edit_int3(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, ' ', itostr3(*(data)))
|
||||||
#define lcd_implementation_drawmenu_setting_edit_float3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data)))
|
#define lcd_implementation_drawmenu_setting_edit_float3_selected(row, pstr, pstr2, data, minValue, maxValue) lcd_implementation_drawmenu_setting_edit_generic(row, pstr, '>', ftostr3(*(data)))
|
||||||
|
|
@ -1229,8 +1232,8 @@ static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char*
|
||||||
if(LCD_CLICKED || ( enc_dif != encoderDiff )){
|
if(LCD_CLICKED || ( enc_dif != encoderDiff )){
|
||||||
longFilenameTMP = longFilename;
|
longFilenameTMP = longFilename;
|
||||||
*(longFilenameTMP + LCD_WIDTH - 2) = '\0';
|
*(longFilenameTMP + LCD_WIDTH - 2) = '\0';
|
||||||
int i = 1;
|
i = 1;
|
||||||
int j = 0;
|
j = 0;
|
||||||
break;
|
break;
|
||||||
}else{
|
}else{
|
||||||
if (j == 1) delay(3); //wait around 1.2 s to start scrolling text
|
if (j == 1) delay(3); //wait around 1.2 s to start scrolling text
|
||||||
|
|
|
||||||
|
|
@ -392,7 +392,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -392,7 +392,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,7 @@ THERMISTORS SETTINGS
|
||||||
|
|
||||||
#define PING_TIME 60 //time in s
|
#define PING_TIME 60 //time in s
|
||||||
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
#define PING_TIME_LONG 600 //10 min; used when length of commands buffer > 0 to avoid false triggering when dealing with long gcodes
|
||||||
#define PING_ALLERT_PERIOD 60 //time in s
|
#define PING_ALERT_PERIOD 60 //time in s
|
||||||
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
#define NC_TIME 10 //time in s for periodic important status messages sending which needs reponse from monitoring
|
||||||
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
#define NC_BUTTON_LONG_PRESS 15 //time in s
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue