Merge branch 'Development' into marlin_configurator

Latest upstream commits
This commit is contained in:
Scott Lahteine 2015-02-12 21:59:26 -08:00
commit 68184af57b
18 changed files with 344 additions and 63 deletions

View file

@ -60,9 +60,9 @@ My preferred method:
* g) You can raise the z probe with M402 command; * g) You can raise the z probe with M402 command;
* h) Fill the defines bellow multiplying the values by "-1" (just change the signal) * h) Fill the defines bellow multiplying the values by "-1" (just change the signal)
* X and Y-Offset must be Integers!
* \#define X_PROBE_OFFSET_FROM_EXTRUDER -24.3 * \#define X_PROBE_OFFSET_FROM_EXTRUDER -24
* \#define Y_PROBE_OFFSET_FROM_EXTRUDER 31.4 * \#define Y_PROBE_OFFSET_FROM_EXTRUDER 31
* \#define Z_PROBE_OFFSET_FROM_EXTRUDER -5.1 * \#define Z_PROBE_OFFSET_FROM_EXTRUDER -5.1
Sled Option Notes Sled Option Notes

View file

@ -559,7 +559,12 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
#define ABS_PREHEAT_HPB_TEMP 100 #define ABS_PREHEAT_HPB_TEMP 100
#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 #define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255
//LCD and SD support //==============================LCD and SD support=============================
// Define your display language below. Replace (en) with your language code and uncomment.
// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu
// See also language.h
//#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
// Character based displays can have different extended charsets. // Character based displays can have different extended charsets.
#define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°" #define DISPLAY_CHARSET_HD44780_JAPAN // "ääööüüß23°"

View file

@ -228,7 +228,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -201,8 +201,9 @@ void Stop();
bool IsStopped(); bool IsStopped();
void enquecommand(const char *cmd); //put an ASCII command at the end of the current buffer. bool enquecommand(const char *cmd); //put a single ASCII command at the end of the current buffer or return false when it is full
void enquecommand_P(const char *cmd); //put an ASCII command at the end of the current buffer, read from flash void enquecommands_P(const char *cmd); //put one or many ASCII commands at the end of the current buffer, read from flash
void prepare_arc_move(char isclockwise); void prepare_arc_move(char isclockwise);
void clamp_to_software_endstops(float target[3]); void clamp_to_software_endstops(float target[3]);

View file

@ -385,6 +385,8 @@ static int serial_count = 0;
static boolean comment_mode = false; static boolean comment_mode = false;
static char *strchr_pointer; ///< A pointer to find chars in the command string (X, Y, Z, E, etc.) static char *strchr_pointer; ///< A pointer to find chars in the command string (X, Y, Z, E, etc.)
const char* queued_commands_P= NULL; /* pointer to the current line in the active sequence of commands, or NULL when none */
const int sensitive_pins[] = SENSITIVE_PINS; ///< Sensitive pin list for M42 const int sensitive_pins[] = SENSITIVE_PINS; ///< Sensitive pin list for M42
// Inactivity shutdown // Inactivity shutdown
@ -448,39 +450,64 @@ void serial_echopair_P(const char *s_P, unsigned long v)
} }
#endif //!SDSUPPORT #endif //!SDSUPPORT
//adds an command to the main command buffer //Injects the next command from the pending sequence of commands, when possible
//thats really done in a non-safe way. //Return false if and only if no command was pending
//needs overworking someday static bool drain_queued_commands_P()
void enquecommand(const char *cmd)
{ {
if(buflen < BUFSIZE) char cmd[30];
if(!queued_commands_P)
return false;
// Get the next 30 chars from the sequence of gcodes to run
strncpy_P(cmd, queued_commands_P, sizeof(cmd)-1);
cmd[sizeof(cmd)-1]= 0;
// Look for the end of line, or the end of sequence
size_t i= 0;
char c;
while( (c= cmd[i]) && c!='\n' )
++i; // look for the end of this gcode command
cmd[i]= 0;
if(enquecommand(cmd)) // buffer was not full (else we will retry later)
{ {
//this is dangerous if a mixing of serial and this happens if(c)
strcpy(&(cmdbuffer[bufindw][0]),cmd); queued_commands_P+= i+1; // move to next command
SERIAL_ECHO_START; else
SERIAL_ECHOPGM(MSG_Enqueing); queued_commands_P= NULL; // will have no more commands in the sequence
SERIAL_ECHO(cmdbuffer[bufindw]);
SERIAL_ECHOLNPGM("\"");
bufindw= (bufindw + 1)%BUFSIZE;
buflen += 1;
} }
return true;
} }
void enquecommand_P(const char *cmd) //Record one or many commands to run from program memory.
//Aborts the current queue, if any.
//Note: drain_queued_commands_P() must be called repeatedly to drain the commands afterwards
void enquecommands_P(const char* pgcode)
{ {
if(buflen < BUFSIZE) queued_commands_P= pgcode;
{ drain_queued_commands_P(); // first command exectuted asap (when possible)
//this is dangerous if a mixing of serial and this happens
strcpy_P(&(cmdbuffer[bufindw][0]),cmd);
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_Enqueing);
SERIAL_ECHO(cmdbuffer[bufindw]);
SERIAL_ECHOLNPGM("\"");
bufindw= (bufindw + 1)%BUFSIZE;
buflen += 1;
}
} }
//adds a single command to the main command buffer, from RAM
//that is really done in a non-safe way.
//needs overworking someday
//Returns false if it failed to do so
bool enquecommand(const char *cmd)
{
if(*cmd==';')
return false;
if(buflen >= BUFSIZE)
return false;
//this is dangerous if a mixing of serial and this happens
strcpy(&(cmdbuffer[bufindw][0]),cmd);
SERIAL_ECHO_START;
SERIAL_ECHOPGM(MSG_Enqueing);
SERIAL_ECHO(cmdbuffer[bufindw]);
SERIAL_ECHOLNPGM("\"");
bufindw= (bufindw + 1)%BUFSIZE;
buflen += 1;
return true;
}
void setup_killpin() void setup_killpin()
{ {
#if defined(KILL_PIN) && KILL_PIN > -1 #if defined(KILL_PIN) && KILL_PIN > -1
@ -684,6 +711,9 @@ void loop()
void get_command() void get_command()
{ {
if(drain_queued_commands_P()) // priority is given to non-serial commands
return;
while( MYSERIAL.available() > 0 && buflen < BUFSIZE) { while( MYSERIAL.available() > 0 && buflen < BUFSIZE) {
serial_char = MYSERIAL.read(); serial_char = MYSERIAL.read();
if(serial_char == '\n' || if(serial_char == '\n' ||
@ -4459,7 +4489,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) //default argument s
{ {
if (homeDebounceCount == 0) if (homeDebounceCount == 0)
{ {
enquecommand_P((PSTR("G28"))); enquecommands_P((PSTR("G28")));
homeDebounceCount++; homeDebounceCount++;
LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME); LCD_ALERTMESSAGEPGM(MSG_AUTO_HOME);
} }

View file

@ -532,7 +532,7 @@ void CardReader::checkautostart(bool force)
sprintf_P(cmd, PSTR("M23 %s"), autoname); sprintf_P(cmd, PSTR("M23 %s"), autoname);
enquecommand(cmd); enquecommand(cmd);
enquecommand_P(PSTR("M24")); enquecommands_P(PSTR("M24"));
found=true; found=true;
} }
} }
@ -637,7 +637,7 @@ void CardReader::printingHasFinished()
if(SD_FINISHED_STEPPERRELEASE) if(SD_FINISHED_STEPPERRELEASE)
{ {
//finishAndDisableSteppers(); //finishAndDisableSteppers();
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND)); enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
} }
autotempShutdown(); autotempShutdown();
} }

View file

@ -199,7 +199,7 @@ static void lcd_implementation_status_screen() {
u8g.setPrintPos(80,47); u8g.setPrintPos(80,47);
if (starttime != 0) { if (starttime != 0) {
uint16_t time = millis()/60000 - starttime/60000; uint16_t time = (millis() - starttime) / 60000;
u8g.print(itostr2(time/60)); u8g.print(itostr2(time/60));
u8g.print(':'); u8g.print(':');
u8g.print(itostr2(time%60)); u8g.print(itostr2(time%60));
@ -210,26 +210,25 @@ static void lcd_implementation_status_screen() {
#endif #endif
// Extruders // Extruders
_draw_heater_status(6, 0); for (int i=0; i<EXTRUDERS; i++) _draw_heater_status(6 + i * 25, i);
#if EXTRUDERS > 1
_draw_heater_status(31, 1);
#if EXTRUDERS > 2
_draw_heater_status(55, 2);
#endif
#endif
// Heatbed // Heatbed
_draw_heater_status(81, -1); if (EXTRUDERS < 4) _draw_heater_status(81, -1);
// Fan // Fan
u8g.setFont(FONT_STATUSMENU); u8g.setFont(FONT_STATUSMENU);
u8g.setPrintPos(104,27); u8g.setPrintPos(104,27);
#if defined(FAN_PIN) && FAN_PIN > -1 #if defined(FAN_PIN) && FAN_PIN > -1
u8g.print(itostr3(int((fanSpeed*100)/256 + 1))); int per = ((fanSpeed + 1) * 100) / 256;
u8g.print("%"); if (per) {
#else u8g.print(itostr3(per));
u8g.print("---"); u8g.print("%");
}
else
#endif #endif
{
u8g.print("---");
}
// X, Y, Z-Coordinates // X, Y, Z-Coordinates
u8g.setFont(FONT_STATUSMENU); u8g.setFont(FONT_STATUSMENU);

View file

@ -228,7 +228,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -228,7 +228,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -228,7 +228,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 240 #define DEFAULT_STEPPER_DEACTIVE_TIME 240
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -228,7 +228,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -226,7 +226,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -225,7 +225,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -227,7 +227,7 @@
#define INVERT_Z_STEP_PIN false #define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false #define INVERT_E_STEP_PIN false
//default stepper release if idle //default stepper release if idle. Set to 0 to deactivate.
#define DEFAULT_STEPPER_DEACTIVE_TIME 60 #define DEFAULT_STEPPER_DEACTIVE_TIME 60
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate #define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate

View file

@ -223,5 +223,6 @@
*/ */
#include LANGUAGE_INCLUDE #include LANGUAGE_INCLUDE
#include "language_en.h"
#endif //__LANGUAGE_H #endif //__LANGUAGE_H

View file

@ -8,124 +8,356 @@
#ifndef LANGUAGE_EN_H #ifndef LANGUAGE_EN_H
#define LANGUAGE_EN_H #define LANGUAGE_EN_H
#ifndef WELCOME_MSG
#define WELCOME_MSG MACHINE_NAME " ready." #define WELCOME_MSG MACHINE_NAME " ready."
#endif
#ifndef MSG_SD_INSERTED
#define MSG_SD_INSERTED "Card inserted" #define MSG_SD_INSERTED "Card inserted"
#endif
#ifndef MSG_SD_REMOVED
#define MSG_SD_REMOVED "Card removed" #define MSG_SD_REMOVED "Card removed"
#endif
#ifndef MSG_MAIN
#define MSG_MAIN "Main" #define MSG_MAIN "Main"
#endif
#ifndef MSG_AUTOSTART
#define MSG_AUTOSTART "Autostart" #define MSG_AUTOSTART "Autostart"
#endif
#ifndef MSG_DISABLE_STEPPERS
#define MSG_DISABLE_STEPPERS "Disable steppers" #define MSG_DISABLE_STEPPERS "Disable steppers"
#endif
#ifndef MSG_AUTO_HOME
#define MSG_AUTO_HOME "Auto home" #define MSG_AUTO_HOME "Auto home"
#endif
#ifndef MSG_SET_HOME_OFFSETS
#define MSG_SET_HOME_OFFSETS "Set home offsets" #define MSG_SET_HOME_OFFSETS "Set home offsets"
#endif
#ifndef MSG_SET_ORIGIN
#define MSG_SET_ORIGIN "Set origin" #define MSG_SET_ORIGIN "Set origin"
#endif
#ifndef MSG_PREHEAT_PLA
#define MSG_PREHEAT_PLA "Preheat PLA" #define MSG_PREHEAT_PLA "Preheat PLA"
#endif
#ifndef MSG_PREHEAT_PLA_N
#define MSG_PREHEAT_PLA_N MSG_PREHEAT_PLA " " #define MSG_PREHEAT_PLA_N MSG_PREHEAT_PLA " "
#endif
#ifndef MSG_PREHEAT_PLA_ALL
#define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " All" #define MSG_PREHEAT_PLA_ALL MSG_PREHEAT_PLA " All"
#endif
#ifndef MSG_PREHEAT_PLA_BEDONLY
#define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " Bed" #define MSG_PREHEAT_PLA_BEDONLY MSG_PREHEAT_PLA " Bed"
#endif
#ifndef MSG_PREHEAT_PLA_SETTINGS
#define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " conf" #define MSG_PREHEAT_PLA_SETTINGS MSG_PREHEAT_PLA " conf"
#endif
#ifndef MSG_PREHEAT_ABS
#define MSG_PREHEAT_ABS "Preheat ABS" #define MSG_PREHEAT_ABS "Preheat ABS"
#endif
#ifndef MSG_PREHEAT_ABS_N
#define MSG_PREHEAT_ABS_N MSG_PREHEAT_ABS " " #define MSG_PREHEAT_ABS_N MSG_PREHEAT_ABS " "
#endif
#ifndef MSG_PREHEAT_ABS_ALL
#define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " All" #define MSG_PREHEAT_ABS_ALL MSG_PREHEAT_ABS " All"
#endif
#ifndef MSG_PREHEAT_ABS_BEDONLY
#define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " Bed" #define MSG_PREHEAT_ABS_BEDONLY MSG_PREHEAT_ABS " Bed"
#endif
#ifndef MSG_PREHEAT_ABS_SETTINGS
#define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " conf" #define MSG_PREHEAT_ABS_SETTINGS MSG_PREHEAT_ABS " conf"
#endif
#ifndef MSG_COOLDOWN
#define MSG_COOLDOWN "Cooldown" #define MSG_COOLDOWN "Cooldown"
#endif
#ifndef MSG_SWITCH_PS_ON
#define MSG_SWITCH_PS_ON "Switch power on" #define MSG_SWITCH_PS_ON "Switch power on"
#endif
#ifndef MSG_SWITCH_PS_OFF
#define MSG_SWITCH_PS_OFF "Switch power off" #define MSG_SWITCH_PS_OFF "Switch power off"
#endif
#ifndef MSG_EXTRUDE
#define MSG_EXTRUDE "Extrude" #define MSG_EXTRUDE "Extrude"
#endif
#ifndef MSG_RETRACT
#define MSG_RETRACT "Retract" #define MSG_RETRACT "Retract"
#endif
#ifndef MSG_MOVE_AXIS
#define MSG_MOVE_AXIS "Move axis" #define MSG_MOVE_AXIS "Move axis"
#endif
#ifndef MSG_MOVE_X
#define MSG_MOVE_X "Move X" #define MSG_MOVE_X "Move X"
#endif
#ifndef MSG_MOVE_Y
#define MSG_MOVE_Y "Move Y" #define MSG_MOVE_Y "Move Y"
#endif
#ifndef MSG_MOVE_Z
#define MSG_MOVE_Z "Move Z" #define MSG_MOVE_Z "Move Z"
#endif
#ifndef MSG_MOVE_E
#define MSG_MOVE_E "Extruder" #define MSG_MOVE_E "Extruder"
#endif
#ifndef MSG_MOVE_01MM
#define MSG_MOVE_01MM "Move 0.1mm" #define MSG_MOVE_01MM "Move 0.1mm"
#endif
#ifndef MSG_MOVE_1MM
#define MSG_MOVE_1MM "Move 1mm" #define MSG_MOVE_1MM "Move 1mm"
#endif
#ifndef MSG_MOVE_10MM
#define MSG_MOVE_10MM "Move 10mm" #define MSG_MOVE_10MM "Move 10mm"
#endif
#ifndef MSG_SPEED
#define MSG_SPEED "Speed" #define MSG_SPEED "Speed"
#endif
#ifndef MSG_NOZZLE
#define MSG_NOZZLE "Nozzle" #define MSG_NOZZLE "Nozzle"
#endif
#ifndef MSG_BED
#define MSG_BED "Bed" #define MSG_BED "Bed"
#endif
#ifndef MSG_FAN_SPEED
#define MSG_FAN_SPEED "Fan speed" #define MSG_FAN_SPEED "Fan speed"
#endif
#ifndef MSG_FLOW
#define MSG_FLOW "Flow" #define MSG_FLOW "Flow"
#endif
#ifndef MSG_CONTROL
#define MSG_CONTROL "Control" #define MSG_CONTROL "Control"
#endif
#ifndef MSG_MIN
#define MSG_MIN " " STR_THERMOMETER " Min" #define MSG_MIN " " STR_THERMOMETER " Min"
#endif
#ifndef MSG_MAX
#define MSG_MAX " " STR_THERMOMETER " Max" #define MSG_MAX " " STR_THERMOMETER " Max"
#endif
#ifndef MSG_FACTOR
#define MSG_FACTOR " " STR_THERMOMETER " Fact" #define MSG_FACTOR " " STR_THERMOMETER " Fact"
#endif
#ifndef MSG_AUTOTEMP
#define MSG_AUTOTEMP "Autotemp" #define MSG_AUTOTEMP "Autotemp"
#endif
#ifndef MSG_ON
#define MSG_ON "On " #define MSG_ON "On "
#endif
#ifndef MSG_OFF
#define MSG_OFF "Off" #define MSG_OFF "Off"
#endif
#ifndef MSG_PID_P
#define MSG_PID_P "PID-P" #define MSG_PID_P "PID-P"
#endif
#ifndef MSG_PID_I
#define MSG_PID_I "PID-I" #define MSG_PID_I "PID-I"
#endif
#ifndef MSG_PID_D
#define MSG_PID_D "PID-D" #define MSG_PID_D "PID-D"
#endif
#ifndef MSG_PID_C
#define MSG_PID_C "PID-C" #define MSG_PID_C "PID-C"
#endif
#ifndef MSG_ACC
#define MSG_ACC "Accel" #define MSG_ACC "Accel"
#endif
#ifndef MSG_VXY_JERK
#define MSG_VXY_JERK "Vxy-jerk" #define MSG_VXY_JERK "Vxy-jerk"
#endif
#ifndef MSG_VZ_JERK
#define MSG_VZ_JERK "Vz-jerk" #define MSG_VZ_JERK "Vz-jerk"
#endif
#ifndef MSG_VE_JERK
#define MSG_VE_JERK "Ve-jerk" #define MSG_VE_JERK "Ve-jerk"
#endif
#ifndef MSG_VMAX
#define MSG_VMAX "Vmax " #define MSG_VMAX "Vmax "
#endif
#ifndef MSG_X
#define MSG_X "x" #define MSG_X "x"
#endif
#ifndef MSG_Y
#define MSG_Y "y" #define MSG_Y "y"
#endif
#ifndef MSG_Z
#define MSG_Z "z" #define MSG_Z "z"
#endif
#ifndef MSG_E
#define MSG_E "e" #define MSG_E "e"
#endif
#ifndef MSG_VMIN
#define MSG_VMIN "Vmin" #define MSG_VMIN "Vmin"
#endif
#ifndef MSG_VTRAV_MIN
#define MSG_VTRAV_MIN "VTrav min" #define MSG_VTRAV_MIN "VTrav min"
#endif
#ifndef MSG_AMAX
#define MSG_AMAX "Amax " #define MSG_AMAX "Amax "
#endif
#ifndef MSG_A_RETRACT
#define MSG_A_RETRACT "A-retract" #define MSG_A_RETRACT "A-retract"
#endif
#ifndef MSG_XSTEPS
#define MSG_XSTEPS "Xsteps/mm" #define MSG_XSTEPS "Xsteps/mm"
#endif
#ifndef MSG_YSTEPS
#define MSG_YSTEPS "Ysteps/mm" #define MSG_YSTEPS "Ysteps/mm"
#endif
#ifndef MSG_ZSTEPS
#define MSG_ZSTEPS "Zsteps/mm" #define MSG_ZSTEPS "Zsteps/mm"
#endif
#ifndef MSG_ESTEPS
#define MSG_ESTEPS "Esteps/mm" #define MSG_ESTEPS "Esteps/mm"
#endif
#ifndef MSG_TEMPERATURE
#define MSG_TEMPERATURE "Temperature" #define MSG_TEMPERATURE "Temperature"
#endif
#ifndef MSG_MOTION
#define MSG_MOTION "Motion" #define MSG_MOTION "Motion"
#endif
#ifndef MSG_VOLUMETRIC
#define MSG_VOLUMETRIC "Filament" #define MSG_VOLUMETRIC "Filament"
#endif
#ifndef MSG_VOLUMETRIC_ENABLED
#define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3 #define MSG_VOLUMETRIC_ENABLED "E in mm" STR_h3
#endif
#ifndef MSG_FILAMENT_SIZE_EXTRUDER_0
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1" #define MSG_FILAMENT_SIZE_EXTRUDER_0 "Fil. Dia. 1"
#endif
#ifndef MSG_FILAMENT_SIZE_EXTRUDER_1
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2" #define MSG_FILAMENT_SIZE_EXTRUDER_1 "Fil. Dia. 2"
#endif
#ifndef MSG_FILAMENT_SIZE_EXTRUDER_2
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3" #define MSG_FILAMENT_SIZE_EXTRUDER_2 "Fil. Dia. 3"
#endif
#ifndef MSG_FILAMENT_SIZE_EXTRUDER_3
#define MSG_FILAMENT_SIZE_EXTRUDER_3 "Fil. Dia. 4" #define MSG_FILAMENT_SIZE_EXTRUDER_3 "Fil. Dia. 4"
#endif
#ifndef MSG_CONTRAST
#define MSG_CONTRAST "LCD contrast" #define MSG_CONTRAST "LCD contrast"
#endif
#ifndef MSG_STORE_EPROM
#define MSG_STORE_EPROM "Store memory" #define MSG_STORE_EPROM "Store memory"
#endif
#ifndef MSG_LOAD_EPROM
#define MSG_LOAD_EPROM "Load memory" #define MSG_LOAD_EPROM "Load memory"
#endif
#ifndef MSG_RESTORE_FAILSAFE
#define MSG_RESTORE_FAILSAFE "Restore failsafe" #define MSG_RESTORE_FAILSAFE "Restore failsafe"
#endif
#ifndef MSG_REFRESH
#define MSG_REFRESH "Refresh" #define MSG_REFRESH "Refresh"
#endif
#ifndef MSG_WATCH
#define MSG_WATCH "Info screen" #define MSG_WATCH "Info screen"
#endif
#ifndef MSG_PREPARE
#define MSG_PREPARE "Prepare" #define MSG_PREPARE "Prepare"
#endif
#ifndef MSG_TUNE
#define MSG_TUNE "Tune" #define MSG_TUNE "Tune"
#endif
#ifndef MSG_PAUSE_PRINT
#define MSG_PAUSE_PRINT "Pause print" #define MSG_PAUSE_PRINT "Pause print"
#endif
#ifndef MSG_RESUME_PRINT
#define MSG_RESUME_PRINT "Resume print" #define MSG_RESUME_PRINT "Resume print"
#endif
#ifndef MSG_STOP_PRINT
#define MSG_STOP_PRINT "Stop print" #define MSG_STOP_PRINT "Stop print"
#endif
#ifndef MSG_CARD_MENU
#define MSG_CARD_MENU "Print from SD" #define MSG_CARD_MENU "Print from SD"
#endif
#ifndef MSG_NO_CARD
#define MSG_NO_CARD "No SD card" #define MSG_NO_CARD "No SD card"
#endif
#ifndef MSG_DWELL
#define MSG_DWELL "Sleep..." #define MSG_DWELL "Sleep..."
#endif
#ifndef MSG_USERWAIT
#define MSG_USERWAIT "Wait for user..." #define MSG_USERWAIT "Wait for user..."
#endif
#ifndef MSG_RESUMING
#define MSG_RESUMING "Resuming print" #define MSG_RESUMING "Resuming print"
#endif
#ifndef MSG_PRINT_ABORTED
#define MSG_PRINT_ABORTED "Print aborted" #define MSG_PRINT_ABORTED "Print aborted"
#endif
#ifndef MSG_NO_MOVE
#define MSG_NO_MOVE "No move." #define MSG_NO_MOVE "No move."
#endif
#ifndef MSG_KILLED
#define MSG_KILLED "KILLED. " #define MSG_KILLED "KILLED. "
#endif
#ifndef MSG_STOPPED
#define MSG_STOPPED "STOPPED. " #define MSG_STOPPED "STOPPED. "
#endif
#ifndef MSG_CONTROL_RETRACT
#define MSG_CONTROL_RETRACT "Retract mm" #define MSG_CONTROL_RETRACT "Retract mm"
#endif
#ifndef MSG_CONTROL_RETRACT_SWAP
#define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm" #define MSG_CONTROL_RETRACT_SWAP "Swap Re.mm"
#endif
#ifndef MSG_CONTROL_RETRACTF
#define MSG_CONTROL_RETRACTF "Retract V" #define MSG_CONTROL_RETRACTF "Retract V"
#endif
#ifndef MSG_CONTROL_RETRACT_ZLIFT
#define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm"
#endif
#ifndef MSG_CONTROL_RETRACT_RECOVER
#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
#endif
#ifndef MSG_CONTROL_RETRACT_RECOVER_SWAP
#define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm" #define MSG_CONTROL_RETRACT_RECOVER_SWAP "S UnRet+mm"
#endif
#ifndef MSG_CONTROL_RETRACT_RECOVERF
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet V" #define MSG_CONTROL_RETRACT_RECOVERF "UnRet V"
#endif
#ifndef MSG_AUTORETRACT
#define MSG_AUTORETRACT "AutoRetr." #define MSG_AUTORETRACT "AutoRetr."
#endif
#ifndef MSG_FILAMENTCHANGE
#define MSG_FILAMENTCHANGE "Change filament" #define MSG_FILAMENTCHANGE "Change filament"
#endif
#ifndef MSG_INIT_SDCARD
#define MSG_INIT_SDCARD "Init. SD card" #define MSG_INIT_SDCARD "Init. SD card"
#endif
#ifndef MSG_CNG_SDCARD
#define MSG_CNG_SDCARD "Change SD card" #define MSG_CNG_SDCARD "Change SD card"
#endif
#ifndef MSG_ZPROBE_OUT
#define MSG_ZPROBE_OUT "Z probe out. bed" #define MSG_ZPROBE_OUT "Z probe out. bed"
#endif
#ifndef MSG_POSITION_UNKNOWN
#define MSG_POSITION_UNKNOWN "Home X/Y before Z" #define MSG_POSITION_UNKNOWN "Home X/Y before Z"
#endif
#ifndef MSG_ZPROBE_ZOFFSET
#define MSG_ZPROBE_ZOFFSET "Z Offset" #define MSG_ZPROBE_ZOFFSET "Z Offset"
#endif
#ifndef MSG_BABYSTEP_X
#define MSG_BABYSTEP_X "Babystep X" #define MSG_BABYSTEP_X "Babystep X"
#endif
#ifndef MSG_BABYSTEP_Y
#define MSG_BABYSTEP_Y "Babystep Y" #define MSG_BABYSTEP_Y "Babystep Y"
#endif
#ifndef MSG_BABYSTEP_Z
#define MSG_BABYSTEP_Z "Babystep Z" #define MSG_BABYSTEP_Z "Babystep Z"
#endif
#ifndef MSG_ENDSTOP_ABORT
#define MSG_ENDSTOP_ABORT "Endstop abort" #define MSG_ENDSTOP_ABORT "Endstop abort"
#endif
#ifdef DELTA_CALIBRATION_MENU #ifdef DELTA_CALIBRATION_MENU
#ifndef MSG_DELTA_CALIBRATE
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#endif
#ifndef MSG_DELTA_CALIBRATE_X
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#endif
#ifndef MSG_DELTA_CALIBRATE_Y
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
#endif
#ifndef MSG_DELTA_CALIBRATE_Z
#define MSG_DELTA_CALIBRATE_Z "Calibrate Z" #define MSG_DELTA_CALIBRATE_Z "Calibrate Z"
#endif
#ifndef MSG_DELTA_CALIBRATE_CENTER
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif
#endif // DELTA_CALIBRATION_MENU #endif // DELTA_CALIBRATION_MENU
#endif // LANGUAGE_EN_H #endif // LANGUAGE_EN_H

View file

@ -324,7 +324,7 @@ static void lcd_sdcard_stop()
quickStop(); quickStop();
if(SD_FINISHED_STEPPERRELEASE) if(SD_FINISHED_STEPPERRELEASE)
{ {
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND)); enquecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
} }
autotempShutdown(); autotempShutdown();
@ -347,6 +347,7 @@ static void lcd_main_menu()
MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu); MENU_ITEM(submenu, MSG_DELTA_CALIBRATE, lcd_delta_calibrate_menu);
#endif // DELTA_CALIBRATION_MENU #endif // DELTA_CALIBRATION_MENU
} }
/*JFR TEST*/ MENU_ITEM(gcode, "test multiline", PSTR("G4 S3\nM104 S50\nG4 S1\nM104 S200\nG4 S2\nM104 S0")); // SD-card changed by user
MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu); MENU_ITEM(submenu, MSG_CONTROL, lcd_control_menu);
#ifdef SDSUPPORT #ifdef SDSUPPORT
if (card.cardOK) if (card.cardOK)
@ -394,8 +395,7 @@ void lcd_set_home_offsets()
plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]); plan_set_position(0.0, 0.0, 0.0, current_position[E_AXIS]);
// Audio feedback // Audio feedback
enquecommand_P(PSTR("M300 S659 P200")); enquecommands_P(PSTR("M300 S659 P200\nM300 S698 P200"));
enquecommand_P(PSTR("M300 S698 P200"));
lcd_return_to_status(); lcd_return_to_status();
} }
@ -677,6 +677,13 @@ static void lcd_prepare_menu()
} }
#endif #endif
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
// JFR for RMud delta printer
MENU_ITEM(gcode, "Calibrate bed", PSTR("M702\nG28\nG1 X-77.94 Y-45 Z36 F8000\nG4 S3\nM701 P0\nG1 X77.94 Y-45 Z36\nG4 S3\nM701 P1\nG1 X0 Y90 Z36\nG4 S3\nM701 P2\nM700\nG1 X0 Y0 Z100 F8000"));
MENU_ITEM(gcode, "Check level", PSTR("G28\nG1 X0 Y0 Z1 F4000\nG1 X-77.94 Y-45 Z1\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG4 S2\nG1 X-77.94 Y-45 Z0.3 F2000\nG1 X-77.94 Y-45\nG1 X77.94 Y-45\nG1 X0 Y90\nG1 X-77.94 Y-45\nG1 X0 Y0 Z0"));
MENU_ITEM(gcode, "Retract filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E-800"));
MENU_ITEM(gcode, "Insert filament", PSTR("M302\nM82\nG92 E0\nG1 F4000 E60"));
MENU_ITEM(gcode, "Finalize filament", PSTR("G1 F4000 E790"));
END_MENU(); END_MENU();
} }
@ -1148,7 +1155,7 @@ menu_edit_type(unsigned long, long5, ftostr5, 0.01)
lcd_move_y(); lcd_move_y();
} }
static void reprapworld_keypad_move_home() { static void reprapworld_keypad_move_home() {
enquecommand_P((PSTR("G28"))); // move all axis home enquecommands_P((PSTR("G28"))); // move all axis home
} }
#endif #endif
@ -1164,7 +1171,13 @@ static void lcd_quick_feedback()
/** Menu action functions **/ /** Menu action functions **/
static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); }
static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); } static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); }
static void menu_action_gcode(const char* pgcode) { enquecommand_P(pgcode); }
static void menu_action_gcode(const char* pgcode)
{
enquecommands_P(pgcode);
}
static void menu_action_function(menuFunc_t data) { (*data)(); } static void menu_action_function(menuFunc_t data) { (*data)(); }
static void menu_action_sdfile(const char* filename, char* longFilename) static void menu_action_sdfile(const char* filename, char* longFilename)
{ {
@ -1174,7 +1187,7 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
for(c = &cmd[4]; *c; c++) for(c = &cmd[4]; *c; c++)
*c = tolower(*c); *c = tolower(*c);
enquecommand(cmd); enquecommand(cmd);
enquecommand_P(PSTR("M24")); enquecommands_P(PSTR("M24"));
lcd_return_to_status(); lcd_return_to_status();
} }
static void menu_action_sddirectory(const char* filename, char* longFilename) static void menu_action_sddirectory(const char* filename, char* longFilename)

View file

@ -55,11 +55,11 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
WRITE(ST7920_CLK_PIN,1); WRITE(ST7920_CLK_PIN,1);
ST7920_CS(); ST7920_CS();
u8g_Delay(90); //initial delay for boot up u8g_Delay(120); //initial delay for boot up
ST7920_SET_CMD(); ST7920_SET_CMD();
ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off ST7920_WRITE_BYTE(0x08); //display off, cursor+blink off
ST7920_WRITE_BYTE(0x01); //clear CGRAM ram ST7920_WRITE_BYTE(0x01); //clear CGRAM ram
u8g_Delay(10); //delay for CGRAM clear u8g_Delay(15); //delay for CGRAM clear
ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active ST7920_WRITE_BYTE(0x3E); //extended mode + GDRAM active
for(y=0;y<HEIGHT/2;y++) //clear GDRAM for(y=0;y<HEIGHT/2;y++) //clear GDRAM
{ {