From e3d154313c43bcd598e8e511b5c5042da8672937 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 8 Aug 2012 17:55:40 +0100 Subject: [PATCH] refresh --- meta | 7 +- patches/eeprom-provide-smaller-code-fo | 111 +++++++--------------- patches/refresh-temp | 124 ------------------------- 3 files changed, 36 insertions(+), 206 deletions(-) delete mode 100644 patches/refresh-temp diff --git a/meta b/meta index 829007c..12f15e1 100644 --- a/meta +++ b/meta @@ -1,11 +1,10 @@ Version: 1 -Previous: 2733b22453dd015b0590f7064e88ea690e46f9b9 -Head: 059d0c28276542276cd5725c1a70d362487fbb5a +Previous: 94c30b7b889682fa50c9c42a720b4a75d025d014 +Head: 3f690257c022b5c6945f7d2f070c89ee1c8275c8 Applied: makefile-support-v-1: 59de9f09a248a5af04203378018ff95f86ff092d m206-always-use-homing-homeing: 704568f265fbb370658a153f8240239dd776f5cc - eeprom-provide-smaller-code-fo: 544900812e955cd117d08b5871408ad6ed14f7fd - refresh-temp: 059d0c28276542276cd5725c1a70d362487fbb5a + eeprom-provide-smaller-code-fo: 3f690257c022b5c6945f7d2f070c89ee1c8275c8 Unapplied: m206-save-values-in-eeprom: a7ff3675bdb6149f684e0e3a15c1a594ea2db815 Hidden: diff --git a/patches/eeprom-provide-smaller-code-fo b/patches/eeprom-provide-smaller-code-fo index 083f7d8..5e4a8a6 100644 --- a/patches/eeprom-provide-smaller-code-fo +++ b/patches/eeprom-provide-smaller-code-fo @@ -1,5 +1,5 @@ Bottom: 1b669c311107d1dd3a4b83e5e099e5155e4f27a4 -Top: 5fa92f577560a8def7ed5e4eb27c03563022c045 +Top: f71276ce0bb76f5c8c5c3c6cdb0be4e72eb00f48 Author: Ian Jackson Date: 2012-08-04 16:13:25 +0100 @@ -23,83 +23,38 @@ Signed-off-by: Ian Jackson --- -diff --git a/Marlin/EEPROMwrite.h b/Marlin/EEPROMwrite.h -index 96e2ec9..96791c7 100644 ---- a/Marlin/EEPROMwrite.h -+++ b/Marlin/EEPROMwrite.h -@@ -75,25 +75,34 @@ inline void EEPROM_StoreSettings() - } +diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h +index c8115af..a78d2ee 100644 +--- a/Marlin/Marlin.h ++++ b/Marlin/Marlin.h +@@ -84,7 +84,11 @@ const char echomagic[] PROGMEM ="echo:"; + #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) + #define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x) - -+static void serial_echopair_double(const PROGMEM char *s, double v) { -+ serialprintPGM(s); -+ SERIAL_ECHO(v); -+} +-#define SERIAL_ECHOPAIR(name,value) {SERIAL_ECHOPGM(name);SERIAL_ECHO(value);} ++#define SERIAL_ECHOPAIR(name,value) (serial_echopair(PSTR(name),(value))) + -+#define SERIAL_ECHOPAIR_DOUBLE(s,v) \ -+ ((void)(&(v) == &acceleration), /* type check */ \ -+ serial_echopair_double(PSTR(s),(v))) ++void serial_echopair(const PROGMEM char *s, float v); ++void serial_echopair(const PROGMEM char *s, double v); ++void serial_echopair(const PROGMEM char *s, unsigned long v); + + + //things to write to serial from Programmemory. saves 400 to 2k of RAM. +diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde +index 9f8e98c..d0c8d79 100644 +--- a/Marlin/Marlin.pde ++++ b/Marlin/Marlin.pde +@@ -200,6 +200,13 @@ bool Stopped=false; + + void get_arc_coordinates(); + ++void serial_echopair(const PROGMEM char *s, float v) ++ { serialprintPGM(s); SERIAL_ECHO(v); } ++void serial_echopair(const PROGMEM char *s, double v) ++ { serialprintPGM(s); SERIAL_ECHO(v); } ++void serial_echopair(const PROGMEM char *s, unsigned long v) ++ { serialprintPGM(s); SERIAL_ECHO(v); } + - inline void EEPROM_printSettings() - { // if def=true, the default values will be used - #ifdef EEPROM_SETTINGS - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Steps per unit:"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[0]); -- SERIAL_ECHOPAIR(" Y",axis_steps_per_unit[1]); -- SERIAL_ECHOPAIR(" Z",axis_steps_per_unit[2]); -- SERIAL_ECHOPAIR(" E",axis_steps_per_unit[3]); -+ SERIAL_ECHOPAIR_DOUBLE(" M92 X",axis_steps_per_unit[0]); -+ SERIAL_ECHOPAIR_DOUBLE(" Y",axis_steps_per_unit[1]); -+ SERIAL_ECHOPAIR_DOUBLE(" Z",axis_steps_per_unit[2]); -+ SERIAL_ECHOPAIR_DOUBLE(" E",axis_steps_per_unit[3]); - SERIAL_ECHOLN(""); - - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR(" M203 X",max_feedrate[0]); -- SERIAL_ECHOPAIR(" Y",max_feedrate[1] ); -- SERIAL_ECHOPAIR(" Z", max_feedrate[2] ); -- SERIAL_ECHOPAIR(" E", max_feedrate[3]); -+ SERIAL_ECHOPAIR_DOUBLE(" M203 X",max_feedrate[0]); -+ SERIAL_ECHOPAIR_DOUBLE(" Y",max_feedrate[1] ); -+ SERIAL_ECHOPAIR_DOUBLE(" Z", max_feedrate[2] ); -+ SERIAL_ECHOPAIR_DOUBLE(" E", max_feedrate[3]); - SERIAL_ECHOLN(""); - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):"); -@@ -106,24 +115,24 @@ inline void EEPROM_printSettings() - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR(" M204 S",acceleration ); -- SERIAL_ECHOPAIR(" T" ,retract_acceleration); -+ SERIAL_ECHOPAIR_DOUBLE(" M204 S",acceleration ); -+ SERIAL_ECHOPAIR_DOUBLE(" T" ,retract_acceleration); - SERIAL_ECHOLN(""); - 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)"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR(" M205 S",minimumfeedrate ); -- SERIAL_ECHOPAIR(" T" ,mintravelfeedrate ); -+ SERIAL_ECHOPAIR_DOUBLE(" M205 S",minimumfeedrate ); -+ SERIAL_ECHOPAIR_DOUBLE(" T" ,mintravelfeedrate ); - SERIAL_ECHOPAIR(" B" ,minsegmenttime ); -- SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); -- SERIAL_ECHOPAIR(" Z" ,max_z_jerk); -- SERIAL_ECHOPAIR(" E" ,max_e_jerk); -+ SERIAL_ECHOPAIR_DOUBLE(" X" ,max_xy_jerk ); -+ SERIAL_ECHOPAIR_DOUBLE(" Z" ,max_z_jerk); -+ SERIAL_ECHOPAIR_DOUBLE(" E" ,max_e_jerk); - SERIAL_ECHOLN(""); - #ifdef PIDTEMP - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("PID settings:"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR(" M301 P",Kp); -+ SERIAL_ECHOPAIR_DOUBLE(" M301 P",Kp); - SERIAL_ECHOPAIR(" I" ,Ki/PID_dT); - SERIAL_ECHOPAIR(" D" ,Kd*PID_dT); - SERIAL_ECHOLN(""); + extern "C"{ + extern unsigned int __bss_end; + extern unsigned int __heap_start; diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index f7d99a9..0000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,124 +0,0 @@ -Bottom: 5fa92f577560a8def7ed5e4eb27c03563022c045 -Top: f71276ce0bb76f5c8c5c3c6cdb0be4e72eb00f48 -Author: Ian Jackson -Date: 2012-08-08 17:55:40 +0100 - -Refresh of eeprom-provide-smaller-code-fo - ---- - -diff --git a/Marlin/EEPROMwrite.h b/Marlin/EEPROMwrite.h -index 96791c7..96e2ec9 100644 ---- a/Marlin/EEPROMwrite.h -+++ b/Marlin/EEPROMwrite.h -@@ -75,34 +75,25 @@ inline void EEPROM_StoreSettings() - } - - --static void serial_echopair_double(const PROGMEM char *s, double v) { -- serialprintPGM(s); -- SERIAL_ECHO(v); --} -- --#define SERIAL_ECHOPAIR_DOUBLE(s,v) \ -- ((void)(&(v) == &acceleration), /* type check */ \ -- serial_echopair_double(PSTR(s),(v))) -- - inline void EEPROM_printSettings() - { // if def=true, the default values will be used - #ifdef EEPROM_SETTINGS - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Steps per unit:"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR_DOUBLE(" M92 X",axis_steps_per_unit[0]); -- SERIAL_ECHOPAIR_DOUBLE(" Y",axis_steps_per_unit[1]); -- SERIAL_ECHOPAIR_DOUBLE(" Z",axis_steps_per_unit[2]); -- SERIAL_ECHOPAIR_DOUBLE(" E",axis_steps_per_unit[3]); -+ SERIAL_ECHOPAIR(" M92 X",axis_steps_per_unit[0]); -+ SERIAL_ECHOPAIR(" Y",axis_steps_per_unit[1]); -+ SERIAL_ECHOPAIR(" Z",axis_steps_per_unit[2]); -+ SERIAL_ECHOPAIR(" E",axis_steps_per_unit[3]); - SERIAL_ECHOLN(""); - - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR_DOUBLE(" M203 X",max_feedrate[0]); -- SERIAL_ECHOPAIR_DOUBLE(" Y",max_feedrate[1] ); -- SERIAL_ECHOPAIR_DOUBLE(" Z", max_feedrate[2] ); -- SERIAL_ECHOPAIR_DOUBLE(" E", max_feedrate[3]); -+ SERIAL_ECHOPAIR(" M203 X",max_feedrate[0]); -+ SERIAL_ECHOPAIR(" Y",max_feedrate[1] ); -+ SERIAL_ECHOPAIR(" Z", max_feedrate[2] ); -+ SERIAL_ECHOPAIR(" E", max_feedrate[3]); - SERIAL_ECHOLN(""); - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):"); -@@ -115,24 +106,24 @@ inline void EEPROM_printSettings() - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("Acceleration: S=acceleration, T=retract acceleration"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR_DOUBLE(" M204 S",acceleration ); -- SERIAL_ECHOPAIR_DOUBLE(" T" ,retract_acceleration); -+ SERIAL_ECHOPAIR(" M204 S",acceleration ); -+ SERIAL_ECHOPAIR(" T" ,retract_acceleration); - SERIAL_ECHOLN(""); - 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)"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR_DOUBLE(" M205 S",minimumfeedrate ); -- SERIAL_ECHOPAIR_DOUBLE(" T" ,mintravelfeedrate ); -+ SERIAL_ECHOPAIR(" M205 S",minimumfeedrate ); -+ SERIAL_ECHOPAIR(" T" ,mintravelfeedrate ); - SERIAL_ECHOPAIR(" B" ,minsegmenttime ); -- SERIAL_ECHOPAIR_DOUBLE(" X" ,max_xy_jerk ); -- SERIAL_ECHOPAIR_DOUBLE(" Z" ,max_z_jerk); -- SERIAL_ECHOPAIR_DOUBLE(" E" ,max_e_jerk); -+ SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); -+ SERIAL_ECHOPAIR(" Z" ,max_z_jerk); -+ SERIAL_ECHOPAIR(" E" ,max_e_jerk); - SERIAL_ECHOLN(""); - #ifdef PIDTEMP - SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("PID settings:"); - SERIAL_ECHO_START; -- SERIAL_ECHOPAIR_DOUBLE(" M301 P",Kp); -+ SERIAL_ECHOPAIR(" M301 P",Kp); - SERIAL_ECHOPAIR(" I" ,Ki/PID_dT); - SERIAL_ECHOPAIR(" D" ,Kd*PID_dT); - SERIAL_ECHOLN(""); -diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h -index c8115af..a78d2ee 100644 ---- a/Marlin/Marlin.h -+++ b/Marlin/Marlin.h -@@ -84,7 +84,11 @@ const char echomagic[] PROGMEM ="echo:"; - #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) - #define SERIAL_ECHOLNPGM(x) SERIAL_PROTOCOLLNPGM(x) - --#define SERIAL_ECHOPAIR(name,value) {SERIAL_ECHOPGM(name);SERIAL_ECHO(value);} -+#define SERIAL_ECHOPAIR(name,value) (serial_echopair(PSTR(name),(value))) -+ -+void serial_echopair(const PROGMEM char *s, float v); -+void serial_echopair(const PROGMEM char *s, double v); -+void serial_echopair(const PROGMEM char *s, unsigned long v); - - - //things to write to serial from Programmemory. saves 400 to 2k of RAM. -diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde -index 9f8e98c..d0c8d79 100644 ---- a/Marlin/Marlin.pde -+++ b/Marlin/Marlin.pde -@@ -200,6 +200,13 @@ bool Stopped=false; - - void get_arc_coordinates(); - -+void serial_echopair(const PROGMEM char *s, float v) -+ { serialprintPGM(s); SERIAL_ECHO(v); } -+void serial_echopair(const PROGMEM char *s, double v) -+ { serialprintPGM(s); SERIAL_ECHO(v); } -+void serial_echopair(const PROGMEM char *s, unsigned long v) -+ { serialprintPGM(s); SERIAL_ECHO(v); } -+ - extern "C"{ - extern unsigned int __bss_end; - extern unsigned int __heap_start; -- 2.30.2