Commit 81d2713e authored by MagoKimbra's avatar MagoKimbra

Update DOGLCD

parent 030509f1
...@@ -385,7 +385,7 @@ void Config_ResetDefault() ...@@ -385,7 +385,7 @@ void Config_ResetDefault()
{ // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown { // Always have this function, even with EEPROM_SETTINGS disabled, the current values will be shown
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR("Baudrate: ", baudrate); SERIAL_ECHOPAIR("Baudrate: ", baudrate);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOLNPGM("Steps per unit:"); SERIAL_ECHOLNPGM("Steps per unit:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[X_AXIS]); SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[X_AXIS]);
...@@ -401,7 +401,7 @@ void Config_ResetDefault() ...@@ -401,7 +401,7 @@ void Config_ResetDefault()
#endif //EXTRUDERS > 3 #endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2 #endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
#ifdef SCARA #ifdef SCARA
...@@ -410,7 +410,7 @@ void Config_ResetDefault() ...@@ -410,7 +410,7 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" M365 X",axis_scaling[X_AXIS]); SERIAL_ECHOPAIR(" M365 X",axis_scaling[X_AXIS]);
SERIAL_ECHOPAIR(" Y",axis_scaling[Y_AXIS]); SERIAL_ECHOPAIR(" Y",axis_scaling[Y_AXIS]);
SERIAL_ECHOPAIR(" Z",axis_scaling[Z_AXIS]); SERIAL_ECHOPAIR(" Z",axis_scaling[Z_AXIS]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
#endif #endif
...@@ -429,7 +429,7 @@ void Config_ResetDefault() ...@@ -429,7 +429,7 @@ void Config_ResetDefault()
#endif //EXTRUDERS > 3 #endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2 #endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Retraction Steps per unit:"); SERIAL_ECHOLNPGM("Retraction Steps per unit:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
...@@ -443,7 +443,7 @@ void Config_ResetDefault() ...@@ -443,7 +443,7 @@ void Config_ResetDefault()
#endif //EXTRUDERS > 3 #endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2 #endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):"); SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
SERIAL_ECHO_START; SERIAL_ECHO_START;
...@@ -460,13 +460,13 @@ void Config_ResetDefault() ...@@ -460,13 +460,13 @@ void Config_ResetDefault()
#endif //EXTRUDERS > 3 #endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2 #endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration"); SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M204 S",acceleration ); SERIAL_ECHOPAIR(" M204 S",acceleration );
SERIAL_ECHOPAIR(" T" ,retract_acceleration); SERIAL_ECHOPAIR(" T" ,retract_acceleration);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)"); SERIAL_ECHOLNPGM("Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s)");
...@@ -477,7 +477,7 @@ void Config_ResetDefault() ...@@ -477,7 +477,7 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); SERIAL_ECHOPAIR(" X" ,max_xy_jerk );
SERIAL_ECHOPAIR(" Z" ,max_z_jerk); SERIAL_ECHOPAIR(" Z" ,max_z_jerk);
SERIAL_ECHOPAIR(" E" ,max_e_jerk); SERIAL_ECHOPAIR(" E" ,max_e_jerk);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Home offset (mm):"); SERIAL_ECHOLNPGM("Home offset (mm):");
...@@ -485,7 +485,7 @@ void Config_ResetDefault() ...@@ -485,7 +485,7 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" M206 X",add_homing[X_AXIS] ); SERIAL_ECHOPAIR(" M206 X",add_homing[X_AXIS] );
SERIAL_ECHOPAIR(" Y" ,add_homing[Y_AXIS] ); SERIAL_ECHOPAIR(" Y" ,add_homing[Y_AXIS] );
SERIAL_ECHOPAIR(" Z" ,add_homing[Z_AXIS] ); SERIAL_ECHOPAIR(" Z" ,add_homing[Z_AXIS] );
SERIAL_ECHOLN(""); SERIAL_EOL;
#ifdef DELTA #ifdef DELTA
SERIAL_ECHO_START; SERIAL_ECHO_START;
...@@ -494,7 +494,7 @@ void Config_ResetDefault() ...@@ -494,7 +494,7 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" M666 X",endstop_adj[0]); SERIAL_ECHOPAIR(" M666 X",endstop_adj[0]);
SERIAL_ECHOPAIR(" Y" ,endstop_adj[1]); SERIAL_ECHOPAIR(" Y" ,endstop_adj[1]);
SERIAL_ECHOPAIR(" Z" ,endstop_adj[2]); SERIAL_ECHOPAIR(" Z" ,endstop_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Delta Geometry adjustment:"); SERIAL_ECHOLNPGM("Delta Geometry adjustment:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
...@@ -508,17 +508,17 @@ void Config_ResetDefault() ...@@ -508,17 +508,17 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" D" ,delta_diagonal_rod); SERIAL_ECHOPAIR(" D" ,delta_diagonal_rod);
SERIAL_ECHOPAIR(" H" ,max_pos[2]); SERIAL_ECHOPAIR(" H" ,max_pos[2]);
SERIAL_ECHOPAIR(" P" ,z_probe_offset[3]); SERIAL_ECHOPAIR(" P" ,z_probe_offset[3]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOLN("Tower Positions"); SERIAL_ECHOLN("Tower Positions");
SERIAL_ECHOPAIR("Tower1 X:",delta_tower1_x); SERIAL_ECHOPAIR("Tower1 X:",delta_tower1_x);
SERIAL_ECHOPAIR(" Y:",delta_tower1_y); SERIAL_ECHOPAIR(" Y:",delta_tower1_y);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("Tower2 X:",delta_tower2_x); SERIAL_ECHOPAIR("Tower2 X:",delta_tower2_x);
SERIAL_ECHOPAIR(" Y:",delta_tower2_y); SERIAL_ECHOPAIR(" Y:",delta_tower2_y);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("Tower3 X:",delta_tower3_x); SERIAL_ECHOPAIR("Tower3 X:",delta_tower3_x);
SERIAL_ECHOPAIR(" Y:",delta_tower3_y); SERIAL_ECHOPAIR(" Y:",delta_tower3_y);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif // DELTA #endif // DELTA
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef ENABLE_AUTO_BED_LEVELING
...@@ -526,7 +526,7 @@ void Config_ResetDefault() ...@@ -526,7 +526,7 @@ void Config_ResetDefault()
SERIAL_ECHOLNPGM("Z Probe offset (mm)"); SERIAL_ECHOLNPGM("Z Probe offset (mm)");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M666 P",zprobe_zoffset); SERIAL_ECHOPAIR(" M666 P",zprobe_zoffset);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif // ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
#ifdef PIDTEMP #ifdef PIDTEMP
...@@ -543,7 +543,7 @@ void Config_ResetDefault() ...@@ -543,7 +543,7 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" P", Kp[e]); SERIAL_ECHOPAIR(" P", Kp[e]);
SERIAL_ECHOPAIR(" I" ,unscalePID_i(Ki[e])); SERIAL_ECHOPAIR(" I" ,unscalePID_i(Ki[e]));
SERIAL_ECHOPAIR(" D" ,unscalePID_d(Kd[e])); SERIAL_ECHOPAIR(" D" ,unscalePID_d(Kd[e]));
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
#endif // PIDTEMP #endif // PIDTEMP
...@@ -554,27 +554,27 @@ void Config_ResetDefault() ...@@ -554,27 +554,27 @@ void Config_ResetDefault()
SERIAL_ECHOPAIR(" M207 S",retract_length); SERIAL_ECHOPAIR(" M207 S",retract_length);
SERIAL_ECHOPAIR(" F" ,retract_feedrate*60); SERIAL_ECHOPAIR(" F" ,retract_feedrate*60);
SERIAL_ECHOPAIR(" Z" ,retract_zlift); SERIAL_ECHOPAIR(" Z" ,retract_zlift);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)"); SERIAL_ECHOLNPGM("Recover: S=Extra length (mm) F:Speed (mm/m)");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M208 S",retract_recover_length); SERIAL_ECHOPAIR(" M208 S",retract_recover_length);
SERIAL_ECHOPAIR(" F" ,retract_recover_feedrate*60); SERIAL_ECHOPAIR(" F" ,retract_recover_feedrate*60);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries"); SERIAL_ECHOLNPGM("Auto-Retract: S=0 to disable, 1 to interpret extrude-only moves as retracts or recoveries");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0)); SERIAL_ECHOPAIR(" M209 S", (unsigned long)(autoretract_enabled ? 1 : 0));
SERIAL_ECHOLN(""); SERIAL_EOL;
#if EXTRUDERS > 1 #if EXTRUDERS > 1
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Multi-extruder settings:"); SERIAL_ECHOLNPGM("Multi-extruder settings:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap); SERIAL_ECHOPAIR(" Swap retract length (mm): ", retract_length_swap);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap); SERIAL_ECHOPAIR(" Swap rec. addl. length (mm): ", retract_recover_length_swap);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
SERIAL_ECHO_START; SERIAL_ECHO_START;
if (volumetric_enabled) if (volumetric_enabled)
...@@ -582,19 +582,19 @@ void Config_ResetDefault() ...@@ -582,19 +582,19 @@ void Config_ResetDefault()
SERIAL_ECHOLNPGM("Filament settings:"); SERIAL_ECHOLNPGM("Filament settings:");
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M200 D", filament_size[0]); SERIAL_ECHOPAIR(" M200 D", filament_size[0]);
SERIAL_ECHOLN(""); SERIAL_EOL;
#if EXTRUDERS > 1 #if EXTRUDERS > 1
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]); SERIAL_ECHOPAIR(" M200 T1 D", filament_size[1]);
SERIAL_ECHOLN(""); SERIAL_EOL;
#if EXTRUDERS > 2 #if EXTRUDERS > 2
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]); SERIAL_ECHOPAIR(" M200 T2 D", filament_size[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
#if EXTRUDERS > 3 #if EXTRUDERS > 3
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M200 T3 D", filament_size[3]); SERIAL_ECHOPAIR(" M200 T3 D", filament_size[3]);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif //EXTRUDERS > 3 #endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2 #endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
......
// BitMap for splashscreen // BitMap for splashscreen
// Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php // Generated with: http://www.digole.com/tools/PicturetoC_Hex_converter.php
// Please note that using the high-res version takes about 0.5KB of // Please note that using the high-res version takes 402Bytes of PROGMEM.
//#define START_BMPHIGH
#ifdef START_BMPHIGH #ifdef START_BMPHIGH
#define START_BMPWIDTH 112 #define START_BMPWIDTH 112
#define START_BMPHEIGHT 38 #define START_BMPHEIGHT 38
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
#define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n')) #define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n'))
#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n')) #define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
extern const char errormagic[] PROGMEM; extern const char errormagic[] PROGMEM;
extern const char echomagic[] PROGMEM; extern const char echomagic[] PROGMEM;
...@@ -86,6 +85,8 @@ extern const char echomagic[] PROGMEM; ...@@ -86,6 +85,8 @@ extern const char echomagic[] PROGMEM;
#define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value))) #define SERIAL_ECHOPAIR(name,value) (serial_echopair_P(PSTR(name),(value)))
#define SERIAL_EOL SERIAL_ECHOLN("")
void serial_echopair_P(const char *s_P, float v); void serial_echopair_P(const char *s_P, float v);
void serial_echopair_P(const char *s_P, double v); void serial_echopair_P(const char *s_P, double v);
void serial_echopair_P(const char *s_P, unsigned long v); void serial_echopair_P(const char *s_P, unsigned long v);
...@@ -323,4 +324,4 @@ void FirmwareTest(); ...@@ -323,4 +324,4 @@ void FirmwareTest();
extern void calculate_volumetric_multipliers(); extern void calculate_volumetric_multipliers();
#endif #endif //MARLIN_H
\ No newline at end of file \ No newline at end of file
...@@ -1573,7 +1573,7 @@ bool extruder_duplication_enabled = false; // used in mode 2 ...@@ -1573,7 +1573,7 @@ bool extruder_duplication_enabled = false; // used in mode 2
SERIAL_PROTOCOL_F(bed_level[x+3][3-y], 3); SERIAL_PROTOCOL_F(bed_level[x+3][3-y], 3);
SERIAL_PROTOCOLPGM(" "); SERIAL_PROTOCOLPGM(" ");
} }
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
} }
...@@ -1679,7 +1679,7 @@ bool extruder_duplication_enabled = false; // used in mode 2 ...@@ -1679,7 +1679,7 @@ bool extruder_duplication_enabled = false; // used in mode 2
SERIAL_ECHOPAIR("\t\t\tX:",endstop_adj[0]); SERIAL_ECHOPAIR("\t\t\tX:",endstop_adj[0]);
SERIAL_ECHOPAIR(" Y:",endstop_adj[1]); SERIAL_ECHOPAIR(" Y:",endstop_adj[1]);
SERIAL_ECHOPAIR(" Z:",endstop_adj[2]); SERIAL_ECHOPAIR(" Z:",endstop_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_PROTOCOL_F(bed_level_oy, 4); SERIAL_PROTOCOL_F(bed_level_oy, 4);
SERIAL_PROTOCOLPGM("\t\t"); SERIAL_PROTOCOLPGM("\t\t");
...@@ -1691,7 +1691,7 @@ bool extruder_duplication_enabled = false; // used in mode 2 ...@@ -1691,7 +1691,7 @@ bool extruder_duplication_enabled = false; // used in mode 2
SERIAL_ECHOPAIR("\t\t\tA:",tower_adj[0]); SERIAL_ECHOPAIR("\t\t\tA:",tower_adj[0]);
SERIAL_ECHOPAIR(" B:",tower_adj[1]); SERIAL_ECHOPAIR(" B:",tower_adj[1]);
SERIAL_ECHOPAIR(" C:",tower_adj[2]); SERIAL_ECHOPAIR(" C:",tower_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_PROTOCOL_F(bed_level_x, 4); SERIAL_PROTOCOL_F(bed_level_x, 4);
SERIAL_PROTOCOLPGM("\t\t"); SERIAL_PROTOCOLPGM("\t\t");
...@@ -1699,17 +1699,17 @@ bool extruder_duplication_enabled = false; // used in mode 2 ...@@ -1699,17 +1699,17 @@ bool extruder_duplication_enabled = false; // used in mode 2
SERIAL_ECHOPAIR("\t\tI:",tower_adj[3]); SERIAL_ECHOPAIR("\t\tI:",tower_adj[3]);
SERIAL_ECHOPAIR(" J:",tower_adj[4]); SERIAL_ECHOPAIR(" J:",tower_adj[4]);
SERIAL_ECHOPAIR(" K:",tower_adj[5]); SERIAL_ECHOPAIR(" K:",tower_adj[5]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_PROTOCOLPGM("\t"); SERIAL_PROTOCOLPGM("\t");
SERIAL_PROTOCOL_F(bed_level_oz, 4); SERIAL_PROTOCOL_F(bed_level_oz, 4);
SERIAL_PROTOCOLPGM("\t\t\tDelta Radius: "); SERIAL_PROTOCOLPGM("\t\t\tDelta Radius: ");
SERIAL_PROTOCOL_F(delta_radius, 4); SERIAL_PROTOCOL_F(delta_radius, 4);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_PROTOCOLPGM("X-Tower\t\tY-Tower\t\tDiag Rod: "); SERIAL_PROTOCOLPGM("X-Tower\t\tY-Tower\t\tDiag Rod: ");
SERIAL_PROTOCOL_F(delta_diagonal_rod, 4); SERIAL_PROTOCOL_F(delta_diagonal_rod, 4);
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
void save_carriage_positions(int position_num) void save_carriage_positions(int position_num)
...@@ -2492,7 +2492,7 @@ void gcode_G28() ...@@ -2492,7 +2492,7 @@ void gcode_G28()
if (code_seen('D')) if (code_seen('D'))
{ {
SERIAL_ECHOLN("Current bed level array values:"); SERIAL_ECHOLN("Current bed level array values:");
SERIAL_ECHOLN(""); SERIAL_EOL;
for (int y = 0; y < 7; y++) for (int y = 0; y < 7; y++)
{ {
for (int x = 0; x < 7; x++) for (int x = 0; x < 7; x++)
...@@ -2500,7 +2500,7 @@ void gcode_G28() ...@@ -2500,7 +2500,7 @@ void gcode_G28()
SERIAL_PROTOCOL_F(bed_level[x][y], 3); SERIAL_PROTOCOL_F(bed_level[x][y], 3);
SERIAL_PROTOCOLPGM(" "); SERIAL_PROTOCOLPGM(" ");
} }
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
return; return;
} }
...@@ -2568,7 +2568,7 @@ void gcode_G28() ...@@ -2568,7 +2568,7 @@ void gcode_G28()
SERIAL_ECHO(y); SERIAL_ECHO(y);
SERIAL_ECHO(" = "); SERIAL_ECHO(" = ");
SERIAL_PROTOCOL_F(probe_value, 4); SERIAL_PROTOCOL_F(probe_value, 4);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO("Carriage Positions: ["); SERIAL_ECHO("Carriage Positions: [");
SERIAL_ECHO(saved_position[X_AXIS]); SERIAL_ECHO(saved_position[X_AXIS]);
...@@ -2648,12 +2648,12 @@ void gcode_G28() ...@@ -2648,12 +2648,12 @@ void gcode_G28()
{ {
SERIAL_ECHOLN("The position of the endstop switches on this printer are not within limits"); SERIAL_ECHOLN("The position of the endstop switches on this printer are not within limits");
SERIAL_ECHOLN("Adjust endstop switches so that they are within 3mm Z-height of each other"); SERIAL_ECHOLN("Adjust endstop switches so that they are within 3mm Z-height of each other");
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("Current Endstop Positions - X: ", bed_level_x + endstop_adj[0]); SERIAL_ECHOPAIR("Current Endstop Positions - X: ", bed_level_x + endstop_adj[0]);
SERIAL_ECHOPAIR(" Y: ", bed_level_y + endstop_adj[1]); SERIAL_ECHOPAIR(" Y: ", bed_level_y + endstop_adj[1]);
SERIAL_ECHOPAIR(" Z: ", bed_level_z + endstop_adj[2]); SERIAL_ECHOPAIR(" Z: ", bed_level_z + endstop_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOLN("Auto calibration aborted"); SERIAL_ECHOLN("Auto calibration aborted");
retract_z_probe(); retract_z_probe();
...@@ -2675,7 +2675,7 @@ void gcode_G28() ...@@ -2675,7 +2675,7 @@ void gcode_G28()
{ {
SERIAL_ECHO("Iteration: "); SERIAL_ECHO("Iteration: ");
SERIAL_ECHO(loopcount); SERIAL_ECHO(loopcount);
SERIAL_ECHOLN(""); SERIAL_EOL;
if ((bed_level_c > 3) or (bed_level_c < -3)) if ((bed_level_c > 3) or (bed_level_c < -3))
{ {
...@@ -2865,7 +2865,7 @@ void gcode_G28() ...@@ -2865,7 +2865,7 @@ void gcode_G28()
if (bed_level_z > bed_level_oz) adj_RadiusC = -0.5; if (bed_level_z > bed_level_oz) adj_RadiusC = -0.5;
#ifdef DEBUG_MESSAGES #ifdef DEBUG_MESSAGES
SERIAL_ECHOPAIR("adj_RadiusC set to ",adj_RadiusC); SERIAL_ECHOPAIR("adj_RadiusC set to ",adj_RadiusC);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif #endif
} }
} }
...@@ -2880,7 +2880,7 @@ void gcode_G28() ...@@ -2880,7 +2880,7 @@ void gcode_G28()
if (bed_level_x > bed_level_ox) adj_RadiusA = -0.5; if (bed_level_x > bed_level_ox) adj_RadiusA = -0.5;
#ifdef DEBUG_MESSAGES #ifdef DEBUG_MESSAGES
SERIAL_ECHOPAIR("adj_RadiusA set to ",adj_RadiusA); SERIAL_ECHOPAIR("adj_RadiusA set to ",adj_RadiusA);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif #endif
} }
} }
...@@ -2895,7 +2895,7 @@ void gcode_G28() ...@@ -2895,7 +2895,7 @@ void gcode_G28()
if (bed_level_y > bed_level_oy) adj_RadiusB = -0.5; if (bed_level_y > bed_level_oy) adj_RadiusB = -0.5;
#ifdef DEBUG_MESSAGES #ifdef DEBUG_MESSAGES
SERIAL_ECHOPAIR("adj_RadiusB set to ",adj_RadiusB); SERIAL_ECHOPAIR("adj_RadiusB set to ",adj_RadiusB);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif #endif
} }
} }
...@@ -2933,19 +2933,19 @@ void gcode_G28() ...@@ -2933,19 +2933,19 @@ void gcode_G28()
SERIAL_ECHOPAIR(" ox: ", bed_level_ox); SERIAL_ECHOPAIR(" ox: ", bed_level_ox);
SERIAL_ECHOPAIR(" oy: ", bed_level_oy); SERIAL_ECHOPAIR(" oy: ", bed_level_oy);
SERIAL_ECHOPAIR(" oz: ", bed_level_oz); SERIAL_ECHOPAIR(" oz: ", bed_level_oz);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO("radius:"); SERIAL_ECHO("radius:");
SERIAL_PROTOCOL_F(delta_radius, 4); SERIAL_PROTOCOL_F(delta_radius, 4);
SERIAL_ECHO(" diagrod:"); SERIAL_ECHO(" diagrod:");
SERIAL_PROTOCOL_F(delta_diagonal_rod, 4); SERIAL_PROTOCOL_F(delta_diagonal_rod, 4);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHO("Radius Adj Complete: "); SERIAL_ECHO("Radius Adj Complete: ");
if (adj_r_done == true) SERIAL_ECHO("Yes"); if (adj_r_done == true) SERIAL_ECHO("Yes");
else SERIAL_ECHO("No"); else SERIAL_ECHO("No");
SERIAL_ECHO(" DiagRod Adj Complete: "); SERIAL_ECHO(" DiagRod Adj Complete: ");
if (adj_dr_done == true) SERIAL_ECHO("Yes"); if (adj_dr_done == true) SERIAL_ECHO("Yes");
else SERIAL_ECHO("No"); else SERIAL_ECHO("No");
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("RadiusA Error: ",radiusErrorA); SERIAL_ECHOPAIR("RadiusA Error: ",radiusErrorA);
SERIAL_ECHOPAIR(" (adjust: ",adj_RadiusA); SERIAL_ECHOPAIR(" (adjust: ",adj_RadiusA);
SERIAL_ECHOLN(")"); SERIAL_ECHOLN(")");
...@@ -2956,11 +2956,11 @@ void gcode_G28() ...@@ -2956,11 +2956,11 @@ void gcode_G28()
SERIAL_ECHOPAIR(" (adjust: ",adj_RadiusC); SERIAL_ECHOPAIR(" (adjust: ",adj_RadiusC);
SERIAL_ECHOLN(")"); SERIAL_ECHOLN(")");
SERIAL_ECHOPAIR("DeltaAlphaA: ",adj_AlphaA); SERIAL_ECHOPAIR("DeltaAlphaA: ",adj_AlphaA);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("DeltaAlphaB: ",adj_AlphaB); SERIAL_ECHOPAIR("DeltaAlphaB: ",adj_AlphaB);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("DeltaAlphaC: ",adj_AlphaC); SERIAL_ECHOPAIR("DeltaAlphaC: ",adj_AlphaC);
SERIAL_ECHOLN(""); SERIAL_EOL;
#endif #endif
} while (((adj_r_done == false) or (adj_dr_done = false)) and (loopcount < iterations)); } while (((adj_r_done == false) or (adj_dr_done = false)) and (loopcount < iterations));
} }
...@@ -3006,7 +3006,7 @@ void gcode_G28() ...@@ -3006,7 +3006,7 @@ void gcode_G28()
SERIAL_ECHOLN("Issue M500 Command to save calibration settings to EPROM (if enabled)"); SERIAL_ECHOLN("Issue M500 Command to save calibration settings to EPROM (if enabled)");
/* /*
if ((abs(delta_diagonal_rod - saved_delta_diagonal_rod) > 1) and (adj_dr_allowed == true)) { if ((abs(delta_diagonal_rod - saved_delta_diagonal_rod) > 1) and (adj_dr_allowed == true)) {
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("WARNING: The length of diagonal rods specified (", saved_delta_diagonal_rod); SERIAL_ECHOPAIR("WARNING: The length of diagonal rods specified (", saved_delta_diagonal_rod);
SERIAL_ECHOLN(" mm) appears to be incorrect"); SERIAL_ECHOLN(" mm) appears to be incorrect");
SERIAL_ECHOLN("If you have measured your rods and you believe that this value is correct, this could indicate"); SERIAL_ECHOLN("If you have measured your rods and you believe that this value is correct, this could indicate");
...@@ -3034,7 +3034,7 @@ void gcode_G60() ...@@ -3034,7 +3034,7 @@ void gcode_G60()
//SERIAL_ECHOPAIR(" Lastpos Y: ", lastpos[Y_AXIS]); //SERIAL_ECHOPAIR(" Lastpos Y: ", lastpos[Y_AXIS]);
//SERIAL_ECHOPAIR(" Lastpos Z: ", lastpos[Z_AXIS]); //SERIAL_ECHOPAIR(" Lastpos Z: ", lastpos[Z_AXIS]);
//SERIAL_ECHOPAIR(" Lastpos E: ", lastpos[E_AXIS]); //SERIAL_ECHOPAIR(" Lastpos E: ", lastpos[E_AXIS]);
//SERIAL_ECHOLN(""); //SERIAL_EOL;
} }
// G61: move to X Y Z in memory // G61: move to X Y Z in memory
...@@ -3055,7 +3055,7 @@ void gcode_G61() ...@@ -3055,7 +3055,7 @@ void gcode_G61()
//SERIAL_ECHOPAIR(" Move to Y: ", destination[Y_AXIS]); //SERIAL_ECHOPAIR(" Move to Y: ", destination[Y_AXIS]);
//SERIAL_ECHOPAIR(" Move to Z: ", destination[Z_AXIS]); //SERIAL_ECHOPAIR(" Move to Z: ", destination[Z_AXIS]);
//SERIAL_ECHOPAIR(" Move to E: ", destination[E_AXIS]); //SERIAL_ECHOPAIR(" Move to E: ", destination[E_AXIS]);
//SERIAL_ECHOLN(""); //SERIAL_EOL;
if(code_seen('F')) if(code_seen('F'))
{ {
...@@ -3443,7 +3443,7 @@ void gcode_G92() ...@@ -3443,7 +3443,7 @@ void gcode_G92()
if (code_seen('L')) if (code_seen('L'))
{ {
SERIAL_ECHOPAIR("P (Z-Probe Offset):", zprobe_zoffset); SERIAL_ECHOPAIR("P (Z-Probe Offset):", zprobe_zoffset);
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
} }
#elif defined(DELTA) #elif defined(DELTA)
...@@ -3520,33 +3520,33 @@ void gcode_G92() ...@@ -3520,33 +3520,33 @@ void gcode_G92()
{ {
SERIAL_ECHOLN("Current Delta geometry values:"); SERIAL_ECHOLN("Current Delta geometry values:");
SERIAL_ECHOPAIR("X (Endstop Adj): ",endstop_adj[0]); SERIAL_ECHOPAIR("X (Endstop Adj): ",endstop_adj[0]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("Y (Endstop Adj): ",endstop_adj[1]); SERIAL_ECHOPAIR("Y (Endstop Adj): ",endstop_adj[1]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("Z (Endstop Adj): ",endstop_adj[2]); SERIAL_ECHOPAIR("Z (Endstop Adj): ",endstop_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("P (Z-Probe Offset): X", z_probe_offset[0]); SERIAL_ECHOPAIR("P (Z-Probe Offset): X", z_probe_offset[0]);
SERIAL_ECHOPAIR(" Y", z_probe_offset[1]); SERIAL_ECHOPAIR(" Y", z_probe_offset[1]);
SERIAL_ECHOPAIR(" Z", z_probe_offset[2]); SERIAL_ECHOPAIR(" Z", z_probe_offset[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("A (Tower A Position Correction): ",tower_adj[0]); SERIAL_ECHOPAIR("A (Tower A Position Correction): ",tower_adj[0]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("B (Tower B Position Correction): ",tower_adj[1]); SERIAL_ECHOPAIR("B (Tower B Position Correction): ",tower_adj[1]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("C (Tower C Position Correction): ",tower_adj[2]); SERIAL_ECHOPAIR("C (Tower C Position Correction): ",tower_adj[2]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("I (Tower A Radius Correction): ",tower_adj[3]); SERIAL_ECHOPAIR("I (Tower A Radius Correction): ",tower_adj[3]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("J (Tower B Radius Correction): ",tower_adj[4]); SERIAL_ECHOPAIR("J (Tower B Radius Correction): ",tower_adj[4]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("K (Tower C Radius Correction): ",tower_adj[5]); SERIAL_ECHOPAIR("K (Tower C Radius Correction): ",tower_adj[5]);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("R (Delta Radius): ",delta_radius); SERIAL_ECHOPAIR("R (Delta Radius): ",delta_radius);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("D (Diagonal Rod Length): ",delta_diagonal_rod); SERIAL_ECHOPAIR("D (Diagonal Rod Length): ",delta_diagonal_rod);
SERIAL_ECHOLN(""); SERIAL_EOL;
SERIAL_ECHOPAIR("H (Z-Height): ",max_pos[Z_AXIS]); SERIAL_ECHOPAIR("H (Z-Height): ",max_pos[Z_AXIS]);
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
} }
#endif #endif
...@@ -3908,31 +3908,6 @@ void process_commands() ...@@ -3908,31 +3908,6 @@ void process_commands()
setWatch(); setWatch();
} }
break; break;
case 111: //M111 - Debug mode
{
if (code_seen('S')) debugLevel = code_value();
if (debugDryrun())
{
SERIAL_ECHOLN("DEBUG DRYRUN ENABLED");
setTargetBed(0);
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder)
{
setTargetHotend(0, cur_extruder);
}
}
}
break;
case 112: //M112 -Emergency Stop
{
kill();
}
break;
case 140: //M140 set bed temp
{
if(debugDryrun()) break;
if (code_seen('S')) setTargetBed(code_value());
}
break;
case 105 : //M105 case 105 : //M105
{ {
if(setTargetedHotend(105)) break; if(setTargetedHotend(105)) break;
...@@ -4000,6 +3975,27 @@ void process_commands() ...@@ -4000,6 +3975,27 @@ void process_commands()
return; return;
} }
break; break;
#if defined(FAN_PIN) && FAN_PIN > -1
case 106: //M106 Fan On
{
if (code_seen('S'))
{
fanSpeed=constrain(code_value(),0,255);
}
else
{
fanSpeed=255;
}
break;
}
case 107: //M107 Fan Off
{
fanSpeed = 0;
}
break;
#endif //FAN_PIN
case 109: //M109 - Wait for extruder heater to reach target. case 109: //M109 - Wait for extruder heater to reach target.
{ {
if(setTargetedHotend(109)) break; if(setTargetedHotend(109)) break;
...@@ -4096,6 +4092,31 @@ void process_commands() ...@@ -4096,6 +4092,31 @@ void process_commands()
refresh_cmd_timeout(); refresh_cmd_timeout();
} }
break; break;
case 111: //M111 - Debug mode
{
if (code_seen('S')) debugLevel = code_value();
if (debugDryrun())
{
SERIAL_ECHOLN("DEBUG DRYRUN ENABLED");
setTargetBed(0);
for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder)
{
setTargetHotend(0, cur_extruder);
}
}
}
break;
case 112: //M112 -Emergency Stop
{
kill();
}
break;
case 140: //M140 set bed temp
{
if(debugDryrun()) break;
if (code_seen('S')) setTargetBed(code_value());
}
break;
case 190: //M190 - Wait for bed heater to reach target. case 190: //M190 - Wait for bed heater to reach target.
{ {
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1 #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
...@@ -4140,26 +4161,6 @@ void process_commands() ...@@ -4140,26 +4161,6 @@ void process_commands()
} }
break; break;
#if defined(FAN_PIN) && FAN_PIN > -1
case 106: //M106 Fan On
{
if (code_seen('S'))
{
fanSpeed=constrain(code_value(),0,255);
}
else
{
fanSpeed=255;
}
break;
}
case 107: //M107 Fan Off
{
fanSpeed = 0;
}
break;
#endif //FAN_PIN
#ifdef BARICUDA #ifdef BARICUDA
// PWM for HEATER_1_PIN // PWM for HEATER_1_PIN
#if defined(HEATER_1_PIN) && HEATER_1_PIN > -1 #if defined(HEATER_1_PIN) && HEATER_1_PIN > -1
...@@ -4647,7 +4648,7 @@ void process_commands() ...@@ -4647,7 +4648,7 @@ void process_commands()
SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]); SERIAL_ECHO(extruder_offset[Z_AXIS][tmp_extruder]);
#endif #endif
} }
SERIAL_ECHOLN(""); SERIAL_EOL;
} }
break; break;
#endif //EXTRUDERS > 1 #endif //EXTRUDERS > 1
......
...@@ -51,11 +51,24 @@ ...@@ -51,11 +51,24 @@
#endif #endif
*/ */
#define USE_BIG_EDIT_FONT // save 3120 bytes of PROGMEM by commenting out this line
#define FONT_STATUSMENU u8g_font_6x9
#define FONT_MENU u8g_font_6x10_marlin
// DOGM parameters (size in pixels) // DOGM parameters (size in pixels)
#define DOG_CHAR_WIDTH 6 #define DOG_CHAR_WIDTH 6
#define DOG_CHAR_HEIGHT 12 #define DOG_CHAR_HEIGHT 12
#define DOG_CHAR_WIDTH_LARGE 9 #ifdef USE_BIG_EDIT_FONT
#define DOG_CHAR_HEIGHT_LARGE 18 #define FONT_MENU_EDIT u8g_font_9x18
#define DOG_CHAR_WIDTH_EDIT 9
#define DOG_CHAR_HEIGHT_EDIT 18
#define LCD_WIDTH_EDIT 14
#else
#define FONT_MENU_EDIT u8g_font_6x10_marlin
#define DOG_CHAR_WIDTH_EDIT 6
#define DOG_CHAR_HEIGHT_EDIT 12
#define LCD_WIDTH_EDIT 22
#endif
#define START_ROW 0 #define START_ROW 0
...@@ -70,8 +83,6 @@ ...@@ -70,8 +83,6 @@
#define LCD_STR_BEDTEMP "\xFE" #define LCD_STR_BEDTEMP "\xFE"
#define LCD_STR_THERMOMETER "\xFF" #define LCD_STR_THERMOMETER "\xFF"
#define FONT_STATUSMENU u8g_font_6x9
int lcd_contrast; int lcd_contrast;
// LCD selection // LCD selection
...@@ -107,26 +118,27 @@ static void lcd_implementation_init() ...@@ -107,26 +118,27 @@ static void lcd_implementation_init()
u8g.setRot270(); // Rotate screen by 270° u8g.setRot270(); // Rotate screen by 270°
#endif #endif
// FIXME: whats the purpose of the box? Maybe clear screen?
u8g.firstPage();
do {
u8g.setFont(u8g_font_6x10_marlin);
u8g.setColorIndex(1);
u8g.drawBox (0, 0, u8g.getWidth(), u8g.getHeight());
u8g.setColorIndex(1);
} while(u8g.nextPage());
// Show splashscreen // Show splashscreen
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2; int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
int offy = (u8g.getHeight() - 18 - START_BMPHEIGHT) / 2; #ifdef START_BMPHIGH
int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*5) / 2; // 5 is fontwidth in pixel int offy = 0;
int txtY = u8g.getHeight() - 10; #else
int offy = DOG_CHAR_HEIGHT;
#endif
int txt1X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE1) - 1)*DOG_CHAR_WIDTH) / 2;
u8g.firstPage(); u8g.firstPage();
do { do {
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
u8g.setFont(FONT_MENU);
u8g.setFont(u8g_font_5x8); #ifndef STRING_SPLASH_LINE2
u8g.drawStr(txtX, txtY, STRING_SPLASH); u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
#else
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
#endif
} while(u8g.nextPage()); } while(u8g.nextPage());
} }
...@@ -244,7 +256,7 @@ static void lcd_implementation_status_screen() { ...@@ -244,7 +256,7 @@ static void lcd_implementation_status_screen() {
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
// Feedrate // Feedrate
u8g.setFont(u8g_font_6x10_marlin); u8g.setFont(FONT_MENU);
u8g.setPrintPos(3,49); u8g.setPrintPos(3,49);
u8g.print(LCD_STR_FEEDRATE[0]); u8g.print(LCD_STR_FEEDRATE[0]);
u8g.setFont(FONT_STATUSMENU); u8g.setFont(FONT_STATUSMENU);
...@@ -265,18 +277,14 @@ static void lcd_implementation_status_screen() { ...@@ -265,18 +277,14 @@ static void lcd_implementation_status_screen() {
lcd_printPGM(PSTR("dia:")); lcd_printPGM(PSTR("dia:"));
u8g.print(ftostr12ns(filament_width_meas)); u8g.print(ftostr12ns(filament_width_meas));
lcd_printPGM(PSTR(" factor:")); lcd_printPGM(PSTR(" factor:"));
u8g.print(itostr3(extruder_multiplier[active_extruder])); u8g.print(itostr3(extrudemultiply));
u8g.print('%'); u8g.print('%');
} }
#endif #endif
} }
static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char) { static void lcd_implementation_mark_as_selected(uint8_t row, char pr_char) {
char c; if ((pr_char == '>') || (pr_char == LCD_STR_UPLEVEL[0] )) {
uint8_t n = LCD_WIDTH - 1 - 2;
if ((pre_char == '>') || (pre_char == LCD_STR_UPLEVEL[0] )) {
u8g.setColorIndex(1); // black on white u8g.setColorIndex(1); // black on white
u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT); u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
u8g.setColorIndex(0); // following text must be white on black u8g.setColorIndex(0); // following text must be white on black
...@@ -284,9 +292,14 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c ...@@ -284,9 +292,14 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
else { else {
u8g.setColorIndex(1); // unmarked text is black on white u8g.setColorIndex(1); // unmarked text is black on white
} }
u8g.setPrintPos(START_ROW * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
}
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT); static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char) {
u8g.print(pre_char == '>' ? ' ' : pre_char); // Row selector is obsolete char c;
uint8_t n = LCD_WIDTH - 2;
lcd_implementation_mark_as_selected(row, pre_char);
while((c = pgm_read_byte(pstr))) { while((c = pgm_read_byte(pstr))) {
u8g.print(c); u8g.print(c);
...@@ -294,29 +307,23 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c ...@@ -294,29 +307,23 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
n--; n--;
} }
while(n--) u8g.print(' '); while(n--) u8g.print(' ');
u8g.print(post_char); u8g.print(post_char);
u8g.print(' '); u8g.print(' ');
u8g.setColorIndex(1); // restore settings to black on white
} }
static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) { static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, const char* data, bool pgm) {
char c; char c;
uint8_t n = LCD_WIDTH - 1 - 2 - (pgm ? strlen_P(data) : strlen(data)); uint8_t n = LCD_WIDTH - 2 - (pgm ? strlen_P(data) : (strlen(data)));
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT); lcd_implementation_mark_as_selected(row, pre_char);
u8g.print(pre_char);
while( (c = pgm_read_byte(pstr)) != '\0' ) { while( (c = pgm_read_byte(pstr))) {
u8g.print(c); u8g.print(c);
pstr++; pstr++;
n--; n--;
} }
u8g.print(':'); u8g.print(':');
while(n--) u8g.print(' '); while(n--) u8g.print(' ');
if (pgm) { lcd_printPGM(data); } else { u8g.print(data); } if (pgm) { lcd_printPGM(data); } else { u8g.print(data); }
} }
...@@ -363,11 +370,31 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p ...@@ -363,11 +370,31 @@ static void _drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char p
#define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF)) #define lcd_implementation_drawmenu_setting_edit_callback_bool(row, pstr, pstr2, data, callback) lcd_implementation_drawmenu_setting_edit_generic_P(row, pstr, ' ', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
void lcd_implementation_drawedit(const char* pstr, char* value) { void lcd_implementation_drawedit(const char* pstr, char* value) {
u8g.setPrintPos(0 * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW ); uint8_t rows = 1;
u8g.setFont(u8g_font_9x18); uint8_t lcd_width = LCD_WIDTH;
uint8_t char_width = DOG_CHAR_WIDTH;
#ifdef USE_BIG_EDIT_FONT
if (strlen_P(pstr) <= LCD_WIDTH_EDIT - 1) {
u8g.setFont(FONT_MENU_EDIT);
lcd_width = LCD_WIDTH_EDIT + 1;
char_width = DOG_CHAR_WIDTH_EDIT;
if (strlen_P(pstr) >= LCD_WIDTH_EDIT - strlen(value)) rows = 2;
}
else {
u8g.setFont(FONT_MENU);
}
#endif
if (strlen_P(pstr) > LCD_WIDTH - 2 - strlen(value)) rows = 2;
const float kHalfChar = DOG_CHAR_HEIGHT_EDIT / 2;
float rowHeight = u8g.getHeight() / (rows + 1); // 1/(rows+1) = 1/2 or 1/3
u8g.setPrintPos(0, rowHeight + kHalfChar);
lcd_printPGM(pstr); lcd_printPGM(pstr);
u8g.print(':'); u8g.print(':');
u8g.setPrintPos((14 - strlen(value)) * DOG_CHAR_WIDTH_LARGE, (u8g.getHeight() - 1 - DOG_CHAR_HEIGHT_LARGE) - (1 * DOG_CHAR_HEIGHT_LARGE) - START_ROW ); u8g.setPrintPos((lcd_width-1-strlen(value)) * char_width, rows * rowHeight + kHalfChar);
u8g.print(value); u8g.print(value);
} }
...@@ -380,25 +407,15 @@ static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, ch ...@@ -380,25 +407,15 @@ static void _drawmenu_sd(uint8_t row, const char* pstr, const char* filename, ch
longFilename[n] = '\0'; longFilename[n] = '\0';
} }
if (isSelected) { lcd_implementation_mark_as_selected(row, ((isSelected) ? '>' : ' '));
u8g.setColorIndex(1); // black on white
u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
u8g.setColorIndex(0); // following text must be white on black
}
u8g.setPrintPos(0 * DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
u8g.print(' '); // Indent by 1 char
if (isDir) u8g.print(LCD_STR_FOLDER[0]); if (isDir) u8g.print(LCD_STR_FOLDER[0]);
while((c = *filename) != '\0') { while((c = *filename) != '\0') {
u8g.print(c); u8g.print(c);
filename++; filename++;
n--; n--;
} }
while(n--) u8g.print(' '); while(n--) u8g.print(' ');
if (isSelected) u8g.setColorIndex(1); // black on white
} }
#define lcd_implementation_drawmenu_sdfile_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, true) #define lcd_implementation_drawmenu_sdfile_selected(row, pstr, filename, longFilename) _drawmenu_sd(row, pstr, filename, longFilename, false, true)
......
...@@ -27,34 +27,29 @@ ...@@ -27,34 +27,29 @@
#endif #endif
#define PROTOCOL_VERSION "1.0" #define PROTOCOL_VERSION "1.0"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2) #if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
#define MACHINE_NAME "Ultimaker" #define MACHINE_NAME "Ultimaker"
#define FIRMWARE_URL "http://firmware.ultimaker.com" #define FIRMWARE_URL "http://firmware.ultimaker.com"
#elif MB(RUMBA) #elif MB(RUMBA)
#define MACHINE_NAME "Rumba" #define MACHINE_NAME "Rumba"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#elif MB(3DRAG) #elif MB(3DRAG)
#define MACHINE_NAME "3Drag" #define MACHINE_NAME "3Drag"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/" #define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#elif MB(K8200) #elif MB(K8200)
#define MACHINE_NAME "K8200" #define MACHINE_NAME "K8200"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#elif MB(5DPRINT) #elif MB(5DPRINT)
#define MACHINE_NAME "Makibox" #define MACHINE_NAME "Makibox"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#elif MB(SAV_MKI) #elif MB(SAV_MKI)
#define MACHINE_NAME "SAV MkI" #define MACHINE_NAME "SAV MkI"
#define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" #define FIRMWARE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
#else #else // Default firmware set to Mendel
#ifdef CUSTOM_MENDEL_NAME #define MACHINE_NAME "Mendel"
#define MACHINE_NAME CUSTOM_MENDEL_NAME #endif
#else
#define MACHINE_NAME "Prusa"
#endif
// Default firmware set to Prusa/Mendel #ifdef CUSTOM_MENDEL_NAME
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra" #define MACHINE_NAME CUSTOM_MENDEL_NAME
#endif #endif
......
...@@ -1531,7 +1531,7 @@ void lcd_update() ...@@ -1531,7 +1531,7 @@ void lcd_update()
u8g.firstPage(); u8g.firstPage();
do do
{ {
u8g.setFont(u8g_font_6x10_marlin); u8g.setFont(FONT_MENU);
u8g.setPrintPos(125,0); u8g.setPrintPos(125,0);
if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot if (blink % 2) u8g.setColorIndex(1); else u8g.setColorIndex(0); // Set color for the alive dot
u8g.drawPixel(127,63); // draw alive dot u8g.drawPixel(127,63); // draw alive dot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment