Configtool: get values back into config/*.metadata.

This has to work, else we can't provide default values for new
items.

Now loading a RAMPS board and just saving it results in an
identical file. Very well. Not so for other boards, because
disabled values still get lost.
This commit is contained in:
Markus Hitter 2015-07-14 13:15:13 +02:00
parent fb922735fd
commit 6b866e8c85
2 changed files with 67 additions and 59 deletions

View File

@ -43,45 +43,45 @@
* * * *
\***************************************************************************/ \***************************************************************************/
#define X_STEP_PIN #define X_STEP_PIN DIO54
#define X_DIR_PIN #define X_DIR_PIN DIO55
#define X_MIN_PIN #define X_MIN_PIN DIO3
#define X_MAX_PIN #define X_MAX_PIN DIO2
#define X_ENABLE_PIN #define X_ENABLE_PIN DIO38
#define X_INVERT_DIR #define X_INVERT_DIR
#define X_INVERT_MIN #define X_INVERT_MIN
#define X_INVERT_MAX #define X_INVERT_MAX
#define X_INVERT_ENABLE #define X_INVERT_ENABLE
#define Y_STEP_PIN #define Y_STEP_PIN DIO60
#define Y_DIR_PIN #define Y_DIR_PIN DIO61
#define Y_MIN_PIN #define Y_MIN_PIN DIO14
#define Y_MAX_PIN #define Y_MAX_PIN DIO15
#define Y_ENABLE_PIN #define Y_ENABLE_PIN DIO56
#define Y_INVERT_DIR #define Y_INVERT_DIR
#define Y_INVERT_MIN #define Y_INVERT_MIN
#define Y_INVERT_MAX #define Y_INVERT_MAX
#define Y_INVERT_ENABLE #define Y_INVERT_ENABLE
#define Z_STEP_PIN #define Z_STEP_PIN DIO46
#define Z_DIR_PIN #define Z_DIR_PIN DIO48
#define Z_MIN_PIN #define Z_MIN_PIN DIO18
#define Z_MAX_PIN #define Z_MAX_PIN DIO19
#define Z_ENABLE_PIN #define Z_ENABLE_PIN DIO62
#define Z_INVERT_DIR #define Z_INVERT_DIR
#define Z_INVERT_MIN #define Z_INVERT_MIN
#define Z_INVERT_MAX #define Z_INVERT_MAX
#define Z_INVERT_ENABLE #define Z_INVERT_ENABLE
#define E_STEP_PIN #define E_STEP_PIN DIO26
#define E_DIR_PIN #define E_DIR_PIN DIO28
#define E_ENABLE_PIN #define E_ENABLE_PIN DIO24
#define E_INVERT_DIR #define E_INVERT_DIR
#define E_INVERT_ENABLE #define E_INVERT_ENABLE
#define PS_ON_PIN #define PS_ON_PIN xxxx
#define PS_MOSFET_PIN #define PS_MOSFET_PIN xxxx
#define STEPPER_ENABLE_PIN #define STEPPER_ENABLE_PIN xxxx
#define STEPPER_INVERT_ENABLE #define STEPPER_INVERT_ENABLE
/** \def DEBUG_LED_PIN /** \def DEBUG_LED_PIN
@ -94,7 +94,7 @@
a LED in hardware), see a LED in hardware), see
http://reprap.org/wiki/Teacup_Firmware#Doing_precision_profiling http://reprap.org/wiki/Teacup_Firmware#Doing_precision_profiling
*/ */
#define DEBUG_LED_PIN #define DEBUG_LED_PIN DIO13
/***************************************************************************\ /***************************************************************************\
@ -103,6 +103,10 @@
* * * *
\***************************************************************************/ \***************************************************************************/
#ifndef DEFINE_TEMP_SENSOR
#define DEFINE_TEMP_SENSOR(...)
#endif
/** \def TEMP_MAX6675 TEMP_THERMISTOR TEMP_AD595 TEMP_PT100 TEMP_INTERCOM /** \def TEMP_MAX6675 TEMP_THERMISTOR TEMP_AD595 TEMP_PT100 TEMP_INTERCOM
Which temperature sensor types are you using? Leave all used ones Which temperature sensor types are you using? Leave all used ones
uncommented, comment out all others to save binary size and enhance uncommented, comment out all others to save binary size and enhance
@ -152,6 +156,10 @@
* * * *
\***************************************************************************/ \***************************************************************************/
#ifndef DEFINE_HEATER
#define DEFINE_HEATER(...)
#endif
/** \def HEATER_PIN /** \def HEATER_PIN
Heater pins a user should be able to choose from in configtool. All Heater pins a user should be able to choose from in configtool. All
commented out. commented out.
@ -205,7 +213,7 @@
115200, other common values are 19200, 38400 or 57600. Ignored when USB_SERIAL 115200, other common values are 19200, 38400 or 57600. Ignored when USB_SERIAL
is defined. is defined.
*/ */
#define BAUD #define BAUD 115200
/** \def XONXOFF /** \def XONXOFF
Xon/Xoff flow control. Xon/Xoff flow control.

View File

@ -20,7 +20,7 @@
are long and crossing toothed belts and a print head are long and crossing toothed belts and a print head
moving on the X-Y-plane. moving on the X-Y-plane.
*/ */
#define KINEMATICS #define KINEMATICS KINEMATICS_STRAIGHT
/** \def STEPS_PER_M_X STEPS_PER_M_Y STEPS_PER_M_Z STEPS_PER_M_E /** \def STEPS_PER_M_X STEPS_PER_M_Y STEPS_PER_M_Z STEPS_PER_M_E
Steps per meter ( = steps per mm * 1000 ), calculate these values Steps per meter ( = steps per mm * 1000 ), calculate these values
@ -30,26 +30,26 @@
Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm) Valid range: 20 to 4'0960'000 (0.02 to 40960 steps/mm)
*/ */
#define STEPS_PER_M_X #define STEPS_PER_M_X 1280000
#define STEPS_PER_M_Y #define STEPS_PER_M_Y 1280000
#define STEPS_PER_M_Z #define STEPS_PER_M_Z 1280000
#define STEPS_PER_M_E #define STEPS_PER_M_E 96271
/** \def MAXIMUM_FEEDRATE_X MAXIMUM_FEEDRATE_Y MAXIMUM_FEEDRATE_Z MAXIMUM_FEEDRATE_E /** \def MAXIMUM_FEEDRATE_X MAXIMUM_FEEDRATE_Y MAXIMUM_FEEDRATE_Z MAXIMUM_FEEDRATE_E
Used for G0 rapid moves and as a cap for all other feedrates. Used for G0 rapid moves and as a cap for all other feedrates.
*/ */
#define MAXIMUM_FEEDRATE_X #define MAXIMUM_FEEDRATE_X 600
#define MAXIMUM_FEEDRATE_Y #define MAXIMUM_FEEDRATE_Y 600
#define MAXIMUM_FEEDRATE_Z #define MAXIMUM_FEEDRATE_Z 600
#define MAXIMUM_FEEDRATE_E #define MAXIMUM_FEEDRATE_E 2000
/** \def SEARCH_FEEDRATE_X SEARCH_FEEDRATE_Y SEARCH_FEEDRATE_Z /** \def SEARCH_FEEDRATE_X SEARCH_FEEDRATE_Y SEARCH_FEEDRATE_Z
Used when doing precision endstop search and as default feedrate. No Used when doing precision endstop search and as default feedrate. No
SEARCH_FEEDRATE_E, as E can't be searched. SEARCH_FEEDRATE_E, as E can't be searched.
*/ */
#define SEARCH_FEEDRATE_X #define SEARCH_FEEDRATE_X 50
#define SEARCH_FEEDRATE_Y #define SEARCH_FEEDRATE_Y 50
#define SEARCH_FEEDRATE_Z #define SEARCH_FEEDRATE_Z 50
/** \def ENDSTOP_CLEARANCE_X ENDSTOP_CLEARANCE_Y ENDSTOP_CLEARANCE_Z /** \def ENDSTOP_CLEARANCE_X ENDSTOP_CLEARANCE_Y ENDSTOP_CLEARANCE_Z
@ -71,9 +71,9 @@
Sane values: 0 to 20000 (0 to 20 mm) Sane values: 0 to 20000 (0 to 20 mm)
Valid range: 0 to 1000000 Valid range: 0 to 1000000
*/ */
#define ENDSTOP_CLEARANCE_X #define ENDSTOP_CLEARANCE_X 1000
#define ENDSTOP_CLEARANCE_Y #define ENDSTOP_CLEARANCE_Y 1000
#define ENDSTOP_CLEARANCE_Z #define ENDSTOP_CLEARANCE_Z 100
/** \def X_MIN X_MAX Y_MIN Y_MAX Z_MIN Z_MAX /** \def X_MIN X_MAX Y_MIN Y_MAX Z_MIN Z_MAX
Soft axis limits. Define them to your machine's size relative to what your Soft axis limits. Define them to your machine's size relative to what your
@ -90,14 +90,14 @@
Sane values: according to printer build room size Sane values: according to printer build room size
Valid range: -1000.0 to 1000.0 Valid range: -1000.0 to 1000.0
*/ */
#define X_MIN #define X_MIN 0.0
#define X_MAX #define X_MAX 200.0
#define Y_MIN #define Y_MIN 0.0
#define Y_MAX #define Y_MAX 200.0
#define Z_MIN #define Z_MIN 0.0
#define Z_MAX #define Z_MAX 140.0
/** \def E_ABSOLUTE /** \def E_ABSOLUTE
Some G-code creators produce relative length commands for the extruder, Some G-code creators produce relative length commands for the extruder,
@ -125,7 +125,7 @@
Units: mm/s^2 Units: mm/s^2
Useful range: 1 to 10'000 Useful range: 1 to 10'000
*/ */
#define ACCELERATION #define ACCELERATION 100
/** \def LOOKAHEAD /** \def LOOKAHEAD
Define this to enable look-ahead during *ramping* acceleration to smoothly Define this to enable look-ahead during *ramping* acceleration to smoothly
@ -156,10 +156,10 @@
Sane values: 0 to 400 Sane values: 0 to 400
Valid range: 0 to 65535 Valid range: 0 to 65535
*/ */
#define MAX_JERK_X #define MAX_JERK_X 20
#define MAX_JERK_Y #define MAX_JERK_Y 20
#define MAX_JERK_Z #define MAX_JERK_Z 0
#define MAX_JERK_E #define MAX_JERK_E 200
/***************************************************************************\ /***************************************************************************\
@ -183,7 +183,7 @@
Unit: degree Celsius Unit: degree Celsius
*/ */
#define TEMP_HYSTERESIS #define TEMP_HYSTERESIS 10
/** \def TEMP_RESIDENCY_TIME /** \def TEMP_RESIDENCY_TIME
Actual temperature must be close to target (within set temperature Actual temperature must be close to target (within set temperature
@ -192,7 +192,7 @@
Unit: seconds Unit: seconds
*/ */
#define TEMP_RESIDENCY_TIME #define TEMP_RESIDENCY_TIME 60
/** \def TEMP_EWMA /** \def TEMP_EWMA
Smooth noisy temperature sensors. Good hardware shouldn't be noisy. Set to Smooth noisy temperature sensors. Good hardware shouldn't be noisy. Set to
@ -205,7 +205,7 @@
Valid range: 0.001 to 1.0 Valid range: 0.001 to 1.0
*/ */
#define TEMP_EWMA #define TEMP_EWMA 1.0
/** \def REPORT_TARGET_TEMPS /** \def REPORT_TARGET_TEMPS
With this enabled, M105 commands will return the current temperatures along With this enabled, M105 commands will return the current temperatures along
@ -240,12 +240,12 @@
/** \def BANG_BANG_ON /** \def BANG_BANG_ON
PWM value for Bang Bang 'on'. PWM value for Bang Bang 'on'.
*/ */
#define BANG_BANG_ON #define BANG_BANG_ON 200
/** \def BANG_BANG_OFF /** \def BANG_BANG_OFF
PWM value for Bang Bang 'off'. PWM value for Bang Bang 'off'.
*/ */
#define BANG_BANG_OFF #define BANG_BANG_OFF 45
/** \def MOVEBUFFER_SIZE /** \def MOVEBUFFER_SIZE
Move buffer size, in number of moves. Move buffer size, in number of moves.
@ -256,15 +256,15 @@
math (hence time) to set up so a longer buffer allows more of the math to math (hence time) to set up so a longer buffer allows more of the math to
be done during preceding longer moves. be done during preceding longer moves.
*/ */
#define MOVEBUFFER_SIZE #define MOVEBUFFER_SIZE 8
/** \def DC_EXTRUDER DC_EXTRUDER_PWM /** \def DC_EXTRUDER DC_EXTRUDER_PWM
If you have a DC motor extruder, configure it as a "heater" above and define If you have a DC motor extruder, configure it as a "heater" above and define
this value as the index or name. You probably also want to comment out this value as the index or name. You probably also want to comment out
E_STEP_PIN and E_DIR_PIN in the Pinouts section above. E_STEP_PIN and E_DIR_PIN in the Pinouts section above.
*/ */
#define DC_EXTRUDER #define DC_EXTRUDER HEATER_motor
#define DC_EXTRUDER_PWM #define DC_EXTRUDER_PWM 180
/** \def USE_WATCHDOG /** \def USE_WATCHDOG
Teacup implements a watchdog, which has to be reset every 250ms or it will Teacup implements a watchdog, which has to be reset every 250ms or it will
@ -280,7 +280,7 @@
order to calculate derivative in PID loop higher values make PID derivative order to calculate derivative in PID loop higher values make PID derivative
term more stable at the expense of reaction time. term more stable at the expense of reaction time.
*/ */
#define TH_COUNT #define TH_COUNT 8
/** \def FAST_PWM /** \def FAST_PWM
Teacup offers two PWM frequencies, 76(61) Hz and 78000(62500) Hz on a Teacup offers two PWM frequencies, 76(61) Hz and 78000(62500) Hz on a
@ -298,7 +298,7 @@
/** \def PID_SCALE /** \def PID_SCALE
This is the scaling of internally stored PID values. 1024L is a good value. This is the scaling of internally stored PID values. 1024L is a good value.
*/ */
#define PID_SCALE #define PID_SCALE 1024L
/** \def ENDSTOP_STEPS /** \def ENDSTOP_STEPS
Number of steps to run into the endstops intentionally. As endstops trigger Number of steps to run into the endstops intentionally. As endstops trigger